Plot 0
	name <Investigation>

	% This plot contains the monk who will be investigating
	% the artifact. The PC can always come back to this monk
	% to learn the results of the investigation.

	element1 <Grab 1>
	element2 <Character Monk Knowledge !Comrade 1>

	Init_Start <ifNPCOK E2 else GoCleanDelete>
	start <ifNPCOK E2 else GoCleanDelete>

	% If the master of this plot has died, better load a new
	% investigative plot.
	GoCleanDelete <S= 204 0 AdvancePlot 0>

	% At cleanup, delete this plot. If the PC has been given the
	% mission advance to the plot which will tell him it's over.
	cleanup <if# S103 0 else GoRealDelete if# S104 0 else GoTimeOver AdvancePlot 2>
	GoTimeOver <AdvancePlot 1>
	GoRealDelete <AdvancePlot 0>

	% Every 5 minutes, check for email.
	% 5Min <if= d30 1 if= S103 0 else GoCheckUpdate if= PCFac E1 Email 1 S= 103 1 P= 101 S202>
	5Min <if= d30 1 if= S103 0 else GoCheckUpdate if= PCFac E1 SetNPC E2 Email 1 S= 103 1 P= 101 S202>
	% GoCheckUpdate <if# P101 S203 ifG ComTime S205 Email 2 P= 101 S203 if# S202 S203 S= 203 S202>
	GoCheckUpdate <if# P101 S203 ifG ComTime S205 SetNPC E2 Email 2 P= 101 S203 if# S202 S203 S= 203 S202>

	% Msg1 : Initial message
	% Msg1 <\ELEMENT 2 @ \SCENE EScene 2 :// Our quest for ancient knowledge has led to \NARRATIVE 2 . Go there and see what you can find.>
	Msg1 <\ELEMENT 2 @ \SCENE EScene 2 :// αҤõᤷƤ \NARRATIVE 2 ˤɤĤޤعԤ뤫Ĵ٤ʤ>
	% Msg1_1 <\ELEMENT 2 @ \SCENE EScene 2 :// Explore \NARRATIVE 2 for lost technology and relics of the past. Report your findings to me.>
	Msg1_1 <\ELEMENT 2 @ \SCENE EScene 2 :// μ줿Ѥʪ \NARRATIVE 2 õʤȯ𤷤ʤ>
	% Msg1_2 <\ELEMENT 2 @ \SCENE EScene 2 :// Here is a quest for you from the temple: Proceed to \NARRATIVE 2 and search for artifacts from the past age.>
	Msg1_2 <\ELEMENT 2 @ \SCENE EScene 2 :// ϻõǤ \NARRATIVE 2 عԤλʸ仺õʤ>
	% Msg1_3 <\ELEMENT 2 @ \SCENE EScene 2 :// Our research has led us to \NARRATIVE 2 . You should proceed there and quest for relics from the past age.>
	Msg1_3 <\ELEMENT 2 @ \SCENE EScene 2 :// 򤷤Ƥ \NARRATIVE 2 ؤɤĤޤعԤλΰʪõʤ>
	% Msg1_4 <\ELEMENT 2 @ \SCENE EScene 2 :// The library has determined that something important must be located in \NARRATIVE 2 .>
	Msg1_4 <\ELEMENT 2 @ \SCENE EScene 2 :// ޽ۤ \NARRATIVE 2 ˽פʪˤʤȷդƤޤ>

	% Msg2 : Reminder message
	% Msg2_1 <\ELEMENT 2 @ \SCENE EScene 2 :// The results are in. \NARRATIVE 2 should be your next destination.>
	Msg2_1 <\ELEMENT 2 @ \SCENE EScene 2 :// Фޤˤʤ٤ \NARRATIVE 2 Ǥ>
	% Msg2_2 <\ELEMENT 2 @ \SCENE EScene 2 :// The clues uncovered so far all point to \NARRATIVE 2 .>
	Msg2_2 <\ELEMENT 2 @ \SCENE EScene 2 :// ޤ餫ˤ줿꤬Ϥ٤ \NARRATIVE 2 򼨤Ƥޤ>


