void main()
{
    object oPC = GetClickingObject();
    effect eRoomgear = EffectVisualEffect(VFX_FNF_SCREEN_SHAKE, FALSE);

    if(GetLocalInt(GetObjectByTag("room9counter"), "exitcounter") == 0)
        {
            if(GetLocalInt(GetObjectByTag("room5counter"), "exitcounter") == 0)
                {
                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r9_to_r5"))));
                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 1);
                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                }
              else
                {
                    if(GetLocalInt(GetObjectByTag("room5counter"), "exitcounter") == 1)
                        {
                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r10_to_r5"))));
                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 1);
                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                        }
                      else
                        {
                            if(GetLocalInt(GetObjectByTag("room5counter"), "exitcounter") == 2)
                                {
                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r6_to_r5"))));
                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 1);
                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                }
                              else
                                {
                                    if(GetLocalInt(GetObjectByTag("room5counter"), "exitcounter") == 3)
                                        {
                                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r1_to_r5"))));
                                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 1);
                                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                        }
                                }
                        }
                 }
        }
      else
        {
            if(GetLocalInt(GetObjectByTag("room9counter"), "exitcounter") == 1)
                {
                    if(GetLocalInt(GetObjectByTag("room4counter"), "exitcounter") == 0)
                        {
                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r9_to_r4"))));
                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 2);
                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                        }
                      else
                        {
                            if(GetLocalInt(GetObjectByTag("room4counter"), "exitcounter") == 1)
                                {
                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r1_to_r4"))));
                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 2);
                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                }
                              else
                                {
                                    if(GetLocalInt(GetObjectByTag("room4counter"), "exitcounter") == 2)
                                        {
                                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r8_to_r4"))));
                                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 2);
                                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                        }
                                      else
                                        {
                                            if(GetLocalInt(GetObjectByTag("room4counter"), "exitcounter") == 3)
                                                {
                                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r13_to_r4"))));
                                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 2);
                                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                                }
                                        }
                                }
                         }
                }
              else
                {
                    if(GetLocalInt(GetObjectByTag("room9counter"), "exitcounter") == 2)
                        {
                            if(GetLocalInt(GetObjectByTag("room6counter"), "exitcounter") == 0)
                                {
                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r9_to_r6"))));
                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 3);
                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                }
                              else
                                {
                                    if(GetLocalInt(GetObjectByTag("room6counter"), "exitcounter") == 1)
                                        {
                                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r7_to_r6"))));
                                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 3);
                                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                        }
                                      else
                                        {
                                            if(GetLocalInt(GetObjectByTag("room6counter"), "exitcounter") == 2)
                                                {
                                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r5_to_r6"))));
                                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 3);
                                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                                }
                                              else
                                                {
                                                    if(GetLocalInt(GetObjectByTag("room6counter"), "exitcounter") == 3)
                                                        {
                                                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r2_to_r6"))));
                                                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 3);
                                                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                                        }
                                                }
                                        }
                                 }
                        }
                      else
                        {
                            if(GetLocalInt(GetObjectByTag("room9counter"), "exitcounter") == 3)
                                {
                                    if(GetLocalInt(GetObjectByTag("room8counter"), "exitcounter") == 0)
                                        {
                                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r9_to_r8"))));
                                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 0);
                                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                        }
                                      else
                                        {
                                            if(GetLocalInt(GetObjectByTag("room8counter"), "exitcounter") == 1)
                                                {
                                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r3_to_r8"))));
                                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 0);
                                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                                }
                                              else
                                                {
                                                    if(GetLocalInt(GetObjectByTag("room8counter"), "exitcounter") == 2)
                                                        {
                                                            AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r4_to_r8"))));
                                                            SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 0);
                                                            DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                                            DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                                            DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                                        }
                                                      else
                                                        {
                                                            if(GetLocalInt(GetObjectByTag("room8counter"), "exitcounter") == 3)
                                                                {
                                                                    AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_r7_to_r8"))));
                                                                    SetLocalInt(GetObjectByTag("room9counter"), "exitcounter", 0);
                                                                    DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eRoomgear, GetLocation(GetObjectByTag("room9counter")), 6.0));
                                                                    DelayCommand(1.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_crank1")));
                                                                    DelayCommand(5.0, AssignCommand(GetObjectByTag("room9counter"), PlaySound("as_cv_boomdist2")));
                                                                }
                                                        }
                                                }
                                         }
                                }
                        }
                }
         }
}