function onAdvance(cid, skill, oldLevel, newLevel)
if newLevel > oldLevel then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doPlayerAddMana(cid, getPlayerMaxMana(cid))
end
return true
end
function onAdvance(cid, skill, oldlevel, newlevel)
if (skill == SKILL_LEVEL) then
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) - getPlayerHealth(cid)))
doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
end
return true
end
You don't need to check it, it is only executed when advancing, and not when downgradingLUA:if newLevel > oldLevel then
You don't need to check it, it is only executed when advancing, and not when downgrading
OP you might want to check this out: http://otland.net/f82/advanced-onadvance-best-onadvance-68309/#post700144