GOD Esteve
New Member
- Joined
- May 18, 2011
- Messages
- 87
- Reaction score
- 1
Hello guys,
How the title says i whant to make one item that when the players is equipeed with this item he don`t lose nothing of experience, containers, etc...
What i made stay like that
This script is working if use only the item, but if the players have bless and use this item when he die goes to level 1.
login.lua have a registre of preparedeath event.
How the title says i whant to make one item that when the players is equipeed with this item he don`t lose nothing of experience, containers, etc...
What i made stay like that
function onPrepareDeath(cid, lastHitkiller, mostDamagekiller)
if(getPlayerSlotItem(cid, 2).itemid == 2196) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
else
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100)
doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 100)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 100)
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)
doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 100)
end
return TRUE
end
This script is working if use only the item, but if the players have bless and use this item when he die goes to level 1.
login.lua have a registre of preparedeath event.