• 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!

How to make Automatic recharge mana and health when level up

Solution
Okey, Open data/creaturescripts/scripts then add fullmh.lua and inside it add
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
                  if skill == SKILL__LEVEL then
                   doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
                doCreatureAddMana(cid, getCreatureMaxMana(cid))
   end
return true
end
then in creaturescript.xml
add
XML:
<event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
and in data/creaturescripts/scripts/login.lua add
Lua:
registerCreatureEvent(cid, "fullmh")
That's the most simple I can explain since it seems that you don't understand.
Okey, Open data/creaturescripts/scripts then add fullmh.lua and inside it add
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
                  if skill == SKILL__LEVEL then
                   doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
                doCreatureAddMana(cid, getCreatureMaxMana(cid))
   end
return true
end
then in creaturescript.xml
add
XML:
<event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
and in data/creaturescripts/scripts/login.lua add
Lua:
registerCreatureEvent(cid, "fullmh")
That's the most simple I can explain since it seems that you don't understand.
 
Solution
Okey, Open data/creaturescripts/scripts then add fullmh.lua and inside it add
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
                  if skill == SKILL__LEVEL then
                   doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
                doCreatureAddMana(cid, getCreatureMaxMana(cid))
   end
return true
end
then in creaturescript.xml
add
XML:
<event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
and in data/creaturescripts/scripts/login.lua add
Lua:
registerCreatureEvent(cid, "fullmh")
That's the most simple I can explain since it seems that you don't understand.
Well thank you I'll try this

You didn't say what TFS are you using but you can try this one mana/hp on advance
TFS 0.3.6
and thanks this work
 
Back
Top