----------------------------------------------------------------------
 * 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>
	cost_time = 0
	cost_materials = 0
	cost_heat = 0
	terminal = get_player_name() .. _"@hacked_".. bot_type()..": ~ # "
	cli_says(_"Login : ", "NO_WAIT")
	tux_says(get_player_name(), "NO_WAIT")
	cli_says(_"Password : ", "NO_WAIT")
	tux_says("*******")
	npc_says(_"Last login from dev/ttyS0 on Sun, 23 mar 2057.", "NO_WAIT")
	npc_says(_"Welcome to [b]".. bot_name().."[/b]!", "NO_WAIT")
	if (npc_damage_amount() >0) then
		npc_says(_"Hardware Check : BOT DAMAGED", "NO_WAIT")
		npc_says(_"This ".. bot_type().._" unit could stand to be repaired.", "NO_WAIT")
	end
	if (has_cookie("aftertakeover_broadcast_mode")) then
		if (npc_damage_amount() > 5) then
			npc_says(_"BOTNET: UNIT TOO DAMAGED TO BROADCAST COMMANDS.", "NO_WAIT")
			npc_says(_"Entering \"single node\" mode...")
			del_cookie("aftertakeover_broadcast_mode")
		else
			npc_says(_"BOTNET: Most commands will be broadcast.", "NO_WAIT")
		end
	else
		npc_says(_"SINGLE NODE: Commands will not be broadcast.", "NO_WAIT")
	end
	cli_says(terminal, "NO_WAIT")
	show(1, 11, 12, 13, 47, 99)
</LuaCode>
----------------------------------------------------------------------

Nr=1 Text=_"cd repair&settings/"
NO_TEXT
<LuaCode>
	tux_says(_"cd repair&settings/", "NO_WAIT")
	cli_says(terminal, "NO_WAIT")
	next(2)
	topic("repair_and_settings")
</LuaCode>
----------------------------------------------------------------------
Nr=2 Text=_"BUG, REPORT ME! aftertakeover node2" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	terminal_sub = get_player_name().. _"@hacked_".. bot_type().."/repair&settings: ~ # "
	cli_says(terminal_sub, "NO_WAIT")
	show(3, 20, 30, 40)
</LuaCode>
----------------------------------------------------------------------

Nr=3 Text="cd .." Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	tux_says("cd ..", "NO_WAIT")
	pop_topic()
</LuaCode>
----------------------------------------------------------------------
Nr=11 Text=_"./hold_position.sh"
NO_TEXT
<LuaCode>
	tux_says(_"./hold_position.sh", "NO_WAIT")
	npc_says(_"Holding position.", "NO_WAIT")
	npc_says(_"script V 1.0.2 (c) gnu.org, 2054", "NO_WAIT")
	npc_says(_"Checking requirements...")
	npc_says(_"Movement unit: Power-down... [Done].", "NO_WAIT")
	npc_says(_"Status: All movement suppressed.", "NO_WAIT")
	if (has_cookie("aftertakeover_broadcast_mode")) then
		broadcast_bot_state("fixed")
	else
		set_bot_state("fixed")
	end
	cli_says(terminal, "NO_WAIT")
	hide(11) show(12, 13)
</LuaCode>
----------------------------------------------------------------------

Nr=12 Text=_"./follow_me.sh"
NO_TEXT
<LuaCode>
	tux_says(_"./follow_me.sh", "NO_WAIT")
	npc_says(_"Initiating tracking sequence.", "NO_WAIT")
	npc_says(_"Movement unit: Enabled.", "NO_WAIT")
	npc_says(_"Acquiring lock on position of " .. get_player_name() .. ".", "NO_WAIT")
	npc_says(_"Status: Following " .. get_player_name() .. ".", "NO_WAIT")
	if (has_cookie("aftertakeover_broadcast_mode")) then
		broadcast_bot_state("follow_tux")
	else
		set_bot_state("follow_tux")
	end
	cli_says(terminal, "NO_WAIT")
	hide(12) show(11, 13)
</LuaCode>
----------------------------------------------------------------------

