function mainevent_opening1() local Event=EventClass.Event; Event:FadeBlack() Event:SetEventFlag(EventFlag.scene_opening1,1); Event:LockPlayer(); Event:SetStatusVisible(0); coroutine.yield(); Event:SetPlayerPosition(8,21,0) Event:BackupCamera(); Event:BackupDof(); Event:SetCamera(9.0,19.55,2.84); Event:SetParamDepthofField(0.89,0.70,0.0); Event:SetPlayerDirection(0); Event:Wait(1.0); coroutine.yield(); Event:FadeIn() Event:Wait(1.0); coroutine.yield(); Event:MovePlayer(0.0,12.8,3.2); coroutine.yield(); Event:MovePlayer(-1.6,0.0,3.2); coroutine.yield(); Event:MovePlayer(0.0,4.8,3.2); coroutine.yield(); Event:Wait(1.0); coroutine.yield(); setnpccamera("Kinga1_010") if ( Event:IsSpelunker() ) then Event:Print("King: So the time has/rcome. You are Spelunker?/b/cl"); Event:Print("Our kingdom... is in/rgreat peril once again./b/cl"); Event:Print("Normally, I’d wait for/ra brave or legendary/rhero to come.../b/cl"); Event:Print("But if you’re here, they/rmust all be very, very/rbusy.../b/cl"); Event:Print("The hero who saved our/rkingdom left his sword/rin the northern forest./b/cl"); Event:Print("He who pulls the sword/rfrom its base is fated/rto save our kingdom.../b/cl"); Event:Print("But for some reason,/rnobody has managed to/rdo that!/b/cl"); Event:Print("Poor, weak Spelunker.../rIn your case, I would/raccept no for an answer./b/cl"); Event:Print("But I must ask. Are you/rwilling to seek out the/rlegendary sword?/co"); Event:WaitContinue(); coroutine.yield(); while(true) do Event:Select(); coroutine.yield(); if(Event:GetSelect()==0) then break; else Event:Print("/clSpelunker... I share the/rfear in your heart.../b/cl"); Event:Print("But if you refuse, why/rdid you pick this mode/rin the first place!?/b/cl"); Event:Print("Will you seek out the/rlegendary sword in the/rSacred Forest or not?/b/co"); Event:WaitContinue(); coroutine.yield(); end end Event:Print("/clHow brave! Yet so very/rreckless... I shall pray/rfor your safe return!/b/cl"); else if(Event:GetFromMode() == 1) then Event:Print("King: Ah, nice to have/ryou back, "..Event:GetPlayerName().."!/b/cl"); Event:Print("I feel like I haven’t/rsaid that in so long!/b/cl"); Event:Print("You must have guts to/rchallenge this mode.../b/cl"); Event:Print("This being your second/rtime through, I’ll skip/rthe annoying intros./b/cl"); else if(Event:GetJobType()==1) then if(Event:GetPlayerSex()==0) then Event:Print("King: Thank you for/rcoming, Prince "..Event:GetPlayerName().."!/b/cl"); end if(Event:GetPlayerSex()==1) then Event:Print("King: Thank you for/rcoming, Princess "..Event:GetPlayerName().."!/b/cl"); end else Event:Print("King: Thank you for/rcoming, "..Event:GetPlayerName().."!/b/cl"); end Event:Print("Our kingdom... is in/rgreat peril once again./b/cl"); --修正0905 分岐 if(Event:GetJobType()==0) then Event:Print("That is why I need your/rhelp, descendant of the/rlegendary hero./b/cl"); Event:Print("The hero who saved our/rkingdom left his sword/rin the northern forest./b/cl"); end if(Event:GetJobType()==1) then if(Event:GetPlayerSex()==0) then Event:Print("I must ask a favour of/ryou, prince of our/rally, Dottano Kingdom./b/cl"); Event:Print("The hero who saved our/rkingdom left his sword/rin the northern forest./b/cl"); end if(Event:GetPlayerSex()==1) then Event:Print("I must ask a favor of/ryou, princess of our/rally, Dottano Kingdom./b/cl"); Event:Print("The hero who saved our/rkingdom left his sword/rin the northern forest./b/cl"); end end if(Event:GetJobType()==2) then Event:Print("You have seen the world,/rso I must ask a favour of/rsuch a famed scholar./b/cl"); Event:Print("The hero who saved our/rkingdom left his sword/rin the northern forest./b/cl"); end --修正0902 Event:Print("I believe you are the/rone who can pull the/rsword from its stone.../b/cl"); Event:Print("If so, you are destined/rto save our kingdom./b/cl"); Event:Print("The problem is, no one/rhas actually found the/rsword to this very day!/b/cl"); --0905分岐 if(Event:GetJobType()==0) then Event:Print("BUT! As a descendant/rof the legendary hero,/rI know YOU can do it!/b/cl"); end if(Event:GetJobType()==1) then if(Event:GetPlayerSex()==0) then Event:Print("But, you are a royal/rprince of Dottano!/rI know you can do it!/b/cl"); end if(Event:GetPlayerSex()==1) then Event:Print("But, you are a royal/rprincess of Dottano!/rI know you can do it!/b/cl"); end end if(Event:GetJobType()==2) then Event:Print("But you are a scholar of/rwisdom and experience!/rI know you can do it!/b/cl"); end end -- フロムモード Event:Print("Will you venture north/rof the castle to obtain/rthe legendary sword?/b/co"); Event:WaitContinue(); coroutine.yield(); while(true) do Event:Select(); coroutine.yield(); if(Event:GetSelect()==0) then break; else Event:Print("/cl"..Event:GetPlayerName()..".../rHahaha! Good show!/b/cl"); Event:Print("...That was a joke, yes?/rI played a fair share of/rpranks in my day too.../b/cl"); Event:Print("Let’s try this again./rWill you bring back the/rlegendary sword?/b/co"); Event:WaitContinue(); coroutine.yield(); end end --分岐0905 if(Event:GetJobType()==0) then Event:Print("/cl"..Event:GetPlayerName().."! You are indeed/rof the hero’s brave/rbloodline! Thank you!/b/cl"); end if(Event:GetJobType()==1) then if(Event:GetPlayerSex()==0) then Event:Print("/clWow! My dear "..Event:GetPlayerName().."!/rOnly a prince could be/rso brave! Thank you!/b/cl"); end if(Event:GetPlayerSex()==1) then Event:Print("/clWow! My dear "..Event:GetPlayerName().."!/rOnly a princess could be/rso brave! Thank you!/b/cl"); end end if(Event:GetJobType()==2) then Event:Print("/clYou are a grand scholar,/rdear "..Event:GetPlayerName().."! I thank/ryou for your bravery!/b/cl"); end -- end --スぺランカーモード Event:Print("It’s so dangerous to be/ralone! Take this!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); Event:SetCamera(0.10,13.03,-21.10,9.27,3.99,-34.88); Event:SetParamDepthofField(1.26,0.50,0.0); Event:Wait(1.0); coroutine.yield(); Event:SetAnimationId("ImperialGuard", 2); Event:MoveNpc("ImperialGuard",0.0,-1.6,3.2); coroutine.yield(); Event:MoveNpc("ImperialGuard",-4.8,0.0,3.2); coroutine.yield(); Event:SetPlayerDirection(3); Event:SetAnimationId("ImperialGuard", 1); getspecialitem2(105); --ふつうのけん入手 Event:RestoreCamera(); Event:RestoreDof(); Event:BackupCamera(); Event:BackupDof(); Event:Print("/cl> Got a sword!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgetspecialitem2() getspecialitemShield(89); --ふつうのたて入手 Event:Print("/cl> Got a shield!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgetspecialitemShield(89); Event:Wait(1.0); coroutine.yield(); Event:SetAnimationId("ImperialGuard", 2); Event:MoveNpc("ImperialGuard",4.8,0.0,3.2); coroutine.yield(); Event:SetPlayerDirection(0); Event:MoveNpc("ImperialGuard",0.0,1.6,3.2); coroutine.yield(); Event:SetNpcDirection("ImperialGuard",1); Event:SetAnimationId("ImperialGuard", 1); Event:Wait(1.0); coroutine.yield(); setnpccamera("Kinga1_010") --修正0902 Event:Print("/clI have faith that you/rare the hero of legend!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); Event:SetProgressFlag(1,1); --城の北の森MAP表示フラグ Event:SetStatusVisible(1); Event:RestoreCamera(); Event:RestoreDof(); Event:UnlockPlayer(); Event:SetStatusVisible(1); end --盾専用 function getspecialitemShield(n) local Event=EventClass.Event; Event:Wait(1.0); coroutine.yield(); Event:SavePlayerAngle(); Event:SetupBGMInProportion(0.1,0.3) coroutine.yield(); Event:PlaySe(soundList.SoundID.SE_important_item_get); Event:StartHailItem(n,1); Event:PlayCamera(0.0,2.0,1); coroutine.yield(); Event:SetupBGMOutProportion(0.5) return; end function endgetspecialitemShield(n) local Event=EventClass.Event; Event:AddItem2(n); Event:EndHailItem(); Event:RestorPlayerAngle(); return; end