Substitua ser arquivo startskill por esse:
function onLogin(cid) local playerVoc = getPlayerVocation(cid) local skillStor = 56364 local gotSkills = getPlayerStorageValue(cid, 56364) if playerVoc == 5 and gotSkills == -1 then doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,65))) setPlayerStorageValue(cid, skillStor, 1) elseif playerVoc == 6 and gotSkills == -1 then doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,65))) setPlayerStorageValue(cid, skillStor, 1) elseif playerVoc == 7 and gotSkills == -1 then doPlayerSetSkill(cid, SKILL_DISTANCE, 70) doPlayerSetSkill(cid, SKILL_SHIELDING, 60) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10))) setPlayerStorageValue(cid, skillStor, 1) elseif playerVoc == 8 and gotSkills == -1 then doPlayerSetSkill(cid, SKILL_SWORD, 70) doPlayerSetSkill(cid, SKILL_SHIELDING, 65) doPlayerSetSkill(cid, SKILL_AXE, 70) doPlayerSetSkill(cid, SKILL_CLUB, 70) doPlayerSetMagic(cid, 8) setPlayerStorageValue(cid, skillStor, 1) end return TRUE end
E em lib>050-function.lua adicione isso lá no final:
function doPlayerSetSkill(cid, skill, amount)
local pid = getPlayerGUID(cid)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";")
return TRUE
end
function doPlayerSetMagic(cid, amount)
local pid = getPlayerGUID(cid)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = "..pid)
return TRUE
end







info
Grupo: Cavaleiro
Registrado: 01/12/10
Posts: 158
Reputação: +4
Char no Tibia: Pedro Tacador De Bolt
Galera estou com um server de war e knight fica tomando debug quando loga pela primeiras vez por causa do start skill, e nenhuma classe começa com o skill certo que manda no Start Skill
Como sei que o debug do knight é no startskill, porque quando removi o startskill Club e Axe knight entrou susegado então acho que é la
start skil que estou usando :
Editado Junho 16 por pedrizito15