<event type="preparedeath" name="Aol" event="script" value="aol.lua"/>login.lua
registerCreatureEvent(cid, "Aol")
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
Creaturescripts.xml add
login.lua add
aol.lua
(You can always Rep++)
Give it a try![]()