Plot 0
	name <Codex of Knowledge>
	% A conclusion for the item search plot. This conclusion will end the story,
	% either in victory or in defeat for the PC...

	% E1 is the scene where this plot will take place.
	Element1 <Grab 2>

	% E2 is the character who knows where the fire is.
	Element2 <Character !Near 1>

	% E3 is the "Codex" itself.
	Element3 <Prefab>

	% V1 = Initialization Counter
	% V2 = Combat Indicator

	Init_Start <ifNPCOK E2 else GoCheckDelete if= V1 0 V= 1 1 Compose KEY E3 .getkey ItemVar= E3 1 * 5 S2>
	start <ifNPCOK E2 else GoCheckDelete if= V1 0 V= 1 1 Compose KEY E3 .getkey ItemVar= E3 1 * 5 S2>
	.getkey <S= 104 1 EndStory AdvancePlot 0>

	GoCheckDelete <EndStory AdvancePlot 0 if= V2 0 DeleteKeyItem E3>

	CleanUp <AdvancePlot 0 if= V2 0 DeleteKeyItem E3>

sub
	Persona 2
	% rumor <!2 knows where the old public library is.>
	rumor <!2 ϸ޽ۤξΤäƤ>
	greeting <NewChat if# P2 0 else GoCheckMission Say 1 EndStory>
	GoCheckMission <Say 2 Memo 3 AddChat 1 AddChat 2 AddChat 3>

	result1 <NewChat Say 4 AddChat 4 AddChat 5>
	result2 <NewChat Say 5>
	result3 <NewChat Say 6 EndStory>
	result4 <NewChat Say 7>
	result5 <EndChat Say 8 SavePos LoadD .scene P= 2 1 PassVAr 1 E3 PassVar 2 S2 PassVar 3 1 PassVar 4 0 MStockD 10 .mon SeekGate -1>
	.scene <SCENE_ItemTower.txt>
	.mon <Ruins Air Mutant City>

	% Msg1 <The ancient library? It's been torn down for a parking lot.>
	Msg1 <޽ۡ־뤿줿%JG>
	% Msg2 <I was searching for treasure in the wilds near town. I spotted an old building that looked good, but then I saw a sign saying that it was the old public library so I didn't bother exploring.>
	Msg2 <Įζ᤯õ򤷤Ƥ顢ɤθŤʪ򸫤Ĥ줬޽ۤǤȤĤäΤǡ虜虜õʤä%JG>
	% Msg3 <\ELEMENT 2 in \ELEMENT 1 discovered the old public library.>
	Msg3 <\ELEMENT 1  \ELEMENT 2 ϸ޽ۤȯ>
	% Msg4 <You're that desperate for reading material? Sure, I can show you where it is. Let's go.>
	Msg4 <ʤɤʪۤΤʬä줬ذ⤷褦Ԥ>
	% Msg5 <Talk with you later.>
	Msg5 <ä>
	% Msg6 <Join the club.>
	Msg6 <桹Ʊʡ>
	% Msg7 <Alright. It's probably best that you get ready before doing any serious exploring.>
	Msg7 <ʬäܵõ˽򤷤ƤȤΤϤ֤κ>
	% Msg8 <It's just over that way. Look for a huge ruined tower with a "Public Library" sign out front. You can't miss it.>
	Msg8 <ο޽ۤϤ礦ɤƻԤäȤˤ롣ֻ̱޽ۡפȤĤդƤΰפõñ˸ĤϤ>

	% Prompt1 <Can you show me where that was?>
	Prompt1 <줬äذ⤷Ƥʤ>
	% Prompt2 <Hm, I'd like to see that later.>
	Prompt2 <ؤǸƤߤʡ>
	% Prompt3 <That doesn't concern me.>
	Prompt3 <̣ʤʡ>
	% Prompt4 <Maybe I'll go later.>
	Prompt4 <ǹԤʡ>
	% Prompt5 <Let's do that.>
	Prompt5 <褦>


end
inv
	STC BOOKSHELF-1
	name <The Codex>
	name_I18N <ʪ>
	% V1 = SkXP to award
	% V2 = Skill to improve
	use <ifYesNo 102 103 104 Goto GoPickSkill>
	GoPickSkill <if= d8 1 else GoPick2 V= 2 9 Goto GoUse>
	GoPick2 <if= d9 1 else GoPick3 V= 2 5 Goto GoUse>
	GoPick3 <if= d8 1 else GoPick4 V= 2 8 Goto GoUse>
	GoPick4 <if= d7 1 else GoPick5 V= 2 11 Goto GoUse>
	GoPick5 <if= d6 1 else GoPick6 V= 2 14 Goto GoUse>
	GoPick6 <if= d5 1 else GoPick7 V= 2 15 Goto GoUse>
	GoPick7 <if= d4 1 else GoPick8 V= 2 16 Goto GoUse>
	GoPick8 <if= d3 1 else GoPick9 V= 2 18 Goto GoUse>
	GoPick9 <if= d2 1 else GoPick10 V= 2 22 Goto GoUse>
	GoPick10 <V= 2 25 Goto GoUse>

	GoUse <Print 101 Mental Mental Mental Print V2 SkillXP V2 V1 Trigger KEY SelfNID DeleteKeyItem SelfNID>

	% Msg5 <These are old Mecha Piloting manuals. You learn a few new things.>
	Msg5 <ϥåĥޥ˥奢Ȥ򾯤ؤ>
	% Msg8 <You discover a fencing manual from the middle ages, and learn some things about Armed Combat.>
	Msg8 <ηѽ򸫤ĤʼˤĤƤ餫ؤ>
	% Msg9 <You learn about esoteric Martial Arts philosophy.>
	Msg9 <¢ѤˤĤƳؤ>
	% Msg11 <It's an encyclopedia of optical illusions. You improve your Awareness.>
	Msg11 <ܤκФˤĤƤɴʻŵ\NAME2 SKILLMAN Awareness뤬ä줿>
	% Msg14 <It's an encyclopedia of wildlife. Many of the animals mentioned are extinct now.>
	Msg14 <ʪɴʻŵǺܤƤưʪ¿ϺǤƤ롣>
	% Msg15 <These are old mecha technical readouts. You learn some things about repair.>
	Msg15 <ϵ켰åΥǡˤĤƤ餫ؤ>
	% Msg16 <There are old medical texts here. You learn some things about the human body.>
	Msg16 <ˤϸŤŻ롣ΤˤĤƤ餫ؤ>
	% Msg18 <You find some old books on warfare and tactics. You learn some things about exploiting your opponent's weak point.>
	Msg18 <ƮάˤĤƤθŤܤ򸫤ĤŨμ˽ˡˤĤƤ餫ؤ>
	% Msg22 <You discover some PreZero books about Biotechnology.>
	Msg22 <ХƥΥˤĤƤε쵪ܤ򸫤Ĥ>
	% Msg25 <You learn the secrets of the Ninja.>
	Msg25 <ǦԤ̩ؤ>

	% Msg101 <You read through the books...>
	Msg101 <ܤɤ̤ġ>
	% Msg102 <You discover a collection of antique books.>
	Msg102 <ܤΥ쥯򸫤Ĥ>
	% Msg103 <Read the books.>
	Msg103 <ܤɤࡣ>
	% Msg104 <Maybe later...>
	Msg104 <ˤ褦ʡġ>

end
