Plot 0
	name <PLOT: Rats in the Basement>

	% V1 = Time Limit
	% V2 = Combat Indicator
	% V3 = Email / Notification

	Element1 <Grab 1>
	Element2 <Character Citizen !N 1>

	rumor <many houses in !1 have a vermin problem.>

	% On a cleanup, just get rid of this plot,
	% unless the PC has a reward pending.
	cleanup <if= V2 0 AdvancePlot 0>

	% Time limit - this plot will fade after a short time.
	START <ifPersona E2 else GoDelete if= V1 0 else GotoCheckTime V= 1 ComTime V+ 1 86400>
	GotoCheckTime <ifG ComTime V1 if= V2 0  ifG 2 V3 else GoNoWorries  AdvancePlot 0>
	GoDelete <AdvancePlot 0>
	GoNoWorries <AdvancePlot 1>

	% Combat Check - if V2 = 1 then we're in combat.
	% If the player won, then after combat V2 = 2.
	% If the player lost, then after combat V2 = 3.
	NU1 <if= T1 0 if= V2 1 V= 2 3 Reputation 6 -5>
	NU2 <if= T2 0 if= V2 1 V= 2 2 Reputation 6 1 Print 6 XPV 100 S+ 1 1>

	% Email Check
	5MIN <if= V2 0 if= V3 0 if= d50 1 if# SceneID E1 ifG RReact E2 45 ifG PCRep 6 d100  V= 3 1 Email d5>
	Msg1 <\ELEMENT 2 @ \ELEMENT 1 //: If you get any free time, could you swing by \ELEMENT 1 and see me? I could use a bit of help with something.>
	Msg2 <\ELEMENT 2 @ \ELEMENT 1 //: How have you been? Next time you're in \ELEMENT 1 stop by the house.>
	Msg3 <\ELEMENT 2 @ \ELEMENT 1 //: If you're going to be in \ELEMENT 1 any time soon then stop by, I have a favor to ask of you.>
	Msg4 <\ELEMENT 2 @ \ELEMENT 1 //: Help! My basement is infested with giant foul-tempered rats and I need someone to get rid of them!>
	Msg5 <\ELEMENT 2 @ \ELEMENT 1 //: The rat situation here in \ELEMENT 1 is as bad as always. I've got them in my basement, now.>

	Msg6 <You have cleared out all the vermin.>

