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

TFS 1.X+ NPC say error

Hayvosh

Member
Joined
Feb 7, 2019
Messages
40
Solutions
2
Reaction score
10
Location
Sweden
Hello,

I am having some issues with some NPC script, for instance npc Umar from Blue Djinn quest.
Here's a snippet of the lua code for umar.lua

Lua:
elseif msgcontains(msg, 'passage') and getPlayerStorageValue(cid, talkstor) == 1 then  
    if getPlayerStorageValue(cid, melstor) == 1 then
        npcHandler:say("If you want to enter our fortress you have to become one of us and fight the Efreet. ...",cid)
        npcHandler:say("So, are you willing to do so?",cid,4000)
        setPlayerStorageValue(cid, talkstor, 2)
    end

The problem is when I say for instance "Passage" he will only reply with the last line "So, are you willing to do so?"
The line above "If you want to enter our fortress you have to become one of us and fight the Efreet. ..." he never says at all.
What am I missing here?
 
Solution
Hello,

I am having some issues with some NPC script, for instance npc Umar from Blue Djinn quest.
Here's a snippet of the lua code for umar.lua

Lua:
elseif msgcontains(msg, 'passage') and getPlayerStorageValue(cid, talkstor) == 1 then 
    if getPlayerStorageValue(cid, melstor) == 1 then
        npcHandler:say("If you want to enter our fortress you have to become one of us and fight the Efreet. ...",cid)
        npcHandler:say("So, are you willing to do so?",cid,4000)
        setPlayerStorageValue(cid, talkstor, 2)
    end

The problem is when I say for instance "Passage" he will only reply with the last line "So, are you willing to do so?"
The line above "If you want to enter our fortress you have to become one of us...
Hello,

I am having some issues with some NPC script, for instance npc Umar from Blue Djinn quest.
Here's a snippet of the lua code for umar.lua

Lua:
elseif msgcontains(msg, 'passage') and getPlayerStorageValue(cid, talkstor) == 1 then 
    if getPlayerStorageValue(cid, melstor) == 1 then
        npcHandler:say("If you want to enter our fortress you have to become one of us and fight the Efreet. ...",cid)
        npcHandler:say("So, are you willing to do so?",cid,4000)
        setPlayerStorageValue(cid, talkstor, 2)
    end

The problem is when I say for instance "Passage" he will only reply with the last line "So, are you willing to do so?"
The line above "If you want to enter our fortress you have to become one of us and fight the Efreet. ..." he never says at all.
What am I missing here?
Try this out:

Lua:
elseif msgcontains(msg, 'passage') and getPlayerStorageValue(cid, talkstor) == 1 then 
    if getPlayerStorageValue(cid, melstor) == 1 then
        local msgs = {
            [1] = "If you want to enter our fortress you have to become one of us and fight the Efreet...",
            [2] = "So, are you willing to do so?"
        }
        npcHandler:say(msgs, cid, false, true, 4000)
        setPlayerStorageValue(cid, talkstor, 2)
    end
 
Solution
Back
Top