Plot 0
	name <PLOT: Pricey Head>

	% The PC will be informed that there's a price placed on his head.
	% The PC will then face plenty of world map encounters until he
	% locates the main hideout of the gang, and destroys it.

	% E1 is the scene for the current episode.
	% E2 is the character who will tell the PC where to go.
	% E3 is the scene to be used in the next episode.
	Element1 <Grab 3>
	Element2 <Character !Near 1 Heroic HasMecha>
	Element3 <Scene Town Target !Far 1>
	Element4 <Character !Far 1 !Far 3 Heroic Chaotic HasMecha !Member 0>

	% V3 = Email Indicator

	% On a cleanup request just delete this plot.
	cleanup <AdvancePlot 0>

	% If Persona E2 or E4 dies, load a new plot.
	start <ifPersona E4 else GoDelete ifPersona E2 else GoDelete>
	GoDelete <S= 101 1 AdvancePlot 0>

	5Min <if= d50 23 if= V3 0 ifG RReact E2 d70 V= 3 1 Email d5>

	% *********************
	% *** MESSAGE BLOCK ***
	% *********************

	% 01 - 05 :  Email Messages.
	%  The NPC is offering the PC a mission via email.
	Msg1 <\PERSONA E2 @ \SCENE EScene 2 :// Got some bad news, my friend. Better come here in person.>
	Msg2 <\PERSONA E2 @ \SCENE EScene 2 :// Heard something not good in \SCENE EScene 2 . Come here and I'll give you the details.>
	Msg3 <\PERSONA E2 @ \SCENE EScene 2 :// Your life is in danger. Come here and I'll tell you all I know.>
	Msg4 <\PERSONA E2 @ \SCENE EScene 2 :// Bad news- there's a price on your head. I can tell you what I heard.>
	Msg5 <\PERSONA E2 @ \SCENE EScene 2 :// Overheard something at the garage- there's a contract on your life. Come here for more info.>


sub
	Persona 2
	% Fill in something for the rumor string, so the PC will know who
	% has a job to offer. !2 will add the name of the NPC, while !1
	% will add the name of the faction.
	rumor <!2 heard something that you might be interested in.>

	greeting <NewChat ifG React 35 else GoMedReact Say 1 AddChat 1 AddChat 2>
	GoMedReact <ifG React d10 else GoLowReact Say 2 AddChat 1 AddChat 2>
	GoLowReact <Say 3 AddChat 1 AddChat 2>

	result1 <NewChat Say 4 AddChat 3 AdvancePlot 1>
	result2 <NewChat Reputation 4 d8 Say 5 AddChat 3 AdvancePlot 1>
	result3 <NewChat Say 6>

	Msg1 <Hey \PC ! I've been looking around for you... I heard something that you ought to know. There's someone trying to kill you!>
	Msg2 <You're \PC , right? I heard something the other day that you really ought to know... there's a contract out on your life. Someone's trying to kill you.>
	Msg3 <Hey, \PC . I don't like you much but I wouldn't be a very good person if I didn't tell you what I heard. There's a price on your head. Someone's trying to kill you.>
	Msg4 <I was at the shop fixing up my mecha when I overheard some zoners talking about their next hit... you. The contract's being funded by \NARRATIVE 2 . That's all I know, but \ELEMENT 4 was also there, and may be able to tell you more.>
	Msg5 <I overheard some bandits at the repair shop talking about their next big hit... Every gangster in the dead zone is apparently gunning for your hide now. \ELEMENT 4 was also there with me, and may be able to tell you more details.>
	Msg6 <\ELEMENT 4 is in \SCENE EScene 4 right now.>

	Prompt1 <Are you sure!? Who?>
	Prompt2 <I already know that.>
	Prompt3 <Where can I find \ELEMENT 4 ?>

	Plot 1
		% The attempts against the PC's life have begun...

		% V2 = Combat Indicator
		% V3 = Number of encounters fought

		% On a cleanup request just delete this plot.
		cleanup <AdvancePlot 0>

		% If Persona E4 dies, load a new plot.
		% If the PC fights 20 encounters without visiting E4,
		%  load a new plot
		start <ifPersona E4 else GoDelete ifG 20 v3 else GoDelete if= V1 0  V= 1 1 Memo 102>
		GoDelete <S= 101 1 AdvancePlot 0>

		% The order is reversed here- the better the encounter,
		% the less likely you are to meet the bad guys.
		ENC1 <if= V2 0            Block Goto GoStartCombat>
		ENC2 <if= V2 0  if= d2 1  Block Goto GoStartCombat>
		ENC3 <if= V2 0  if= d3 1  Block Goto GoStartCombat>
		GoStartCombat <Print 101 SavePos  V+ 3 1  Dynamic 2 Threat S103 100 .nu1 .nu2>
		.nu1 <if= T1 0 if= V1 0 V= 1 1 Reputation 6 -1 Return>
		.nu2 <if= T2 0 if= V1 0 V= 1 1 Reputation 6  1 XPV 50 Salvage Return>

		% Combat check. If combat has been entered, V2=1.
		% Combat ends in victory if the number of active masters on
		% team two drops to zero, or ends in defeat is the number of
		% active masters on team one drops to zero. After combat, V2=3
		% if the player was victorious or V2=2 is the player lost.
		nu1 <if= T1 0 if= V2 1  V= 2 2  V+ 3 1   Reputation 6 -5>
		nu2 <if= T2 0 if= V2 1  V= 2 3  V+ 3 1   Reputation 6  1  XPV 100>

		Msg101 <You are attacked by mecha bearing \NARRATIVE 2 insignia!>
		Msg102 <\ELEMENT 4 in \SCENE EScene 4 may know something about the people trying to kill you.>
	sub
		Persona 4
		greeting <NewChat if= P2 3 else GoCheckLoss  Say 1 History 12 Goto GoEndMission>
		GoCheckLoss <if= P2 2 else GoCheckMission ifG ComTime V5 else GoWaitRecharge P= 2 0 Say 2 AddChat 1 AddChat 2 AddChat 3>
		GoWaitRecharge <Say 3>
		GoCheckMission <if= V1 1 else GoFirstTime Say 4 AddChat 1 AddChat 2 AddChat 3>

		% Unlike most combat missions, the PC is guaranteed to be offered
		% this one, since it's personal.
		% Set V1, V3, V4 here.
		GoFirstTime <V= 3 Threat S103 175  V= 4 Reward V3 150 Memo 11 Say 6 AddChat 4 AddChat 5>

		% Do everything here that has to be done. If some of the ExtraRandom
		% parameters need to be changed, do that here as well.
		GoEndMission <S= 101 1 S+ 102 1 N= 3 E3 AdvancePlot 0>

		% Combat being entered
		result1 <EndChat Say 5 SavePos P= 2 1 V= 5 ComTime V+ 5 86400 Dynamic 2 V3 .nu1 .nu2 SetMapType 11>
		.nu1 <if= T1 0 Return>
		.nu2 <if= T2 0 Salvage Return>
		% Combat being delayed
		result2 <NewChat Say 7>
		% How many points do the enemy have?
		result3 <NewChat Say 8 AddChat 1 AddChat 2>

		% Result 4 - may add Reputation command or whatnot
		result4 <NewChat Say 9 AddChat 6>

		% Result 5 - may add Reputation command or whatnot
		result5 <NewChat Say 10 AddChat 6>

		result6 <NewChat V= 1 1 Say 13 AddChat 1 AddChat 2 AddChat 3>

		% 1 : Player has won the mission
		%    Should mention that next episode will happen in \ELEMENT 3
		Msg1 <That did it. You should have no problem from those killers from now on... At least, not until \NARRATIVE 2 regroups. I heard that some of the bandits were seen fleeing for \ELEMENT 3 .>

		% 2 : Player lost mission previously, now time to try again
		Msg2 <Would you like to try your luck against those bandits again? I can show you where the base is, but you'll have to take them out yourself.>

		% 3 : Player has lost mission, must wait until tomorrow to try again
		Msg3 <They creamed you out there... But, you're still breathing, so they won't be collecting their bounty yet. Come back tomorrow and we can try again.>

		% 4 : Player has accepted mission, has returned from repair
		Msg4 <Are you still interested in seeing the bandit base? I can lead you there now, if you want.>

		% 5 : Combat is starting
		Msg5 <Good luck. Come talk with me after you're finished and let me know how it went.>

		% 6 : NPC explains what the PC should do in this mission, and why
		Msg6 <Hi \PC . I thought you'd be coming to see me. There's a lot of word on the underground right now about that contract on your head... Every criminal yahoo with a mecha is gearing up to try and get it.>

		% 7 : PC needs some time to get ready
		Msg7 <Make sure that you're ready, because they sure as hell are.>

		% 8 : How many points? Use "\VAL V3 " for that
		Msg8 <I think they'll have around \VAL V3 points worth of mecha. Think you can handle all that?>

		% 9 : Response to Prompt4
		Msg9 <As a matter of fact, I can. The contract was paid for by \NARRATIVE 2 but is being hosted by an action merchant in the dead-zone. Destroy his gang, and the economic incentive to kill you disappears too.>

		% 10 : Response to Prompt5
		Msg10 <You can take a lot of them, I'm sure, but they'll just keep coming until you're dead... I know something you can do about it, though. Destroy the gang that's handling the contract and the wannabe hitmen should dissipate.>

		% 11 : Memo
		Msg11 <\ELEMENT 4 in \SCENE EScene 4 knows where to find the killers pursuing you.>

		Msg12 <You defeated the bandits \NARRATIVE 2 hired to kill you.>

		Msg13 <As a matter of fact I do, and out of the kindness of my heart I'll even tell you for free. You wanna go kick some ass now, or do you need to freshen up first?>

		% 1 - 3 :  Standard combat entry options:
		%         Start Mission, Delay Mission, Mission Details
		Prompt1 <I'm ready to go now.>
		Prompt2 <Let's do that a bit later.>
		Prompt3 <How much to they have at the base?>

		% 4 - 5 :  PC can have different reactions to Msg6 above
		Prompt4 <Can you tell me something useful?>
		Prompt5 <I'm not too worried about it.>

		Prompt6 <Know where I can find this gang?>

	end

end
