• 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!

NPC BUG OTHER NPC SAY SAME THING

Mauzim

Member
Joined
Jan 3, 2011
Messages
568
Reaction score
9
In this situation i speak with Yberius
Obi is normal npc who walking
and when i write heal obi respond too
this situation is with all nearly npc and all types codes ex. trade, keyworlds, keywordHandler, msgcontains etc.
but not in doNPCTalkALot because it is other function
my question is how to fix that w/o change all libs etc please simple codes
Thanks for help anyway.
Bez tytułudd.png

bump
 
Last edited by a moderator:
It looks like someone has used:
Code:
doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
instead of
Code:
doCreatureSay(cid, text, type, ...)

If so, it's due to an incorrectly customized script (probably only one).
 
Code:
    function NpcHandler:say(message, focus, delay, force)
        local delay, force = delay or 0, force or false
        if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE and delay <= 0) then
            if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
                selfSay(message, focus)
            else
                selfSay(message)
            end

            return
        end

   
        -- TODO: Add an event handling method for delayed messages
        table.insert(self.talkDelay, {
            id = getNpcId(),
            cid = focus,
            message = message,
            time = os.mtime() + (delay and delay or self.talkDelayTime),
            start = os.time(),
            force = force or false
        })

i changed from or
if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE or delay <= 0) then
to
if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE and delay <= 0) then

and now npc write 2x same text example Yberius did same text but obi say nothing if i make 3x obi yberius say 4x same text

here is a problem and probably fix

table.insert(self.talkDelay, {
id = getNpcId(),
cid = focus,
message = message,
time = os.mtime() + (delay and delay or self.talkDelayTime),
start = os.time(),
force = force or false
})

this may be fix but i think is other way to did it
table.insert(self.talkDelay, focus, {
it is fix but when i did it and walk away npc still have focus idk how to fix it
 
Back
Top