%%
%%   *:Q_FindMoney Contents
%%		.Investor = The NPC needs the money to invest in a new product
%%		.Charity = The NPC needs the money to save an orphanage or whatever
%%
%%	The PC is sent by someone to scrounge funds for some project or another.
%%
%%  Set the requires attribute to *:Q_DFindMoney for testing
%%
%%	Param1: The character who needs the money
%%

Content
	name <Mechanic Mission>
	% desc <A mechanic may provide funding, if the PC does something for him.>
	desc <とあるメカニックが資金を提供してくれるかもしれない。PC が頼みを聞いてやれば。>
	requires <*:Q_FindMoney>

	% E1 is the character who needs the money
	% E2 is the character who can give the money
	% E3 is a scene for E2
	Element2 <Prefab>
	Place2 <3 (Citizens) Pass>
	Element3 <Scene Building Public Garage>

	%% FAIL CONDITIONS:
	%% - E2 dies
	end <ifNPCDead %2% LoseSubPlot %plotid%>

	% Quest1 is the mission offered by the shopkeeper.
	SubPlot1 <*:Q_MinorMission 2>

	sub
		Persona 2
		% rumor%id% <%name2% is known as a great philanthropist.>
		rumor%id% <%name2% は素晴らしい慈善家として知られている>
		greeting <if= PlotStatus %plotid% %id% else GoGreet if= PlotStatus %plotid1% -1 else GoCheckLoss NewChat Say 1 WinSubPlot %plotid%>
		GoCheckLoss <if= PlotStatus %plotid1% -2 else GoCheckQuest NewChat Say 3 SetPlotStatus %plotid% -2>
		GoCheckQuest <NewChat Say 4 AddChat 1 AddChat 2>
		*GoGreet <*NiceToMeetYou GoShop>
		*GoShop <*SHOP_MECHA GoBye>
		*GoBye <*GoodBye>
		result1 <EndChat Say 5 AddChat 3>
		result2 <Goto GoShop>
		result3 <Goto .%id1%_GoInit>
		% Msg1 <You really came through; thanks. Go let %name1% know that I'm willing to back \PPR %1% project.>
		% Msg3 <You failed to complete the task I asked of you. I'm afraid that I won't be able to help %name1%.>
		% Msg4 <Yes? You look like there's something you want.>
		% Msg5 <Interesting. Well, before I can help %name1%, I need some help myself. If you could do one small thing for me I'd be more than willing to provide funding.>
		% Prompt1 <%name1% needs your help.>
		% Prompt2 <Right now, I just need repairs.>
		% Prompt3 <[Continue]>
		Msg1 <やり遂げてくれた%JG_Q？ ありがとう。%name1% のところに戻って、%JF2が\SPR %1%のプロジェクトを支えると伝えて%JG_R。>
		Msg3 <頼んだ仕事を失敗したよう%JV_M_DA%JV_NA。残念だ%JG_GA、これでは %name1% を助けることもできない%JV_F_WA%JV_NE。>
		Msg4 <うん？ 何か物欲しそうな顔をしている%JG_SY。>
		Msg5 <なるほど。それなら、%JF2が %name1% に手を貸す前に、%JF2自身も手助けが欲しい%JG_SY。もし%JS2がちょっとした仕事を片付けてくれるなら、私も喜んで資金を出す%JG_YO。>
		Prompt1 <%name1% が助力を求めている%JV_F_WA。>
		Prompt2 <今のところはとりあえず修理だけで。>
		Prompt3 <[続ける]>

		MetaScene 2
		sub
			room
			name <Mechanic>
			name_I18N <メカニック>
			ShowNAME <true>
			minimap <....1...............&---!>
			special <SHAREDPALETTE>
			desig <HOME>
		end
	end
	inv
		NPC Mechanic
		chardesc heroic
	end

Content
	name <Shopkeeper Mission>
	% desc <A shopkeeper may provide funding, if the PC does something for him.>
	desc <とある店主が資金を提供してくれるかもしれない。PC が頼みを聞いてやれば。>
	requires <*:Q_FindMoney>

	% E1 is the character who needs the money
	% E2 is the character who can give the money
	% E3 is a scene for E2
	Element2 <Prefab>
	Place2 <3 (Citizens) Pass>
	Element3 <Scene Building Public Mall>

	%% FAIL CONDITIONS:
	%% - E2 dies
	end <ifNPCDead %2% LoseSubPlot %plotid%>

	% Quest1 is the mission offered by the shopkeeper.
	SubPlot1 <*:Q_MinorMission 2>

	sub
		Persona 2
		% rumor%id% <%name2% has been known to donate money to a variety of causes.>
		rumor%id% <%name2% はよく寄付を行う人物として知られている>
		greeting <if= PlotStatus %plotid% %id% else GoGreet if= PlotStatus %plotid1% -1 else GoCheckLoss NewChat Say 1  WinSubPlot %plotid%>
		GoCheckLoss <if= PlotStatus %plotid1% -2 else GoCheckQuest NewChat Say 3 SetPlotStatus %plotid% -2>
		GoCheckQuest <NewChat Say 4 AddChat 1 AddChat 2>
		*GoGreet <*NiceToMeetYou GoShop>
		*GoShop <*SHOP_ARMOR GoBye>
		*GoBye <*GoodBye>
		result1 <EndChat Say 5 AddChat 3>
		result2 <Goto GoShop>
		result3 <Goto .%id1%_GoInit>
		% Msg1 <Thanks for your help. I'll send that money to %name1% right away.>
		% Msg3 <Things are looking grim. Under these circumstances, I can't afford to give any money to %name1%.>
		% Msg4 <May I help you?>
		% Msg5 <I'd like to help %name1%, but before I can do that there's a little something I need you to do for me.>
		% Prompt1 <I'm soliciting donations for %name1%.>
		% Prompt2 <I'd like to buy something.>
		% Prompt3 <[Continue]>
		Msg1 <ありがとう。こちらもすぐに %name1% に送金してお%JV_KOU。>
		Msg3 <恐ろしい結果%JV_M_DA%JV_NA……。これでは %name1% にお金を出してやるどころではない%JG_YO。>
		Msg4 <いらっしゃい。>
		Msg5 <喜んで応じ%JV_YOU。ただその前に、%JF2も%JS2にちょっとした手助けを頼みたい%JV_Nだ%JG_GA。>
		Prompt1 <%name1% への寄付をお願いして回ってる%JG_NDA。>
		Prompt2 <買い物がしたい。>
		Prompt3 <[続ける]>

		MetaScene 2
		sub
			room
			name <Market>
			name_I18N <小売店>
			ShowNAME <true>
			minimap <....1..........2...3&---!>
			special <SHAREDPALETTE>
			desig <HOME>
			inv
				STC MANNEKIN-M
				PDir 1
				MiniMapComponent 2

				STC MANNEKIN-F
				PDir 3
				MiniMapComponent 3
			end
		end
	end
	inv
		NPC Shopkeeper
		Chardesc Shy
	end


