Script atualizado:
local skills = {
[0] = {"Fist up!", 29},
[1] = {"Club up!", 29}, -- [SKILL_ID] = {"ANIMATED TEXT", effect no player}
[2] = {"Sword up!", 29},
[3] = {"Axe up!", 29},
[4] = {"Dist up!", 29},
[5] = {"Shield up!", 29},
[6] = {"Fish up!", 29},
[7] = {"Magic up!", 31},
[8] = {"Level up!", 30},
}
local config = {
heal = true,
save = true,
effect = true
}
function onAdvance(player, skill, oldLevel, newLevel)
if newLevel <= oldLevel then
return true
end
if config.effect then
local up = skills[skill]
if up then
player:say(up[1], TALKTYPE_MONSTER_SAY)
player:getPosition():sendMagicEffect(up[2])
end
end
if config.heal and skill == 8 then
player:addHealth(player:getMaxHealth())
end
if config.save then
player:save()
end
return true
end
Crédito: Sttorm
Participação: tataboy 67
muito obrigado pela ajuda de ambos!!!