Veja se é isso que você quer @Necamanuel
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'jounin')) then
selfSay('Voce Ja Completou As {missoes} Do Kakashi Sensei?.', cid)
end
---------------------------------------------------------
if(msgcontains(msg, 'missoes')) then
selfSay('Se Ja Completou Todas As Missoes Ele Te Deu 3 {trofeus} De Comprovante Do Exame Jounin', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'trofeus') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,13502) > 0) then
selfSay('Voce Ja Me Entregou Os Trofeus.', cid)
else
local iddoitem = 10127
local iddoitem1 = 10128
local iddoitem2 = 10129 -- O id do item que ele precisa ter.
if getPlayerItemCount(cid,iddoitem) >= 1 and getPlayerItemCount(cid,iddoitem1) >= 1 and getPlayerItemCount(cid,iddoitem2) >= 1 then
setPlayerStorageValue(cid,13502,1)
doPlayerRemoveItem(cid, iddoitem, 1)
doPlayerRemoveItem(cid, iddoitem1, 1)
doPlayerRemoveItem(cid, iddoitem2, 1)
selfSay('Bom, Voce Ja Pode Iniciar O Exame Jounin, Se Realmente For Um Chunin!', cid)
else
selfSay('KKKKKKKK, Afim De Virar Jounin Tao Facil?, So Volte Akie Com Os 3 Trofeus Do Kakashi Sensei!!', cid)
end
end
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())