Thats the exact same code I have and it works, did you restart the server after editing the code?
I think you can do it with a reload of /reload global, /reload config
But i restarted the whole server.
Lua:
function NpcHandler:onThink()
local callback = self:getCallback(CALLBACK_ONTHINK)
if callback == nil or callback() then
if NPCHANDLER_TALKDELAY == TALKDELAY_NONE then
for cid, talkDelay in pairs(self.talkDelay) do
if talkDelay.time ~= nil and talkDelay.message ~= nil and os.time() >= talkDelay.time then
selfSay(talkDelay.message, cid, talkDelay.publicize and true or false)
self.talkDelay[cid] = nil
end
end
end
if self:processModuleCallback(CALLBACK_ONTHINK) then
for pos, focus in pairs(self.focuses) do
if focus ~= nil then
if not self:isInRange(focus) then
self:unGreet(focus) -- self:onWalkAway(focus)
elseif self.talkStart[focus] ~= nil and (os.time() - self.talkStart[focus]) > self.idleTime then
self:unGreet(focus) -- here
else
self:updateFocus()
end
end
end
end
end
end