----------------------------------------------------------------------
 * 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

Remember to change =_ to only = for OptionText and Subtitle that will not need translation.


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

<EveryTime LuaCode>
	terminal = "dixon@maintenance: ~ # "

	cli_says(_"Login : ", "NO_WAIT")
	tux_says("dixon", "NO_WAIT")
	cli_says(_"Password : ", "NO_WAIT")
	tux_says("*******", "NO_WAIT")
	npc_says(_"Hello, Dave.")
	npc_says(_"Last login from /dev/ttyS0 on Sun, 23 mar 2057.", "NO_WAIT")
	cli_says(terminal, "NO_WAIT")
	show(0, 99)
</LuaCode>
----------------------------------------------------------------------

Nr=0 Text=_"sys_status --all"
<LuaCode>
	if (not has_cookie("Maintenance-devices") ) then
		add_cookie("Maintenance-devices")
		npc_says(_"Detecting connected devices...")
		npc_says(_"Found 03 connected auto-guns.")
		npc_says(_"Found 02 connected gates.")
		npc_says(_"Found 01 connected automated factories.")
		npc_says(_"Anomalies detected.")
		npc_says("...")
	end

	if (cmp_obstacle_state("Maintenance-gun", "enabled")) then
		npc_says(_"Gun 01 status: ENABLED", "NO_WAIT")
		npc_says(_"Gun 02 status: ENABLED", "NO_WAIT")
		npc_says(_"Gun 03 status: ENABLED", "NO_WAIT")
		if (not has_cookie("Maintenance-refusal")) then
			show(3)
		else
			show(10)
		end
	else
		npc_says(_"Gun 01 status: DISABLED", "NO_WAIT")
		npc_says(_"Gun 02 status: DISABLED", "NO_WAIT")
		npc_says(_"Gun 03 status: DISABLED", "NO_WAIT")
		show(4)
	end

	if (cmp_obstacle_state("Maintenance-gungate", "opened")) then
		npc_says(_"Access Gate status: OPEN", "NO_WAIT")
		show(5)
	else
		npc_says(_"Access Gate status: CLOSED", "NO_WAIT")
		show(6)
	end

	if (cmp_obstacle_state("MiniFactory-Gate", "opened")) then
		npc_says(_"Factory Gate status: OPEN", "NO_WAIT")
	else
		npc_says(_"Factory Gate status: CLOSED", "NO_WAIT")
		show(12)
	end

	if (has_cookie("minifactory_online")) then
		npc_says(_"Automated Factory status: ONLINE", "NO_WAIT")
	else
		npc_says(_"Automated Factory status: OFFLINE", "NO_WAIT")
	end

	cli_says(terminal, "NO_WAIT")

	hide(0)
</LuaCode>
----------------------------------------------------------------------

Nr=3 Text=_"disable guns"
<LuaCode>
	npc_says(_"I'm sorry. I'm afraid I can't let you do that.")
	cli_says(terminal, "NO_WAIT")
	hide(3) show(7)
</LuaCode>
----------------------------------------------------------------------

Nr=4 Text=_"sudo enable guns"
<LuaCode>
	cli_says(_"[sudo] password for dixon: ")
	tux_says("*******", "NO_WAIT")
	npc_says(_"Enabling gun 01 ...", "NO_WAIT")
	change_obstacle_state("Maintenance-gun1", "enabled")
	npc_says(_"Enabling gun 02 ...", "NO_WAIT")
	change_obstacle_state("Maintenance-gun2", "enabled")
	npc_says(_"Enabling gun 03 ...", "NO_WAIT")
	change_obstacle_state("Maintenance-gun", "enabled")
	npc_says(_"SUCCESS")
	cli_says(terminal, "NO_WAIT")
	hide(4) show(0)
</LuaCode>
----------------------------------------------------------------------

Nr=5 Text=_"close access gate"
<LuaCode>
	npc_says(_"Closing Access Gate ...", "NO_WAIT")
	change_obstacle_state("Maintenance-gungate", "closed")
	npc_says(_"SUCCESS")
	cli_says(terminal, "NO_WAIT")
	hide(5) show(0)
</LuaCode>
----------------------------------------------------------------------

Nr=6 Text=_"open access gate"
<LuaCode>
	npc_says(_"Opening Access Gate ...", "NO_WAIT")
	change_obstacle_state("Maintenance-gungate", "opened")
	npc_says(_"SUCCESS")
	cli_says(terminal, "NO_WAIT")
	hide(6) show(0)
</LuaCode>
----------------------------------------------------------------------

Nr=7 Text=_"sudo disable guns"
<LuaCode>
	cli_says(_"[sudo] password for dixon: ")
	tux_says("*******")
	npc_says(_"Would you like a sandwich with that?")
	cli_says("> ", "NO_WAIT")
	show(8, 9)
	topic("Make a sandwich")
</LuaCode>
----------------------------------------------------------------------

Nr=8 Text=_"yes" Topic="Make a sandwich"
<LuaCode>
	npc_says_random(_"Now how would I make one of those?", _"Sudo doesn't give you magic powers.")
	add_cookie("want_sandwich")
	cli_says(terminal, "NO_WAIT")
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=9 Text=_"no" Topic="Make a sandwich"
<LuaCode>
	npc_says(_"Good choice.")
	add_cookie("Maintenance-refusal")
	hide(7, 8, 9) next(11)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=10 Text=_"sudo disable guns"
<LuaCode>
	cli_says(_"[sudo] password for dixon: ")
	tux_says("*******")
	hide(10) next(11)
</LuaCode>
----------------------------------------------------------------------

Nr=11 Text=_"BUG, REPORT ME! Maintenance-Terminal node11 -- Disable Guns"
NO_TEXT
<LuaCode>
	npc_says(_"Disabling gun 01 ...")
	change_obstacle_state("Maintenance-gun1", "disabled")
	npc_says(_"Disabling gun 02 ...")
	change_obstacle_state("Maintenance-gun2", "disabled")
	npc_says(_"Disabling gun 03 ...")
	change_obstacle_state("Maintenance-gun", "disabled")
	npc_says(_"SUCCESS")
	cli_says(terminal, "NO_WAIT")
	show(0)
</LuaCode>
----------------------------------------------------------------------

Nr=12 Text=_"open autofactory gate"
<LuaCode>
	npc_says(_"Opening Automated Factory Gate ...", "NO_WAIT")
	change_obstacle_state("MiniFactory-Gate", "opened")
	npc_says(_"SUCCESS")
	cli_says(terminal, "NO_WAIT")
	hide(12) show(0)
</LuaCode>
----------------------------------------------------------------------

Nr=99 Text=_"logout"
<LuaCode>
	npc_says(_"Exiting", "NO_WAIT")
	npc_says(_"Goodbye Dave.")
	end_dialog()
	hide(3, 4, 5, 6, 7, 8, 9, 10)
</LuaCode>
----------------------------------------------------------------------

End of chat dialog for character="XXXXX"
