• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Problem with releaseFocus

fish04k

Member
Joined
Mar 23, 2008
Messages
102
Reaction score
19
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.

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
 
Back
Top