I'm trying to release NPC focus from a function I have. Now this is my problem:
It works, However, the npc doesn't start walking around again. Its like its frozen in place. Now you can talk to the NPC again and it has no focus it just doesnt begin moving until you release focus from the NPC file.
It works, However, the npc doesn't start walking around again. Its like its frozen in place. Now you can talk to the NPC again and it has no focus it just doesnt begin moving until you release focus from the NPC file.
Code:
function WaitOnQuestAccept(cid, NpcID, npcHandler, storage, value, text, release)
event={}
if (getPlayerStorageValue(cid, storage) == value) then
if event[cid] ~= nil then
stopEvent(event[cid])
end
event[cid] = addEvent(WaitOnQuestAccept, 500, cid, NpcID, npcHandler, storage, value, text, release)
else
doCreatureSay(NpcID, text, TALKTYPE_PRIVATE_NP, false, cid)
if release == true then
npcHandler:releaseFocus(cid)
end
end
end