Nr=13 Text=_"./move_freely.sh"
NO_TEXT
<LuaCode>
	tux_says(_"./move_freely.sh", "NO_WAIT")
	npc_says(_"Enable movement.", "NO_WAIT")
	npc_says(_"script V 1.0.5 (c) gnu.org, 2054", "NO_WAIT")
	npc_says(_"Checking requirements...")
	npc_says(_"Movement unit: Power-up... [Done].", "NO_WAIT")
	npc_says(_"Resuming normal patrol operations... [Done]", "NO_WAIT")
	npc_says(_"Status: Patrolling.", "NO_WAIT")
	if (has_cookie("aftertakeover_broadcast_mode")) then
		broadcast_bot_state("free")
	else
		set_bot_state("free")
	end
	cli_says(terminal, "NO_WAIT")
	hide(13) show(11, 12)
</LuaCode>
----------------------------------------------------------------------

Nr=20 Text=_"./est_repair.plx" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	tux_says(_"./est_repair.plx", "NO_WAIT")
	repair_level = get_program_revision("Repair equipment")
	damage = npc_damage_amount()
	if (damage > 0) then
		npc_says(_"Available amount of valuable circuits for repair: ".. get_gold() ..".")
		-- Estimate the average repair costs: --
		cost_time = damage / math.log(repair_level * get_program_revision("Check system integrity") + math.exp(1) - 1)
		cost_materials = damage * 10 / math.log(repair_level * get_program_revision("Extract bot parts") + math.exp(1))
		cost_heat = damage * 5 / math.log(repair_level * get_program_revision("Hacking") + math.exp(1))
		-- Display the maximum repair costs: --
		npc_says(_"Repairs on ".. bot_name() .._" will take less than ".. math.ceil(cost_time * 1.2) .._" seconds, ".. math.ceil(cost_materials * 1.2) .._" valuable circuits, and " .. math.ceil(cost_heat * 1.2) .._" heat.")
		hide(20)
		if (get_gold() < cost_materials * 1.2) then
			npc_says(_"You do not have enough valuable circuits to ensure repair of this ".. bot_type() .._" unit.")
		else
			show(21)
		end
	else
		if (has_cookie("AfterTakeover_repair")) then
			npc_says(_"Repair in progress.", "NO_WAIT")
			npc_says(_"Logout to complete repair process.")
		else
			npc_says(bot_name().._" is currently undamaged.", "NO_WAIT")
			hide(20)
		end
	end
	cli_says(terminal_sub, "NO_WAIT")
</LuaCode>
----------------------------------------------------------------------

Nr=21 Text=_"./repair.plx" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	tux_says(_"./repair.plx", "NO_WAIT")
	npc_says(_"Repair in progress.", "NO_WAIT")
	npc_says(_"Logout to complete repair process.")
	heal_npc()
	-- Calculate the true repair costs: --
	cost_time = math.ceil(cost_time * (math.random()*0.4 + 0.8) )
	cost_materials = math.ceil(cost_materials * (math.random()*0.4 + 0.8) )
	cost_heat = math.ceil(cost_heat * (math.random()*0.4 + 0.8) )
	-- Apply repair costs: --
	freeze_tux_npc(cost_time)
	del_gold(cost_materials)
	heat_tux(cost_heat)
	cli_says(terminal_sub, "NO_WAIT")
	add_cookie("AfterTakeover_repair")
	hide(20, 21)
</LuaCode>
----------------------------------------------------------------------

Nr=30 Text=_"./settings.plx" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	tux_says(_"./settings.plx", "NO_WAIT")
	npc_says(_"Welcome to the settings menu.", "NO_WAIT")
	npc_says(_"Version: 1.82c", "NO_WAIT")
	npc_says(_"No upgrades found.", "NO_WAIT")
	if (npc_damage_amount() > 5) then
		npc_says(_"UNIT TOO DAMAGED TO BROADCAST COMMANDS.", "NO_WAIT")
	else
		show(35)
	end
	npc_says(_"Which setting should be changed?", "NO_WAIT")
	hide(3, 20, 21, 30, 40) show(31, 39)
</LuaCode>
----------------------------------------------------------------------

Nr=31 Text=_"confirmation of hcf.py" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	npc_says(_"Always ask for confirmation before execution of hcf.py? [Y/N]", "NO_WAIT")
	hide(31, 35, 39) show(32, 33)
	topic("hcf.py confirmation Y/N")
</LuaCode>
----------------------------------------------------------------------

