----------------------------------------------------------------------
 * This file is part of Freedroid
 *
 * Freedroid is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Freedroid is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Freedroid; see the file COPYING. If not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 * MA 02111-1307 USA
----------------------------------------------------------------------


If you have questions concerning FreedroidRPG, please send an email to:

freedroid-discussion@lists.sourceforge.net


Beginning of new chat dialog for character="XXXXX"
----------------------------------------------------------------------

<EveryTime LuaCode>
	if (not has_cookie("skip_GAS_captcha")) then
		-- Are we human? CAPTCHA!!!
		number_one=math.random(2,7)
		number_two=math.random(1,number_one-1)
		captcha = number_one - number_two
		if (captcha == 1) then
			captcha = _"one"
		elseif (captcha == 2) then
			captcha = _"two"
		elseif (captcha == 3) then
			captcha = _"three"
		elseif (captcha == 4) then
			captcha = _"four"
		elseif (captcha == 5) then
			captcha = _"five"
		elseif (captcha == 6) then
			captcha = _"six"
		end
		response = user_input_string(_"CAPTCHA: Please write the lowercase word that answers the following: "..number_one.." - ".. number_two.." = ?")
	else
		del_cookie("skip_GAS_captcha")
	end
	if (captcha ~= response) then
		npc_says(_"Non-human detected. Administering paralyzing shock.")
		npc_says(_"NOTE: If you are a human, try again, and make sure you enter a word and not digits.")
		freeze_tux_npc(7)
		hurt_tux(20)
		heat_tux(20)
		end_dialog()
	else
		npc_says(_"Welcome to MS gate access server for region #54648.")
		if (not has_cookie("HF-AccessGateServer-Spencer-chat")) then
			tux_says(_"WHAT?!")
			update_quest(_"Propagating a faulty firmware update", _"The firmware server seems to actually be an access server to a gate. What am I supposed to do now?")
			add_cookie("HF-Spencer")
			add_cookie("HF-AccessGateServer-Spencer-chat")
			add_cookie("skip_GAS_captcha")
			start_chat("Spencer")
			end_dialog()
		end
		if (has_cookie("HF-Spencer")) then
			end_dialog()
			del_cookie("HF-Spencer")
		else
			npc_says(_"Please select action")
		end
		show(1, 99)
	end
</LuaCode>
----------------------------------------------------------------------

Nr=1 Text=_"status"
NO_TEXT
<LuaCode>
	tux_says(_"status", "NO_WAIT")
	if (cmp_obstacle_state("HF-Gate-outer", "opened")) then
		npc_says(_"Gate 1 status: OPENED", "NO_WAIT")
	else
		npc_says(_"Gate 1 status: CLOSED", "NO_WAIT")
		if (not has_cookie("MO-HFGAS_hacked")) then
			show(2)
		end
	end

	if (cmp_obstacle_state("HF-Gate-inner", "opened")) then
		npc_says(_"Gate 2 status: OPENED", "NO_WAIT")
	else
		npc_says(_"Gate 2 status: CLOSED", "NO_WAIT")
		if (not has_cookie("MO-HFGAS_hacked")) then
			show(2)
		end
	end

	if (cmp_obstacle_state("HF-Gate-inner", "opened")) and
	   (cmp_obstacle_state("HF-Gate-outer", "opened")) then
	end
</LuaCode>
----------------------------------------------------------------------

Nr=2 Text=_"open gate"
NO_TEXT
<LuaCode>
	tux_says(_"open gate", "NO_WAIT")
	npc_says(_"Permission denied")
	end_dialog()
	hurt_tux(5)
	heat_tux(10)
	update_quest("Open Sesame", "The server is secured, looks like I have to hack it.")
	hide(2) show(3)
</LuaCode>
----------------------------------------------------------------------

Nr=3 Text=_"(Try hacking the server)"
<LuaCode>
	if (takeover(get_program("Hacking")+3)) then
		tux_says(_"sudo !!")
		npc_says(_"sudo open gates", "NO_WAIT")
		npc_says(_"Which gates do you want to open?")
		update_quest("Open Sesame", "Whew, I finally managed to hack the gate access server. I can open the gates now.")
		add_cookie("MO-HFGAS_hacked")
		hide(3) show(4)
	else
		npc_says(_"Permission denied.")
		heat_tux(15)
		hurt_tux(10)
		end_dialog()
	end
