Vamos ver se funciona!
Adicione em /data/creaturescripts/creaturescripts.lua:
<event type="login" name="Skill" event="script" value="skills.lua"/>
Adicione em data/creaturescripts/scripts/login.lua:
registerCreatureEvent(cid, "Skill")
Crie um arquivo chamado skills.luaem /data/creaturescripts/scripts:
function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)
if playerVoc == 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,80)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 2 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,80)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 3 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 50))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 40))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,26)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 4 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 45))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_AXE, 45))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_AXE, 45))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 40))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,8)))
setPlayerStorageValue(cid, skillStor, 1)
end
return TRUE
end
Espero ter ajudado! Caso não funcione post aqui o erro.