Nr=32 Text=_"Y (always ask)" Topic="hcf.py confirmation Y/N"
NO_TEXT
<LuaCode>
	npc_says(_"Confirmation will now be asked before execution of hcf.py.")
	if (not has_cookie("aftertakeover_confirm_hcf")) then 
		add_cookie("aftertakeover_confirm_hcf")
	end
	next(38)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=33 Text=_"N (don't ask)" Topic="hcf.py confirmation Y/N"
NO_TEXT
<LuaCode>
	npc_says(_"hcf.py will be executed without asking for confirmation.")
	if (has_cookie("aftertakeover_confirm_hcf")) then
		del_cookie("aftertakeover_confirm_hcf")
	end
	next(38)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=35 Text=_"broadcast commands" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	npc_says(_"Broadcast commands to all units on level? [Y/N]", "NO_WAIT")
	hide(31, 35, 39) show(36, 37)
	topic("enable broadcast Y/N")
</LuaCode>
----------------------------------------------------------------------

Nr=36 Text=_"Y (enable broadcast)" Topic="enable broadcast Y/N"
NO_TEXT
<LuaCode>
	npc_says(_"Commands will be broadcast and executed by all bots on this level under your control.", "NO_WAIT")
	npc_says(_"Entering \"botnet\" mode...")
	if (not has_cookie("aftertakeover_broadcast_mode")) then
		add_cookie("aftertakeover_broadcast_mode")
	end
	next(38)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=37 Text=_"N (disable broadcast)" Topic="enable broadcast Y/N"
NO_TEXT
<LuaCode>
	npc_says(_"Commands will only be executed by this bot.", "NO_WAIT")
	npc_says(_"Entering \"single node\" mode...")
	if (has_cookie("aftertakeover_broadcast_mode")) then
		del_cookie("aftertakeover_broadcast_mode")
	end
	next(38)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=38 Text="BUG, REPORT ME! aftertakeover node38" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	hide(32, 33, 36, 37)
	next(30)
</LuaCode>
----------------------------------------------------------------------

Nr=39 Text="leave settings.plx" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	npc_says(_"Settings saved", "NO_WAIT")
	npc_says(_"Leaving settings.plx", "NO_WAIT")
	cli_says(terminal_sub, "NO_WAIT")
	hide(31, 35, 39) show(3, 20, 30, 40)
</LuaCode>
----------------------------------------------------------------------

Nr=40 Text=_"./hostname" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	tux_says(_"./hostname", "NO_WAIT")
	npc_says(_"Welcome to the hostname menu.", "NO_WAIT")
	npc_says(_"Version: 0.15.01", "NO_WAIT")
	npc_says(_"Current botname: [b]"..bot_name().."[/b]", "NO_WAIT")
	npc_says(_"Select new name? [Y/N]", "NO_WAIT")
	cli_says("> ", "NO_WAIT")
	hide(3, 20, 21, 30, 40) show(41, 42)
	topic("change hostname Y/N")
</LuaCode>
----------------------------------------------------------------------

Nr=41 Text=_"Yes" Topic="change hostname Y/N"
NO_TEXT
<LuaCode>
	tux_says(_"Y", "NO_WAIT")
	cli_says(_"New Name: ", "NO_WAIT")

	funny_name = get_random(_"Bald", _"Chic", _"Fuzzy", _"Fluffy", _"Cuddly", _"Laughing", _"Fickle", _"Hyper", _"Machavellian", _"Happy", _"Chic", _"Ornery")
	funny_name = funny_name .." ".. get_random(_"Bunny", _"Koala", _"Lemur", _"Aardvark", _"Fox", _"Gnu", _"Puffin", _"Herring", _"Halibut", _"Mackerel", _"Trout", _"Tuna", _"Barracuda", _"Shrew", _"Bat", _"Kitten", _"Duck", _"Platypus", _"Armadillo", _"Panda", _"Hedgehog", _"Otter")

	new_name = user_input_string(_"Type a new name for this "..bot_type().._" unit.", funny_name .." ".. bot_type())
	hide(41, 42) next(43)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=42 Text=_"No" Topic="change hostname Y/N"
NO_TEXT
<LuaCode>
	tux_says(_"N", "NO_WAIT")
	cli_says(terminal_sub, "NO_WAIT")
	hide(41, 42) show(3, 20, 30, 40)
	pop_topic()
