samuel157
Intermediate OT User
- Joined
- Mar 19, 2010
- Messages
- 618
- Solutions
- 4
- Reaction score
- 122
- Location
- São Paulo, Brazil
- GitHub
- Samuel10M
help please using server 8.60 No up health no mana
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, getPlayerMaxMana(cid)-getPlayerMana(cid))
end
local pos = getPlayerPosition(cid)
local effectPositions = {
{x = pos.x, y = pos.y - 1, z = pos.z},
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x - 1, y = pos.y, z = pos.z},
{x = pos.x + 1, y = pos.y, z = pos.z}
}
for _, ePos in ipairs(effectPositions) do
doSendMagicEffect(ePos, CONST_ME_HOLYAREA)
doSendAnimatedText(getThingPos(cid), "Gratz!" , 70)
end
return true
end