%%
%% City missions are given by civil servants. They can be politicians, police
%% officers, military, or anything else.
%%

Plot
	name <Basic City Patrol Job>
	% The basic patrol job is a fight against some generic enemy mecha.
	% This job gives salvage. This job will not result in the PC making
	% any enemies.
	requires <*GENERAL>
	PayRate 100

	% E1 is the town itself
	% E2 is a character who will offer the mission
	% E3 is a scene where the encounter will take place
	Element1 <Scene Town>
	Element2 <Character (HasMecha|POLIT) !Ally 1 RECHARGED>
	Element3 <Scene Environs>

	% SubPlot1 is the combat encounter
	SubPlot1 <*MECHAMISSION_Basic 2 3>

	% P1 = Time Limit
	% P2 = Email Indicator
	start <if= PlotStatus %plotid% 0 ifNPCOK %2% else GoDelete ifG ComTime P1 EndPlot>
	GoDelete <EndPlot>
	update <if= PlotStatus %plotid% 0 if= P1 0 P= 1 ComTime P+ 1 86400>

	% Insert email here
	5min <if= PlotStatus %plotid% 0 if= RootSceneID %1% if= P2 0  if= PCFac NPCFac %2%  if= d4 1  ifG PCCharm d40  Email 1 P= 2 1>
	Msg1   <%name2%@ \SCENE NPCSCene %2% :// Hey \RANK , I've got a mission for you in %name1%.>
	Msg1_1 <%name2%@ \SCENE NPCSCene %2% :// Report to \SCENE EScene 2 for a mission at once.>
	Msg1_2 <%name2%@ \SCENE NPCSCene %2% :// Your services are required by \FACTION NPCFac E2 . Come see me for mission briefing.>
	Msg1_3 <%name2%@ \SCENE NPCSCene %2% :// I've got a mission for you. Come to \SCENE ESCene 2 for the briefing.>

	sub
		Persona 2
		rumor0 <%name2% needs a mecha pilot to intercept an enemy patrol.>
		greeting <if= PlotStatus %plotid% %id1% else GoCheckOffer Goto GoRemind>
		*GoRemind <*MechaMissionReminder %3%>
		GoCheckOffer <if# PlotStatus %plotid% 0 else GoCheckEnemy NewChat SayAnything>
		*GoCheckEnemy <*ENEMY_CHECK GoCheckEmail ChatNPCFac GoEnd>
		GoCheckEmail <if= P2 1 else GoCheckMember Goto GoGotEmail>
		*GoGotEmail <*DidYouGetEmail GoMissionBriefing>
		GoCheckMember <if= PCFac ChatNPCFac else GoCheckAuto  Goto GoIsMember>
		*GoIsMember <*IHaveAJobForYou GoMissionBriefing>
		*GoCheckAuto <*AutoMissionTest&Mecha GoMissionBriefing GoRejectMission GoCheckSkill ChatNPCFac na>
		*GoCheckSkill <*GenericMissionTest&Mecha  GoMissionBriefing GoEnd GoRejectMission ChatNPCFac na %threat%>
		*GoRejectMission <*RejectMission GoEnd>
		GoEnd <EndPlot>
		GoMissionBriefing <NewChat Say 1  AddChat 1 AddChat 2>
		*result1 <*GoodLuckOnMission&NoEnemyFac GoR1Final ChatNPCFac na>
		GoR1Final <Memo 2 SetPlotStatus %plotid% %id1%>
		result2 <Goto GoRejectMission>
		Msg1 <A lance of unauthorized mecha has been spotted in %name3%. Defeat them and you'll get $ \VAL Reward %threat% PayRate plus salvage.>
		Msg1_1 <>
		CMsg1_1 <ifNPCSociable Accept>
		Msg1_2 <>
		CMsg1_2 <ifNPCShy Accept>
		Msg1_3 <>
		CMsg1_3 <ifNPCEasygoing Accept>
		Msg1_4 <>
		CMsg1_4 <ifNPCPassionate Accept>
		Msg1_5 <>
		CMsg1_5 <ifNPCCheerful Accept>
		Msg1_6 <>
		CMsg1_6 <ifNPCMelancholy Accept>
		Msg2 <\ELEMENT 2 in \SCENE NPCScene %2% hired you to fight some unauthorized mecha in %name3%.>
		Prompt1 <Sounds good. I'll do it.>
		Prompt1_1 <Alright, I'll do it.>
		Prompt1_2 <I'll get to work immediately.>
		Prompt2 <Sorry, I don't want this job.>
		CPrompt2 <if# PCFac ChatNPCFac Accept>
		Prompt2_1 <On second thought, I don't want this job.>
		Prompt2_2 <Really, I don't want to do this.>
	end


