Bamabo submitted a new resource:
AntiLootDespawn - Change loot despawn time in cupboard radius
Read more about this resource...
AntiLootDespawn
Stop defenders from despawning their loot
Total Downloads: 1,070 - First Release: Aug 13, 2016 - Last Update: Mar 17, 2017
- 5/5, 4 likes
-
I get: Invalid Command: antilootdespawn.enabled.true
The multiplier commands seems to work fine..
also.. I just unloaded it and deleted the plugin.. now items I've dropped are NOT despawning, PERIOD. Oh SH*T man? lol I am doing some more testing and I ran server.itemdespawn 300 in console -
And yeah things that you have dropped previously will not be despawning because of how the plugin changes the despawn duration. It cancels the function that will despawn them, then restarts it. server.itemdespawn 300 means that the absolute shortest time it will take for an item to despawn is 5 minutes (300 seconds). That value will be multiplied by the rarity of the item. So things like AKs and Rocket Launchers will take 1200 seconds.
The item rarities are as follows:
None = 0
Common = 1
Uncommon = 2
Rare = 3
VeryRare = 4
Also worth noting the despawn duration when using this plugin is the following:
itemdespawn * item rarity * antilootdespawn.multiplier
While the normal duration is
itemdespawn * item rarityLast edited by a moderator: Aug 16, 2016 -
Ahh ok thanks for the prompt reply.. and pointing out my typo lol
I did just drop a Supply Signal and it's sticking around for a lot longer than 300 seconds though, but it did eventually despawn... does this plugin "stick around" somehow, even after I've unloaded it and deleted the .cs and .json file? Or is the default behavior of Rust to make certain items stick around longer, based on rarity? Sorry for so many questions, I'm just trying to learn! I ask because I swear some plugins "stick around" even after you unload and delete their files.. like HeliControl.. I've had non-stop weirdness with Heli's ever since I first ran that plugin!
Also, if it's helpful, I found stuff in my log.error file:
[08/15/2016 16:57:43] [Oxide] 16:57 [Error] Failed to call hook 'cmdMultiplier' on plugin 'AntiLootDespawn v1.0.0' (NullReferenceException: Object reference not set to an instance of an object)
[08/15/2016 16:58:04] [Oxide] 16:58 [Error] Failed to call hook 'cmdEnabled' on plugin 'AntiLootDespawn v1.0.0' (NullReferenceException: Object reference not set to an instance of an object) -
Bamabo updated AntiLootDespawn with a new update entry:
1.0.1
-
^^ you read my mind haha
-
So I'm going to do a tiny writeup about exactly what happens when an item is dropped.
Basically every single item in rust has a rarity attached to it, the less valuable they are the lower the rarity. So things like bandages, raw wood etc has a very low rarity. Common or Uncommon.
The default behavior when an item is dropped is that a function is called to despawn the item after a certain duration. This duration is bound to two things
- The server ConVar itemdespawn
- The rarity of the item
Then what my plugin does is that it multiplies itemdespawn * rarity with the multiplier. So if itemdespawn = 30 and the rarity = 4 and the multiplier = 2 then the full despawn time would be: itemdespawn(30) * rarity(4) = 120 * multiplier(2) = 240 seconds. If the item was dropped inside of a cupboard radius that is.
I hope that clears things up. And feel free to ask if you have any more questions.Last edited by a moderator: Aug 17, 2016 -
Yes that is very clear! I am giving it a go again, I'll post back here if I see anything weird.
-
-
Thank you ! This plugin is usefull for my server !
-
Code:
(10:36:54) | [RCON][149.202.87.97:52773] antilootdespawn.enabled true (10:36:54) | [Oxide] 10:36 [Error] Failed to call hook 'cmdEnabled' on plugin 'AntiLootDespawn v1.0.1' (NullReferenceException: Object reference not set to an instance of an object) (10:36:54) | [Oxide] 10:36 [Debug] at Oxide.Plugins.AntiLootDespawn.cmdEnabled (.Arg args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.AntiLootDespawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (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 name, System.Object[] args) [0x00000] in <filename unknown>:0
Last edited by a moderator: Aug 16, 2016 -
-
Bamabo updated AntiLootDespawn with a new update entry:
1.1.0
[DOUBLEPOST=1471416220][/DOUBLEPOST] -
Thank you -
-
-
@Bamabo Could you make it so that there are 2 different times depending on if it's inside a TC range or not?
-
I'm getting the following error on today's update.
Code:Failed to compile: AntiLootDespawn.cs(108,27): error CS0122: `ConsoleSystem.Arg.CheckPermissions()' is inaccessible due to its protection level
-
To fix it, go into the CS file, search for:
CheckPermission
There should be 3 section with this statement. You need to remove the the else section statement.. An example would be this:
ORIGINAL (bugged version):
{
if(args.Player() != null)
{
if (!args.Player().IsAdmin() && !permission.UserHasPermission(args.Player().UserIDString, "antilootdespawn.multiplier"))
return;
}else
{
if (!args.CheckPermissions())
return;
}
if (args.HasArgs())
FIXED:
{
if(args.Player() != null)
{
if (!args.Player().IsAdmin() && !permission.UserHasPermission(args.Player().UserIDString, "antilootdespawn.multiplier"))
return;
}
if (args.HasArgs())
Remove those THREE sets of "else" statements, and it will be fixed.Last edited by a moderator: Feb 10, 2017 -
Wulf Community Admin
Wulf updated AntiLootDespawn with a new update entry:
1.1.1