• 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!

Need Help with "Amulet of Loss"

Rainerr

Mapper n scri
Joined
Apr 2, 2009
Messages
237
Reaction score
1
Hello, i need help with amulet of loss

If player dies they lose their aol but if they die aigan without amulet of loss they wont lose backpack -.-

Any1 know where the problem is - Help me out ^^ - Rep ++ :)
 
Lua:
function onPrepareDeath(cid)
if getPlayerSlotItem(cid, 2).itemid == 2173 then
doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
doPlayerRemoveItem(cid, 2173, 1)
else
doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 100)
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)
end
return 1
end
 
Tnx for Help - Rep++ but you missed out that:
CreatureScripts.XML
<event type="preparedeath" name="Aol" event="script" value="aol.lua"/>


Creaturescripts/Scripts/Login.Lua

registerCreatureEvent(cid, "Aol")
 
Back
Top