Phemus
Member
- Joined
- Jun 16, 2012
- Messages
- 149
- Solutions
- 2
- Reaction score
- 12
Hello guys, I'm breaking my head with this script that i cannot make it function. I want to make a bless function where if you have more than 40 hours of stamina, you do not lose any skills nor level. This is the script.
Thank you!
Code:
local array = {
PLAYERLOSS_EXPERIENCE,
PLAYERLOSS_MANA,
PLAYERLOSS_SKILLS,
PLAYERLOSS_FIGHTING
}
function onPrepareDeath(cid, deathList)
if getPlayerStamina(cid) >= 2400 then
for i = 1, #array do
doPlayerSetLossPercent(cid, array[i], 0)
end
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "Staminabless")
return true
end
Thank you!