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

MiPo91

Member
Joined
Mar 30, 2010
Messages
299
Reaction score
18
Location
Finland
Hello!
I'm beginner in LUA, and I'd like to know how to make this work like this:
Player says boss -> "Are you sure you want..."
then player could say either "yes" or "no".

With this script it works if you say "boss" and then "boss yes" or "boss no".

Code:
	elseif msgcontains(msg, "boss") then
		if (getCreatureStorage(cid, bossStorage) == 23) then
			selfSay("Are you sure you want to fight The Snapper?", cid)
			if msgcontains(msg, "yes") then
				does something....
			elseif msgcontains(msg, "no") then
			        selfSay("Maybe later.", cid)
			end
		else 
			selfSay("You need to complete task first!", cid)
		end
	end
 
Last edited:
No, it works otherwise properly, but if you want to say "yes" you need to say it with boss like "boss yes". (same prob with "no")
 
you need to get those elsifs of 'yes' and 'no' out of the msgcontain'boss'

and set a talstate if he have the storage in the 'boss' msg then in another elsif check for 'yes' and the talkstate you made in the first etc
 
Back
Top