Tenta usar esse:
local itemretirado = 10556
function onSay(cid, words, param, channel)
local alpha={}
confere(cid)
if doPlayerRemoveItem(cid,itemretirado,1) then
if words == "!fist" and alpha[1] ~= 0 then
doPlayerAddSkill(cid,0,1)
elseif words == "!club" and alpha[2] ~= 1 then
doPlayerAddSkill(cid,1,1)
elseif words == "!sword" and alpha[3] ~= 2 then
doPlayerAddSkill(cid,2,1)
elseif words == "!axe" and alpha[4] ~= 3 then
doPlayerAddSkill(cid,2,1)
elseif words == "!distance" and alpha[5] ~= 4 then
doPlayerAddSkill(cid,4,1)
elseif words == "!shield" and alpha[6] ~= 5 then
doPlayerAddSkill(cid,5,1)
else
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você já atingiu o número máxido de skills para se poder comprar mais.')
end
doSendMagicEffect(getThingPos(cid),12)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Skill comprado com sucesso.')
else
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'Você não tem o necessário para comprar esta skill.')
end
end
function confere(cid)
for x=0,5 do
if getPlayerSkillLevel(cid,x) > 349 then
alpha[x+1] = x
end
end
end
Nota: Funciona em 8.54 mas não sei se funciona em 8.5 ou 8.52.
Nota2: Não testei






info
Grupo: Campones
Registrado: 28/11/09
Posts: 62
Reputação: +3
Char no Tibia: Misstter Emme
Ae galera do xtibia,
Gostaria de uma talkaction que adcione 1 skill por 1 item de id: 10556
Assim,
Eu diria !axe ou !sword ou !club(Somente knights) ou !magic (somente druids e sorcerers) !distance(Somente paladin)
E trocaria 1 item de id 10556 por 1 skills das qual eu citei acima, mas o maximo de skill que pode e 350
Se pudessem postar so 1 de cada (axe,magic e distance) Ficaria agradecico ^.^
Versao do ot: 8.5-8.52
Editado Março 11 por XxSauvadurxX