• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Why this autoloot system doesnt work

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
989
Solutions
5
Reaction score
54
Hi
so i found autoloot system by printer but it doesnt work for tfs 1.2 but its for 1.x so it should work. Command works you can add items and etc but it doesnt collect those items from corpses. No errors in console no nothing, everything is clean
 
Solution
Maybe what it's trying to loot isn't considered a corpse.

Remove the portion from the if statement in onKill that contains
Lua:
corpse:getType():isCorpse()
Result should be:
Lua:
if corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == cid then
Have you added this in global.lua ?
Code:
-- AutoLoot config
    AUTO_LOOT_MAX_ITEMS = 5

    -- Reserved storage
    AUTOLOOT_STORAGE_START = 10000
    AUTOLOOT_STORAGE_END = AUTOLOOT_STORAGE_START + AUTO_LOOT_MAX_ITEMS
-- AutoLoot config end
 
Have you added this in global.lua ?
Code:
-- AutoLoot config
    AUTO_LOOT_MAX_ITEMS = 5

    -- Reserved storage
    AUTOLOOT_STORAGE_START = 10000
    AUTOLOOT_STORAGE_END = AUTOLOOT_STORAGE_START + AUTO_LOOT_MAX_ITEMS
-- AutoLoot config end
Ofc i did.
You must have missed something, i am using The same system and its working.
No i didnt missed anything i checked it multiple times.
 
Check if you registered correctly in login.lua, my server is tfs 1.2 and it's working good. Did you get any errors?
 
Maybe what it's trying to loot isn't considered a corpse.

Remove the portion from the if statement in onKill that contains
Lua:
corpse:getType():isCorpse()
Result should be:
Lua:
if corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == cid then
Yes you were right it works now
 
Back
Top