X
Xikini
Guest
TFS 0.3.7
Trying to store last message of player and use it to determine next message by npc.
terrible example incoming..
I've been googling and searching around for a few hours and not having much luck figuring out what to search for to get this to work.
If anyone knows what I should be searching for, or would like to provide an example, I would definitely appreciate it.
Thanks!
Xikini
Trying to store last message of player and use it to determine next message by npc.
terrible example incoming..
Code:
elseif msgcontains(msg, "number") and talkState[talkUser] == 1 then
selfSay("What number under 1000?", cid)
talkState[talkUser] = 2
local playerMessage = ""
elseif msgcontains(msg, "ANYTHING OTHER THEN A NUMBER") and talkState[talkUser] == 2 then
selfSay("That is not an accepted number. Please choose a numeric number.", cid)
elseif msgcontains(msg, "Any numeric number over 1000") and talkState[talkUser] == 2 then
selfSay("The number you have chosen is too high. Choose another.", cid)
elseif msgcontains(msg, "Any numeric number") and talkState[talkUser] == 2 then
selfSay("The number you have chosen is ".. number ..".", cid)
talkState[talkUser] = 3
I've been googling and searching around for a few hours and not having much luck figuring out what to search for to get this to work.
If anyone knows what I should be searching for, or would like to provide an example, I would definitely appreciate it.
Thanks!
Xikini
Last edited by a moderator: