Paulix
Active Member
- Joined
- Sep 13, 2012
- Messages
- 129
- Solutions
- 7
- Reaction score
- 26
I'm trying to make an amulet, that will prevent the player death once. it should remove the item and set the player full hp. but for some reason, its not removing the amulet nor healing the player, but the effect is showing up. No error on console and I'm using tfs 0.4.3.
Lua:
function onPrepareDeath(cid, deathList)
necklace = getPlayerSlotItem(cid, CONST_SLOT_NECKLACE)
if necklace.itemid == 2354 then
doCreatureAddHealth(cid, 99999)
doSendMagicEffect(getThingPosition(cid), 49)
doPlayerRemoveItem(cid, necklace.uid, 1)
return false
end
end