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

need a script to set hp and mana to full on level up

Blackcody

RiseOfTibia Owner
Joined
Aug 31, 2008
Messages
136
Reaction score
1
need a script to set hp and mana to full on level up
the monsters are hard and players keep dieing so this is the thought if some one could help it would be great
 
LUA:
 function onAdvance(cid, skill, oldlevel, newlevel)
if newlevel > oldlevel then 
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    doPlayerAddMana(cid, getCreatureMaxMana(cid))    
    end
return true
end
 
can you make the script so that it can only add 200 hp and 100 mana?

function onAdvance(cid, skill, oldlevel, newlevel)
if newlevel > oldlevel then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) -- change to doCreatureAddHealth(cid, 200)
doPlayerAddMana(cid, getCreatureMaxMana(cid)) -- change to doPlayerAddMana(cid, 100)
end
return true
end
 
LUA:
function onAdvance(cid, skill, oldlevel, newlevel)
	if newlevel > oldlevel then 
		m = getCreatureMaxMana(cid) * 0.85
		h = getCreatureMaxHealth(cid) * 0.85
		doCreatureAddHealth(cid, h)
		doCreatureAddMana(cid, m) 
	end
return true
end
 
Back
Top