function DashRaceQuit() local Event = EventClass.Event; Event:Pause(); Event:LockPlayer(); coroutine.yield(); Event:Print("/vnQuit Dash Circuit?/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(); local stage = Event:GetMiniGameStage(); Event:FadeOut(); Event:StopBgm(); Event:Wait(1.0) coroutine.yield(); Event:SetPlayerDirection(0); coroutine.yield(); Event:EquipSword(); Event:DestroyMiniGame(); Event:Play(); Event:UnlockPlayer(); if ( stage == 1 ) then Event:SetMap("D_21_3","-gDebug"); elseif ( stage == 2 ) then Event:SetMap("D_24_1","-gDebug"); end return; end Event:CloseMessage(); coroutine.yield(); Event:RestartMiniGame(); Event:Play(); Event:UnlockPlayer(); end