Plot 0
	name <PLOT: Zonk the Boss>

	% Element1 is just the leader of some town.
	element1 <Character Leader>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	%  V1 = Time Limit
	%  V2 = Combat Indicator, if V2=1 combat has been entered
	%  V3 = Email sent indicator.
	%  V4 = Salvage Indicator

	% Time limit. This plot will conclude in one day, or immediately
	% if NPC E1 is killed.
	Init_Start <ifNPCOK E1 else GoDelete if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400>
	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  if= L3 0 else GoPCWon V= 2 2  LoseRenown>
	GoPCWon <V= 2 3  Reputation 6  1  XPV 50>
	nu2 <if= T2 0 if= v2 1 if= v4 0 V= 4 1 Salvage>

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

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

	% 01 - 05 :  Email Messages.
	%  The NPC is offering the PC a mission via email.
	% Msg1 <\PERSONA E1 @ \SCENE EScene 1 :// We've got problems in \SCENE EScene 1 . I could use your help.>
	Msg1 <\PERSONA E1 @ \SCENE EScene 1 :// \SCENE EScene 1 ꤬ȯޤʤϤڤꤿ>
	% Msg2 <\PERSONA E1 @ \SCENE EScene 1 :// \SCENE EScene 1 has a troublesome bandit who needs to be stopped. Can you help?>
	Msg2 <\PERSONA E1 @ \SCENE EScene 1 :// \SCENE EScene 1 ˤ±ޤۤߤʤФʤޤ󡣶ϤƤޤ>
	% Msg3 <\PERSONA E1 @ \SCENE EScene 1 :// There's a bandit here who's been causing big trouble. I need someone to take him down a notch.>
	Msg3 <\PERSONA E1 @ \SCENE EScene 1 :// 򵯤Ƥ±Įˤޤ֤ۤѤ򤫤ƤͤɬפǤ>
	% Msg4 <\PERSONA E1 @ \SCENE EScene 1 :// Got a job for you here, if you're interested in taking down a self-proclaimed bandit king.>
	Msg4 <\PERSONA E1 @ \SCENE EScene 1 :// ⤷±Ѥ򤫤Сʤ˻ŻѰդƤޤ>
	% Msg5 <\PERSONA E1 @ \SCENE EScene 1 :// \SCENE EScene 1 needs a defender. Please come quickly.>
	Msg5 <\PERSONA E1 @ \SCENE EScene 1 :// \SCENE EScene 1 ϼäƤʪɬפȤƤޤ᤯Ƥ>

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

	% Fill in something for the rumor string, so the PC will know who
	% has a job to offer. !1 will add the name of the NPC.
	% rumor <there have been a lot of bandit attacks near town recently. !1 should do something about it.>
	rumor <ǶĮζ᤯±ν⤬¿ȯƤ롣 !1 ˴ؤäƤϤ>

	% ********************
	% *** SCRIPT BLOCK ***
	% ********************
	%  V1 = Job offer counter, V1=1 is job offered, V1=-1 if job denied
	%  V2 = Message Randomizer
	%  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 V= 2 5 V+ 2 d5 Say V2 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 170 V= 4 Reward V3 100 Goto GoCheckOffer>
	GoCheckOffer <if= P3 1 else GoMakeOffer V= 2 10 V+ 2 d5 Say V2  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 React d25 else GoNoOffer ifG PCRep 2 d25 else GoNoOffer V= 2 15 V+ 2 d5 Say V2 Goto GoAddAcceptOps>

	GoAddAcceptOps <AddChat d3 V= 2 3 V+ 2 d3 AddChat V2>
	GoAddComOps <V= 2 6 V+ 2 d2 AddChat V2 V= 2 8 V+ 2 d2 AddChat V2 V= 2 10 V+ 2 d2 AddChat V2>

	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 V= 2 20 V+ 2 d5 Say V2 Memo 103 Goto GoAddComOps>
	result2 <Goto Result1>
	result3 <Goto Result1>

	% PC refuses the job.
	result4 <NewChat Say 104 AdvancePlot 0>
	result5 <Goto Result4>
	result6 <Goto Result4>

	% PC will enter combat now.
	result7 <EndChat V= 2 25 V+ 2 d5 Say V2 Goto GoStartCombat>
	GoStartCombat <SavePos P= 2 1 Staged .scene V3>
	.scene <SCENE_DefeatLeader.txt>
	result8 <Goto result7>

	% PC will ask how many points the enemy has.
	result9 <NewChat V= 2 30 V+ 2 d5 Say V2 AddChat 7 AddChat 11>
	result10 <Goto result9>

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

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

	% 01 - 05 :  Player has won the battle and is being paid.
	% Msg1 <You did it. Good job.>
	Msg1 <褯äƤޤ줵ޡ>
	% Msg1_2 <With their leader shamed, the rest of the bandits have split up just as predicted. Here's your pay.>
	Msg1_2 <ۤΥ꡼Ѥ򤫤ΤǡĤ±ϻפäȤ򻶤ޤ餬󽷤Ǥ>
	% Msg1_3 <Their leader will never show his face around these parts again. Here's the pay you earned. Good job.>
	Msg1_3 <ۤΥ꡼Ϥ⤦٤ȤդǴ򸫤ʤǤ礦͡餬ʤ󽷤Ǥ줵ޡ>
	% Msg1_4 <They thought their leader was invincible... well, you showed them they were wrong. Here's a reward for helping to protect \SCENE EScene 1 .>
	Msg1_4 <ۤϥ꡼̵ŨȻפäƤޤĤʤۤˤλפ㤤櫓Ǥ餬 \SCENE EScene 1 äƤ줿Ȥؤ󽷤Ǥ>
	% Msg1_5 <He thought he was undefeatable... I'm glad that you proved him wrong. Here's your pay for ridding \SCENE EScene 1 of the bandits.>
	Msg1_5 <ۤϼʬ̵ŨȻפäƤޤġʤۤλפ㤤Ƥƴ򤷤¤Ǥ餬 \SCENE EScene 1 ±ӽƤ줿Ȥؤ󽷤Ǥ>

	% 06 - 10 :  Player has lost the battle.
	% Msg6 <You lost... maybe their leader really is invincible?>
	Msg6 <ʤ̤ޤĤ⤷ۤΥ꡼̵ŨʤΤ>
	% Msg7 <He beat you... maybe their leader really is as good as they said?>
	Msg7 <ʤۤ餱ޤĤ⤷ۤΥ꡼ۤ餬̤ζʤΤ>
	% Msg8 <You should have concentrated on the leader. They overwhelmed you.>
	Msg8 <꡼Τߤ˽椹٤Ǥ͡ʤۤ˰ݤޤ>
	% Msg9 <You were overwhelmed and defeated. This is a sorry day.>
	Msg9 <ʤϰݤ줽餱ޤϻǰǤ>
	% Msg10 <We tried to shame the bandit lord, but it was us who were shamed...>
	Msg10 <桹±ƬѤ򤫤褦ȤޤѤ򤫤Τϲ桹ΤۤǤ͡ġ>

	% 11 - 15 :  PC got email about mission; asked to accept
	% Msg11 <Ah, you've arrived. We have troubles here in \SCENE EScene 1 ; a local crime gang has started attacking trucks on the highway. I need someone to take the wind out of their sails.>
	Msg11 <䤢ޤ͡ \SCENE EScene 1 ꤬ޤϸȺὸĤƻϩǥȥå򽱤Ϥ᤿ΤǤۤǤäƽФȴƤʪɬפǤ>
	% Msg12 <So, did you get my email? There's a new bandit operating in \SCENE EScene 1 and I want to stop him before he gets too powerful.>
	Msg12 <Ǥϡ᡼Ϥޤ͡ \SCENE EScene 1 Ǥ뿷±ƤꡢۤϤˤʤꤹ˻ߤ᤿ΤǤ>
	% Msg13 <I've been waiting for you. I sent an email concerning our troubles... there's a new bandit lord in \SCENE EScene 1 , and I need to stop him before he gets too powerful.>
	Msg13 <ʤԤƤޤĮˤĤƤΥ᡼äΤϻǤġ \SCENE EScene 1 ˿±ƬޤϤˤʤꤹۤߤʤФʤޤ>
	% Msg14 <I guess you've heard by now. There's a new bandit lord in town, and I need some help to get rid of him.>
	Msg14 <ʤʹȤǤ礦Į˿±ƬޤۤӽƤʪɬפǤ>
	% Msg15 <Are you going to help us? I sent you an email about our problem... There's a new bandit operating in town. He's attracted all kinds of lowlifes to join his gang. I want to stop them before they become a real threat.>
	Msg15 <ĮƤޤ󤫡Į˴ؤ᡼äΤϻǤġĮǿ±ƤޤۤϤȺԤʬΰ̣˲äƤޤζҤˤʤۤߤ᤿ΤǤ>

	% 16 - 20 :  Player has "the right stuff"; will be offered mission.
	% Msg16 <I need a cavalier to help me. There's a new bandit lord in town, and he needs to be stopped before he gets more powerful.>
	Msg16 <˶ϤƤ뵳ΤɬפǤĮ˿±ƬޤϤˤʤꤹۤߤʤФʤޤ>
	% Msg17 <I have a mission available for a mecha pilot, if you're looking for work. There's a new bandit gang near town, and I want them driven out of the area.>
	Msg17 <⤷Żõʤ顢åѥåȸλŻޤĮζ᤯˿±ΰ̣ޤۤ򤳤ϰ褫ɤФΤǤ>
	% Msg18 <I'm looking for a freelance pilot to run a civic defense mission. A crime gang has moved into town and they need to be driven back out again.>
	Msg18 <ԻɱҺ¹ԤƤե꡼ΥѥåȤõƤޤȺὸĤĮ˿ޤۤ򳰤ɤʧʤФʤޤ>
	% Msg19 <\SCENE EScene 1 needs your help. A powerful new bandit has founded a gang in this town. I want them driven out as soon as possible.>
	Msg19 <\SCENE EScene 1 ϤʤϤɬפȤƤޤ붯Ϥʿ±Įǰ̣ޤǤ¤᤯ۤɤʧʤФʤޤ>
	% Msg20 <I have a job available for a cavalier. There's a new bandit gang in town, and I'd rather that they not stay here...>
	Msg20 <θλŻޤĮ˿ȺὸĤޤۤˤϤˤƤۤޤġ>

	% 21 - 25 :  PC has accepted; describe the mission.
	% Msg21 <If the leader were to be shamed, the rest of the gang would stop following him. You can do that if you defeat him in battle... The job pays $ \VAL V4 .>
	Msg21 <⤷꡼Ѥ򤫤СĤ±ۤ˽ʤʤǤ礦ۤѤ򤫤ˤϡۤƮ餫ʤФʤޤġλŻ $ \VAL V4 ˤʤޤ>
	% Msg22 <I'd like to resolve this issue with as little blooshed as possible. I just want their leader taken down. If the gang loses nerve, they'll split up and leave the area. I'll pay you $ \VAL V4 to make that happen.>
	Msg22 <ϤǤ¤Ѥ򤫤˲褷ΤǤۤΥ꡼Ѥ򤫤ǽʬǤΰ̣Сۤϻ껶ˤʤäƤϰ褫ФƹԤǤ礦Ƥ $ \VAL V4 ʧޤ>
	% Msg23 <There's too many bandits to fight them all, but take down the leader and the rest of the gang won't stick around long. It's worth $ \VAL V4 if you can defeat him in combat.>
	Msg23 <ۤ餹٤Ƥ臘ˤο¿ޤ꡼Ѥ򤫤лĤ±ĹդʤǤ礦ۤƮ餫Ƥ $ \VAL V4 ˤʤޤ>
	% Msg24 <Their leader has piloting skills... which is why they all follow him. If you could beat him in combat, he'd lose the respect of the gang. I can give you $ \VAL V4 to make that happen.>
	Msg24 <ۤΥ꡼ϥå򤦤ޤޤĤۤϳ꡼˽äƤΤǤ⤷ۤƮݤȤǤСۤϰ̣鿮Ѥ򼺤Ǥ礦Ƥ $ \VAL V4 ʧޤ>
	% Msg25 <All we need is to demoralize them and they'll move on. If the leader was defeated in combat, the other bandits would lose their respect for him, and the gang would break up. It's worth $ \VAL V4 if you can do that.>
	Msg25 <ۤλε򤯤ϰФƹԤǽʬǤ꡼Ʈ餱С¾±ϥ꡼Фºɤ򼺤̣ϲ򻶤Ǥ礦Ǥ $ \VAL V4 ˤʤޤ>

	% 26 - 30 :  Combat is starting
	% Msg26 <Good luck out there. I'll identify which mecha belongs to the leader. Shoot him down; you can ignore the others if you want. Or defeat them all and you can keep the salvage too.>
	Msg26 <򡣤ɤΥå꡼ʤΤϤꤷޤĤȤƤ¾̵뤷Ƥ⡢١ƤݤƤ⹽ޤ>
	% Msg27 <I better warn you, there's a whole lot of them out there. Just aim straight for the leader... humiliating him in battle is the most important thing. Though if you can defeat them all the salvage is yours.>
	Msg27 <ٹ𤷤Ƥޤ礦Ũο¿ޤä꡼äƤۤѿͿ뤳ȤǤפʤȤǤäȤ⡢ݤȤǤХ١⤢ʤΤΤǤ>
	% Msg28 <The leader's mecha will be identified when you reach the field; don't let him defeat you. Beat the lot of them and I'll throw in the salvage.>
	Msg28 <夤꡼ΥåȽޤ餱ʤ褦ˡۤ礤áΤᤷơ١ˤƤ>
	% Msg29 <Good luck. Strike quickly, then make a clean getaway. Or if you think you can take them defeat the whole gang and you can keep the salvage.>
	Msg29 <®ųݤ᤯ΥæƤ뤤ϡ⤷ƤϢǤݤʤС١⤢ʤΤΤǤ>
	% Msg30 <Do battle for \SCENE ESCene 1 ! Defeat them all and you can keep the salvage.>
	Msg30 <\SCENE ESCene 1 ΤäƤۤݤС١ϤʤΤΤǤ>

	% 31 - 35 :  Describe enemy point value
	% Msg31 <The gang has around \VAL V3 points worth of mecha. Your best bet is to ignore most of them, and just concentrate on taking down the boss!>
	Msg31 <̣Ϥ褽 \VAL V3 ݥȤϤĥåͭƤޤʤμ٤κۤʬ̵뤷ʬѤ򤫤뤳Ȥ˽椹뤳ȤǤ>
	% Msg32 <They've got about \VAL V3 tactical points worth of equipment. You probably can't handle all of that in a fair fight...>
	Msg32 <ۤϤ褽 \VAL V3 ݥȤϤͭƤޤƲ廊Ф餯ȤƤۤˤǤʤǤ礦ġ>
	% Msg33 <Their leader is always protected by \VAL V3 tactical points of his best men. He's going to be a hard target.>
	Msg33 <꡼Ͼ \VAL V3 ݥȤϤͥ˼ƤޤۤݤΤϰǤϤʤǤ礦>
	% Msg34 <You're looking at around \VAL V3 threat points. That's a lot to deal with... Think you can do it?>
	Msg34 <ʤϤ褽 \VAL V3 ݥȤϤ긫뤳ȤˤʤޤˤˤϤ礭ޤġʤʤˤǤޤ>
	% Msg35 <So far the gang has scrounged \VAL V3 points worth of mecha, and they're going to get a lot more if we can't stop them soon!>
	Msg35 <ޤǰ̣ \VAL V3 ݥȤϤˤʤå򤢤ޤäƼƤޤ⤷ۤ򤹤ˤǤߤ뤳ȤǤʤФϤϤޤޤ礭ʤǤ礦>


	% 101 :  Player is back from repairs, time to start mission.
	% Msg101 <Are you ready to start the mission yet?>
	Msg101 <ﳫϤνϤ⤦ޤ>
	% 102 :  Player doesn't have "the right stuff" for this mission.
	% Msg102 <I've found a law-abiding mecha pilot to defeat that bandit... I just hope that he's good enough.>
	Msg102 <±ݤƤåѥåȤϤǤ˸Ĥޤˡ餹ΩɤʿλǤӤΤۤΩɤǤ뤳Ȥ˾¤Ǥ>
	% 103 :  Memo
	% Msg103 <\ELEMENT 1 in \SCENE EScene 1 wants you to take down the local bandit lord.>
	Msg103 <\SCENE EScene 1  \ELEMENT 1 ϰ±ƬѤ򤫤褦ޤ줿>
	% 104 :  PC didn't want the job.
	% Msg104 <That's too bad. I'll have to find someone else to do it, then.>
	Msg104 <ǰǤǤ¾ˤλŻäƤʪõȤޤ礦>
	% 105 :  PC needs time to get ready.
	% Msg105 <Do whatever you need to do, then come back here and we'll start.>
	Msg105 <ɬפʸ¤ΤȤ򤹤٤ƺѤޤƤäƤʤϤޤ礦>

	% 01 - 03 :  PC will accept the mission.
	% Prompt1 <Alright, I'll help you.>
	Prompt1 <褷ߤ>
	% Prompt2 <I'm here to help.>
	Prompt2 <Ϥ褿%JG>
	% Prompt3 <I'll do what I can to help.>
	Prompt3 <%JF˼¤ΤȤ>

	% 04 - 06 :  PC doesn't want this mission.
	% Prompt4 <Sorry, I have other things to worry about.>
	Prompt4 <ʤ¾˵ʤȤ%JG>
	% Prompt5 <No, I don't want to get involved.>
	Prompt5 <빽%JFϴؤꤿʤ%JG>
	% Prompt6 <This doesn't concern me.>
	Prompt6 <ꤿȤϻפʤ%JG>

	% 07 - 08 :  Combat is starting.
	% prompt7 <All ready to go!>
	prompt7 <ü>
	% prompt8 <I'm ready to take him!>
	prompt8 <֤ۤѤ򤫤Ƥ>

	% 09 - 10 :  How many points?
	% prompt9 <How big is their gang?>
	prompt9 <ΰ̣ϤɤΤ餤礭>
	% prompt10 <How many threat points am I looking at?>
	prompt10 <%JFϤɤΤ餤Ϥ긫뤳Ȥˡ>

	% 11 - 12 :  Just a minute...
	% prompt11 <Just a moment while I get ready.>
	prompt11 <֤פ%JG>
	% prompt12 <Give me a minute to get fixed up.>
	prompt12 <֤򤯤졣>

end