sub
	Persona 2
	% rumor <!2 has been searching for PreZero artifacts>
	rumor <!2 ϵ쵪ʸ仺õƤ>
	% V2 = Message Randomizer
	% To start with, check to see whether or not the PC has already
	% been given this mission.
	greeting <NewChat if= S103 0 else GoStartWithCase if= PCFac E1 else GoCheckRep Say d3 AddChat d3>
	GoCheckRep <ifG React d50 else GoNoChance V= 2 3 V+ 2 d3 Say V2 AddChat d3 V= 2 3 V+ 2 d3 AddChat V2>
	GoNoChance <V= 2 9 V+ 2 d3 Say V2>

	% If the number of clues equals the number of wins, then E2
	% can tell the PC where to head next.
	GoStartWithCase <NewChat if= S202 S203 else GoCheckClue V= 2 15 V+ 2 d5 Say V2>

	% If the clue timer has run its course, tell the PC the next
	% place to go now.
	GoCheckClue <ifG ComTime S205 else GoMustWait S= 203 S202 V= 2 21 V+ 2 d3 Say V2 V= 2 6 V+ 2 d3 AddChat V2>

	% If the PC must wait, then there's not much else to do
	% but wait. Bummer.
	GoMustWait <V= 2 24 V+ 2 d3 Say V2>

	result1 <NewChat S= 103 1 Goto GoStartWithCase>
	result2 <Goto Result1>
	result3 <Goto result1>

	result4 <NewChat V= 2 12 V+ 2 d3 Say V2>
	result5 <Goto Result4>
	result6 <Goto result4>

	result7 <NewChat V= 2 15 V+ 2 d5 Say V2>
	result8 <Goto Result7>
	result9 <Goto result7>

	%  01 - 03 :  PC is faction member; automatically offered job.
	% Msg1 <Ah, \RANK \PC . I have a quest for you.>
	Msg1 <䤢 \RANK \PC ʤõ꤬ޤ>
	% Msg2 <It's good to see you, \RANK . The temple has need of a skilled volunteer such as yourself.>
	Msg2 <%JS˲񤨤ƴ򤷤ޤ \RANK ϤʤΤ褦ӤΩ֤ͭɬפȤƤޤ>
	% Msg3 <\PC , you have come at a good time. I have a quest which requires your skills.>
	Msg3 <\PC 礦ɤȤޤʤӤɬפõ꤬ޤ>

	%  04 - 06 :  PC is liked; will be offered the job.
	% Msg4 <Greetings, \PC . The temple archive has a quest available for an adventurer. If you are interested, we may discuss the specifics.>
	Msg4 <ˤϡ \PC εϿݴɽԤõѰդƤޤ⤷褱Сܺ٤äޤ礦>
	% Msg5 <Ah, \PC . If you aren't busy the temple has a job which requires a person with broad skills.>
	Msg5 <䡢 \PC ⤷ʤ˻ʤĿʪɬפȤʤ褦ʻŻѰդƤޤ>
	% Msg6 <I have a job that you may be interested in. The temple library has need of a cavalier to perform some field research.>
	Msg6 <ʤ褦Ȥ⤷ʤŻޤԤäƤ뵳ΤɬפȤƤޤ>

	%  10 - 12 :  PC is denied mission; NPC will just imply it.
	% Msg10 <I'm very busy today... our temple archive is conducting some field research.>
	Msg10 <ϤȤƤ˻ΤǤεϿݴɽ꤬ԤäƤΤǤ>
	% Msg11 <Did you know that in the Night of Fire more than two thirds of the people on Earth died? It's a wonder that all of human civilization wasn't lost.>
	Msg11 <Ǥϵ͸λʬʾ夬˴ʤäȤ¸ΤǤʸ٤Ƽ줿櫓ǤϤʤΤԻ׵ĤʤȤǤ>
	% Msg12 <It is our job to investigate the past, to make sure that the mistakes of history are not allowed to repeat themselves.>
	Msg12 <ˤβ֤뤳ȤΤʤ褦λĴ뤳Ȥ桹λŻǤ>

	%  13 - 15 :  PC doesn't want the job.
	% Msg13 <So that's the way it goes.>
	Msg13 <ޤʤΤǤ礦͡>
	% Msg14 <I guess we will find another cavalier, then.>
	Msg14 <Ǥϡ¾εΤ򤵤Ȥޤ礦>
	% Msg15 <In that case, I will find another.>
	Msg15 <ʤ顢¾οͤ򤵤ޤ礦>

	%  16 - 20 :  General clue reminder.
	% Msg16 <Our research indicates that some PreZero artifacts may be located in \NARRATIVE 2 . You should go there and see what you can find.>
	Msg16 <桹θˤ \NARRATIVE 2 ˵쵪ʸ仺뤫⤷ʤ褦ǤعԤäƲ뤫Ĵ٤ʤ>
	% Msg17 <The research we've been doing points to \NARRATIVE 2 as the site of an important artifact. Go there and explore. Report back here when you've found anything.>
	Msg17 <桹ԤäƤ븦ˤ \NARRATIVE 2 Ͻפʸ仺ΤΤ褦ǤعԤäõʤĤ餳𤷤äƤʤ>
	% Msg18 <There is an artifact in \NARRATIVE 2 which is vital to our research. You should travel there and seek it out.>
	Msg18 <桹θԲķʸ仺 \NARRATIVE 2 ˤޤعԤäƤõФʤ>
	% Msg19 <In \NARRATIVE 2 there's a ruin containing information about the previous age. You should attempt to locate it, and recover any artifacts that may be there. I'd give you more information but we don't know any more ourselves.>
	Msg19 <\NARRATIVE 2 ˵ξ󤬵ͤޤäפޤξĤȤᡢˤ뤫⤷ʤʸ仺ʤäȾܤ򶵤ɡ桹⤽ʾʬޤ>
	% Msg20 <Search \NARRATIVE 2 for a prezero ruin of some type. In that ruin you will find an artifact which is of great importance to our studies.>
	Msg20 <\NARRATIVE 2 ǲ餫ε쵪ΰפõʤΰפǤϲ桹θˤȤäƤؤפʸ仺ĤǤ礦>

	%  22 - 24 :  The next clue has been discovered! Yay!
	% Msg22 <We have considered the evidence you uncovered, and have reached a conclusion.>
	Msg22 <ʤȯڵˤĤƹͻȤãޤ>
	% Msg23 <Our archivist has examined all the evidence, and determined where our search for artifacts should proceed next.>
	Msg23 <Ͽݴɿͤ٤ƤξڵĴ٤Ȥõʤ٤ˤĤƷФޤ>
	% Msg24 <Your discoveries have been added to the archive. It's been determined where our research should lead us next.>
	Msg24 <ʤȯʪϵϿݴɽ˲äޤ桹θ椬ˤɤؤɤĤˤĤƷФޤ>

	%  25 - 27 :  PC must wait for the lab report.
	% Msg25 <The archivists are now interpreting your discoveries. It will take some hours before we have any results.>
	Msg25 <ϿݴɿͤʤȯʪʬϤƤޤФˤϿ֤Ǥ礦>
	% Msg26 <Your discoveries are still being analyzed. Check back in a few hours and I can tell you then what we've discovered.>
	Msg26 <ʤȯʪϤޤʬǤָ˳Τʤв桹ηޤ礦>
	% Msg27 <We are currently busy with analyzing these new archeological finds. Come back here in a little while and I may be able to tell you more.>
	Msg27 <߲桹Ͽʹ͸ųŪȯʬϤΤ˻ȤǤФäƤäСܤȤ뤫⤷ޤ>

	%  01 - 03 :  PC is interested in taking the case.
	% Prompt1 <I'll get to work on it.>
	Prompt1 <˼꤫>
	% Prompt2 <I'd like to help you.>
	Prompt2 <ߤ>
	% Prompt3 <Alright, I'll do the quest.>
	Prompt3 <ʬäõ褦>

	%  04 - 06 :  PC won't take the case.
	% Prompt4 <I have more important things to do.>
	Prompt4 <äȽפѤ%JG>
	% Prompt5 <Sorry, I can't.>
	Prompt5 <ʤ̵>
	% Prompt6 <Don't you have anyone else?>
	Prompt6 <¾ïɤ>

	%  07 - 09 :  Next clue has been discovered.
	% Prompt7 <What did you find out?>
	Prompt7 <ʬä>
	% Prompt8 <Well, tell me what you found.>
	Prompt8 <ǤϡʬäȤ򶵤Ƥ졣>
	% Prompt9 <Where should I go search next?>
	Prompt9 <ϤɤõФ>


	Plot 1
	% This plot exists only to tell the PC that the time is up.
	% start <if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400 Email d5>
	Init_Start <if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400 SetNPC E2 Email d5>
	start <if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400 SetNPC E2 Email d5>
	GoCheckTime <ifG ComTime V1 AdvancePlot 0>
	% Msg1 <\ELEMENT 2 @ \SCENE EScene 2 :// You may cease your searching. Our research grant has run out.>
	Msg1 <\ELEMENT 2 @ \SCENE EScene 2 :// õߤʤ⤬ԤƤޤޤ>
	% Msg2 <\ELEMENT 2 @ \SCENE EScene 2 :// Your quest has ended. The trail of clues has ended.>
	Msg2 <\ELEMENT 2 @ \SCENE EScene 2 :// ʤõϽλޤ꤬꤬Ԥޤ>
	% Msg3 <\ELEMENT 2 @ \SCENE EScene 2 :// Time has expired. We no longer require you to search.>
	Msg3 <\ELEMENT 2 @ \SCENE EScene 2 :// ڤǤ⤦õɬפϤޤ>
	% Msg4 <\ELEMENT 2 @ \SCENE EScene 2 :// Our exploration has ended. Your quest for us has come to an end.>
	Msg4 <\ELEMENT 2 @ \SCENE EScene 2 :// 桹õϽλޤʤõ⽪λǤ>
	% Msg5 <\ELEMENT 2 @ \SCENE EScene 2 :// We have found all there is to be found, this time. Your quest is ended.>
	Msg5 <\ELEMENT 2 @ \SCENE EScene 2 :// 󡢲桹ϤˤϤΤΤ򤹤٤ȯޤʤõϽޤ>
	sub
		Persona 2
		greeting <NewChat Say d5 AddReact d6 AdvancePlot 0>
		% Msg1 <The sequence of expeditions has reached an end. There are no more artifacts to be discovered, until we discover a new lead.>
		Msg1 <ϢõϽλޤʼ꤬꤬Ĥޤǡʾʸ仺ȯǤޤ>
		% Msg2 <We have exhausted the leads. This research project has come to an end... There will be more later, of course.>
		Msg2 <꤬꤬ԤޤõײϽλޤġ󡢸ˤʤФޤ̤õʤǤ礦>
		% Msg3 <The research project has ended. We ran out of money.>
		Msg3 <ײϽλޤ⤬Ԥޤ>
		% Msg4 <This line of research has been productive, but the time has come to move on to other things. Thanks for your help.>
		Msg4 <θϼ¤¿ΤǤ¾θơޤذܹԤޤϤ꤬Ȥޤ>
		% Msg5 <Our research has come to an end. The time has come to focus on other matters... Thank you for your help.>
		Msg5 <桹θϽλޤ¾Υơޤ˾ƤˤʤޤġϤ꤬Ȥޤ>
	end

	Plot 2
	% This plot exists to reward the PC for solving the case.
	% start <if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400 Email d5>
	Init_Start <if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400 SetNPC E2 Email d5>
	start <if= V1 0 else GoCheckTime V= 1 ComTime V+ 1 86400 SetNPC E2 Email d5>
	GoCheckTime <ifG ComTime V1 AdvancePlot 0>
	% Msg1 <\ELEMENT 2 @ \SCENE EScene 2 :// The research project is complete. Come here for a reward.>
	Msg1 <\ELEMENT 2 @ \SCENE EScene 2 :// ײϴλޤ󽷤ʤ>
	% Msg2 <\ELEMENT 2 @ \SCENE EScene 2 :// I have a reward for your participation in our research initiative.>
	Msg2 <\ELEMENT 2 @ \SCENE EScene 2 :// ʤμƳ˻äƤ줿Ȥ󽷤ѰդƤޤ>
	% Msg3 <\ELEMENT 2 @ \SCENE EScene 2 :// You've done very well in researching the past. Come here for a reward.>
	Msg3 <\ELEMENT 2 @ \SCENE EScene 2 :// ʤõȤƤ褯äƤޤ󽷤ʤ>
	% Msg4 <\ELEMENT 2 @ \SCENE EScene 2 :// The project is ended; come here for your reward.>
	Msg4 <\ELEMENT 2 @ \SCENE EScene 2 :// õײϽλޤ󽷤ʤ>
	% Msg5 <\ELEMENT 2 @ \SCENE EScene 2 :// Our research is complete. You've done very well. I have a reward for you.>
	Msg5 <\ELEMENT 2 @ \SCENE EScene 2 :// 桹θϴλޤ褯äƤޤʤ󽷤ѰդƤޤ>
	sub
		Persona 2
		greeting <NewChat Say d5 CashPrize Reward Threat PCRep 6 100 500 XPV 100 FacXP+ E1 5 AdvancePlot 0>
		% Msg1 <We've completed the set of artifacts that we set out to recover. Thank you for making this possible. Here's a reward for you.>
		Msg1 <桹ϲꤷƤʸ仺켰򤽤뤳ȤǤޤ줬ǤΤ⤢ʤΤǤ餬󽷤Ǥ>
		% Msg2 <All the artifacts we required have been recovered. Our archivists will be studying these for years. Thank you very much for your help... here's a reward.>
		Msg2 <桹˾ʸ仺Ϥ٤ƲǤޤ桹εϿݴɿͤǯƤ򸦵椹Ǥ礦Ϥ꤬ȤޤĤ餬󽷤Ǥ>
		% Msg3 <Everything we were looking for has been found. The research project is a complete success, thanks to your efforts. Here's a reward.>
		Msg3 <桹õƤΤϤ٤ƸĤޤθײϴ˽ޤʤϤ˴դޤ餬󽷤Ǥ>
		% Msg4 <This research project has been a complete success. Take this reward; you've earned it.>
		Msg4 <θײϴ˽ޤ󽷤äƤʤˤϤλʤޤ>
		% Msg5 <Thanks to you, our research project has been completed ahead of schedule. Here's a reward.>
		Msg5 <ʤ˴դޤ桹θײͽ᤯λޤ餬󽷤Ǥ>
	end

end