Content
	name <Charity Mecha Tournament>
	% desc <The PC can enter and maybe even win a charity mecha tournament.>
	desc <PC はチャリティーのメックトーナメントに参加し、あわよくば優勝することもできる。>
	requires <*:Q_FindMoney .Charity>

	% E1 is the character who needs the money
	% E2 is the organizer of the tournament
	% E3 is the tournament encounter
	% E4 is a scene for E2
	% E5 is an environs scene for E3
	Element2 <Prefab>
	Place2 <4 (Citizens) Pass>
	Element3 <Prefab>
	Place3 <5>
	Element4 <Scene Building Public -Sleazy>
	Element5 <Scene Environs>

	sub
		Persona 2
		% rumor%id% <%name2% has organized a charity mecha tournament.>
		rumor%id% <%name2% がチャリティのメックトーナメントを開く>
		% NPCVar %2% 1 = Have won the fight
		% V1 = Match recharge timer
		% V2 = Registration counter
		greeting <if= PlotStatus %plotid% %id% else GoGreet if= NPCVar %2% 1 1 else GoCheckStatus NewChat Say 9 WinSubPlot %plotid% History 10>
		GoCheckStatus <if= ItemVar %3% 11 1 else GoCheckRecharge NewChat Say 7 AddChat 3>
		GoCheckRecharge <ifG V1 ComTime else GoCheckFirst NewChat Say 6>
		GoCheckFirst <if= V2 1 else GoRegister NewChat Say 4 AddChat 2>
		GoRegister <NewChat Say 1 AddChat 1>
		GoSetCombat <ItemVar= %3% 11 1 V= 1 ComTime V+ 1 86400>
		*GoGreet <*NiceToMeetYou GoChat>
		*GoChat <*MISC_CHATTER>
		result1 <NewChat Say 2 QMemo %plotid% 3 V= 2 1 Goto GoSetCombat>
		result2 <NewChat Say 5 Goto GoSetCombat>
		result3 <NewChat Say 8>
		% Msg1 <This is the \SCENE RootSceneID Charity Mecha Spectacular. Pilots from across the solar system have come to compete for their favorite charities. Would you like to register?>
		% Msg2 <Very good. There's a match coming up soon. Go to the arena in %name5% and do your best.>
		% Msg3 <You joined %name2%'s charity mecha tournament to earn money for %name1%.>
		% Msg4 <Welcome to the \SCENE RootSceneID Charity Mecha Spectacular. Are you ready to fight?>
		% Msg5 <There's another match coming up shortly. I trust you remember where to find the arena.>
		% Msg6 <You lost the match, but you aren't out of the running yet... You can try in a different heat tomorrow.>
		% Msg7 <What are you doing here? You're supposed to be in the arena!>
		% Msg8 <You can find the arena entrance in %name5% . It should be pretty obvious.>
		% msg9 <You did it! You've won the \SCENE RootSceneID Charity Mecha Spectacular. I've arranged for the prize money to be sent to %name1%... you must be very proud.>
		% Msg10 <You won the \SCENE RootSceneID Charity Mecha Spectacular.>
		% Prompt1 <I'm here to help %name1%.>
		% Prompt2 <I'm ready.>
		% Prompt3 <Where was that again?>
		Msg1 <ここは \SCENE RootSceneID チャリティ・メックショーの会場%JV_DESU。この太陽系すべてから集まったパイロットたちが、チャリティのために競い合%JV_IMASU。貴方も参加%JV_S_SIMASUか？>
		Msg2 <結構なこと%JV_DESU。試合はすぐに始ま%JV_RIMASUから、%name5%内のアリーナへ行って存分に力を振るって%JV_KUDASAI。>
		Msg3 <%name1% のために、%name2% の開くチャリティのメックトーナメントで資金を稼ぐ。>
		Msg4 <\SCENE RootSceneID チャリティ・メックショーへようこそ。戦いの準備はできてい%JV_MASUか？>
		Msg5 <すぐに次の試合が始ま%JV_RIMASU。場所はもう覚えてい%JV_MASUね？>
		Msg6 <負けてしま%JV_IMASITAか、でもまだこれで終わりでは%JV_ARIMASEN……明日また、別の試合に参加でき%JV_MASU%JV_YO。>
		Msg7 <何をしている%JV_N%JV_DESU？ もうアリーナにいないといけないのに！>
		Msg8 <アリーナの入り口は %name5% にあ%JV_RIMASU。行けばすぐに分かる%JV_DESYOU。>
		msg9 <や%JV_RIMASITA%JV_NA！ %JS2は \SCENE RootSceneID チャリティ・メックショーの優勝者%JV_DESU。賞金は %name1% に送られるよう手配し%JV_MASITA……誇るべき行い%JV_DESU。>
		Msg10 <\SCENE RootSceneID のチャリティ・メックショーで優勝した。>
		Prompt1 <%name1% を助けるために来た%JV_F_NO。>
		Prompt2 <準備ＯＫ%JG_DA。>
		Prompt3 <どこだったっけ？>

		% Death check
		Metascene 2
		start <if= PlotStatus %plotid% %id% else %pop% ifNPCDead %2% else %pop% SetPlotStatus %plotid% -2 DeleteItem %3% Goto %pop%>
	end
	inv
		NPC Arena Pilot
		chardesc Heroic Sociable

		STC QUEST-MAPMARKER-STATIONARY
		name <Charity Arena>
		name_I18N <チャリティー・アリーナ>
		%% V11 = Primed for combat
		update <if# V11 0 else GoHide  SetStat STAT_MetaVisibility 0  ShowEncounter  Goto GoSetOrders>
		use <ifG StatVal STAT_MetaVisibility -1  Print 1  Goto GoStartCombat>
		GoStartCombat <V= 11 0  SavePos Dynamic 2 V2 100 .nu1 .nu2 ComposeD Msg1 .Msg1 DynaFaction 5>
		.nu1 <if= T1 0  Return   if= L1 0  L= 1 1  LoseRenown>
		.nu2 <if= T2 0           if= L1 0  L= 1 1  XPV 100  AddRenown 1   NPCVar= %2% 1 1  QMemo %plotid% 1  DeleteItem %3%>
		% .msg1 <You have won the charity mecha tournament, and should inform %name2% in %name4% .>
		% Msg1 <You enter the arena.>
		.msg1 <チャリティーのメックトーナメントで優勝した。%name4% の %name2% に報告しよう。>
		Msg1 <アリーナに入った。>
	end


