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

Lua NPC Issue..

Naxtie

mapper, designer
Joined
Oct 15, 2011
Messages
1,565
Solutions
1
Reaction score
250
Location
Sweden
Hello! I'm just wondering if this works or not.
PHP:
if(msgcontains(msg, 'yes', 'fast pass') and talkState[talkUser] < 1) then
                selfSay('Well.. i won\'t give it to you for free.. Are you willing to do me a favor?', cid)
				talkState[talkUser] = 1

The thing is, that I'm wondering if it works to say either "yes" or "fast pass"?
But somehow the NPC only reacts when you say "fast pass".

Thanks in advance,
Naxtie
 
Lua:
if isInArray({'yes','fast pass'}, msg) then
                selfSay('Well.. i won\'t give it to you for free.. Are you willing to do me a favor?', cid)
                talkState[talkUser] = 1
 
You mean like this?
Lua:
	if(msgcontains(msg, 'yes') or msgcontains(msg, 'fast pass')) and talkState[talkUser] < 1 then
                selfSay('Well.. i won\'t give it to you for free.. Are you willing to do me a favor?', cid)
                talkState[talkUser] = 1
 
Yeah exactly, I think this one will work.

- - - Updated - - -

f*ck this, it aint working ill just keep it as it is :p thanks for ur help anyways!
 
What part doesn't work?
I tested it on TFS 0.3.6pl1 8.54 to be sure and I could say both with the talkstate still working, or was it something else you ment?
 
if(msgcontains(msg, 'yes') or msgcontains(msg, 'fast pass')) and talkState[talkUser] < 1 then

This part is not working for me :p
 
Back
Top