</LuaCode>
----------------------------------------------------------------------

Nr=43 Text="BUG, REPORT ME! aftertakeover node43" Topic="repair_and_settings"
NO_TEXT
<LuaCode>
	tux_says(new_name,"NO_WAIT")
	npc_says(_"Confirm renaming from [b]"..bot_name().._"[/b] to [b]"..new_name.._"[/b]? [Y/N]", "NO_WAIT")
	cli_says("> ", "NO_WAIT")
	hide(41, 42) show(44, 45)
	topic("confirm hostname Y/N")
</LuaCode>
----------------------------------------------------------------------

Nr=44 Text=_"Yes" Topic="confirm hostname Y/N"
NO_TEXT
<LuaCode>
	tux_says(_"Y", "NO_WAIT")
	display_console_message(_"Renamed [b]"..bot_name().._"[/b] to [b]"..new_name.."[/b].")
	set_bot_name(new_name)
	npc_says(_"This "..bot_type().._" unit is now designated: [b]"..bot_name().."[/b]", "NO_WAIT")
	cli_says(terminal_sub, "NO_WAIT")
	pop_topic()
	show(3, 20, 30, 40)
</LuaCode>
----------------------------------------------------------------------

Nr=45 Text=_"No" Topic="confirm hostname Y/N"
NO_TEXT
<LuaCode>
	tux_says(_"N", "NO_WAIT")
	cli_says(terminal_sub, "NO_WAIT")
	pop_topic()
	show(3, 20, 30, 40)
</LuaCode>
----------------------------------------------------------------------

Nr=47 Text=_"./hcf.py"
NO_TEXT
<LuaCode>
	tux_says(_"./hcf.py", "NO_WAIT")
	if (has_cookie("aftertakeover_confirm_hcf")) then
		npc_says(_"Are you really sure you want to destroy ".. bot_name().._"? Y/N")
		hide(1, 11, 12, 13, 47) show(48, 49)
	else
		next(50)
	end
</LuaCode>
----------------------------------------------------------------------

Nr=48 Text=_"Yes"
NO_TEXT
<LuaCode>
	npc_says(_"Destruction confirmed.")
	hide(48, 49) next(50)
</LuaCode>
----------------------------------------------------------------------

Nr=49 Text=_"No"
NO_TEXT
<LuaCode>
	npc_says(_"Destruction averted.")
	hide(48, 49) show(1, 11, 12, 13, 47, 99)
</LuaCode>
----------------------------------------------------------------------

Nr=50 Text="BUG, REPORT ME! aftertakeover node50"
NO_TEXT
<LuaCode>
	npc_says(_"Executing: Halt and Catch Fire.", "NO_WAIT")
	if (math.random(1,10) > 2 ) then  -- it shouldn't appear too often
		npc_says(_"Warning! Cooling subsystems disabled.", "NO_WAIT")
		npc_says(_"Warning! Spontaneous oxidization witH emis$ion of light aND heAt detecteddd in THE#main| procesIng unit.", "NO_WAIT")
		npc_says(_"WArn|n*! SsTeM=#faiPure%^#n 3 S 1()$++")
	else
		npc_says(_"Warning: something seems wrong.")
		npc_says(_"Error report:")
		npc_says("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "NO_WAIT")
		npc_says("Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", "NO_WAIT")
		npc_says("Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", "NO_WAIT")
		npc_says("Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
		-- gettext strings left out on purpose
	end
	if (has_cookie("dixon_very_angry")) and
	   (has_cookie("bruce_hurt")) and
	   (has_quest(_"Opening access to MS Office")) and
	   (not has_cookie("tux_has_edge")) then
		npc_says(_"()%#@(% THE BLADE IS YOURS. )##%*&%*!")
		add_cookie("tux_has_edge")
		add_item("Nobody's edge",1)
	end
	drop_dead()
</LuaCode>
----------------------------------------------------------------------

Nr=99 Text="logout"
NO_TEXT
<LuaCode>
	tux_says("logout","NO_WAIT")
	npc_says(_"Closing remote connection...")
	del_cookie("AfterTakeover_repair")
	end_dialog()
	hide(48, 49)
</LuaCode>
----------------------------------------------------------------------

End of chat dialog for character="XXXXX"