Content
	name <Banking: The Boring Way>
	% desc <The PC can gain the loan by talking to a banker.>
	desc <PC は銀行家と話をしてローンを組むことができる。>
	requires <*:Q_FindMoney .Investor ~"safe" ~"financial" ~"lawful">

	% E1 is the character who needs the money
	% E2 is a banker who the PC can argue with
	% E3 is the scene for the bank
	Element2 <Prefab>
	Place2 <3 (Citizens) Pass>
	Element3 <Scene Building Public Legit Mall>

	%% FAIL CONDITIONS:
	%% - E2 dies
	end <ifNPCDead %2% LoseSubPlot %plotid%>

	sub
		Persona 2
		% rumor%id% <%name2% offers business loans at reasonable rates.>
		rumor%id% <%name2% のやってる事業向け融資はそこそこ良心的な利率>
		% V1 = Stupid question counter
		Greeting <Goto GoGreet>
		*GoGreet <*NiceToMeetYou GoChat>
		GoChat <NewChat Say 1 AddChat 1 AddCHat 2>
		Result1 <NewChat Say 2 AddChat 2 V= 1 1>
		Result2 <NewChat Say 3 AddChat 3 AddChat 4 AddChat 5>
		Result3 <ifG PCLaw %threat% else GoR3Fail NewChat Say 4 AddChat 6 AddChat 7>
		GoR3Fail <NewChat Say 5 AddChat 7>
		result4 <ifConversation Skilltar %threat% else GoR4Fail NewChat say 6 AddChat 8>
		GoR4Fail <NewChat Say 7 AddChat 7>
		result5 <NewChat Say 8 AddChat 9 AddChat 10 AddChat 11>
		% Vouching for a criminal character will result in a reputation hit
		result6 <NewChat Say 9 WinSubPlot %plotid% XPV 50 AddSociable d6 ifG -10 NPCLaw %1% AddLawful -1 AddRenown -5>
		result7 <NewChat Say 10 AddChat 3 AddChat 4 AddChat 5 AddChat 12>
		result8 <NewChat Say 9 WinSubPlot %plotid% XPV 50>
		result9 <NewChat Say 11 WinSubPlot %plotid% XPV 50  AddEasygoing -d8  AddReact d10>
		result10 <NewChat Say 12 WinSubPlot %plotid% XPV 50  AddHeroic -1  AddEasygoing -d10  AddReact -d10>
		result11 <Goto result7>
		*result12 <*GoodBye>
		% Msg1 <This is %name2%'s Financial Services. We provide loans to small and medium sized businesses.>
		% Msg2 <Sorry, but adventurers are a bad investment risk. They tend to either die or disappear before paying off what they owe.>
		% Msg3 <Ah, %name1%; \SPR %1% came to see me earlier. Unfortunately, \SPR %1% doesn't have any collatoral. I can't very well risk giving \OPR %1% a loan without a guarantee that I'll be paid back.>
		% Msg4 <Are you certain you want to do that? Your own reputation is beyond reproach; were %name1% to default on the loan, it could be severely tarnished.>
		% Msg5 <You're not exactly a reliable person to be making a character reference, now are you? I'm afraid I'm going to need something better than that.>
		% Msg5_1 <If you were to give a character reference for %name1%, don't you think it would be in my best interest to stay as far away from \OPR %1% as possible?>
		% CMsg5_1 <ifPCCriminal Accept>
		% Msg6 <You sound pretty sure of that. I've looked over %name1%'s proposal and it's certainly possible. You really think that there's a profit to be made here?>
		% Msg7 <It's easy to say that, but without numbers to back it up it's all quite meaningless. I'm going to need something more before I agree to invest my money.>
		% Msg8 <Really? And why is that?>
		% Msg9 <Alright, then. You can go tell %name1% that \PPR %1% loan is approved.>
		% Msg10 <Do you have any other reason why I should give a loan to %name1%?>
		% Msg11 <So I see... Very well, then. You can go tell %name1% that \PPR %1% loan has been approved.>
		% Msg12 <Um, you don't sound like the kind of person who jokes about grievous bodily harm... You can go tell %name1% that I've approved \PPR %1% loan.>
		% Prompt1 <Can I get a loan for myself?>
		% CPrompt1 <if= V1 0 Accept>
		% Prompt2 <%name1% needs a business loan.>
		% CPrompt2 <if= PlotStatus %plotid% %id% ifNPCOK %1% Accept>
		% Prompt3 <How about if I vouch for %name1%'s character?>
		% Prompt4 <I think %name1%'s business is bound to succeed.>
		% CPrompt4 <ifShopping SkillTar %threat% Accept>
		% Prompt5 <It'd be in your best interest to give \OPR %1% that loan...>
		% Prompt6 <Yes, I want to vouch for %name1%.>
		% Prompt7 <Let's see what else I can try...>
		% Prompt7_1 <Let me try something else...>
		% Prompt7_2 <I've got another idea, then...>
		% Prompt8 <Yes I do.>
		% Prompt9 <I could make it completely worth your while.>
		% CPrompt9 <ifChatNPCSexy ifConversation Skilltar %threat% Accept>
		% Prompt10 <It might be intensely painful to refuse.>
		% CPrompt10 <ifIntimidation SkillTar %threat% Accept>
		% Prompt11 <I have no idea.>
		% Prompt12 <Not right now, no.>
		Msg1 <こちらは %name2%・ファイナンシャル・サービスです。私どもでは中小事業者向けの融資を取り扱っております。>
		Msg2 <申し訳ありませんが、冒険者業は融資リスク高と算定されております。返済完了前に死亡または行方不明になることが多いもので。>
		Msg3 <ああ、%name1% 氏ですか。先日お越しくださいましたが、残念ながら担保となるものを何もお持ちでなく……。無担保での貸し付けは行っていないのです。>
		Msg4 <そのご意思は本当に確かですか？ 貴方の名声は疑いのないものですが……もし %name1% 氏が返済に失敗すれば、それにも大きな傷がつくことになります。>
		Msg5 <保証人になれるほどの信用をお持ちだとはお見受けできませんが……？ 恐縮ですが、もう少し確かなものでなければ。>
		Msg5_1 <貴方が保証人と言われますと……むしろ余計に %name1% 氏と関わりたくなくなると思いますがね？>
		CMsg5_1 <ifPCCriminal Accept>
		Msg6 <なるほど、自信がおありのようで。%name1% 氏の事業計画は見ましたが、確かに可能性はあるでしょう。本当に利潤が得られるとお考えなのですね？>
		Msg7 <仰るだけなら簡単ですが、それを裏付ける数字がなければ無意味です。融資に踏み切るには、もう少し何かがありませんと。>
		Msg8 <本当ですか？ それはまたどのような理由で？>
		Msg9 <よろしいでしょう。では %name1% 氏に、融資が認められたとお伝えください。>
		Msg10 <では、%name1% 氏への融資を決断させる他の何かをお持ちでしょうか？>
		Msg11 <ふむ……それなら、いいでしょう。%name1% 氏に、融資が決定されたとお伝えください。>
		Msg12 <うむ、冗談でそういうことを言う方には見えませんね……融資は決定したと %name1% 氏にお伝えください。>
		Prompt1 <%JF2でも借り入れはできるの%JV_KA_Q？>
		CPrompt1 <if= V1 0 Accept>
		Prompt2 <%name1% が事業融資を求めている%JV_F_NO。>
		CPrompt2 <if= PlotStatus %plotid% %id% ifNPCOK %1% Accept>
		Prompt3 <%JF2が保証人になるなら、どう%JV_M_DA？>
		Prompt4 <%name1% の事業は確かな成功が見込める%JV_F_WA。>
		CPrompt4 <ifShopping SkillTar %threat% Accept>
		Prompt5 <ここは素直に融資してしまうのが一番%JV_M_DA%JV_YO……。>
		Prompt6 <%JR_YES、%JF2が %name1% の保証人になる%JV_F_WA。>
		Prompt7 <じゃあ他にできる方法を探%JV_SOU……。>
		Prompt7_1 <では他の方法を……。>
		Prompt7_2 <じゃあ違うやり方はどう%JG_KANA%JV_SIL_R。>
		Prompt8 <もちろん%JG_DA。>
		Prompt9 <それだけの価値はあると断言し%JV_YOU。>
		CPrompt9 <ifChatNPCSexy ifConversation Skilltar %threat% Accept>
		Prompt10 <断るのには、かなりの苦痛を伴うかもしれない%JG_SY？>
		CPrompt10 <ifIntimidation SkillTar %threat% Accept>
		Prompt11 <分からない。>
		Prompt12 <%JR_NO、また今度で。>

		MetaScene 2
		sub
			room
			% The bank itself. Can't add a bank without adding a safe to rob, can you?
			name <%name2% Financial Services>
			name_I18N <%name2%・ファイナンシャル・サービス>
			minimap <2.......1...........#&+&#>
			special <SHAREDPALETTE>
			desig <HOME>
			inv
				STC Safe
				% V1 = Have robbed safe
				% V2 = Have triggered alarm
				MiniMapComponent 2
				PDir 2
				Use <if= V1 0 else GoAlreadyRobbed Print 1>
				GoAlreadyRobbed <Print 2>
				CLUE_CODEBREAKING <if= V1 0 else GoAlreadyRobbed if= V2 0 else GoSafeOpen ifNPCOK %2% else GoSafeOpen ifNPCCanSeePC %2% else GoSafeOpen Goto GoRiskyOpen>
				GoRiskyOpen <ifStealth HardSkillTar %threat% else GoDiscovered Goto GoSafeOpen>
				GoSafeOpen <Mental ifCodeBreaking HardSkillTar %threat% else GoCantOpen Goto GoOpen>
				GoDiscovered <Alert 3 Alarm AddLawful -10 PCEnemy %2% if= PlotStatus %plotid% %id% LoseSubPlot %plotid% V= 2 1>
				GoCantOpen <Print 4>
				GoOpen <Print 5 AddLawful -5 CashPrize Threat %threat% 20 V= 1 1>
				% Msg1_1 <This safe contains all the bank's money. %name2% keeps a close eye on it.>
				% CMsg1_1 <ifNPCOK %2% ifNPCCanSeePC %2% Accept>
				% Msg1_2 <This safe contains all the bank's money.>
				% CMsg1_2 <ifNPCOK %2% else GoAccept ifNPCCanSeePC %2% else GoAccept>
				% GoAccept <ACCEPT>
				% Msg2 <You've already stolen the money from this safe.>
				% Msg3 <You are spotted trying to open the safe!>
				% Msg4 <You can't open this safe at your current skill level.>
				% Msg5 <You open the safe and quickly grab the money.>
				Msg1_1 <この銀行の現金すべてが収められている金庫だ。%name2% がしっかりと見張っている。>
				CMsg1_1 <ifNPCOK %2% ifNPCCanSeePC %2% Accept>
				Msg1_2 <この銀行の現金すべてが収められている金庫だ。>
				CMsg1_2 <ifNPCOK %2% else GoAccept ifNPCCanSeePC %2% else GoAccept>
				GoAccept <ACCEPT>
				Msg2 <この金庫からは既に現金を盗み出した。>
				Msg3 <金庫を開けようとしているところを見つかった！>
				Msg4 <現在のスキルレベルではこの金庫は開けられない。>
				Msg5 <金庫を開けて素早く現金を抜き取った。>
			end
		end
	end
	inv
		NPC Corporate Executive
		job <Banker>
	end


