Tente :
local config = {
vocations = {9, 10, 11, 12}, -- id das vocações
storage = 16463, -- mude somente se precisar
percent = 30 -- porcentagem de hp e mana para adicionar
}
function onLogin(cid)
if isInArray(config.vocations, getPlayerVocation(cid)) and getPlayerStorageValue(cid, config.storage) < 1 then
local hpToAdd = math.floor((getCreatureMaxHealth(cid) * config.percent) / 100)
local manaToAdd = math.floor((getCreatureMaxMana(cid) * config.percent) / 100)
setCreatureMaxHealth(cid, hpToAdd)
doPlayerAddHealth(cid, hpToAdd)
setCreatureMaxMana(cid, manaToAdd)
doPlayerAddMana(cid, manaToAdd)
setPlayerStorageValue(cid, config.storage, 1)
end
return true
end