----------------------------------------------------------------------
 * 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>
	doors1 = {"Main Gate Outer W", "Main Gate Outer E", "Main Gate Guardhouse"}
	doors = {doors1[1], doors1[2], doors1[3], "Main Gate Inner W", "Main Gate Inner E"}
	if (not has_met("Town-NorthGateGuard")) then
		npc_says(_"Hey you! Linarian! What do you want here?")
		show(1, 2, 3)
		set_rush_tux(0)
		add_cookie("guard_follow_tux")
	elseif (will_rush_tux()) then
		set_rush_tux(0)
		if (has_cookie("town-northgateguard_tux_nickname_loon")) then
			npc_says_random(_"Oh, the loon returned.", _"Just the loon. I needn't have worried.")
		else
			npc_says_random(_"Oh, it is you.", _"I see you have returned.", _"Welcome back.")
		end
		end_dialog()
	else
		tux_says(_"Can I ask you something?")
		if (has_cookie("town-northgateguard_tux_nickname_loon")) then
			npc_says(_"Yes, Loon.", "NO_WAIT")
		end
		npc_says(_"You can ask, but don't expect a reply.", "NO_WAIT")
		npc_says(_"I'm guarding this gate, and if I get distracted the bots might overrun this town and kill everybody in it.")
		if (has_quest(_"Deliverance")) and (not has_cookie("knows_spencer_office")) then
			show(40)
		end
	end
	if (has_cookie("knows_spencer_office")) then
		hide(40)
	end
</LuaCode>
----------------------------------------------------------------------

Nr=1 Text=_"Just taking a look around."
<LuaCode>
	npc_says(_"Oh, great. Another curious one.")
	npc_says(_"About a week ago I let in a stranger who also said he was just taking a look around. I never saw him again. And I'm making sure he won't be getting back in either.")
	hide(1, 2, 3) show(5)
</LuaCode>
----------------------------------------------------------------------

Nr=2 Text=_"I'd like to get into town."
<LuaCode>
	npc_says(_"Funny, exactly the same could be said about all of the crazy bots out there.")
	npc_says(_"Not to mention that weird guy that came by last week. The only place in town he is going next time is straight into a holding cell.")
	hide(1, 2, 3) show(5)
</LuaCode>
----------------------------------------------------------------------

Nr=3 Text=_"I'm here to assassinate your leader and you won't stop me!"
<LuaCode>
	npc_says(_"Ok, Linarian! You asked for it!")
	npc_says(_"Open fire!")
	for var in ipairs(doors1) do
		change_obstacle_state(doors1[var], "closed")
	end
	set_faction_state("redguard", "hostile")
	end_dialog()
	hide(1, 2, 3) show(99)
</LuaCode>
----------------------------------------------------------------------

Nr=5 Text=_"Oh? Who was he? And why?"
<LuaCode>
	npc_says(_"Heh, you sure are a curious little bird, in more than one way I might say.")
	npc_says(_"On the day he visited all our computers went insane, 20 bags of food rations vanished from our storage and one of our bots was stolen.")
	npc_says(_"I think that freak lives somewhere to the east. I would love to get my hands on him and beat the life out of him. Slowly.")
	if (not has_met("Kevin")) then
		add_quest(_"A strange guy stealing from town", _"The guard in charge at the entrance of the town mentioned that somebody sneaked into town recently, and stole food and hardware. I might want to find out who this person is - apparently he lives somewhere to the east. But maybe I should get some experience and better equipment first before traveling far outside of town. With all those lethal bots roaming around I might not get far otherwise.")
	else
		add_quest(_"A strange guy stealing from town", _"Ooops, the guard must be talking about Kevin. I'll better not mention I know him and where he lives or I might find myself in a holding cell or being forced to show the guards straight to his home. But I guess that explains where Kevin got that 614 bot from.")
		add_xp(100)
-- We should perhaps not end quest here but later when talking again to Kevin and asking about the comps
		end_quest(_"A strange guy stealing from town", _"Though I probably should ask Kevin some day what he was doing with the town computers.")
	end
	npc_says(_"In any case...")
	npc_says_random(
		_"I'll let you in, but be warned: one false move and we all have flightless waterfowl for dinner. I hope I am making myself clear?",
		_"Linarian, I will let you in. Do something stupid, and you aren't coming out. Got it?")
	hide(5) show(10, 11)
</LuaCode>
----------------------------------------------------------------------

Nr=10 Text=_"Yes. I understand."
<LuaCode>
	npc_says(_"State your name Linarian.")
	tux_says(_"My name is ".. get_player_name() ..".")
	npc_says(_"You may now enter ".. get_player_name() .._". But we'll be watching you. I'll let the others know you've arrived.")
	change_obstacle_state("Main Gate Inner E", "opened")
	change_obstacle_state("Main Gate Inner W", "opened")
	if (has_quest(_"Deliverance"))and (not has_cookie("knows_spencer_office")) then
		show(40)
	end
	hide(10, 11) show(99)
</LuaCode>
----------------------------------------------------------------------

Nr=11 Text=_"No. Not at all. Your mother dresses you funny."
<LuaCode>
	npc_says(_"What did you say, you oversized duck?")
	for var in ipairs(doors1) do
		change_obstacle_state(doors1[var], "closed")
	end
	hide(10, 11) show(20, 21, 22, 23, 30)
</LuaCode>
----------------------------------------------------------------------

Nr=20 Text=_"Let me get back to you on that one."
<LuaCode>
	npc_says(_"Well, you aren't going anywhere. I'm watching you.")
	end_dialog()
</LuaCode>
---------------------------------------------------------------------

