Um dos problemas pode ser o seguinte:
Esse script é funcional apenas para algumas versões do Tibia. Se voce estiver tentando com alguma 8.54+ nao vai funcionar.
Em breve vou editar aqui com o Script para 8.54+
No vocation.lua, apague tudo e coloque:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
npcHandler:setMessage(MESSAGE_GREET, "Ola |PLAYERNAME|. Voce gostaria de entrar para a guild {ZK} por 10 Gold Coins?")
local talkState = {}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
local cfg = {
itemid = 2157, --Substitua 'xxxx' pelo ID do item usado na Promotion
qnt = 10 --Substitua 'xx' pela quantidade do item requerido
}
if msgcontains(msg, "zk") then
selfSay("Voce realmente quer entrar na guild por 10 GC ({Gold Coins})?", cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, "yes") and talkState[talkUser] == 1)then
if doPlayerRemoveItem(cid, cfg.itemid, cfg.qnt) then
selfSay('From now, you are promoted!', cid)
setPlayerPromotionLevel(cid, 1)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
else
selfSay('voce nao possui '.. cfg.qnt ..' '.. getItemNameById(cfg.itemid) .. Mate mais zombies e volte a falar comigo., cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
elseif msg == "no" and talkState[talkUser] == 1 then
selfSay("Okay, volte se mudar de ideia.", cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
E no Vocation.xml, apague tudo e coloque:
<?xml version="1.0"?>
<npc name="ZK Recruter" script="data/npc/scripts/vocation.lua" walkinterval="2000">
<health now="100" max="100" />
<look type="128" head="20" body="100" legs="50" feet="99" addons="0"/>
</npc>
Se a versão do OT for 8.54+ isso pode ser o sulficiente para resolver.
De uma lida e veja se voce quer modificar algo, mas eu ja ajustei para seu propósito.
(Anges et Démons Reloaded)
Coming Up.