function BlockDefenceQuit() local Event = EventClass.Event; Event:Pause(); Event:LockPlayer(); coroutine.yield(); Event:Print("/vnYou will exit Block/r"); Event:Print("Defense. Is this okay?/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:Wait(1.0) coroutine.yield(); Event:SetPlayerDirection(0); coroutine.yield(); Event:ResetBDPlayerSword(); Event:DestroyMiniGame(); Event:Play(); Event:UnlockPlayer(); if ( stage == 1 ) then Event:SetMap("D_22_1","-gDebug"); elseif ( stage == 2 ) then Event:SetMap("D_23_7","-gDebug"); elseif ( stage == 3 ) then Event:SetMap("D_25_1","-gDebug"); elseif ( stage == 4 ) then Event:SetMap("D_26_1","-gDebug"); elseif ( stage == 5 ) then Event:SetMap("D_27_1","-gDebug"); else Event:SetMap("Field_50","-gtf50_1"); end return; end Event:CloseMessage(); coroutine.yield(); Event:Play(); Event:UnlockPlayer(); end