function DashRaceClear() local Event = EventClass.Event; -- ステージの確保 local stage = Event:GetMiniGameStage(); Event:Print("/vnGoal!/co"); Event:WaitContinue(); coroutine.yield(); Event:Wait(1.0); coroutine.yield(); Event:LockPlayer(); coroutine.yield(); Event:Wait(1.0) coroutine.yield(); Event:CloseMessage(); coroutine.yield(); Event:Print("Your time is/r"..Event:GetIntTime().."."..Event:GetDecTime().." seconds!/r"); if ( Event:IsFirstRace(Event:GetMiniGameStage()) ) then Event:Print("Best: No Record/b/cl"); else local bestTime = Event:GetRaceBestRecord(Event:GetMiniGameStage()); Event:SetTime(bestTime, 2); Event:Print("Best: "..Event:GetIntTime().."."..Event:GetDecTime().." seconds/b/cl"); end Event:SetRaceNewRecord(); if ( Event:IsUpdateBestTime() ) then Event:Print("Congratulations! It’s/ra new record!/b/co"); else Event:Print("/co"); end Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); -- 景品処理 ------------------------------------------------------------------------------ -- ステージ1 if ( stage == 1 ) then if ( Event:GetDRTime() < 25 ) then -- 25秒以内なら100G if ( Event:GetEventFlag(244) < 1 ) then Event:Print("You got a prize for/r"); Event:Print("finishing in 25 seconds!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); Event:SetMoney(Event:GetMoney() + 100); geteventitem(); Event:Print("> Got 100G!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgeteventitem(); Event:SetEventFlag(244, 1); end end if ( Event:GetDRTime() < 20 ) then -- 20秒以内なら小さなブロック if ( Event:GetEventFlag(244) < 2 ) then Event:Print("You got a prize for/r"); Event:Print("finishing in 20 seconds!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); -- ちいさなブロック入手 Event:AddItem2(item.Item.IL_MINI_MEDAL); geteventitem(); Event:Print("> Got a Block!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgeteventitem(); Event:SetEventFlag(244, 2); end end -- ステージ2 elseif ( stage == 2 ) then if ( Event:GetDRTime() < 80 ) then -- 80秒以内なら200G if ( Event:GetEventFlag(245) < 1 ) then Event:Print("You got a prize for/r"); Event:Print("finishing in 80 seconds!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); Event:SetMoney(Event:GetMoney() + 200); geteventitem(); Event:Print("> Got 200G!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgeteventitem(); Event:SetEventFlag(245, 1); end end if ( Event:GetDRTime() < 60 ) then -- 60秒以内なら小さなブロック if ( Event:GetEventFlag(245) < 2 ) then Event:Print("You got a prize for/r"); Event:Print("finishing in 60 seconds!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); -- ちいさなブロック入手 Event:AddItem2(item.Item.IL_MINI_MEDAL); geteventitem(); Event:Print("> Got a Block!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgeteventitem(); Event:SetEventFlag(245, 2); end end end -- オール条件の景品処理 ------------------------------------------------------------------ if ( Event:GetEventFlag(251) < 2 ) then if ( Event:GetEventFlag(244) > 0 and Event:GetEventFlag(245) > 0 ) then if ( Event:GetEventFlag(251) < 1 ) then Event:Print("Your record in the Dash/r"); Event:Print("Circuit is amazing!/b/cl"); Event:Print("In honour of this feat.../b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); --ライフのかけら入手 geteventitem(); Event:Print("> Got a LIFE Shard!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgeteventitem(); Event:AddItem2(item.Item.IL_FRAGMENT_HEART); Event:SetEventFlag(251, 1); end if ( Event:GetEventFlag(244) > 1 and Event:GetEventFlag(245) > 1 ) then Event:Print("Your record in the Dash/r"); Event:Print("Circuit is absolutely/r"); Event:Print("splendid!/b/cl"); Event:Print("In honour of this feat.../b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); --ウィングソード入手 getspecialitem2(item.Item.IL_SKATING_SWORD); Event:Print("> Got a Wing Sword!/b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); endgetspecialitem2(); Event:SetEventFlag(251, 2); end end end ------------------------------------------------------------------------------------------ -- コーメー KomeMessage(); Event:Print("Try again?/b/co"); Event:WaitContinue(); coroutine.yield(); Event:Select(); coroutine.yield(); if ( Event:GetSelect() == 0 ) then Event:CloseMessage(); coroutine.yield(); Event:Wait(1.0) coroutine.yield(); Event:FadeOut(); coroutine.yield(); Event:StopBgm(); Event:ContinueMiniGame(); Event:FadeIn(); coroutine.yield(); Event:GetSetRace(); return; end Event:CloseMessage(); coroutine.yield(); Event:Wait(1.0) coroutine.yield(); Event:FadeOut(); Event:StopBgm(); Event:Wait(1.0) coroutine.yield(); Event:SetPlayerDirection(0); coroutine.yield(); Event:EquipSword(); Event:DestroyMiniGame(); Event:UnlockPlayer(); if ( stage == 1 ) then Event:SetMap("D_21_3","-gDebug"); elseif ( stage == 2 ) then Event:SetMap("D_24_1","-gDebug"); end coroutine.yield(); end