function: when you up level your mana and life is full, equal to the global
create a file with name fullmh.lua
register login.lua
and add creaturescript.xml
Credits to Skydanger the real author of the script.
create a file with name fullmh.lua
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
if skill == SKILL__LEVEL then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
end
return true
end
register login.lua
Code:
registerCreatureEvent(cid, "fullmh")
and add creaturescript.xml
Code:
<event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
Credits to Skydanger the real author of the script.