login.lua
like this doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_MAGIC, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
config.lua
deathLostPercent
to 0UPDATE `players` SET `loss_experience`=0;
UPDATE `players` SET `loss_mana`=0;
UPDATE `players` SET `loss_skills`=0;
data\creaturescripts\creaturescripts.xml
<event type="preparedeath" name="DeathProtection" event="script" value="blessingdeath.lua"/>
data\creaturescripts\scripts\login.lua
addregisterCreatureEvent(cid, "DeathProtection")
data\creaturescripts\scripts\deathprotection.lua
then paste this insidefunction onPrepareDeath(cid)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
doPlayerSetLossPercent(cid, level, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
end
return true
data\creaturescripts\scripts\login.lua
if isPlayer(cid) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
doPlayerSetLossPercent(cid, level, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
doSavePlayer(cid)
end
return true
vocations.xml
one should work.