Plot 0
	name <Bandit Job 3>

    % v1.303 Standard

	% Element1 is the mission-giver.
	element1 <Character Bandit Cheerful HasMecha>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	%  P1 = Time Limit
	%  P2 = Combat Indicator, if V2=1 combat has been entered
	%  P3 = Email sent indicator.

	% Time limit. This plot will conclude in one day, or immediately
	% if NPC E1 is killed.
	start <ifNPCOK E1 else GoDelete if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400>
	GoCheckTime <if= V2 0 ifG ComTime V1 AdvancePlot 0>
	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.
	nu1 <if= T1 0 if= V2 1  V= 2 2  LoseRenown>
	nu2 <if= T2 0 if= V2 1  V= 2 3  Reputation 6  1  XPV 50>

	% Email check. The NPC might send the PC email about this mission.
	5Min <if= d80 23 if= V3 0 ifG RReact E1 d150 ifPCChaotic V= 3 1 Email 1>

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

	% 01 - 05 :  Email Messages.
	%  The NPC is offering the PC a mission via email.
	Msg1   <\PERSONA E1 @ \SCENE EScene 1 :// I've just come into a large shipment of goods that are scheduled to fall off a truck. Help wanted.>
	Msg1_2 <\PERSONA E1 @ \SCENE EScene 1 :// Got a raid going on; your muscle would really come in handy.>
	Msg1_3 <\PERSONA E1 @ \SCENE EScene 1 :// Up for a bit of petty theft? Call me.>

