Today i compiled my tfs 1.3 and I'ma quite some big time trying to implement this script into my tfs 1.3 the weird thing there's no errors or anything appear into the console also the player didn't lose that item.
PS: if there's something related with droploot.lua i removed that file because i didn't want the players lose their items so i decided to write it manually from this script if there's a link between them is there's some way to make it from this file? . can someone help? thanks in advance!
PS: if there's something related with droploot.lua i removed that file because i didn't want the players lose their items so i decided to write it manually from this script if there's a link between them is there's some way to make it from this file? . can someone help? thanks in advance!
Lua:
local amulets = {2173}
function onPrepareDeath(cid, deathList)
local player = Player(cid)
if not player then
return false
local amulet = player:getSlotItem(CONST_SLOT_NECKLACE)
if not amulet then
return true
end
if isInArray(amulets, amulet.itemid) then
item:remove(amulet.uid, 1)
end
end
return true
end
Lua:
player:registerEvent("remove_item")
XML:
<event type="preparedeath" name="remove_item" event="script" value="remove_item.lua"/>