Plot 0
	name <PLOT: GuardJob2>
	% VARIABLES USED
	% 1 -> Time Limit Timer
	% 2 -> Combat Indicator

	element1 <Character Guardian Heroic>

	rumor <there's some kind of emergency going on. Ask !1 if you want to know more.>

	% Time limit - this plot will fade after a short time.
	START <if= V1 0 else GotoCheckTime V= 1 ComTime V+ 1 5500>
	GotoCheckTime <ifG ComTime V1 if= V2 0 AdvancePlot 0>

	% If combat has been entered, V2 = 1. This is important to keep
	% the events below from activating in scenes other than the
	% plot's combat...
	NU1 <if= T1 0 if= V2 1 AdvancePlot 1 Reputation 6 -5           V= 2 2>
	NU2 <if= T2 0 if= V2 1 AdvancePlot 2 XPV 100 Reputation 6 1    V= 2 2>

sub
	Persona 1
	% The NPC who will offer the job.
	% PCs who don't have mecha will be sent elsewhere...
	% Only PCs with good reaction score will be offered a job.
	greeting <NewChat ifG PCMeks 0 else GoNoMeks ifG React 65 else GoMedReact Goto GoJobDesc>

	% PCs with a medium reaction score have a chance to get offered a job,
	% if they make a good impression on the NPC.
	GoMedReact <ifG PCRep 1 -1 else GoLowReact Say 3 AddChat 1 AddChat 2 AddChat 3>

	% PCs with a low reaction score will most likely be told to buzz off.
	GoLowReact <EndChat Say 4>

	% With no meks, the PC won't get offered a job at all, but may be told
	% about it.
	GoNoMeks <ifG PCRep 1 10 else GoNMMedReact Say 1>
	GoNMMedReact <Say 2>
	GoNMLowReact <EndChat Say 4>

	% Result 1 -> The player will try to charm the NPC with CONVERSATION
	result1 <ifG SkRoll 19 17 else GoNoCon NewChat Say 8 AddChat 4 AddChat 5>
	GoNoCon <AdvancePlot 0 NewChat Say 7>

	% Result 2 -> The player will try to impress the NPC with HEROIC rep
	result2 <ifG PCRep 1 15 else GoNoHero NewChat Say 9 AddChat 4 AddChat 5>
	GoNoHero <AdvancePlot 0 Say 6 NewChat>

	% Result 3 -> The player goes quietly away.
	result3 <NewChat Say 5>

	% Result 4 -> Go straight to the job description.
	result4 <Goto GoJobDesc>

	% Result 5 -> Go away.
	result5 <NewChat Say 10>

	% The NPC will describe the job being offered. This will depend upon the
	% PC's reputation.
	% V1 = Threat Value of Encounter
	GoJobDesc <ifG PCRep 6 90 Else GoLvl9 V= 1 18000000 E= 8 10 Say 11 goto GoChoose>
	GoLvl9 <ifG PCRep 6 80 Else GoLvl8 V= 1 9000000 E= 8 9 Say 12 goto GoChoose>
	GoLvl8 <ifG PCRep 6 70 Else GoLvl7 V= 1 5000000 E= 8 8 Say 13 goto GoChoose>
	GoLvl7 <ifG PCRep 6 60 Else GoLvl6 V= 1 2550000 E= 8 7 Say 14 goto GoChoose>
	GoLvl6 <ifG PCRep 6 50 Else GoLvl5 V= 1 1350000 E= 8 6 Say 15 goto GoChoose>
	GoLvl5 <ifG PCRep 6 40 Else GoLvl4 V= 1  750000 E= 8 5 Say 16 goto GoChoose>
	GoLvl4 <ifG PCRep 6 30 Else GoLvl3 V= 1  450000 E= 8 4 Say 17 goto GoChoose>
	GoLvl3 <ifG PCRep 6 20 Else GoLvl2 V= 1  300000 E= 8 3 Say 18 goto GoChoose>
	GoLvl2 <ifG PCRep 6 10 Else GoLvl1 V= 1  150000 E= 8 2 Say 19 goto GoChoose>
	GoLvl1 <ifG PCRep 6  0 Else GoLvl0 V= 1   60000 E= 8 1 Say 20 goto GoChoose>
	GoLvl0 <V= 1  30000 E= 8 1 Say 20 goto GoChoose>

	% The encounter has been described, and a threat rating been set.
	% See whether or not the PC will accept the job.
	GoChoose <NewChat AddChat 6>

	Result6 <EndChat Say 21 P= 2 1 AddReact d6 SavePos Dynamic 2 V1 FrzNU1 FrzNU2 Encounter 1 10 .enemydata>
	FrzNU1 <if= T1 0 Return>
	FrzNU2 <if= T2 0 Salvage Return>
	.enemydata <ArchEnemy Passionate +ECRA>

	Msg1 <I'm looking for a pilot to do a very important mission. Too bad you don't have a mecha.>
	Msg2 <I have a lot of work to do.>
	Msg3 <I haven't got a lot of time today. There's a situation which requires my immediate attention.>
	Msg4 <I don't have time to chat.>
	Msg5 <Be careful out there, okay?>
	Msg6 <It's official Guardian business. There's nothing you can help me with.>
	Msg7 <Nothing you'd be interested in.>
	Msg8 <I need a mecha pilot ASAP. We just got an emergency call, and there's no-one around here to respond. Can you help me?>
	Msg9 <Maybe you can help me... An emergency call has been recieved and I need a good pilot to respond. Can you take the call?>
	Msg10 <Too bad.>

	Msg11 <A fusion power station is being attacked by unknown mecha. If it goes nova, that'll be bad news for everyone. There's not much time left; please hurry!>
	Msg12 <An apartment complex is under attack. We have no idea who the attackers are, but they have some very powerful mecha. Please hurry.>
	Msg13 <The shopping district has just been attacked. Hundreds of shoppers are in immediate danger. We'll discuss payment when you return.>
	Msg14 <There's a shipment of medical supplies being attacked by raiders. The attackers are strong and well-organized. You need to disable them before they either steal or destroy the shipment.>
	Msg15 <A mysterious pilot has attracted a band of cut-throats and mercenaries. They've been striking at civilian targets for no apparent reason. Sensor sweeps have located their base of operations... we need to attack quickly.>
	Msg16 <Several unregistered mecha have just lobbed missiles at the industrial district. Seven workers are dead, many more injured. I need you to disable the hostile mecha, and hopefully bring in their pilots for questioning.>
	Msg17 <A local high school is being attacked by mecha! I need you to stop the attackers before anyone gets hurt. There could be a reward if you succeed.>
	Msg18 <One of the bandit gangs operating near here has become increasingly violent. They've started a policy of leaving no survivors when they rob convoys. I need you to eliminate them before they kill again.>
	Msg19 <A small group of mecha bandits just destroyed a civilian bus, killing most of those aboard. They need to be stopped before they can hurt anyone else.>
	Msg20 <A farmhouse is being attacked by power armored raiders. The family that lives there needs to be rescued. If you can stop the raiders, there might be a reward.>

	Msg21 <Here are the coordinates; please hurry!>

	prompt1 <What's the matter?>
	prompt2 <I could help you with it.>
	prompt3 <I'll come back later.>
	prompt4 <Definitely!>
	prompt5 <Not interested.>
	prompt6 <I'm on my way.>


	Plot 1
		% The player lost the battle.
		% Time limit - this plot will fade after a short time.
		START <if= V1 0 else GotoCheckTime V= 1 ComTime V+ 1 7500>
		GotoCheckTime <ifG ComTime V1 AdvancePlot 0>
	sub
		Persona 1
		% The exact message given by the NPC will vary depending on
		% whether or not the PC is well-liked...
		greeting <NewChat AdvancePlot 0 ifG React 60 else GoMedReact Say 1>
		GoMedReact <ifG PCRep 1 75 else GoMedRenown Say 2>
		GoMedRenown <ifG React 35 else GoLowReact Say 3>
		GoLowReact <ifG PCRep 1 25 else GoLowRenown Say 4>
		GoLowRenown <Say 5>

		Msg1 <I'm relieved to see you again... It's a wonder that you made it back here alive. The criminals escaped, but they could have done much more damage if not for you.>
		Msg2 <The mission was a failure. One of the toughest parts of this job is realizing that you can't save everyone...>
		Msg3 <That battle was insane. I was worried that you wouldn't be coming back.>
		Msg4 <Your mission was a failure. I know you must feel very bad about that... Just know that the criminals would have done a lot more damage if you hadn't driven them away.>
		Msg5 <Your last mission ended in failure. This is a dark day for all of us.>
	end

	Plot 2
		% The player won the battle.
		% Time limit - this plot will fade after a short time.
		START <if= V1 0 else GotoCheckTime V= 1 ComTime V+ 1 17500>
		GotoCheckTime <ifG ComTime V1 AdvancePlot 0>
	sub
		Persona 1
		greeting <NewChat AdvancePlot 0 AddReact 5 if= E8 10 Else GoLvl9 CashPrize 180000 Goto GoSaySomething>
		GoLvl9 <if= E8 9 Else GoLvl8 CashPrize 90000 Goto GoSaySomething>
		GoLvl8 <if= E8 8 Else GoLvl7 CashPrize 50000 Goto GoSaySomething>
		GoLvl7 <if= E8 7 Else GoLvl6 CashPrize 25500 Goto GoSaySomething>
		GoLvl6 <if= E8 6 Else GoLvl5 CashPrize 13500 Goto GoSaySomething>
		GoLvl5 <if= E8 5 Else GoLvl4 CashPrize  7500 Goto GoSaySomething>
		GoLvl4 <if= E8 4 Else GoLvl3 CashPrize  3000 Goto GoSaySomething>
		GoLvl3 <if= E8 3 Else GoLvl2 CashPrize  1500 Goto GoSaySomething>
		GoLvl2 <if= E8 2 Else GoLvl1 CashPrize   750 Goto GoSaySomething>
		GoLvl1 <CashPrize 500 Goto GoSaySomething>
		GoSaySomething <if= d6 1 else GoSay2 Say 1>
		GoSay2 <if= d5 1 else GoSay3 Say 2>
		GoSay3 <if= d4 1 else GoSay4 Say 3>
		GoSay4 <if= d3 1 else GoSay5 Say 4>
		GoSay5 <if= d2 1 else GoSay6 Say 5>
		GoSay6 <Say 6>

		Msg1 <Very good! Here's a reward for your efforts.>
		Msg2 <No good deed should go unthanked... Here's a reward. Hopefully it'll be enough to cover repairs and refueling.>
		Msg3 <You did really well out there. This is a reward for you.>
		Msg4 <Your mission was a complete success. Here's your reward.>
		Msg5 <Great job! This cash should cover your expenses, I hope.>
		Msg6 <You did it! Here's a little something for your good work.>
	end


end