sub
	% This next bit is the conversation which will happen when the
	% PC speaks to E1.
	Persona 1
	rumor <!1 is plotting something.>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	%  V1 = Job offer counter, V1=1 is job offered, V1=-1 if job denied
	%  V3 = Threat value of enemy mecha
	%  V4 = Reward offered to PC for the mission

	greeting <NewChat if= P2 3 else GoCheckLoss Say 1 AddReact d5 CashPrize V4 AdvancePlot 0>
	GoCheckLoss <if= P2 2 else GoCheckMission Say 6 AdvancePlot 0>
	GoCheckMission <if= V1 1 else GoCheckFirst Say 101 Goto GoAddComOps>

	% The first time the PC speaks to the NPC, initialize everything.
	GoCheckFirst <if= V1 0 else GoDenied V= 1 -1 V= 3 Threat PCRep 6 100 V= 4 Reward V3 150 Goto GoCheckOffer>
	GoCheckOffer <if= P3 1 else GoMakeOffer Say 11  Goto GoAddAcceptOps>
	% If the PC has "the right stuff", an offer will be made immediately.
	% If not, no offer will be made at all. In the example provided
	% below, "the right stuff" is a Lawful reputation + being liked.
	GoMakeOffer  <ifG PCMeks 0 else GoNoMeks ifG React d25 else GoNoOffer ifG PCRep 2 d25 else GoNoOffer Say 16 Goto GoAddAcceptOps>

	GoAddAcceptOps <AddChat 1 AddChat 4>
	GoAddComOps <AddChat 7 AddChat 9 AddChat 11>
    GoNoMeks <Say 106 AdvancePlot 0>
	GoNoOffer <Say 102 AdvancePlot 0>
	% If the mission was denied but not previously cleaned up, do
	% that now.
	GoDenied <SayAnything AdvancePlot 0>

	% PC will accept the job. Descibe the mission.
	result1 <NewChat V= 1 1 Say 21 Memo 103 Goto GoAddComOps>

	% PC refuses the job.
	result4 <NewChat Say 104 AdvancePlot 0>

	% PC will enter combat now.
	result7 <EndChat Say 26 Goto GoStartCombat>
	GoStartCombat <SavePos P= 2 1 Dynamic 2 V3 .nu1 .nu2 Encounter 25 0 .enemydata>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Salvage Return>
	.enemydata <Lawful +PCRA +ECRA>

	% PC will ask how many points the enemy has.
	result9 <NewChat Say 31 AddChat 7 AddChat 11>

	% PC needs some time to get ready.
	result11 <NewChat Say 105>

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

	% 01 :  Player has won the battle and is being paid.
	Msg1 <We did it! Here's your pay.>
	Msg1_1 <The wages of sin are... exactly $ \VAL V4 , in this case. Here's your pay.>

	% 06 :  Player has lost the battle.
	Msg6 <That was bad. Honestly, I didn't think they'd have so many guards...>
	Msg6_1 <Wow, they really got lucky that time... We should've annihilated the lot of them. I don't understand why we lost.>
	Msg6_2 <I thought that mission was going to be easy... They just got lucky, that's all.>
	Msg6_3 <You lost!? How could you have possibly lost!? That mission was so easy...>
	Msg6_4 <I can't believe that you lost that mission. You are such a wangtta.>

	% 11 :  PC got email about mission; asked to accept
	Msg11 <You've done this kind of work before. Maybe not this exactly, but something like it... I'm planning a raid. You could help us out, if you'd like a share of the loot.>
	Msg11_2 <I like you, so I'm gonna let you in on a secret. I've got a raid set up and ready to go. If you were interested in a cut of the take, I'd let you in on the action.>
	Msg11_3 <>
	Msg11_4 <>
	Msg11_5 <>

	% 16 :  Player has "the right stuff"; will be offered mission.
	Msg16 <I'm planning a raid. You could take part in the action, for a sizable cut, if you wanted...>
	Msg16_7 <I'm planning a raid. You want to be a bandit? How'd you like to sign up for this mission?>
	Msg16_8 <>
	Msg16_9 <>
	Msg16_0 <>

	% 21 :  PC has accepted; describe the mission.
	Msg21 <My next plan is to rob a shipment of audio equipment coming from the factory. Pay is $ \VAL V4 and salvage.>
	Msg21_1 <There's a shipment of bubblewrap passing through the area. I know it's not much but beggars can't be choosers. Anyhow, we steal the shipment and you earn $  \VAL V4 . Sound good?>
    CMsg21_1 <ifG 10 PCRenown Accept>
	Msg21_2 <I've learned about a shipment of computer chips ripe for the picking. You disable the guards, I'll ransack the trucks. The pay is $  \VAL V4 plus whatever salvage you can manage.>
	Msg21_3 <A crate of fine imported coffee is our next target. The job is worth $  \VAL V4 plus salvage.>
    CMsg21_4 <ifG PCRenown 25 Accept>
	Msg21_4 <An armored car transporting several bars of plutonium is our target. Normally I don't deal in that kind of stuff but there's a buyer already lined up. I can offer $ \VAL V4 and salvage.>
    CMsg21_4 <ifG PCRenown 45 Accept>
	Msg21_5 <We're going to raid a shipment of bootleg video game CDs. I can offer $ \VAL V4 and salvage rights for the job.>
	Msg21_6 <There's a shipment of pornographic videodiscs heading through town, and I want them... uh, for business purposes only, of course. Pay is $ \VAL V4 plus mecha salvage.>
    CMsg21_6 <ifG PCRenown 25 Accept>
	Msg21_7 <A truck full of brand-name sneakers is my next target. Eliminate the guards for $ \VAL V4 plus salvage.>
    CMsg21_7 <ifG PCRenown 15 Accept>
	Msg21_8 <Word on the street is that a shipment of toothpaste will be coming through any day now. I plan to raid the convoy. I can offer $ \VAL V4 and salvage for you to take part.>
    CMsg21_8 <ifG 30 PCRenown Accept>
	Msg21_9 <I found out about a truck full of disposable chopsticks that's ours for the taking. Pay is $ \VAL V4 plus salvage for you to take out the convoy guards. I don't expect much resistance.>
    CMsg21_9 <ifG 20 PCRenown Accept>

	% 26 :  Combat is starting
	Msg26 <Take out the guard meks, then meet back here to divvy up the loot.>
	Msg26_7 <>
	Msg26_8 <>
	Msg26_9 <>
	Msg26_10 <>

	% 31 :  Describe enemy point value
	Msg31 <I expect they'll have around \VAL V3 points, but why worry about that right now?>
	Msg31_2 <>
	Msg31_3 <>
	Msg31_4 <>
	Msg31_5 <>


	% 101 :  Player is back from repairs, time to start mission.
	Msg101 <Are you ready to start the mission yet?>
	% 102 :  Player doesn't have "the right stuff" for this mission.
	Msg102 <I'm working. Unless you have some very important news for me I don't want to hear it.>
	% 103 :  Memo
	Msg103 <\ELEMENT 1 in \SCENE EScene 1 hired you to steal some things.>
	% 104 :  PC didn't want the job.
	Msg104 <Then why are you wasting my time!? You know, some of us have jobs, we can't just stand around playing games all day.>
	Msg104_1 <That's too bad, but you gotta do what you gotta do.>
	% 105 :  PC needs time to get ready.
	Msg105 <Do whatever you need to do, then come back here and we'll start.>
    % 106 : PC doesn't have a mecha.
    Msg106 <You know what you need? If you could steal a mecha, you'd be all set for the high life.>

	% 01 :  PC will accept the mission.
	Prompt1 <I could do that.>
	Prompt1_2 <>
	Prompt1_3 <>

	% 04 :  PC doesn't want this mission.
	Prompt4 <I don't need that kind of job.>
	Prompt4_5 <>
	Prompt4_6 <>

	% 07 :  Combat is starting.
	prompt7 <I'm ready.>
	prompt7_8 <>

	% 09 :  How many points?
	prompt9 <What am I up against?>
	prompt9_10 <>

	% 11 :  Just a minute...
	prompt11 <Just a minute, I need to prepare.>
	prompt11_2 <>

end