Nr=21 Text=_"... I was only wondering who you were, and why you were wearing such a bright scarlet outfit."
<LuaCode>
	npc_says(_"My apologies, Linarian. You are new here, and do not know.")
	npc_says(_"The red outfit indicates that I am of the Red Guard. We are the defenders of the town and impose the law.")
	npc_says(_"With the continued bot attacks, and the grumbling townsfolk, all of us are a little on edge.")
	npc_says(_"Tell me your name, and then you may pass.")
	tux_says(_"My name is ".. get_player_name() ..".")
	npc_says(_"You may enter.")
	for var in ipairs(doors) do
		change_obstacle_state(doors[var], "opened")
	end
	if (has_quest(_"Deliverance")) and (not has_cookie("knows_spencer_office")) then
		show(40)
	end
	hide(20, 21, 22, 23, 30) show(99)
</LuaCode>
----------------------------------------------------------------------

Nr=22 Text=_"I said: YOUR MOTHER DRESSES YOU FUNNY."
<LuaCode>
	npc_says(_"Nobody says things about my mother. Forget you, Linarian!")
	npc_says(_"Open fire!")
	set_faction_state("redguard", "hostile")
	end_dialog()
	hide(20, 21, 22, 23, 30)
</LuaCode>
----------------------------------------------------------------------

Nr=23 Text=_"I said: THIS PLACE LOOKS CLASSY."
<LuaCode>
	npc_says(_"Sure you said that.")
	hide(21, 22, 23, 30) show(30, 31, 32)
</LuaCode>
----------------------------------------------------------------------

Nr=30 Text=_"Please don't hurt me."
<LuaCode>
	npc_says(_"How about I punch you until you spit out your name, and get out of here and we call it even?")
	tux_says(_"OW")
	npc_says(_"Your name?")
	tux_says("".. get_player_name() ..".")
	tux_says(_"OW. That HURT!")
	npc_says(_"Get out of here. The Doc is the third door on the right along the main path.")
	if (del_health(40)) then else 
		del_health(1)
	end
	for var in ipairs(doors) do
		change_obstacle_state(doors[var], "opened")
	end
	end_dialog()
	if (has_quest(_"Deliverance")) and (not has_cookie("knows_spencer_office")) then
		show(40)
	end
	hide(20, 21, 22, 23, 30, 31, 32) show(99)
</LuaCode>
----------------------------------------------------------------------

Nr=31 Text=_"I want to talk to your manager, moron."
<LuaCode>
	npc_says(_"I'll be happy to send you his way, but I need your name before I let you in.")
	tux_says(_"".. get_player_name() ..".")
	npc_says(_"Talk to Spencer. His office is in the citadel, straight ahead, the first one on your left. You can't miss it.")
	npc_says(_"Now stop bothering me! You crazy loon.")
	add_cookie("town-northgateguard_tux_nickname_loon")
	for var in ipairs(doors) do
		change_obstacle_state(doors[var], "opened")
	end
	if (has_quest(_"Deliverance")) then
		add_cookie("knows_spencer_office")
		update_quest(_"Deliverance", _"I've managed to get into town, and the guard at the gate told me where I can find Spencer: his office is the first one on the left inside the Citadel, directly south of the gate. The guard also calls me a loon.")
	end
	hide(20, 30, 31, 32) show(99)
</LuaCode>
----------------------------------------------------------------------

Nr=32 Text=_"That is exactly what I said."
<LuaCode>
	npc_says(_"You are as out of your mind as that Sorenson lady.")
	npc_says(_"But I guess she's already here, so it doesn't matter if we have another loon.")
	tux_says(_"I'm a Linarian, not a loon. ".. get_player_name() .._" the Linarian.")
	npc_says(_"Get out of here ".. get_player_name() .._", the loon, and stop bothering me.")
	add_cookie("town-northgateguard_tux_nickname_loon")
	for var in ipairs(doors) do
		change_obstacle_state(doors[var], "opened")
	end
	if (has_quest(_"Deliverance")) and
	   (not has_cookie("knows_spencer_office")) then
		show(40)
	end
	hide(20, 30, 31, 32) show(99)
</LuaCode>
----------------------------------------------------------------------

Nr=40 Text=_"Can you tell me where I can find Spencer?"
<LuaCode>
	if (has_cookie("town-northgateguard_tux_nickname_loon")) then
		npc_says(_"Spencer? What would a loon like you want with the boss?")
	else
		npc_says(_"Spencer? What would you want with the boss?")
	end
	tux_says(_"Francis gave me something to deliver to him.")
	npc_says(_"Ah, Professor Popsicle. Yeah, I guess he wouldn't want to show up here anymore.")
	tux_says(_"Why not?")
	npc_says(_"Well, you'll have to ask the boss.")
	npc_says(_"Spencer's office is in the citadel, straight ahead. First one on your left.")
	add_cookie("knows_spencer_office")
	update_quest(_"Deliverance", _"I've managed to get into the town, and the guard at the gate told me where I can find Spencer: his office is the first one on the left inside the Citadel, directly south of the gate. The guard also told me he understands why Francis didn't want to deliver the cube himself, but I'll have to ask Spencer for details. Hmm...")
	hide(40)
</LuaCode>
----------------------------------------------------------------------

Nr=99 Text=_"I'll be going then."
<LuaCode>
	npc_says(_"Mhmmm.")
	if (has_cookie("town-northgateguard_tux_nickname_loon")) then
		npc_says(get_player_name() .._"... the Loon")
	end
	end_dialog()
</LuaCode>
----------------------------------------------------------------------

End of chat dialog for character="XXXXX"
