Hameq
Banned User
- Joined
- Aug 8, 2010
- Messages
- 374
- Reaction score
- 36
Hello guys.
It is possible to add (addevent function) to my npc system(Jiddos), i mean something like ungreet with delay. I found some related functions like changeFocus(0), releaseFocus(), unGreet(), onFarewell(). For example how to add delay event into this ungreet function?
I tried that: addEvent(releaseFocus() 1000, cid) i know it won't work but maybe you guys can help
It is possible to add (addevent function) to my npc system(Jiddos), i mean something like ungreet with delay. I found some related functions like changeFocus(0), releaseFocus(), unGreet(), onFarewell(). For example how to add delay event into this ungreet function?
Code:
function NpcHandler:unGreet()
if(self.focus == 0) then
return
end
local callback = self:getCallback(CALLBACK_FAREWELL)
if(callback == nil or callback()) then
if(self:processModuleCallback(CALLBACK_FAREWELL)) then
if(self.queue == nil or not self.queue:greetNext()) then
local msg = self:getMessage(MESSAGE_FAREWELL)
local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(self.focus) }
msg = self:parseMessage(msg, parseInfo)
self:say(msg)
self:releaseFocus()
end
end
end
end
I tried that: addEvent(releaseFocus() 1000, cid) i know it won't work but maybe you guys can help