Content
	name <Tycoon Party>
	% desc <If the PC can crash a party of the station's wealthiest residents, maybe he can get funding.>
	desc <ステーションで最も豊かな住人たちの開くパーティーを PC が盛り上げれば、資金提供が受けられるかもしれない。>
	requires <*:Q_FindMoney SPINNER>

	% Element 1 will be the NPC who needs some money
	% Element 2 will be the tycoon who can maybe provide the money
	% E3 is the yacht scene
	% E4 is the outdoors scene where it will be placed.
	element2 <Prefab>
	Place2 <3 (Citizens) pass>
	Element3 <QuestScene>
	Place3 <4>
	Element4 <Scene Outdoors>

	% P%id%01 = Initialization Counter

	%% FAIL CONDITIONS:
	%% - E2 dies
	end <ifNPCDead %2% LoseSubPlot %plotid%>

	update <if= P%id%01 0 P= %id%01 1 SetPlotStatus %plotid1% %id1%>

	SubPlot1 <*:Q_RevealEncounter 3 4>

	sub
		Persona 2
		special <Unlisted>
		% V1 = Have applied reaction boost.
		greeting <if= PlotStatus %plotid% %id% else GoChat ifG PartyScore 2 else GoBadParty NewChat Say 1 AddChat 1 AddChat 2 if= V1 0 V= 1 1 AddReact 20>
		GoBadParty <NewChat Say 2 QMemo %plotid% 6>
		*GoChat <*MISC_CHATTER>
		result1 <NewChat Say 3 AddChat 3>
		result2 <NewChat Say 4>
		result3 <NewChat Say 5  WinSubPlot %plotid%>
		% Msg1 <Ah, \PC ! I've heard that you're the life of the party. It's such a pleasure to see you here at my little event!>
		% Msg2 <How disappointing... So far, this party has been one colossal bore.>
		% Msg3 <For you, \PC , anything... as long as it isn't too expensive, or too perverted.>
		% Msg4 <You're very welcome. Please, stay as long as you'd like.>
		% Msg5 <So, not only a pretty face, you also have business sense... I respect that. Alright, I'll help %name1% .>
		% Msg6 <%name2% isn't enjoying \PPR %2% yacht party in \SCENE RootSceneID very much.>
		% Prompt1 <%name2%, I need to ask you a favor.>
		% Prompt2 <I'm glad to hear that.>
		% Prompt3 <I want you to finance %name1%.>
		% CPrompt3 <ifNPCOK %1% Accept>
		Msg1 <ああ、\PC！ すっかりパーティーの主役になってる様子%JG_TY。このささやかなイベントにまで%JS2が来てくれるとは、喜ばしい限り%JG_DANE！>
		Msg2 <なんと期待外れな……これでは死ぬほど退屈なパーティー%JG_DAYO。>
		Msg3 <分かった%JG_YO、\PC の頼みなら……あんまり高すぎたり、逸脱したことでなければ。>
		Msg4 <%JS2なら大歓迎%JG_DAYO。さあ、好きなだけゆっくりしていって%JG_R。>
		Msg5 <素晴らしい外見だけでなく、ビジネスセンスも持っているとは……大したもの%JG_TY。分かった%JG_YO、%name1% %JG_SANを支援し%JV_MASYOU。>
		Msg6 <%name2% は \SCENE RootSceneID で主催しているヨットパーティーが楽しめていない。>
		Prompt1 <%name2%、頼みごとがある%JV_F_NO。>
		Prompt2 <そう言ってもらえて嬉しい%JG_YO。>
		Prompt3 <%name1% に融資をしてやってほしい%JV_F_NO。>
		CPrompt3 <ifNPCOK %1% Accept>

		MetaScene 3
		name <%name2%'s Yacht>
		name_I18N <%name2% のヨット>
		% rumor%id% <%name2% is hosting a fancy yacht party for all the spinner's richest inhabitants.>
		rumor%id% <%name2% がこのコロニーの金持ち連中の集まる小洒落たヨットパーティーを開いている>
		entrance <*QUEST-INACTIVE>
		type <Yacht>
		mapwidth 21
		mapheight 21
		ClubMap
		special <NOEXIT>
		NeededCells 5
		Content1 <Some 5 25 Sub *CLUB_X>
		Content2 <Some 1 100 Here *ANTI_ATTACK_SECURITY 2>
		sub
			team 1

			team 2
			name <Citizens>
			SetAlly 1
			Passive

			team 3
			name <Guards>
			SetAlly 2

			room
			name <Foyer>
			name_I18N <ロビー>
			desig <EntranceGrid>
			Content1 <Variety 3 5 Here *PartyGames %threat%>
			Content3 <Some 3  55 Here *URBAN_X na>

			room
			minimap <#######1###...##...###+##>
			inv
				Elevator
				name <Exit>
				name_I18N <出口>
				MiniMapComponent 1
				Destination -1
			end
		end
	end
	inv
		NPC Corporate Executive
		job <Tycoon>
		chardesc Renowned Renowned Old Sociable Cheerful
	end


