Tipo do script: Talkactions and database
Protocolo (versão do Tibia): 8.60
Servidor utilizado: Styller Yourots 8.60
Nível de experiência: Avançado
Adicionais/Informações: Bom espero que possam me ajudar.
Uso esse script, funciona sim o comando mas ele vai até 202 e 208 paladin e compra de magic level nao esta nele pois queria que me ajudassem plx '-'
Sciprt teve que modificar na data/lib/050-function.lua a seguinte parte.
function doPlayerAddSkill(cid, skill, amount, round)
if(skill == SKILL__LEVEL) then
return doPlayerAddLevel(cid, amount, round)
elseif(skill == SKILL__MAGLEVEL) then
return doPlayerAddMagLevel(cid, amount)
end
return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill'))
end
Para isso:
function doPlayerAddSkill(cid, skill, amount, round)
local amount = amount or 1
if(skill == SKILL__LEVEL) then
return doPlayerAddLevel(cid, amount, round)
elseif(skill == SKILL__MAGLEVEL) then
return doPlayerAddMagLevel(cid, amount)
end
for i = 1, amount do
doPlayerAddSkillTry(cid, skill, getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill), false)
end
return true
end
E em data/talkactions/scripts
function onSay(cid, words, param, channel)
local w = {item = 9971, count = 10}
local id = {club = 1, sword = 2, axe = 3, distance = 4, shield = 5}
if (param == '') then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Como usar: !comprar club.")
return true
end
if doPlayerRemoveItem(cid,w.item,w.count) then
if (param == 'club') and getPlayerSkill(cid,id.club) < 350 then
doPlayerAddSkill(cid,id.club,10)
elseif (param == 'sword') and getPlayerSkill(cid,id.sword) < 350 then
doPlayerAddSkill(cid,id.sword,10)
elseif (param == 'axe') and getPlayerSkill(cid,id.axe) < 350 then
doPlayerAddSkill(cid,id.axe,10)
elseif (param == 'distance') and getPlayerSkill(cid,id.distance) < 350 then
doPlayerAddSkill(cid,id.distance,10)
elseif (param == 'shield') and getPlayerSkill(cid,id.shield) < 350 then
doPlayerAddSkill(cid,id.shield,10)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já atingiu o número máxido de skills.")
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Skill comprado com sucesso.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem o item necessário para comprar skill.")
end
return true
end
Pois bem mas esse comando vai até 202 e queria que alguem me ajudasse a adicionar direto na database, pois assim ira ir até 350. porque nao vai, ajuda plx.