Lua:
local vocation= {
-- voc/HP/mp
[17] = {625, 399},
[18] = {781, 498},
[91] = {451, 523},
[96] = {322, 292}
}
function onLogout(player)
local voc = vocation[player:getVocation():getId()]
if not voc then
return true
end
player:setMaxHealth(player:getMaxHealth() - voc[1])
player:addHealth(-voc[1])
player:setMaxHealth(player:getMaxMana() - voc[2])
player:addMana(-voc[2])
return true
end