• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[REQUEST] OnAdvanced

pugamoline

uint32_t patch_mem(char *
Joined
Nov 15, 2011
Messages
189
Reaction score
19
Hi Otlanders, need help in this script!

Is possible this function in advanced, refill full mana and hp? on skill advanced (lvl,magic,sword,club,shielding etc)

example: Advanced in Sword fighting add mana and hp full


doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid)


Lua:
if skill == SKILL__LEVEL then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))

this script only recovery hp and mana in lvl and magic advanced, but not in the rest of the "skilll"




anyone can help me?
 
PHP:
function onAdvance(cid, skill, oldlevel, newlevel)

if skill == SKILL__LEVEL then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_STUN)
end
return TRUE
end
 
Back
Top