Plot 0
	name <The Artifact>

	% The PC has apparently been looking for an artifact.
	% A noted archeologist has been murdered. The PC can meet
	% his grad student and learn about a ruin. Going into the
	% ruin, the PC can find an item. The student will tell the
	% PC that only Kaema in Hwang-Sa temple can identify what
	% it is. The PC must then head to Hwang-Sa, but will be
	% attacked by his enemy along the way.

	% - Edited to v0.901 "light" standard

	% E1 is the scene for this episode
	element1 <Grab 3>

	% E2 is the scene for the next episode
	element2 <Scene Town Target !Far 1>

	% E3 is the grad student who will give the mission
	Element3 <Prefab>

	% E4 is the dead professor; needed just for a name
	Element4 <Prefab>

	% E5 is Kaema
	Element5 <Character>
	Stat 5 1506

	% E6 is your enemy
	Element6 <Prefab>

	% E7 is the artifact
	Element7 <Prefab>

	% V1 = Initialization Counter

	Init_Start <ifKeyItem E7 else GoCheckDelete S= 105 -1 N= 3 EScene 5 History 101 XRMystery NAV_XRMResolved AdvancePlot 1>
	start <ifKeyItem E7 else GoCheckDelete S= 105 -1 N= 3 EScene 5 History 101 XRMystery NAV_XRMResolved AdvancePlot 1>
	GoCheckDelete <ifNPCOK E3 else GoDelete ifNPCOK E5 else GoDelete ifItemOK E7 else GoDelete if= V1 0 V= 1 1 News d3 ifNPCOK N1 else GoN1Dead DeleteChar E6 E= 6 N1>
	GoN1Dead <N= 1 E6 FreezeChar E6>
	GoDelete <S= 101 1 AdvancePlot 0>

	% Msg1 <Renowned archaeologist \ELEMENT 4 in \ELEMENT 1 has been murdered. Guardians search for clues.>
	Msg1 <\ELEMENT 1 ˽ͭ̾ʹ͸ųؼ \ELEMENT 4 줿Guardiansϼ꤬õƤ롣>
	% Msg2 <History professor \ELEMENT 4 in \ELEMENT 1 has been found murdered. Guardians suspect antiquities smugglers.>
	Msg2 <\ELEMENT 1 ˽Ūʶ \ELEMENT 4 ¾Τȯ줿GuardiansϹơ̩͢ĤλŶȤǤϤʤȵäƤ롣>
	% Msg3 <Famed archaeologist \ELEMENT 4 has been murdered by antiquities smugglers in \ELEMENT 1 . Guardians search for leads.>
	Msg3 <ͭ̾ʹ͸ųؼ \ELEMENT 4  \ELEMENT 1 ǹơ̩͢Ĥˤ껦줿Guardiansϼ꤬õƤ롣>

	% Msg101 <You discovered a mysterious emerald in the \ELEMENT 1 ruins.>
	Msg101 <\ELEMENT 1 ΰפԻ׵Ĥʥɤȯ>