</LuaCode>
----------------------------------------------------------------------

Nr=4 Text=_"man open gates"
NO_TEXT
<LuaCode>
	tux_says(_"man open gates", "NO_WAIT")
	npc_says(_"NAME", "NO_WAIT")
	npc_says(_"   open gates -- opens gates via console", "NO_WAIT")
	npc_says(" ")
	npc_says(_"SYNOPSIS", "NO_WAIT")
	npc_says(_"    open gates --inner --outer", "NO_WAIT")
	npc_says(_" ")
	npc_says(_"DESCRIPTION", "NO_WAIT")
	npc_says(_"    Opens gates via console. Awesome, isn't it?", "NO_WAIT")
	npc_says(" ")
	npc_says(_"OPTIONS", "NO_WAIT")
	npc_says(_"    --inner", "NO_WAIT")
	npc_says(_"       Opens the inner gate.", "NO_WAIT")
	npc_says(" ", "NO_WAIT")
	npc_says(_"    --outer", "NO_WAIT")
	npc_says(_"       Opens the outer gate.", "NO_WAIT")
	npc_says(" ")
	npc_says(_"SEE ALSO", "NO_WAIT")
	npc_says(_"    These are not the gates you are looking for.", "NO_WAIT")
	npc_says(" ")
	npc_says(_"AUTHOR", "NO_WAIT")
	npc_says(_"    The Hell Fortress GateAccessServer Manual Writer", "NO_WAIT")
	npc_says(" ")
	npc_says(_"                       February 22, 1992")
	hide(4) show(5, 6, 7)
</LuaCode>
----------------------------------------------------------------------

Nr=5 Text=_"open gates --inner"
NO_TEXT
<LuaCode>
	tux_says(_"open gates --inner", "NO_WAIT")
	npc_says(_"inner gate opened", "NO_WAIT")
	npc_says(_"[b]WARNING[/b]:", "NO_WAIT")
	npc_says(_"Anomalies detected!")
	change_obstacle_state("HF-Gate-inner", "opened")
	if (cmp_obstacle_state("HF-Gate-outer", "opened")) then
		update_quest("Open Sesame", "I think I managed to open the gates to the Hell Fortress. But where can I find them?")
		hide(7)
	end
	hide(5)
</LuaCode>

----------------------------------------------------------------------

Nr=6 Text=_"open gates --outer"
NO_TEXT
<LuaCode>
	tux_says(_"open gates --outer", "NO_WAIT")
	npc_says(_"outer gate opened", "NO_WAIT")
	npc_says(_"[b]WARNING[/b]:", "NO_WAIT")
	npc_says(_"Anomalies detected!")
	change_obstacle_state("HF-Gate-outer", "opened")
	if (cmp_obstacle_state("HF-Gate-inner", "opened")) then
		update_quest("Open Sesame", "I think I managed to open the gates to Hell Fortress. But where can I find them?")
		hide(7)
	end
	hide(6)
</LuaCode>
----------------------------------------------------------------------

Nr=7 Text=_"open gates --inner --outer"
NO_TEXT
<LuaCode>
	tux_says(_"open gates --inner --outer", "NO_WAIT")
	npc_says(_"inner gate opened", "NO_WAIT")
	npc_says(_"outer gate opened", "NO_WAIT")
	npc_says(_"[b]WARNING[/b]:", "NO_WAIT")
	npc_says(_"Anomalies detected!")
	change_obstacle_state("HF-Gate-inner", "opened")
	change_obstacle_state("HF-Gate-outer", "opened")
	update_quest("Open Sesame", "I think I managed to open the gates to Hell Fortress. But where can I find them?")
	hide(5, 6, 7)
</LuaCode>
----------------------------------------------------------------------

Nr=99 Text=_"logout"
NO_TEXT
<LuaCode>
	tux_says(_"logout")
	npc_says(_"exiting...")
	end_dialog()
</LuaCode>
----------------------------------------------------------------------

End of chat dialog for character="XXXXX"
