hello, could someone help me rewrite it on version 1.2?
Lua:
local vocation= {
-- Random
[17] = {625, 399},
[18] = {781, 498},
[91] = {451, 523},
[96] = {322, 292}
}
function onLogout(cid)
local Player = vocation[getPlayerVocation(cid)]
if (Player == nil) then
return true
end
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-Player[1])
doCreatureAddHealth(cid, -Player[1])
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-Player[2])
doCreatureAddMana(cid, -Player[2])
return true
end