sub
	Persona 2
	rumor <!2 has rats in the basement.>
	% V2 = Randomizer
	% V3 = Asked for reward
	% V10 = Threat Value
	% V20 = Reward

	greeting <NewChat if= P2 3 else GoCheckWin  Say 37 AddChat 19 AddChat 20>
	GoCheckWin <if= P2 2 else GoCheckContact  ifG V3 0 else GoCWNoPrize Say 40 CashPrize V20 AdvancePlot 0>
	GoCWNoPrize <Say 41 Reputation 1 d6 AddReact d10 CashPrize d200 AdvancePlot 0>
	GoCheckContact <If= P3 2 else GoCheckEmail  ifG React 25 else GoCCNoLike  V= 2 31 V+ 2 d4 Say V2 AddChat 17 AddChat 18>
	GoCCNoLike <V= 2 21 V+ 2 d4 Say V2>
	GoCheckEmail <V= 10 PCRep 6 V+ 10 -d8 V+ 10 d8 V= 20 Reward Threat PCRep 6 100 150 if= P3 1 else GoFirstTime P= 3 2 ifG NPCRep E2 3 d100 else GoCENoSoc Say 1 AddChat 1 AddChat 2>
	GoCENoSoc <ifG PCRep 1 d100 else GoCENoHero  Say 2  AddChat 1 AddChat 2>
	GoCENoHero <ifG -d100 NPCRep E2 4 else GoCENoPassion ifG 1 NPCRep E2 5 else GoCENoPassion Say 3  AddChat 3 AddChat 2>
	GoCENoPassion <V= 2 3 V+ 2 d2 Say V2  AddChat 1 AddChat 2>
	GoFirstTime <P= 3 2 ifG React d100 else GoNoChance  V= 2 26 V+ 2 d4 Say V2 AddChat 1 AddChat 15  AddChat 16>
	GoNoChance <SayAnything AdvancePlot 0>

	GoStartCombat <EndChat Say 36 SavePos MStaged .ratscene V10 .ratdesc P= 2 1>
	.ratscene <Scene_Basement.txt>
	.ratdesc <Animal Vermin Mutant City>

	result1 <NewChat V= 2 5 V+ 2 d5 Say V2  Memo 26 AddChat 4 AddChat 5 AddChat 6 AddChat 7>
	result2 <NewChat ifG React d100 else GoR2LowReact  ifG NPCRep E2 2 d50 else GoR2NoLaw Say 11>
	GoR2NoLaw <Say 12 V= 3 1 AddChat 5 AddChat 8>
	GoR2LowReact <AddReact -d6 Say 13>
	result3 <NewChat ifG 10 SkRoll 19 else result1 Say 14  AddChat 1>
	result4 <NewChat Say 15 AddChat 9 AddChat 10>
	result5 <NewChat Say 16 V= 3 1 AddChat 11 AddChat 7 AddChat 12>

	result6 <NewChat ifG d100 PCRep 6 else GoR2NoLaw Say 17>
	result7 <NewChat Say 18 AddChat 13 AddChat 14>
	result8 <NewChat Say 19>
	result9 <Goto GoStartCombat>
	result10 <NewChat Say 20>

	result11 <Goto result4>
	result12 <NewChat Reputation 1 -1 ifG d25 PCRep 1 else GoR2NoLaw Say 21 AddReact -10>
	result13 <Goto result4>
	result14 <Goto result5>
	result15 <Reputation 1 1 Goto result1>

	result16 <NewChat Say 31>
	result17 <Goto GoStartCombat>
	result18 <NewChat Say 31>
	result19 <NewChat Say 38 P= 2 0>
	result20 <NewChat Say 39 AdvancePlot 0>

	Msg1 <Good to see you. Did you get that email I sent you? I'm in a bit of a jam and could use some help badly...>
	Msg2 <Oh, good! I was waiting for you! Look, I know you're pretty good at helping people, so when I had a problem you were the first one who came to mind...>
	Msg3 <It's horrible! \ELEMENT 1 is collapsing, and nobody does a thing about it. That's why I emailed you... You have to help me!>
	Msg4 <Ah, you must have recieved the email I sent. Well, I need your help with a small matter.>
	Msg5 <Ah, you've arrived. I'm glad that you decided to respond to my email. I really need your help...>

	Msg6 <The basement of my house has been infested with mutant rats! The damn things ate the neighbor's dog... I can't go down there, and the city guardian can't spare a man to clear them out.>
	Msg7 <\ELEMENT 1 has always had a problem with rats... Now, so does my house! They've moved into the basement. I'm not talking about tiny cheese-nibblers here, these things are the size of a mastiff.>
	Msg8 <I heard some noises in the basement a few nights ago. When I went to check it out, I found dozens of giant rats! I've kept the door barred since then... It isn't safe!>
	Msg9 <My basement is full of giant rats. I was thinking that you could, you know, head down there with a chainsword and shotgun and clear out the place for me.>
	Msg10 <I just moved into a new house... Only the real estate forgot to tell me that the basement is full of killer rats! The door has been bolted shut, but I'm worried that one might escape...>

	Msg11 <I understand. It seems that time is always short these days...>
	Msg12 <There's a reward avaliable, if that might change your mind...>
	Msg13 <Fine. I'll just find someone else to help me. Or get eaten by giant rats. Whichever comes first. Don't let it bother your conscience as you try to sleep at night.>
	Msg14 <It's going to be fine... I'm okay... I just need a moment to pull myself together. This is pretty stressful, you understand. There. I'm ready now.>
	Msg15 <That's great! I can bring you to the house now, if you'd like. Or do you have to get ready first? You probably shouldn't go down there unless your gun is full and all that.>

	Msg16 <To go to my basement and eliminate all the rats I can offer $ \VAL V20 . How does that sound? It's the most I can afford, I'm afraid.>
	Msg17 <Exactly, and that's why I don't want to do it myself. I'll keep looking for help...>
	Msg18 <This city is infested by vermin. Most of them come from the city dump, which was once a toxic waste site, which according to legend used to be a chemical weapon testing ground... In any case they're pretty bad.>
	Msg19 <Okay, but you can come back if you ever need the cash. I don't think those rats are going anywhere...>
	Msg20 <Make sure you're ready before you start with the rats. I'd hate to have giant killer vermin and a dead body in my basement... That'd really keep me awake at night...>

	Msg21 <Fine.>
	Msg22 <It's horrible living in a house infested by smelly, dangerous creatures, but at least I don't have rabbits.>
	Msg23 <I'm handling the rodent problem fine by myself.>
	Msg24 <If I need any more help with anything, I'll know who not to ask.>
	Msg25 <My house is fine, as long as the basement door doesn't shatter.>

	Msg26 <\ELEMENT 2 in \ELEMENT 1 wants you to remove some giant rats from the basement.>
	Msg27 <I'm busy. I have far too many problems right now to waste time chatting...>
	Msg28 <My house is infested. I have to find someone to clear out the vermin right away.>
	Msg29 <It's a horrible state to be in. My new house is practically uninhabitable from the start, and I have no-one to turn to...>
	Msg30 <I have to go... There's a serious problem I need to solve.>

	Msg31 <Thanks for the sympathy.>
	Msg32 <It's horrible having to live with big, smelly, dangerous creatures... But then again, one of my cousins married an arena pilot.>
	Msg33 <If this keeps up, I don't know what I'm going to do. I just want to get rid of the rats and let my life return to normal.>
	Msg34 <My house is still infested with miscellaneous vermin.>
	Msg35 <It's dangeous in my house now. The rats are locked in the basement, but I worry they could find another way out.>

	Msg36 <Be careful down there... I want to see you come back in one piece!>
	Msg37 <You ran away! What happened!? I thought you were a big shot adventurer... They're just rats!>
	Msg38 <Alright. What choice do I have? Go fix yourself up first...>
	Msg39 <Fine, just give up, defeated by a pack of rodents...>
	Msg40 <Wow, good work down there! I'll be able to sleep easy tonight. Here's the reward that I promised you.>

	Msg41 <Wow, you did great! You have my deepest gratitude. Here's a small reward for your actions... It's not much, but it's all I can afford to give.>

	Prompt1 <Tell me about the problem.>
	Prompt2 <Sorry, I don't have time to help.>
	Prompt3 <Calm down... Now, what's the matter?>
	Prompt4 <Alright, I'll get rid of your vermin.>
	Prompt5 <How much of a reward are we talking about?>

	Prompt6 <Woah, that sounds far too dangerous...>
	Prompt7 <Where did these rats come from?>
	Prompt8 <Nope, my mind is made up.>
	Prompt9 <I'm ready to go now.>
	Prompt10 <Give me some time to get ready.>

	Prompt11 <Sounds good. I'll do it!>
	Prompt12 <That's not enough... I'm out of here.>
	Prompt13 <Okay, I'll clear them out for you.>
	Prompt14 <Tell me about the reward again.>
	Prompt15 <I'd like to help you, if I can.>

	Prompt16 <That's tough.>
	Prompt17 <I can exterminate your rats now.>
	Prompt18 <I hope everything clears up.>
	Prompt19 <Let me try again!>
	Prompt20 <I'm not going back down there...>

	Plot 1
		% Time limit - this plot will fade after a short time.
		START <ifPersona E2 else GoDelete if= V1 0 else GotoCheckTime V= 1 ComTime V+ 1 43200>
		GotoCheckTime <ifG ComTime V1 AdvancePlot 0>
		GoDelete <AdvancePlot 0>

	sub
		Persona 2
		% The rats went away on their own.
		greeting <NewChat Say d5 AdvancePlot 0>
		Msg1 <The rats went away. My basement is safe once more!>
		Msg2 <There are no rats in my basement anymore. I guess they just went away... or were chased off by something bigger...>
		Msg3 <I haven't been down to the basement in a few days, but the horrible scratching noises have stopped.>
		Msg4 <The basement has been quiet lately... Maybe the giant rats have gone?>
		Msg5 <I had rats infesting my basement, but they went away.>
	end

end
