1. what did you do to try to make it work?
2. do you get any errors in your oxide log? and if you do, please post them for the pros![]()
R-Remover-Tool
Building and entity removal tool
Total Downloads: 63,256 - First Release: Apr 3, 2015 - Last Update: Feb 7, 2018
- 5/5, 105 likes
-
What's the way to fix high quality and metal frags to return what was removed instead of a set amount?
-
[DOUBLEPOST=1485082189][/DOUBLEPOST] -
Help Me! Friends! How to fix the error?
Code:NullReferenceException: Object reference not set to an instance of an object at Oxide.Plugins.RemoverTool.GetRefund (.BaseEntity TargetEntity) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RemoverTool.GUIRefundUpdate (.BasePlayer player, Boolean useRefund, .BaseEntity TargetEntity) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RemoverTool+ToolRemover.RemoveUpdate () [0x00000] in <filename unknown>:0
Last edited by a moderator: Jan 23, 2017 -
-
Everything works properly! But sometimes such mistakes!
How to be what to do that I didn't? -
-
What I was trying to save above is: Percentages for HQM and Metal doesn't work. 50% actually gives back 50 HQM. This is being abused with the remove tool. Is there a way to fix this?
-
It is possible to make that remove worked the specified time after construction at home?
-
Code:
[01/27/2017 14:15:54] Failed to call hook 'OnEntityDeath' on plugin 'RemoverTool v4.0.10' (NullReferenceException: Object reference not set to an instance of an object)
-
I had an idea for players using the /remove tool that would be cool to see implemented. I wanted players to need a salvaged hammer in their inventory to use the remove tool. But using the entire hammer seems a little more steep in cost than I want it, is it possible to set the cost of using the tool as a % durability damage to the salvage hammer? This would also give flexibility over more expensive things to remove costing more durability %.
-
So I actually went ahead and injected some code into the mod to make it so you can have the price of removing something be durability of a salvaged hammer. Code wise, I don't like how I implemented it, but was the best way to change as little of the pre-existing code as possible. If the cost of removing an entity is a salvaged hammer, it checks what your current active item is, if it is a salvaged hammer and has enough durability, it will remove the entity and deduct the durability from the hammer.
If you would like to look at my code, just ctrl-f search the code for Justin. I added a small amount of code to 3 different spots. Here is also an example of what the price should look like in the .json configuration file.
"Metal Window Bars": {
"salvaged hammer": 50
},
"Mining Quarry": {
"salvaged hammer": 250
},
This will deduct 50 durability when removing metal window bars, and 250 when removing a quarry. As an fyi, the maximum durability of salvaged hammer is 500.
If the mod author incorporates this feature into the mod, I would recommend making the price value be a % of durability rather than specific amount, so people don't have to remember it is out of 500. Easy to do, just didn't do it. Also, code could be made cleaner and reason messages better by redesigning a few functions, just didn't want to take the time to do that.
Edit: I did this because it felt that it added an immersive component to the mod, while also giving purpose to a practically unused, pre-existing tool. It might be cool to make it so salvaged hammers will automatically trigger the mod for removing stuff without having to type /remove. I would love to see that added!Attached Files:
Last edited by a moderator: Jan 29, 2017 -
-
NullReferenceException: Object reference not set to an instance of an object
at Oxide.Plugins.RemoverTool.GetRefund (.BaseEntity TargetEntity) [0x00000] in <filename unknown>:0
at Oxide.Plugins.RemoverTool.GUIRefundUpdate (.BasePlayer player, Boolean useRefund, .BaseEntity TargetEntity) [0x00000] in <filename unknown>:0
at Oxide.Plugins.RemoverTool+ToolRemover.RemoveUpdate () [0x00000] in <filename unknown>:0
(Filename: Line: -1) -
-
Attached Files:
-
-
I look forward to adding a permission for example "removertool.refund" for the team "oxide.grant group NAMEGROUP removertool.refund"). Only to a certain group could return resources. Excuse my English, I explained as could ((
-
-
If admins are using this plugin should it still have a cost and return? None of my admins can use the tool without having cupboard use or the resources
-
-
Any chance for an update that supports the new items being refunded? Flame Turrets, etc.. It currently will remove but not put it back in your pack.. it just destroys it.