sub
	Persona 3
	% V1 = Initialization
	% The grad student. Phase one: PC must locate the artifact.
	% rumor <!3 was a student of the murdered professor.>
	rumor <!3 ϻ줿ζҤ>
	greeting <NewChat if= V1 1 else GoCheckFirst Say 7 AddChat 5 AddChat 6>
	GoCheckFirst <if= P1 1 else GoNotYet Say 1 AddChat 1 AddChat 2>
	GoNotYet <SayAnything>
	result1 <NewChat Say 2 AddChat 3>
	result2 <NewChat Say 3 AddChat 3>
	result3 <NewChat Say 4 V= 1 1 AddChat 4 Memo 6>
	result4 <NewChat Say 5 AddChat 5 AddChat 6>
	result5 <EndChat Say 9 SavePos LoadD .scene PassVar 1 E7 PassVar 2 S103 PassVar 3 5 PassVar 4 4 SeekGate -1>
	.scene <SCENE_ItemDungeon.txt>
	result6 <NewChat Say 8>
	% Msg1 <I can't believe what happened to Professor \ELEMENT 4 ... Who would do such a thing?>
	Msg1 < \ELEMENT 4 οȤ˵äȤ򿮤ޤġ줬ʤȤ>
	% Msg2 <It's been all over the news. Some thieves killed the professor and ransacked \PPR E4 office. It doesn't make sense. We haven't discovered anything valuable in the ruins; there's probably nothing valuable there.>
	Msg2 <λ֤ǥ˥塼ˤʤäƤޤ衣򻦳 \PPR E4 θ漼򤢤ä±ޤʤȤ򤷤Ƥ̵̤ʤΤˡΰפǤϲ⵮ŤʤΤϸĤäƤޤ󡣤֤󤢤ˤϲͤΤΤϤʤǤ礦>
	% Msg3 <\ELEMENT 4 was a great researcher. It makes no sense that \SPR E4 was killed... The ruin we're exploring is a cultural dig site. We haven't discovered anything valuable; there's probably nothing valuable there.>
	Msg3 <\ELEMENT 4 ϰʸԤǤͳϸޤġ䤿õƤפʸŪȯǤΰפǤϲ⵮ŤʤΤϸĤäƤޤ󡣤֤󤢤ˤϲͤΤΤϤʤǤ礦>
	% Msg4 <They're just outside of town. We've explored down to about \VAL S103 meters deep; \ELEMENT 4 wouldn't let us dig past that... \SPR E4 said there were too many monsters past that depth.>
	Msg4 <ΰפĮΤˤޤ䤿ϲ褽 \VAL S103 ᡼ȥޤõޤ \ELEMENT 4 餽ʾϷʤȸƤޤġˤСο᤮вʪФ뤽Ǥ>
	% Msg5 <I don't see why not. Our expedition here is finished... If you could find anything that we missed, that could be very useful. Would you like to go there now, or do you need to prepare?>
	Msg5 <ǤΰפõϽޤġ⤷䤿ƨΤ򸫤Ĥ顢ϤʤΩĤ⤷ޤ󡣺פعԤޤȤɬפޤ>
	% Msg6 <The ruins in \ELEMENT 1 have been explored to \VAL S103 meters deep, but no farther.>
	Msg6 <\ELEMENT 1 ΰפϲ \VAL S103 ᡼ȥޤõ줿ʾĴ٤Ƥʤ>
	% Msg7 <Do you want to explore the ruins?>
	Msg7 <ΰפõˤޤ>
	% Msg8 <It's pretty dangerous down there, so you'll want to make sure everything is in top shape before you head down.>
	Msg8 <ΰפ˴Ǥ顢ԤƤ>
	% Msg9 <Be careful. The place is crawling with monsters and all kinds of other nasty things... If you get past your depth come back up.>
	Msg9 <Ĥơˤϲʪ󤪤ꡢ¾͡⤿󤢤ޤġ⤷᤮äȤǤ礦>
	% Prompt1 <What happened here?>
	Prompt1 <ǲä>
	% Prompt2 <Tell me about the professor.>
	Prompt2 <ζˤĤƶƤ졣>
	% Prompt3 <Tell me about the ruins.>
	Prompt3 <ΰפˤĤƶƤ졣>
	% Prompt4 <Can I see the ruins?>
	Prompt4 <פ򸫤Ƥ롩>
	% Prompt5 <I'm ready to go.>
	Prompt5 <Ԥ%JG>
	% Prompt6 <Maybe I should get ready first.>
	Prompt6 <ޤϽʤȡ>

Plot 1
	% The PC has recovered the artifact, and now heads back to
	% the surface.

	% V1 = Combat recharge indicator
	% V10 = Told NPC don't have item

	Init_Start <ifNPCOK E5 else GoDelete>
	start <ifNPCOK E5 else GoDelete if= V1 -1 else goCheckCombat V= 1 1 ForceChat E6>
	GoCheckCombat <if= SceneID 1 else GoCheckTown if= V1 0 Block V= 1 -1 Alert 1 SavePos Dynamic 2 Threat S103 90 .nu1 .nu2>
	.nu1 <if= T1 0 Return>
	.nu2 <if= T2 0 Return>
	GoCheckTown <ifScene .scene V= 1 0>
	.scene <TOWN>
	GoDelete <S= 101 1 AdvancePlot 0>

	% Msg1 <While exiting town, you are attacked by mecha!>
	Msg1 <ĮФ褦Ȥȡå˽줿>