Content
	name <Insane Venture Capitalist>
	% The PC needs a few million dollars to help a friend. This rich shopkeeper will
	% give him the money if the PC will clear the rats out of his basement. Fairly
	% standard RPG plot, except the PC will be able to call the NPC on his clear insanity.
	requires <*:Q_FindMoney>

	% E1 is the character who needs the money
	% E2 is the shopkeeper who might be able to provide it
	% E3 is the basement full of rats
	% E4 is the scene for the office
	element2 <Prefab>
	Place2 <4 (Citizens) pass ally>
	Element3 <QuestScene>
	Place3 <4>
	Element4 <Scene Mall Public>

	%% FAIL CONDITIONS:
	%% - E2 dies
	end <ifNPCDead %2% LoseSubPlot %plotid%>

	sub
		Persona 2
		% rumor%id% <%name2% is very rich, but doesn't seem to be all that bright.>
		rumor%id% <%name2% はとても金持ちだ%JG_GA、あまり頭は良くない>
		% V1 = Have accepted quest
		greeting <if= PlotStatus %plotid% %id% else GoFirstTime if= V1 1 else GoQuestIntro NewChat Say 14 AddChat 14 AddChat 15>
		GoQuestIntro <ifNPCOK %1% else GoCancel NewChat Say 1 AddChat 1 AddChat 2>
		GoCancel <SetPlotStatus %plotid% -2 goto GoFirstTime>
		*GoFirstTime <*NiceToMeetYou GoOpenShop>
		*GoOpenShop <*SHOP_ARMOR GoGoodbye>
		*GoGoodbye <*GOODBYE>
		result1 <NewChat Say 2 V= 1 1 AddChat 3 AddChat 4>
		result2 <Goto GoOpenShop>
		result3 <ifChatNPCInPlay else GoR3NotHere NewChat Say 3 QMemo %plotid% 5 AddChat 13>
		GoR3NotHere <NewChat Say 4 QMemo %plotid% 5 AddChat 13>
		result4 <NewChat Say 6 AddChat 5 AddChat 6>
		result5 <Goto result3>
		result6 <NewChat Say 7 AddChat 5 AddChat 7>
		result7 <NewChat Say 8 AddChat 5 AddChat 8>
		result8 <NewChat Say 9 AddChat 5 AddChat 9>
		result9 <NewChat Say 10 AddChat 5 AddChat 10>
		result10 <NewChat Say 11 AddChat 5 AddChat 11>
		result11 <NewChat Say 12 AddChat 5 AddChat 12>
		result12 <NewChat Say 13 AddChat 5>
		result13 <AddRenown 1 AddReact -10 Goto result14>
		result14 <NewChat Say 15 AddReact 10 WinSubPlot %plotid%>
		result15 <Goto GoOpenShop>
		% Msg1 <Yes, may I help you with something?>
		% Msg1_1 <You look like you want to ask something... Hurry up and spit it out, I don't have all day.>
		% Msg2 <Donations, huh? Well, it sounds like a worthwhile cause... I may be able to help %name1%, if you do me a little favor. My storage room has been infested with rats. If you can get rid of them, then I'll agree to help your friend.>
		% Msg3 <The way down to the storage room is right behind this door. Come back when you've cleared out all the mice.>
		% Msg4 <You'll have to come to \SCENE NPCScene %2% to exterminate the mice- I know technology is great but I don't think you can do that over the phone just yet.>
		% Msg5 <%name2% in %name4% agreed to fund %name1% if you clear the vermin out of \PPR %2% storage room.>
		% Msg6 <Yes, that's the deal. Take it or leave it.>
		% Msg7 <Why should I hire an exterminator when I have you right here? And you have to do what I say, or else %name1% won't get the money!>
		% Msg8 <A million dollars isn't a lot when you have as much money as I do. That's why I can afford to help people like %name1%... plus I can use it as a tax write-off.>
		% Msg9 <Careful! Don't upset me, or I'll make you clean the storage room with no donation for %name1%!>
		% Msg10 <I see what you mean... So, it seems we have a bit of a standoff here, neither one of us are capable of breaking our original agreement.>
		% Msg11 <When I was younger I used to play adventure games, and there was always a rich king or a merchant who would give the adventurer some fantastic treasure in exchange for killing rats. I've always wanted that...>
		% Msg12 <Oh hell no. I was crap at those games... my adventurer always died. I wanted to be the king-merchant character... Imagine, being able to send people on any mundane yet dangerous assignments that strike my fancy...>
		% Msg13 <That may well be... but, I'm your only chance to help %name1%, short of becoming a millionaire yourself... or finding someone else to help... or winning a lottery...>
		% Msg14 <How goes the progress on your mouse-killing, adventurer?>
		% Msg14_1 <Any progress in cleaning out my storage room, yet?>
		% Msg14_2 <Have you cleared the mice, or whatever they are, from the storage room yet?>
		% Msg15 <Thanks! You can tell %name1% that the money's on the way.>
		% Prompt1 <I'm soliciting donations for %name1%.>
		% Prompt2 <I'd like to see what you have for sale.>
		% Prompt3 <It's a deal.>
		% Prompt4 <You'll give the money if I clean downstairs...?>
		% Prompt5 <Well, I've heard enough.>
		% Prompt5_1 <That's enough rambling.>
		% Prompt5_2 <Well, that's enough for me.>
		% Prompt5_3 <That's all I needed to hear.>
		% Prompt6 <But you can hire an exterminator for $200, $300 tops...>
		% Prompt7 <We're talking millions of dollars here...>
		% Prompt8 <You're completely blazing insane.>
		% Prompt9 <I'm not going to clean there for free.>
		% Prompt10 <Why are you doing this, anyhow?>
		% Prompt11 <So you want to be a cavalier?>
		% Prompt12 <I said it before, you're out of your mind.>
		% Prompt13 <I think you'll find the mice are gone already.>
		% CPrompt13 <if= SceneVar %3% 1 1 Accept>
		% Prompt14 <The mice are all dead.>
		% Prompt14_1 <They won't be bothering you again.>
		% CPrompt14 <if= SceneVar %3% 1 1 Accept>
		% Prompt15 <I need some supplies for my adventure.>
		Msg1 <いらっしゃい、何の御用かな？>
		Msg1_1 <何か言いたげな顔%JG_DANE%JV_SIL_Rこっちも暇じゃないから、さっさと用件を言って%JG_R。>
		Msg2 <寄付？ %JR_YES、善いことだとは思える%JG_GA……%JS2が少しばかり%JF2を助けてくれるなら、%JF2も %name1% を助け%JV_YOU。ウチの倉庫がネズミに占拠されてしまっている%JG_NDA。あいつらを片付けてくれれば、%JS2の頼みも聞き入れる%JG_GA。>
		Msg3 <倉庫へ続く階段はそこの扉のすぐ向こう%JG_DAYO。全部のネズミを始末したら戻ってきて%JG_R。>
		Msg4 <なら、ネズミ駆除に \SCENE NPCScene %2% まで来て%JG_R──科学技術というのは偉大なものだ%JG_GA、電話越しにそれをやるのはまだ無理%JV_DAROU？>
		Msg5 <%name4% の %name2% は、\SPR %2%の倉庫に巣食う害獣を片付ければ %name1% の資金調達に協力すると言った。>
		Msg6 <そう、それが条件%JG_DANE。受けるか、諦めるか%JV_M_DA%JV_YO。>
		Msg7 <%JS2が目の前にいるのに、どうして業者なんか呼ぶ必要がある%JV_N%JV_M_DA？ 言われた通りにする以外に、%name1% が金を得る方法はない%JV_ZO！>
		Msg8 <%JF2くらいの資産を持ってる人間にははした金%JG_DAYO。だからこそ %name1% のような人々を支援することができるし、経費にしてしまえば税金対策にもなる%JV_Nだから。>
		Msg9 <口の利き方に気をつけるべき%JV_M_DA%JV_NA！ %JF2を怒らせたら、約束の金なしでも下の掃除をさせてやれる%JG_SK！>
		Msg10 <言いたいことはよく分かった%JG_YO。ならこの話は平行線%JG_DANE%JV_SIL_Rどっちも譲る気はないんだから。>
		Msg11 <若い頃に遊んでいたアドベンチャーゲームには、ネズミ退治と引き換えにお宝をくれる金持ちの王だの商人だのが必ずいた%JV_N%JV_M_DA。%JF2もやってみたい%JV_N%JV_M_DAよ、そういうの……。>
		Msg12 <まさか。そういうゲームは下手で下手で……%JF2のキャラはいつも死んでた%JG_YO。やりたかったのは、王とか商人のほう……ありきたりな、でも危険な任務に人々を送り出す……そういうのがイイ%JG_SK。>
		Msg13 <ああそう……でも、%name1% の儲け話を実現できるのは私だけ%JG_DAYO。それが嫌なら、他のツテでも探して回るか……宝くじでもアテにするか……。>
		Msg14 <ネズミ退治の進み具合はどう%JV_M_DA、冒険者さん？>
		Msg14_1 <倉庫の掃除はまだ終わらないの%JV_KA_Q？>
		Msg14_2 <ネズミだか何だかは、まだ倉庫に残ってるの%JV_KA_Q？>
		Msg15 <ありがとう！ 資金はすぐに届くと %name1% に伝えて%JG_R。>
		Prompt1 <%name1% への寄付を依頼して回っている%JV_F_NO。>
		Prompt2 <売り物を見せてほしい。>
		Prompt3 <それで決まり%JG_DA。>
		Prompt4 <下を掃除すれば資金を融通してくれると……？>
		Prompt5 <分かった、それでいい%JV_F_WA。>
		Prompt5_1 <ああ、それ以上言わなくていい%JV_F_WA……。>
		Prompt5_2 <ああ分かった、もうそれで十分%JG_DA。>
		Prompt5_3 <それだけ聞ければ十分%JG_DA。>
		Prompt6 <$200、いや$300もあれば駆除業者が雇えるのに……。>
		Prompt7 <何百万って金額の話をしてるんだ%JG_GA……。>
		Prompt8 <感覚がおかしくなってるんじゃ？>
		Prompt9 <タダでその掃除をするつもりはない%JV_F_WA。>
		Prompt10 <というか、何でこんなややこしいことを？>
		Prompt11 <そういうのって、勇者とかメック乗りとかを？>
		Prompt12 <さっきも言った%JG_GA、その発想はおかしい。>
		Prompt13 <ネズミならもう片付いてると思う%JG_GA？>
		CPrompt13 <if= SceneVar %3% 1 1 Accept>
		Prompt14 <ネズミは全滅した%JV_F_WA。>
		Prompt14_1 <これでもう邪魔者はいない%JV_F_WA。>
		CPrompt14 <if= SceneVar %3% 1 1 Accept>
		Prompt15 <仕事の道具を買いに来た%JV_F_WA。>

		MetaScene 2
		sub
			room
			name <Market>
			name_I18N <小売店>
			ShowNAME <true>
			minimap <2#...+#.......1.....&---!>
			special <SHAREDPALETTE>
			desig <HOME>
			sub
				Door
				update <if= V1 0 else GoCheckQuest V= 1 1 SetStat STAT_Lock HardSkillTar %threat%>
				GoCheckQuest <ifG PlotStatus %plotid% 0 SetStat STAT_Lock 0>
			end
			inv
				TrapDoor
				MiniMapComponent 2
				desig <ENTRANCE %3%>
			end
		end

		STC QS_ExterminationBasement
		name <%name2%'s Basement>
		name_I18N <%name2% の地下室>
		SetID 3
	end
	inv
		NPC Shopkeeper
		Knowledge 8
		Ego 14
	end

