When wrong vocation talk with the npc it should release the focus of that player, it does that. But when i go talk with another npc and say hi, it say exactly same text as the previous npc!
npcHandler:releaseFocus(cid)!
Version: TFS 0.3 - 0.3.7-r5916
npcHandler:releaseFocus(cid)!
LUA:
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)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, 'mission') and isDruid(cid) then
npcHandler:say("Welcome my son", cid)
else
npcHandler:say("I dont feel to talk.", cid)
npcHandler:releaseFocus(cid)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Version: TFS 0.3 - 0.3.7-r5916
Last edited: