Plot 0
	name <ARC: Inv: Trucker>

	Element1 <Grab 3>

	% E2 is the NPC who will give the PC the mission.
	Element2 <Character !Near 1 Trucker>

	% E3 is the next town in the series.
	Element3 <Scene Town !Far 1>

	Element4 <Scene Town !Far 1 !Far 3>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	% V2 = Combat Indicator, if V2=1 combat has been entered
	% V3 = Email sent indicator.
	% V4 = Combat Threat Level
	%   if V4=0, PC has not yet been given the mission.

	% On a cleanup request, delete this plot unless combat has been
	% entered.
	cleanup <if= V2 0 AdvancePlot 0>

	% Time limit. No time limit.
	start <ifPersona E2 else GoDelete>
	GoDelete <AdvancePlot 0>

	% 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.
	% Finally, if the player won, the calling story's faction victory
	% count (by default now story variable 101) will be increased.
	nu1 <if= T1 0 if= V2 1  V= 2 2  Reputation 6 -7  S+ 101 -1 S= 5 0>
	nu2 <if= T2 0 if= V2 1  V= 2 3  Reputation 6  1  XPV 100  N= 3 E3 S= 5 0 S+ 4 1>

	% Alternate Version: send email if PC is well-liked, regardless
	% of faction affiliation.
	5Min <if= d100 23 if= V3 0 ifG RReact E2 d120 V= 3 1 Email d5>

	% World map encounter checks.
	%  Note that the encounter can only happen after the PC has spoken
	%  to the NPC. Also note that it cannot happen twice.
	%  For encounter levels 1 and 2, the PC must make an AWARENESS roll
	%  to activate the encounter.
	ENC1 <ifG V4 0 if= V2 0 ifG AWARENESS 15  Goto GoStartCombat>
	ENC2 <ifG V4 0 if= V2 0 ifG AWARENESS  7  Goto GoStartCombat>
	ENC3 <ifG V4 0 if= V2 0  Goto GoStartCombat>

	% Combat starts here.
	GoStartCombat <Block ifYesNo 51 52 53   SavePos P= 2 1 Dynamic 2 V4 .nu1 .nu2>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Salvage Return>


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

	% 01 - 05 :  Email Messages.
	%  The NPC is offering the PC a mission via email.
	Msg1 <\PERSONA E2 @ \SCENE EScene 2 :// I've got some trouble in \SCENE EScene 2 . How about coming round?>
	Msg2 <\PERSONA E2 @ \SCENE EScene 2 :// I could use your help. Bandits holed up outside of \SCENE EScene 2 ; can't move my truck until they're gone.>
	Msg3 <\PERSONA E2 @ \SCENE EScene 2 :// Life is fine, wish there were fewer bandits. Hope all is well with you.>
	Msg4 <\PERSONA E2 @ \SCENE EScene 2 :// Trapped in \SCENE EScene 2 by bandits. Must escape soon or will go insane with boredom.>
	Msg5 <\PERSONA E2 @ \SCENE EScene 2 :// The roads aren't safe so I can't move from here. Can you help?>

	% 51 :  Description of encounter
	Msg51 <You see some mecha hiding just off the road. These could be the bandits \ELEMENT 2 told you about.>
	% 52 :  Start the encounter
	Msg52 <Approach them.>
	% 53 :  Try to evade them
	Msg53 <Don't bother.>

sub
	% This next bit is the conversation which will happen when the
	% PC speaks to E2.

	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 has been stuck here for days, thanks to the bandits hiding just out of town.>
	% eg., rumor <!2 might have a job for you.>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	% If you're feeling faint of heart, just skip this
	% and jump straight to the messages block below.
	% Here are the variables used in this conversation:
	%  V2 = Message randomizer
	%  V4 = Pay for the job
	%  V5 = Specific job description

	greeting <NewChat if= P2 3 else GoCheckLoss Say d5 Reputation 1 1 AddReact d8 AdvancePlot 0>
	GoCheckLoss <if= P2 2 else GoCheckJob V= 2 5 V+ 2 d5 Say V2 AdvancePlot 0>

	% If the PC has already accepted but not yet completed the job,
	% the NPC will merely remind him of what he's supposed to do.
	GoCheckJob <ifG P4 0 else GoFirstTime Say V5>

	GoFirstTime <if# P3 0 else GoCheckFriend V= 2 20 V+ 2 d2 Say V2 AddChat d2 V= 2 2 V+ 2 d2 AddChat V2>

	% A good friend of the NPC may also be offered a chance at the job.
	GoCheckFriend <ifG React d10 else GoAway ifG PCRep 1 d30 else GoAway V= 2 22 V+ 2 d3 Say V2 AddChat d2 V= 2 2 V+ 2 d2 AddChat V2>

	% Otherwise, no chance of getting this mission.
	% Why is there no partial PC-can-say-something-to-get-job chance?
	% Two reasons- because this job involves searching the world map,
	% it's not a premium mission. Best not to make the PC jump through
	% hoops for this kind of job. Secondly- I'm tired and it's late
	% at night. If you want extra complexity, cut and paste from one
	% of the other templates and see if you can get it to work.
	GoAway <V= 2 15 V+ 2 d5 Say V2>

	GoStartMission <V= 2 FacVar E1 1000 V+ 2 d10 P= 4 Threat V2 75 V= 4 Reward P4 175 V= 5 10 V+ 5 d5 Say V5 Memo 27>

	result1 <NewChat Goto GoStartMission>
	result2 <Goto result1>

	result3 <NewChat Say 26 AdvancePlot 0>
	result4 <Goto result3>

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

	% 01 - 05 :  Player has won the battle and is being paid.
	Msg1 <Good job out there. I was going to head to \ELEMENT 3 , but from what I heard that place is even worse for bandits. So, I'll go somewhere else... Maybe \ELEMENT 4 .>
	Msg2 <So, you stopped the bandits, huh? I can get a move on again. Here's a word to the wise- the bandits all seem to be coming from \ELEMENT 3 , so that would be a good city to avoid.>
	Msg3 <Thanks for getting rid of the bandits! I can move out now. I'll probably head to \ELEMENT 4 ... I was going to \ELEMENT 3 , but I've heard that's where all these bandits have been coming from lately.>
	Msg4 <I heard what you did out there. You're a hero to the trucker nation! If you're interested in finding some more bandits to fight, word on the wire is that their base is in \ELEMENT 3 .>
	Msg5 <You stopped the bandits! Now I can get back to work. I know a lot of truckers think you're a hero. Here's a word of advice- stay away from \ELEMENT 3 . I heard that it's impossible to get a truck in that city without getting attacked.>

	% 06 - 10 :  Player has lost the battle.
	Msg6 <Arg, they got you too, huh? Those bandits are going to be the death of me... possibly literally.>
	Msg7 <So, you got attacked by those bandits too, huh? And you aren't even a member of the trucker's union... those dregs will stop at nothing.>
	Msg8 <I heard you got your ass kicked out there. I told you they were dangerous.>
	Msg9 <I heard that you got stomped while trying to fight those bandits... Well, thanks anyway for trying to help.>
	Msg10 <The bandits got you too, huh? Something needs to be done about them.>

	% 11 - 15 :  Mission description.
	%  List pay using "$ \VAL V4".
	Msg11 <I've been stuck in place for far too long. There's a gang of bandits hiding on the road outside of town; I can't leave here until they're gone. If you could help, it'd be greatly appreciated.>
	Msg12 <I'm waiting for the bandits outside of town to leave. They're waiting for me to move, so they can loot my truck. It's kind of a catch-22 situation. If someone could get rid of them it'd be great.>
	Msg13 <I'm stuck here because of some bandits who are waiting to ambush me just outside of the town limits. If you see anyone like that in your travels, please kick their asses for me...>
	Msg14 <I've got a shipment to deliver, but can't risk moving because there's a mecha gang hiding just outside of town. If you could find them and get rid of them I'd surely appreciate the effort.>
	Msg15 <This town is driving me nuts with boredom... I can't leave yet because there's a gang of bandits waiting to ambush my truck the minute I get outside the city. Someone ought to stop them.>

	% 16 - 20 :  NPC brushes off the PC.
	Msg16 <Scoot. I'd be very busy right now if not for the bandits outside of town denying me my livelihood.>
	Msg17 <Hmmm. I guess you could say that I'm on somewhat of an unlisted vacation right now.>
	Msg18 <This town is too blasted boring.>
	Msg19 <Twenty four hours left to go, and not a blasted sedative in sight. This is way too lame.>
	Msg20 <I'd be out of here in a second, if I could leave.>

	% 21 - 22 :  Player got email, NPC needs help.
	Msg21 <So, you got my email? I need help, and I need it right now. Of course I can't pay you anything for it...>
	Msg22 <Did you get the message I sent? I'm in a real fix and need some help, but didn't know who else to ask...>

	% 23 - 25 :  NPC will offer job to PC because they're friends.
	Msg23 <I know you've done some good things for people before... I need some help.>
	Msg24 <I'm in a bit of a jam and could use some help. How about it, could you do a small favor for me?>
	Msg25 <I could really use some help. I know you're the kind who likes helping people... could I ask you for a small favor?>

	Msg26 <That's fair enough. I guess I can't ask you for more than that.>
	Msg27 <\ELEMENT 2 in \SCENE EScene 2 asked you to be on the lookout for bandits.>

	% 01 - 02 :  PC accepts mission
	Prompt1 <What do you need?>
	Prompt2 <I'll help you if I can.>

	% 03 - 04 :  PC rejects mission
	Prompt3 <Sorry, I don't work for free.>
	Prompt4 <I can't afford to help you now.>


end