Content
	name <The Prodigal Son/Daughter>
	% desc <A rich investor will give the PC some money, if the PC can redeem his son/daughter>
	desc <裕福な投資家が PC に資金を与えてくれる。彼の息子または娘を連れ戻すことができれば。>
	requires <*:Q_FindMoney ~.Investor>

	% E1 is the character who needs the money
	% E2 is the character who can give the money
	% E3 is the city scene; no money involved
	% E4 is the child who squandered the money
	% E5 is a local public scene
	Element2 <Prefab>
	Place2 <5 (Citizens) pass ally>
	Element3 <.>
	Element4 <NewNPC 0 3 Young>
	Element5 <Scene Building Public Legit>

	%% FAIL CONDITIONS:
	%% - E2 dies
	end <ifNPCDead %2% LoseSubPlot %plotid%>

	% SubQuest1 is the intervention for the target
	SubPlot1 <*:Q_PersonalIntervention 4 2>

	sub
		Persona 2
		% rumor%id% <%name2% has been known to donate money to businesses and charities.>
		rumor%id% <%name2% はチャリティーやビジネスに寄付をする人物として知られている>
		% V1 = Have accepted quest
		greeting <if= PlotStatus %plotid% %id% else GoNoQuest if= PlotStatus %plotid1% -1 else GoCheckStatus NewChat Say 1 WinSubPlot %plotid%>
		GoCheckStatus <if= V1 1 else GoFirstTime NewChat Say 3 AddChat 1 AddChat 2 AddChat 3>
		GoFirstTime <NewChat Say 4 AddChat 4>
		GoNoQuest <NewChat SayAnything>
		result1 <NewChat Say 5>
		result2 <NewChat Say 6 SetPlotStatus %plotid% -2>
		result3 <NewChat Say 6 AddCheerful -d10 SetPlotStatus %plotid% -2>
		result4 <ifNPCOK %4% else GoR4Trivial NewChat Say 9 AddChat 5>
		% If the prodigal sondaughter is already dead at the start of this
		% subquest, the investment will be decided by a single conversation roll.
		GoR4Trivial <ifConversation SkillTar %threat% else GoR4Fail NewChat Say 7 WinSubPlot %plotid%>
		GoR4Fail <NewChat Say 8 SetPlotStatus %plotid% -2>
		Result5 <NewChat Say 10 QMemo %plotid% 11 AddChat 6 SetPlotStatus %plotid1% %id1% V= 1 1>
		result6 <NewChat Say 12 QMemo %plotid% 13>
		% Msg1 <You've brought %name4% back to me! I've approved the donation for %name1%; you can go tell \OPR %1% the good news.>
		% Msg3 <Do you have any news from %name4% yet?>
		% Msg4 <What's this, a cavalier with a business proposal? I can tell that you're after something and it more than likely has to do with money.>
		% Msg5 <Well, keep trying.>
		% Msg6 <That is... most upsetting. Considering your failure in this matter I think I will decline to invest with %name1%.>
		% Msg7 <You seem like an earnest young person. Alright, you can tell %name1% that I'll support \PPR %1% endeavor.>
		% Msg8 <I'm sorry, but there's been a loss in my family and I've been taking a break from investing. Keep looking and maybe you can find the money somewhere else.>
		% Msg9 <I try to invest in things which will improve our world, since the most anyone can hope for is to leave a great legacy to future generations. Unfortunately I've had better luck with money than I have with my own children.>
		% Msg10 <%name4% left home some years ago and fell in with a bad crowd. Since then I've had very little contact with \OPR %4% . If you could find \OPR %4% and convince \OPR %4% to come back, I would agree to finance %name1%.>
		% Msg11 <%name2% will agree to finance %name1% if you convince %name4% to return home.>
		% Msg12 <As far as I know, \SPR %4% can often be found at \SCENE NPCScene %4% . There's really no way of telling where \SPR %4% is exactly.>
		% Msg13 <%name2% will agree to finance %name1% if you convince %name4%, who may or may not be at \SCENE NPCScene %4% , to return home.>
		% Prompt1 <Nothing yet.>
		% Prompt2 <I'm afraid %name4% won't be coming back.>
		% CPrompt2 <ifSubPlotLost %plotid1% Accept>
		% Prompt3 <%name4% has died.>
		% CPrompt3 <ifNPCDead %4% Accept>
		% Prompt4 <I'd like for you to contribute to %name1%.>
		% Prompt5 <What do you mean?>
		% Prompt6 <Any idea where I might find %name4%?>
		Msg1 <%JS2のおかげで %name4% が帰ってきてくれた！ %name1% への寄付手続きは済んでいるから、行って知らせてあげなさい。>
		Msg3 <%name4% から何か返事は得られた%JG_KANA？>
		Msg4 <むむ、メック乗りがビジネスの売り込みとは？ 何か理由がある様子%JG_DANE、まあ金に関わることには間違いない%JV_N%JV_DAROU%JG_GA。>
		Msg5 <%JR_YES……諦めず続けて%JG_R。>
		Msg6 <それは……やってくれたもの%JV_M_DA%JV_NA。その失敗に応えて、%JF2も %name1% への投資を断らせてもらう%JV_F_WA。>
		Msg7 <熱心な若者%JG_DANE。いい%JV_DAROU、%name1% の挑戦に%JF2も手を貸すと伝えなさい。>
		Msg8 <悪い%JG_GA……家族に不幸があって、投資活動からは一旦身を引いている%JG_NDA。よそを当たって%JG_R、誰かほかに見つかるかもしれないから。>
		Msg9 <%JF2は、この世界をより良くしてくれるものに資産を供している%JV_F_NO。未来の世代に優れた遺産を残していくことこそが、人間にとって最も尊いことだから%JV_NA。だ%JG_GA、%JF2は……カネの運には恵まれた%JG_GA、家庭の運には恵まれなかったらしい%JV_F_WA。>
		Msg10 <%name4% は数年前にこの家を出て、ならず者の集団に混じってしまった%JG_NDA。それ以来、あの子からはろくに音沙汰もない……もし%JS2があの子を探し出して家に帰ってくるよう説得することができれば、%name1% への資金提供を約束する%JG_YO。>
		Msg11 <%name2% は、%name4% を説得して家に帰らせることができれば %name1% に資金を出すと約束した。>
		Msg12 <%JF2の知る限りでは、あの子は \SCENE NPCScene %4% でよく目撃されるそう%JG_DAYO。それ以上の詳しいことはまったく分からない%JV_F_WA。>
		Msg13 <%name2% は、\SCENE NPCScene %4% に居るらしい %name4% を説得して家に帰らせることができれば、%name1% に資金を出すと約束した。>
		Prompt1 <まだ何も。>
		Prompt2 <残念だけど、%name4% は戻ってこない%JV_F_WA。>
		CPrompt2 <ifSubPlotLost %plotid1% Accept>
		Prompt3 <%name4% は死んだ%JV_F_WA。>
		CPrompt3 <ifNPCDead %4% Accept>
		Prompt4 <%name1% への協力をお願いしたい%JV_F_NO。>
		Prompt5 <どういう意味%JV_M_DA？>
		Prompt6 <%name4% の居場所について、心当たりは？>
	end
	inv
		NPC Corporate Executive
		job <Investor>
		Age 30
	end

