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

<FirstTime LuaCode>
	fuel = 97
</LuaCode>

<EveryTime LuaCode>
	show(5, 6, 99)
	npc_says(_"Welcome to Kevin's personal lawnmower.")
	npc_says(_"Your connection with this bot has been logged and reported to Kevin.")
	npc_says(_"Please state your name for identification.")
	npc_says(_"WARNING: ANY ABUSE WILL BE PUNISHED!")

	if (fuel < 5) then
		set_bot_state("fixed")
		npc_says(_"WARNING:", "NO_WAIT")
		npc_says(_"Less than [b]5%[/b] fuel remaining!", "NO_WAIT")
		npc_says(_"All movement suppressed...")
		npc_says(_"Scanning area for possible compatible energy sources...")
		hide(5, 6)
		if (has_item_backpack("Barf's Energy Drink") > 0) then
			npc_says(_"Compatible energy source found!")
			npc_says(_"[b]Barf's Energy Drink[/b]")
			show(50, 51)
		else
			npc_says(_"Could not detect compatible energy source.")
			npc_says(_"Recommended energy source: [b]Barf's Energy Drink[/b]")
			npc_says(_"Resuming hibernation...")
			end_dialog()
		end
	end

	if ((fuel > 4) and (fuel <= 97)) then
		fuel = math.floor(fuel*0.7-2)
		if (fuel < 0) then
			fuel = 0
		end
	end

</LuaCode>
----------------------------------------------------------------------

Nr=5 Text=_"I'll state my name."
NO_TEXT
<LuaCode>
	tux_says("" .. get_player_name() .. "")
	npc_says(_"Identifying as " .. get_player_name() .. "", "NO_WAIT")
	if (has_cookie("kevins_lawnmower_tux_login_granted")) then
		npc_says(_"Welcome to Kevin's lawnmower.")
		show(20)
		hide(5, 6, 30, 30, 31)
	else
		npc_says(_"Verification failed!")
		npc_says(_"WARNING: LOGIN ATTEMPT REPORTED. THERE WILL BE CONSEQUENCES!")
		add_cookie("kevins_lawnmower_tux_login")
		heat_tux(15)
		end_dialog()
	end
</LuaCode>
----------------------------------------------------------------------

Nr=6 Text=_"I'll try 'Kevin'."
NO_TEXT
<LuaCode>
	tux_says(_"Kevin")
	npc_says(_"Identifying as Kevin...", "NO_WAIT")
	npc_says(_"Identification failed!", "NO_WAIT")
	npc_says(_"Liar!", "NO_WAIT")
	npc_says(_"WARNING: ABUSE REPORTED!")
	npc_says(_"PUNISHMENT IN 3 SECONDS!")
	npc_says(_"IN 2 SECONDS!")
	npc_says(_"IN 1 SECOND!")
	npc_says(_"DIE!")
	add_cookie("kevins_lawnmower_tux_login_kevin_attempt")
	heat_tux(25)
	end_dialog()
</LuaCode>
----------------------------------------------------------------------

Nr=20 Text=_"help"
<LuaCode>
	tux_says(_"Available commands:", "NO_WAIT")
	npc_says(_"help", "NO_WAIT")
	npc_says(_"version", "NO_WAIT")
	npc_says(_"fuel_level", "NO_WAIT")
	npc_says(_"exit", "NO_WAIT")
	show(30, 31, 20)
</LuaCode>
----------------------------------------------------------------------

Nr=30 Text=_"version"
NO_TEXT
<LuaCode>
	tux_says(_"version", "NO_WAIT")
	npc_says(_"printing version...", "NO_WAIT")
	npc_says(_"MowOS 0.4.2", "NO_WAIT")
	hide(30)
</LuaCode>
----------------------------------------------------------------------

Nr=31 Text=_"fuel_level"
NO_TEXT
<LuaCode>
	tux_says(_"fuel_level", "NO_WAIT")
	npc_says(_"Printing fuel level...")
	if (fuel < 5) then
		npc_says(_"WARNING, less than [b]5%[/b] fuel remaining!")
	elseif (fuel <= 97) then
		npc_says(_"[b]"..fuel.."[/b]% remaining")
	else
		npc_says(_"Tank completely refilled.")
	end
	hide(31)
</LuaCode>
----------------------------------------------------------------------

Nr=50 Text=_"It can have one drink..."
NO_TEXT
<LuaCode>
	tux_says(_"So, where do I have to put in the drink...?", "NO_WAIT")
	tux_says(_"Ah, here!", "NO_WAIT")
	npc_says(_"[b]glug glug glug[/b]")
	npc_says(_"Tank refilled.")
	npc_says(_"Fuel status:")
	npc_says(_"[b]100[/b]%!")
	npc_says(_"This will approximately suffice for:")
	npc_says(_"1 month and 14 days.")
	npc_says(_"Dropping waste product of last fuel filling...")
	npc_says(_"Done.")
	del_item("Barf's Energy Drink", 1)
	add_item("Tungsten spikes", 2)
	fuel = 100
	add_cookie("lawnmower_fueled")
	set_bot_state("home")
	hide(50, 51)
</LuaCode>

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

Nr=51 Text=_"No, I cannot spare any drinks!"
NO_TEXT
<LuaCode>
	tux_says(_"Sorry, tin can.")
	npc_says(_"Import error: [b]null[/b] fuel received.", "NO_WAIT")
	npc_says(_"WARNING, less than [b]5%[/b] fuel remaining!")
	npc_says(_"Resuming hibernation...")
	hide(50, 51)
	end_dialog()
</LuaCode>
----------------------------------------------------------------------

Nr=99 Text="exit"
NO_TEXT
<LuaCode>
	tux_says("exit","NO_WAIT")
	npc_says(_"exiting...")
	hide(31, 30, 20, 50, 51)
	end_dialog()
</LuaCode>
----------------------------------------------------------------------

End of chat dialog for character="XXXXX"
