Em data/actions/scripts crie um arquivo.lua, nomeio para changevoc e adicione:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,1992) == 1 then
doCreatureSay(cid, "Você ja recebeu a nova vocaçao", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 20 then
doCreatureSay(cid, "você recebeu uma nova vocaçao!", TALKTYPE_ORANGE_1)
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then
doPlayerSetVocation(cid, 9)
end
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
doPlayerSetVocation(cid, 10)
end
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
doPlayerSetVocation(cid, 11)
end
if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
doPlayerSetVocation(cid, 12)
end
doSendMagicEffect(fromPosition, 2)
doRemoveItem(item.uid)
setPlayerStorageValue(cid,1992,1)
return TRUE
else
doCreatureSay(cid, "Você deve ter level 20 ou mais para usar o Item!",TALKTYPE_ORANGE_1)
end
end
end
Editando:
-Vermelho: Mensagem quando o item for ativado
-Verde: Level necessário para usar o item
-Marrom: Vocações antigas
-Laranja: Vocações novas
-Roxo: Efeito (/z)
-Rosa: Mensagem quando cancela (abaixo do level 20 do caso)
Em actions.xml adicione:
<action itemid="1965" script="changevoc.lua"/>
Editando:
-Vermelho: Id do item






info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado
mais ai muda pra q vocação?
cara tem 3 problemas ai ta pegando de boa mais nao ta do jeito q eu quero, pq toda vocaçao ta podendo usar, e ele tem q ter level pra usar, e quando eu uso q dou logout a voc volta a q era antes
Editado Agosto 9 por nbb147