%%
%% Debugging Frame
%%
%% Loads a mission into the Cavalier's Club for easy debugging.
%%

Content
	requires <*:Q_Debug>
	% desc <The NPC will give the PC a mission, to be handled by a "GiveMission" subquest.>
	desc <NPC が PC にミッションを発行し、続きは "GiveMission" のサブクエストで処理される。>

	% E1 is the person who will be giving the mission.
	% E2 is the CavClub
	Element1 <NewNPC 0 0>
	Place1 <2 (Citizens) ally pass>
	Element2 <Scene CavClub>

	% SubQuest1 is the mission.
	SubPlot1 <*:Q_DFindMoney 1>

	sub
		Persona 1
		% rumor0 <%name1% needs a cavalier for a mission of some kind.>
		rumor0 <%name1% は何かのミッションにメック乗りを必要としている>
		greeting <if= PlotStatus %plotid1% -1 else GoCheckLoss NewChat Say 1 SetPlotStatus %plotid% -1>
		GoCheckLoss <if= PlotStatus %plotid1% -2 else GoCheckFirst SetPlotStatus %plotid% -2 Goto GoEndInLoss>
		*GoEndInLoss <*MissionWasFailure na na na>
		GoCheckFirst <if= PlotStatus %plotid1% 0 else GoChat Goto GoOfferQuest>
		*GoOfferQuest <*DoYouWantAJob GoStartQuest>
		GoStartQuest <SetPlotStatus %plotid1% %id1% NewChat Say 2>
		GoChat <NewChat SayAnything>
		% Msg1 <I hear that you succeeded. The debugging of the mission is now over.>
		% Msg2 <Give me my money!!!>
		Msg1 <成功したようだな。このミッションのデバッグはこれで完了だ。>
		Msg2 <金をよこせ！！！>

		MetaScene 1
		sub
			room
			desig <HOME>
			minimap <#&&&#&...&&.1.&&...&&&-&&>
		end
	end

