Testei no meu Interpretador, a biblioteca dele não reconheceu a função de adicionar os Skills. Tente assim:
function onUse(cid, item, frompos, item2, topos)
voc = getPlayerVocation(cid)
pos = getPlayerPosition(cid)
if voc == 1 or voc == 2 or voc == 5 or voc == 6 or voc == 11 or voc == 12 then
stor = getPlayerStorageValue(cid,5556)
if stor == -1 then
setPlayerStorageValue(cid,5556,1)
doTeleportThing(cid, {x=451, y=195, z=7})
doPlayerSetMagic(cid, getPlayerMagLevel(cid)+4)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Magic Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 3 or voc == 7 then
stor = getPlayerStorageValue(cid,5556)
if stor == -1 then
setPlayerStorageValue(cid,5556,1)
doTeleportThing(cid, {x=451, y=195, z=7})
doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE)+10)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Distance Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 9 or voc == 10 then
stor = getPlayerStorageValue(cid,5556)
if stor == -1 then
setPlayerStorageValue(cid,5556,1)
doTeleportThing(cid, {x=451, y=195, z=7})
doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+10)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Club Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 4 or voc == 8 then
stor = getPlayerStorageValue(cid,5556)
if stor == -1 then
setPlayerStorageValue(cid,5556,1)
doTeleportThing(cid, {x=451, y=195, z=7})
doPlayerAddSkillTry(cid, 1 , 10)
doPlayerAddSkillTry(cid, 2 , 10)
doPlayerAddSkillTry(cid, 3 , 10)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Skills Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem a vocacao necessaria.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return true
end





info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...
Galera achei esse script aki no xtibia e ele funcionou perfeitamente so está com 1 pequeno probleminha ele está para adicionar 10 skills club,10 skills sword e 10 skills axe para a vocação knight porem so está adicionando 10 skill club porque o script kicka o player pra adicionar os skills ai acaba so adicionando os skill club gostaria que arruma-sem ele pra ganhar os 10 de cada skill
Obs: não mecha no resto do script so edita a parte de kina ganhar skills que é a parte de vocation 4 e 8.
function onUse(cid, item, frompos, item2, topos) voc = getPlayerVocation(cid) pos = getPlayerPosition(cid) if voc == 1 or voc == 2 or voc == 5 or voc == 6 or voc == 11 or voc == 12 then stor = getPlayerStorageValue(cid,5556) if stor == -1 then setPlayerStorageValue(cid,5556,1) doTeleportThing(cid, {x=451, y=195, z=7}) doPlayerSetMagic(cid, getPlayerMagLevel(cid)+4) doSendMagicEffect(frompos, 28) doSendAnimatedText(pos, "Magic Up", TEXTCOLOR_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end elseif voc == 3 or voc == 7 then stor = getPlayerStorageValue(cid,5556) if stor == -1 then setPlayerStorageValue(cid,5556,1) doTeleportThing(cid, {x=451, y=195, z=7}) doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE)+10) doSendMagicEffect(frompos, 28) doSendAnimatedText(pos, "Distance Up", TEXTCOLOR_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end elseif voc == 9 or voc == 10 then stor = getPlayerStorageValue(cid,5556) if stor == -1 then setPlayerStorageValue(cid,5556,1) doTeleportThing(cid, {x=451, y=195, z=7}) doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+10) doSendMagicEffect(frompos, 28) doSendAnimatedText(pos, "Club Up", TEXTCOLOR_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end elseif voc == 4 or voc == 8 then stor = getPlayerStorageValue(cid,5556) if stor == -1 then setPlayerStorageValue(cid,5556,1) doTeleportThing(cid, {x=451, y=195, z=7}) doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+10) doPlayerSetSkill(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD)+10) doPlayerSetSkill(cid, SKILL_AXE, getPlayerSkillLevel(cid, SKILL_AXE)+10) doSendMagicEffect(frompos, 28) doSendAnimatedText(pos, "Skills Up", TEXTCOLOR_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem a vocacao necessaria.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end