kokokoko
Veteran OT User
- Joined
- Feb 4, 2008
- Messages
- 921
- Reaction score
- 257
--------------------FOR TFS 0.3.5-------------------
---If you want it for 0.3.4, check the post by JBD on page 2---
When you get a level advance, your HP and MP gets full. It's very simple, but still cool
creaturescripts/scripts, name the file levelUp.lua
Paste this:
creaturescripts/creaturescripts.xml
Add this:
And at the bottom of login.lua, add this:
:wub:
---If you want it for 0.3.4, check the post by JBD on page 2---
When you get a level advance, your HP and MP gets full. It's very simple, but still cool
creaturescripts/scripts, name the file levelUp.lua
Paste this:
Code:
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_MAGIC_BLUE)
end
return TRUE
end
creaturescripts/creaturescripts.xml
Add this:
Code:
<event type="advance" name="levelUp" event="script" value="levelUp.lua"/>
And at the bottom of login.lua, add this:
Code:
registerCreatureEvent(cid, "levelUp")
:wub:
Last edited: