Não tenho certeza de onde errei, acho que é por causa da versão do server, eu estou trabalhando em um 8.50.. kk
Então dei uma editada, configurando os ids e arrumando as falas.. Tente ai.
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, 'list')) then
selfSay('I can change Infernal Bolt for {Stuffed Dragon}', cid)
elseif(msgcontains(msg, 'stuffed dragon')) then
selfSay('Do you want to exchange a Stuffed Dragon for a Infernal Bolt?', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if(doPlayerRemoveItem(cid, 6566, 1) == true) then
selfSay('Thank You!', cid)
doPlayerAddItem(cid, 6529, 1)
talkState[talkUser] = 0
else
selfSay('You dont have the Stuffed Dragon', cid)
talkState[talkUser] = 0
end
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Espero que desta vez funcione.