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

CreatureEvent Level Up Message

Synthetic_

deathzot.net
Joined
Dec 30, 2008
Messages
2,535
Reaction score
574
Well I know this is a very easy piece of code, but I think its a cool idea and some of you might want to use it. When you level up, it will give you full health & mana and do a cool effect.
Credits: Kekox for helping me understand onAdvance, and http://otland.net/f35/full-hp-mana-each-level-50544/
TESTED ON TFS0.3.5.PL1
Lets start;
6sctp0.jpg


Advance.lua
Lua:
-- Credits: Synthetic @ OTFans & OTLand

	function onAdvance(cid, skill, oldlevel, newlevel)
local pPos = getPlayerPosition(cid)
         if skill == 8 then
	doSendAnimatedText(pPos, "Level Up", 210)
	doSendMagicEffect(pPos, 28)    
	doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
	doCreatureAddMana(cid, getCreatureMaxMana(cid))    
 		end
         return TRUE
end

Then in creaturescripts.xml
Code:
<event type="advance" name="Advance" event="script" value="Advance.lua"/>

Then in login.lua add
Lua:
registerCreatureEvent(cid, "Advance")
 
Last edited:
Short?
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
	doCreatureSay(cid, SKILLS[skill]:gsub("%a", string.upper, 1) .. " UP [" .. newLevel .. "]", TALKTYPE_ORANGE_1)
	return TRUE
end
Credits: Slawkens
 
Short?
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
	doCreatureSay(cid, SKILLS[skill]:gsub("%a", string.upper, 1) .. " UP [" .. newLevel .. "]", TALKTYPE_ORANGE_1)
	return TRUE
end
Credits: Slawkens

Yeah, well this gives max HP/mana on level up and does a different effect, their different scripts
 
how can i find one for 0.2 god some one give me a hand! Rep+++ and claps for thaT PERSON!!!
 
Back
Top