sub
	Persona 3
	% The grad student; will tell the PC to go to Hwang-Sa.
	greeting <NewChat if= V1 0 else GoBeenBefore Say 1 AddChat 1 AddChat 2>
	GoBeenBefore <SayAnything>
	result1 <NewChat Reputation 3 d8 Reputation 2 1   V= 1 1  XPV 100  Say 2 Memo 4 AddChat 3>
	result2 <NewChat Reputation 3 -d8 Reputation 2 -1 V= 1 1  XPV 100  Say 3 Memo 5 AddChat 4>
	result3 <NewChat Say 6>
	result4 <goto result3>
	% Msg1 <You had a pretty long expedition down there. Some of the researchers thought you might've been eaten by a cave snail. Did you find anything interesting?>
	Msg1 <ʤĹõä褦Ǥ͡ˤϤʤƶĥ˿٤줿ΤǤϤʤȻפäƤͤ⤤ޤ衣̣ΤϸĤޤ>
	% Msg2 <Wow... we haven't found anything else like that on the entire dig! It might be important. Your best bet would be to bring it to the archivist at Hwang-Sa temple to have it identified.>
	Msg2 <ȡġ桹ȯǤϤΤ褦ʤΤϸĤޤǤϽפʤΤ⤷ޤ󡣤 Hwang-Sa εϿݴɿͤΤȤػäƹԤꤷƤ餦ΤɤκǤ礦>
	% Msg3 <That's really disappointing. Since you left, an archivist from Hwang-Sa temple has been asking about the ruin. If you had found anything, they might have been interested in financing further exploration.>
	Msg3 <ϤäǤ͡ʤФƤ顢Hwang-Sa εϿݴɿͤפˤĤʹƤޤ⤷ʤ򸫤ĤƤСõ³Ԥ˽л񤹤뵤ˤʤä⤷ޤ>
	% Msg4 <You should bring the emerald to Hwang-Sa temple to have it identified.>
	Msg4 <Υɤ Hwang-Sa ػäƹԤꤷƤʤФʤʤ>
	% Msg5 <An archivist from Hwang-Sa temple has been inquiring about the \ELEMENT 1 ruins.>
	Msg5 <Hwang-Sa εϿݴɿͤ \ELEMENT 1 פˤĤƼ򤷤Ƥ롣>
	% Msg6 <Hwang-Sa Temple has the largest archive of PreZero cultural artifacts on the planet. They're the chief research institution in this field... And it doesn't hurt that they pay top dollar for interesting finds.>
	Msg6 <Hwang-Sa ϵǺǤ礭ʵ쵪ʸ仺ݴɽǤꡢʬǺǹθ浡ؤǤġ϶̣ȯˤʤʧäƤ⹽ʤ褦Ǥ>
	% Prompt1 <I found this emerald!>
	Prompt1 <Υɤ򸫤Ĥ>
	% Prompt2 <No, nothing worth reporting...>
	Prompt2 <䡢ͤΤϲġ>
	% Prompt3 <Why Hwang-Sa temple?>
	Prompt3 <ʤ Hwang-Sa ˡ>
	% Prompt4 <Why would they be interested?>
	Prompt4 <ʤ餬л񤹤뵤ˤʤ>


	Persona 5
	% Kaema; will explain to the PC about the gem.
	% rumor <!5 knows a lot about PreZero artifacts.>
	rumor <!5 ϵ쵪ο͹ʪ˾ܤ>
	greeting <NewChat say 1 AddChat 1 ifKeyItem E7 else GoNoKey AddChat 2>
	GoNoKey <ifItemOK E7 else GoKeyGone AddChat 3>
	GoKeyGone <AddChat 4>
	result1 <NewChat Say 2>
	result2 <NewChat Say 3 AddChat 5  DeleteKeyItem E7  V= 1 Reward Threat S103 300 500 CashPrize V1 History 9 Goto GoEndMission>
	result3 <NewChat Say 4>
	result4 <NewChat Say 5 AddChat 5 LoseRenown goto GoEndMission>
	result5 <NewChat History 8 ifG PCRep 1 0 else GoR5NoHero Say 6>
	GoR5NoHero <Say 7>
	GoEndMission <S= 101 1 S+ 102 1 N= 3 E2 S= 105 -1  AdvancePlot 0>
	% Msg1 <I've heard a rumor that you went exploring in the \ELEMENT 1 ruins. We are searching for an item from there, an ancient emerald. If you have found this I would be most glad to purchase it from you and tell you of its history.>
	Msg1 <ʤ \ELEMENT 1 פõ˹ԤäȤʹޤ桹ϤǤʪĤޤΥɤõƤޤ⤷ʤ򸫤ĤΤʤ顢ϴǤ㤤ꡢˤޤĤˤˤĤƸäƤޤ礦>
	% Msg2 <I get the feeling that you're in denial, either to yourself or just to me. Come back sometime when you are ready for some knowledge.>
	Msg2 <ʤϻ򡢤ƼʬǤ褦˻פޤĤΤѰդǤޤʤ>
	% Msg3 <Ah, so you have it! This is a great relief to me; I had feared the worst. Here, you should be properly rewarded for recovering this gem.>
	Msg3 <䡢ǤϤޤ󤫡礤˰¿ޤǰλ֤ۤƤޤ顣ɤФäƤƤäȤФŬڤ󽷤äƤ>
	% Msg4 <You left the Emerald somewhere unguarded? Hurry, go retrieve it... It is very important that it not fall into the wrong hands!>
	Msg4 <ʤϤΥɤ֤ƤΤǤޤǼ˹ԤʤġФˤְäʪμϤƤϤʤޤ>
	% Msg5 <Not anymore? Then all may be lost... The Emerald was safe when it was hidden deep in the ruin, but now it will be found by those who intend to use it for evil!>
	Msg5 <⤦äƤʤǤäơǤϤ⤦ʤ⤷ޤ͡ġ׿˱ƤˤΥɤäǤ礦Ϥ⤦򰭻˻ȤȤڤ˸ĤäƤޤǤ礦>
	% Msg6 <The Magnus Emerald is an AI core from the Age of Superpowers. It was in charge of a weapons project seeking to replace the Cyclops biosoldiers. Cetus was the final prototype for this line; the Emerald has knowledge of the others as well.>
	Msg6 <MagnusɤĶ˺줿ɥǤ줬줿ΤCyclopsʪʼΤʼﳫȯײǤηײκǽΤ Cetus ǤΥɤĴ٤¾ΤȤʬǤ礦>
	% Msg7 <All you need to know is that it is a source of dark knowledge from PreZero times, and in the wrong hands it could do very great harm to this world.>
	Msg7 <ʤΤʤФʤʤΤϡϵ쵪λΰμθǤꡢְäʪμϤФˤȤä礭ʳڤܤȤȤǤ>
	% Msg8 <You learned that the Magnus Emerald is a source of dark knowledge.>
	Msg8 <Magnusɤϼٰμθʬä>
	% Msg9 <You sold the Emerald to Kaema of Hwang-Sa Temple for $ \VAL V1 .>
	Msg9 <Magnusɤ Hwang-Sa  Kaema  $ \VAL V1 Ѥ>
	% Prompt1 <That's none of your business.>
	Prompt1 <%JSˤϴطʤ>
	% Prompt2 <Here it is, right here. [give Emerald]>
	Prompt2 <ɤ[ɤϤ]>
	% Prompt3 <I don't have it now, but I can get it!>
	Prompt3 <ϻäƤʤˤϹԤ%JG>
	% Prompt4 <I don't have that anymore.>
	Prompt4 <⤦äƤʤ%JG>
	% Prompt5 <Can you tell me why it's so important?>
	Prompt5 <ɤƤ줬ʤ˽פʤ>

	Persona 6
	% The PC's enemy; will attack the PC regularly.
	greeting <EndCHat Say d5 ifKeyItem E7 else GoNoItem AddChat d3>
	GoNoItem <if= P10 0 AddChat 4>
	Result1 <EndChat V= 2 6 V+ 2 d4 Say V2>
	result2 <Goto Result1>
	result3 <Goto Result1>
	result4 <EndChat P= 10 1 Say 6>
	% Msg1 <I know that you've found it... so hand it over and you won't have to die!>
	Msg1 <%JSΤΤ򸫤ĤΤΤäƤ%JGĤϤлʤʤƺѤा>
	% Msg2 <I know what you found in \ELEMENT 1 and I want it!>
	Msg2 <%JS \ELEMENT 1 ǲ򸫤ĤΤäƤ%JG褳>
	% Msg3 <You took something from the ruins in \ELEMENT 1 . Well, it should be mine! I will take it!>
	Msg3 <%JS \ELEMENT 1 ΰפäƤΤäƤ褦ʡ%JF٤ΤϤƤ餪>
	% Msg4 <You're carrying precious cargo. I want it!>
	Msg4 <%JSϵŤʤΤäƤ褦ʡ褳>
	% Msg5 <You found something in \ELEMENT 1 that we've been searching for. I intend to take it!>
	Msg5 <%JSϲ桹õƤΤ \ELEMENT 1 ǸĤ褦ʡϤƤ餪>
	% Msg6 <Ha, you're not a very convincing liar... Since you don't have the courtesy to just hand it over, we'll have to take it from your dead body!!!>
	Msg6 <ե%JSϱĤΤʡġŤϤʤΤʤ顢%JSλΤ뤳Ȥˤʤ롪>
	% Msg7 <My henchmen will take the emerald from your corpse!>
	Msg7 <%JF%JSλӤΥɤ>
	% Msg8 <Good, there's going to be a fight... my henchmen will be able to defeat you easily.>
	Msg8 <ʤϤåޤǤġ%JFʤ%JSʤɤ䤹Ǥ>
	% Msg9 <Whether you give it to us or whether we have to kill you to get it makes no matter to me.>
	Msg9 <%JS桹ϤƤ⡢桹%JS򻦤ƤåäƤ⡢%JFˤȤäƤƱȤ>
	% Msg10 <You will not live long enough to find out what power the emerald actually holds...>
	Msg10 <%JSϤΥɤλĿϤ򤹤˻̤Τġ>
	% Prompt1 <No way! It's mine!>
	Prompt1 <Ǥ롪%JFΤΤ>
	% Prompt2 <Get lost, \ELEMENT 6 .>
	Prompt2 < \ELEMENT 6 >
	% Prompt3 <Just try and get it.>
	Prompt3 <ΤʤäƤߤ>
	% Prompt4 <I don't have anything! Honest!>
	Prompt4 <%JFϲäƤʤ%JG>

% Plot 1
end

% Plot 0
end
inv
	NPC Professor
	CharDesc Young
	job <Grad Student>
	place <1 PASS>

	NPC Professor

	NPC Mecha Pilot
	EquipChar 25000

	Treasure 1000
	name <Magnus Emerald>
	name_I18N <Magnus>
	Clue37 <Print 1>
	% Msg1 <Peering into this gem, you can see faint geometric patterns embedded into the material. It looks like a computer circuit.>
	Msg1 <ФΤȡ˴ͤޤƤΤ˸ϥԥ塼βϩΤ褦>
	Clue29 <Print 2>
	% Msg2 <This gemstone appears to be an old style AI computer core. Examining it more closely, you make out faint geometric patterns embedded into the material.>
	Msg2 <ФϸŤΣɥԥ塼Τ褦ܤĴ٤ƤߤȡФ˴ͤޤƤΤ򤫤뤳ȤǤ>

end
