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

[Creaturescript] Reload hp and mana to level up

Knight God

Member
Joined
Oct 19, 2008
Messages
1,180
Reaction score
21
As I said, I need that script, it is urgent
give reputation to help me
:):blink:
 
data/creaturescripts/scripts/advancesave.lua

Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
		doCreatureAddMana(cid, getCreatureMaxMana(cid))
	end

	return true
end
 
data/creaturescripts/scripts/advancesave.lua

Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
		doCreatureAddMana(cid, getCreatureMaxMana(cid))
	end

	return true
end

Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
		doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
	end

	return true
end

xdd
 
It works, but I know what you're saying. ^_^

Code:
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
	end

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