This does not fix the problem

Recycle
Recycle crafted items to base resources
Total Downloads: 3,965 - First Release: Aug 11, 2015 - Last Update: Apr 1, 2018
- 5/5, 12 likes
-
I saw this in my console. I can't tell what was happening at the time.
Code:(22:02:54) | Failed to call hook 'OnItemAddedToContainer' on plugin 'Recycle v2.1.0' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.Recycle.SalvageItem (.BasePlayer player, .Item item) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Recycle.OnItemAddedToContainer (.ItemContainer container, .Item item) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Recycle.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
-
Code:
[Error] Failed to call hook 'OnItemAddedToContainer' on plugin 'Recycle v2.1.0' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.Recycle.SalvageItem (.BasePlayer player, .Item item) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Recycle.OnItemAddedToContainer (.ItemContainer container, .Item item) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Recycle.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
-
Same here:
Code:[Error] Failed to call hook 'OnItemAddedToContainer' on plugin 'Recycle v2.1.0' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.Recycle.SalvageItem (.BasePlayer player, .Item item) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Recycle.OnItemAddedToContainer (.ItemContainer container, .Item item) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Recycle.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
-
Well, it appears like the MoegicBox.cs finally does not work. I literally was able to make changes as Rust changed to keep it going till today. However this time I have no idea. It now gets an error starting with EXCEPTION: An element with the same key already exists in the dictionary. The things I did were basic. I get that the plugin is done, and I do use this recycle.cs, but I liked the ability to /mlink and /mulink a real box.
Could you add the old /mlink and /mulink functions to this version?
It's the only thing needed.
This gives the option for a player to put a small box under their level 3 workbench, or wherever, /mlink it once, and not have to type /rec while they're crafting, to go into their inventory screen. I use on a base building server where I often need to make a bunch of skinrandomizer.cs doors of a particular skin, and recycle all the undesired skins. Typing /rec in chat is cumbersome for that task.
Of course /rec is great for out and about.
You can rename /mlink and /mulink to /blink and /bulink.
It would be appreciated to add those two commands. -
If you adjust the ratio, it changes what you get for resources, but not for scrap.
Recycling 100 Tech Trash at a ratio of 0.5:
- 520 scrap, 25 hqm
- 520 scrap 52 hqm
-
Anyone able to help me understand why the recycle plugin will grant you 5 scrap and 2 hqm a road sign but if you do 100 road signs together it does 50 scrap and 20 hqm? I can't seem to get my refund ratio to even work in the config either, it does no change to it.
--> 1 Road Sign Screenshot
--> 100 Road Signs Screenshot -
on my server recycle only max 4 Items and lost norecycle items.
-
So is there any way to fix this?
Code:10:39 [Error] Failed to call hook 'OnServerInitialized' on plugin 'MoegicBox v1.0.4' (ArgumentException: An element with the same key already exists in the dictionary.) at System.Collections.Generic.Dictionary`2[System.String,ItemDefinition].Add (System.String key, .ItemDefinition value) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToDictionary[ItemDefinition,String,ItemDefinition] (IEnumerable`1 source, System.Func`2 keySelector, System.Func`2 elementSelector, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToDictionary[ItemDefinition,String,ItemDefinition] (IEnumerable`1 source, System.Func`2 keySelector, System.Func`2 elementSelector) [0x00000] in <filename unknown>:0 at Oxide.Plugins.MoegicBox.OnServerInitialized () [0x00000] in <filename unknown>:0 at Oxide.Plugins.MoegicBox.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
The value of being able to make a box recycle is OP!
Imagine you're a solo player and a big clan raids and harasses you.
You're smart, and have enough hard earned resources to wipe their whole compound.
The next day they come online, and all they see is a small box where their compound was.
I was known for this to the point where as soon as someone saw their base missing and a recycle box in it's place, you'd see in chat: SNIVEL!!!!!!!
I only did this to someone (everyone) that attacks me first, other than that I just gathered, built, and managed my quarrys.
But I love the recycle box option. Also /rec STILL wont open 1 out of 3 times, and when it wont open, it can take 10 or more tries. -
Wulf Community Admin
-
I know this is the replacement for Moegic, but I hope to see if someone could add the /mulink and /mrec function to this.
Or possibly give me a hint how to fix that error in moegic.
Up till May 3rd, I used both plugins together. -
-
this is what I see..... and I don't know this programming language. but the file seems full of errors and full of things that don't belong... and fully commented sections.... A bunch of "F"s where they don't belong. Some nasty math to calculate some sort of scrap devaluation of an item as a convenience fee. I dub thee mod broken/incomplete.
and lastly, this "CONTAINER" issue.
to be blunt:
if(mod.OhSweetMod.broken)fix
else(find.fixerCoderGuy)
below is what I think is wrong. don't quote me. I'm a noob.
void OnItemAddedToContainer (ItemContainer container, Item item)
if (container.playerOwner is BasePlayer)
if (onlinePlayers.ContainsKey (container.playerOwner))
BasePlayer owner = container.playerOwner;
if ( containerS <=========== REMOVE THIS S, .ContainsKey (container))
if (SalvageItem (owner, item))
item.Remove (0f);
item.RemoveFromContainer ();
else
ShowNotification (owner, GetMsg ("Recycle: Invalid", owner));
item.MoveToContainer (owner.inventory.containerMain);Last edited by a moderator: Jun 12, 2018 -
Wulf Community Admin
-
Hello not sure if anyone could help me here. People on my server said they placed a vending machine and if they did /rec and recycled something all the vending machines would all break. Checked logs and saw no errors. I tried it myself and it does break them using /rec . Any one have any ideas?
Last edited by a moderator: Jun 25, 2018 -
It might be another one of those "welcome to rust" things again.Last edited by a moderator: Jun 25, 2018 -
IS this anything to worry about ?
Code:(09:40:56) | Failed to call hook 'OnItemAddedToContainer' on plugin 'Recycle v2.1.0' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.Recycle.SalvageItem (BasePlayer player, Item item) [0x00095] in <cae7e4c9a39d4186975a22ea19df74fd>:0 at Oxide.Plugins.Recycle.OnItemAddedToContainer (ItemContainer container, Item item) [0x00039] in <cae7e4c9a39d4186975a22ea19df74fd>:0 at Oxide.Plugins.Recycle.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x003d0] in <cae7e4c9a39d4186975a22ea19df74fd>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <2dad53883fcd4b7faaf900f511ce972a>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <a178d34943f746dd9b92eeffb8beec48>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <a178d34943f746dd9b92eeffb8beec48>:0
Last edited by a moderator: Jul 6, 2018 -
-
As I am not recycling items that I have not recycled before this should not occur, I am recycling sheet metal, weapons i dont need, and other items I do not need, If an object is non recyclable it just stays in the recycle box and you have to remove it.
-
Pls help me... the plugin don't go on my server