Plot
	name <Versus City Patrol Job>
	% The basic patrol job is a fight against some generic enemy mecha.
	% This job gives salvage.
	requires <*GENERAL -!Ne>
	PayRate 150

	% E1 is the town itself
	% E2 is a character who will offer the mission
	% E3 is a scene where the encounter will take place
	% E4 is the enemy faction
	Element1 <Scene Town>
	Element2 <Character (HasMecha|POLIT) !Ally 1 RECHARGED>
	Element3 <Scene Environs>
	Element4 <Faction !Enemy 1 !Xclude 2>

	% SubPlot1 is the combat encounter
	SubPlot1 <*MECHAMISSION_Versus 2 3 4>

	% P1 = Time Limit
	% P2 = Email Indicator
	start <if= PlotStatus %plotid% 0 ifNPCOK %2% else GoDelete ifG ComTime P1 EndPlot>
	GoDelete <EndPlot>
	update <if= PlotStatus %plotid% 0 if= P1 0 P= 1 ComTime P+ 1 86400>

	% Insert email here
	5min <if= PlotStatus %plotid% 0 if= RootSceneID %1% if= P2 0  if= PCFac NPCFac %2%  if= d4 1  ifG PCCharm d40  Email 1 P= 2 1>
	Msg1   <%name2%@ \SCENE NPCSCene %2% :// \RANK \PC , report to \SCENE EScene 2 for a mission.>
	Msg1_1 <%name2%@ \SCENE NPCSCene %2% :// I have a job for you at \SCENE EScene 2 .>
	Msg1_2 <%name2%@ \SCENE NPCSCene %2% :// %name1% needs your help. Come see me at \SCENE EScene 2 .>
	Msg1_3 <%name2%@ \SCENE NPCSCene %2% :// Call when you can; I've got a mission for you.>

	sub
		Persona 2
		rumor0 <%name2% is looking for someone to drive %name4% out of town.>
		greeting <if= PlotStatus %plotid% %id1% else GoCheckOffer Goto GoRemind>
		*GoRemind <*MechaMissionReminder %3%>
		GoCheckOffer <if# PlotStatus %plotid% 0 else GoCheckEnemy NewChat SayAnything>
		*GoCheckEnemy <*ENEMY_CHECK GoCheckEmail ChatNPCFac GoEnd>
		GoCheckEmail <if= P2 1 else GoCheckMember Goto GoGotEmail>
		*GoGotEmail <*DidYouGetEmail GoMissionBriefing>
		GoCheckMember <if= PCFac ChatNPCFac else GoCheckAuto  Goto GoIsMember>
		*GoIsMember <*IHaveAJobForYou GoMissionBriefing>
		*GoCheckAuto <*AutoMissionTest&Mecha GoMissionBriefing GoRejectMission GoCheckSkill ChatNPCFac %4%>
		*GoCheckSkill <*GenericMissionTest&Mecha  GoMissionBriefing GoEnd GoRejectMission ChatNPCFac %4% %threat%>
		*GoRejectMission <*RejectMission GoEnd>
		GoEnd <EndPlot>
		GoMissionBriefing <NewChat Say 1  AddChat 1 AddChat 2>
		*result1 <*GoodLuckOnMission&NoEnemyFac GoR1Final ChatNPCFac na>
		GoR1Final <Memo 2 SetPlotStatus %plotid% %id1%>
		result2 <Goto GoRejectMission>
		Msg1 <Raiders from %name4% have been detected in %name3%. Go drive them off and you'll earn $ \VAL Reward %threat% PayRate plus salvage rights.>
		Msg1_1 <There are infiltrators operating in %name3%; it's believed that they were sent by %name4%. Report to these coordinates and engage any hostile mecha you find. Win, and you'll get $ \VAL Reward %threat% PayRate plus salvage.>
		CMsg1_1 <ifNPCSociable Accept>
		Msg1_2 <There are mecha from %name4% in %name3%. Defeat them and you'll earn $ \VAL Reward %threat% PayRate plus salvage.>
		CMsg1_2 <ifNPCShy Accept>
		Msg1_3 <>
		CMsg1_3 <ifNPCEasygoing Accept>
		Msg1_4 <>
		CMsg1_4 <ifNPCPassionate Accept>
		Msg1_5 <>
		CMsg1_5 <ifNPCCheerful Accept>
		Msg1_6 <>
		CMsg1_6 <ifNPCMelancholy Accept>
		Msg2 <\ELEMENT 2 in \SCENE NPCScene %2% hired you to fight %name4% in %name3%.>
		Prompt1 <No problem. I'll do it.>
		Prompt1_1 <I'll be back when I'm finished.>
		Prompt1_2 <I'll get to work right away.>
		Prompt2 <You can find someone else for this mission.>
		CPrompt2 <if# PCFac ChatNPCFac Accept>
		Prompt2_1 <Sorry, I find your terms unacceptable.>
		Prompt2_2 <Really, I'd rather not get involved.>
	end

