0
\$\begingroup\$

The code in question is a bot that completes the game Nintendo Nightmare at current WR time.

A standard room has some obstacles to walk around in order to reach a door. My current way that I would tackle this is to write some sequence of conditionals that partition the room into manageable regions. Then in each region I say to walk towards some position. That is the extent of this logic. It is automated, and therefore a bot, but it is not really doing any actual thinking.

Speed run information

In this run I would say there are seven major areas that we go through. These seven segments are as follows:

  1. Intro level as Mario
  2. Death Egg as Mario
  3. Intro level as Link
  4. Death Egg as Link
  5. Gyorg Tower
  6. Volcano Temple
  7. Sand Temple

Within the code there are six segments as the intro level is the same code for Link and Mario. The difference being that Link has the ability to acquire items.

The primary goal of the speedrun is to defeat the final boss which is located in the Sand Temple. In order to defeat the boss, two items are required. These items are the hookshot and the hammer. The hookshot is located within the Gyorg tower which we immediately exit upon obtaining. The hammer is located in the volcano temple, and we also leave that dungeon immediately upon getting the hammer. The Death Egg dungeon is entered in order to obtain the Jet Shield, which is an upgrade that allows the player to hover infinitely over any distance. While this item is theoretically skippable, the hover ability allows the bot to essentially skip the majority of obstacles.

The primary technique used in this run is the CAD (control-alt-delete) exploit. To elaborate, on Windows pressing the CAD keyboard combination brings up a secondary desktop security window. Through errors in the underlying game engine that are not fully understood, large swaths of game code are not executed while in this menu and similar UAC menus. As it matters for this speedrun, this causes collision and walking movement disabled while leaving gravity enabled. This allows the player to fall under the floor at any time, and because jumping midair is a normal feature, this is utilized to jump under walls. Once Jet Shield is obtained, the need to jump back in bounds is eliminated as all doors have infinite height in both directions. Because the issue of opening and closing windows security menus via automation is neither deterministic timing-wise nor possible without some form of Windows exploit (aka a Windows security flaw), CAD is simulated via a call to event_perform() to generate calls to the begin step event (which according to people far smarter than me is the only event executing every frame CAD is active).

Another large skip is backup/star farming during the first Death Egg segment. That particular collectible is not quite functional and can be collected any number of times. Doing this allows one to skip the first three worlds and go straight to the Death Egg level.

Feedback

All feedback is welcome. Where I'm hoping a review would be more to try and reign in and improve the code as it is currently functioning. This code will forever be getting optimized, I already have a laundry list of things to improve. I also plan to post on a speedrun feedback board. So I would appreciate any improvements to the actual speed running, however feedback in this area isn't anticipated on Code Review.

There’s a video of the bot in action. Info such as maps, related code, etc. will have to be extracted in order to be provided for reference.
Note: I did not film or publish the video, so there may be a minor discrepency between the bots actual time and the time taken in the video.

Here is a link to the original game’s source code. I have not yet uploaded the modified source file to a location, so I will link to that instead shortly.

Here is the code. I put it in a function-like format for readability. The bot is hardcoded within the game’s source code which is then compiled with Game Maker 8.0.

scr_tas_room2()
{
    if (booSkip == 1)
    {
        internal_room = room2;

        with (obj_mchose1)
            event_perform(ev_mouse, ev_left_press);
    }
}

scr_tas_room50()
{
    if (booSkip == 1)
    {
        internal_room = room50;
    
        with (obj_mchose1)
            event_perform(ev_mouse, ev_left_press);
    }
}

scr_tas_pause77()
{
    scr_tas_internal_room = pause77;

    with (obj_mquit)
        event_perform(ev_mouse, ev_left_press);
}

scr_tas_room1()
{
    internal_room = room1;
    random_set_seed(589190);
}

scr_tas_room3()
{
    if (booSkip == 0)
        frame_timer = 0;
    
    internal_room = room3;
    scr_set_tas_mouse_xy(scr_get_display_get_width()/2,scr_get_display_get_height()/2);
}

scr_tas_room_alien()
{
    internal_room = room_alien;
    booSkip = 1;
    scr_set_tas_mouse_xy(scr_get_display_get_width()/2,scr_get_display_get_height()/2);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room5()
{
    internal_room = room5;
    scr_set_tas_mouse_xy(display_get_width()/2,display_get_height()/2);
    scr_tas_keyboard_key_press(vk_enter);
    keyboard_key_release(vk_space);
}

scr_tas_room_start()
{
    if (internal_room != room_start)
    {
        timer = 0;
        internal_room = room_start;
        keyboard_key_release(vk_enter);
    }
    
    if (player_basic.x < 272)
    {
        scr_rotate_camera_to_dir(player_basic.x+6, player_basic.y+3);
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
    } else if (player_basic.y < 544 && player_basic.x < 352)
    {
        scr_rotate_camera_to_dir(304, 560);
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
    } else if (player_basic.y < 800 && player_basic.x < 352)
    {
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
    } else if (player_basic.x < 760 && timer == 0)
    {
        scr_rotate_camera_to_dir(768, 592);
        scr_tas_keyboard_key_press(vk_up);
    } else if (timer == 0)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 127)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(832, 592);
        if (point_distance(played_basic.x, played_basic.y, 832, 592) < 5)
            timer += 1;
    } else if (timer == 1)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 127)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(896, 624);
        if (point_distance(played_basic.x, played_basic.y, 896, 624) < 5)
            timer += 1;
    } else if (timer == 2)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 138)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(880, 688);
        if (point_distance(played_basic.x, played_basic.y, 880, 688) < 5)
            timer += 1;
    } else if (timer == 3)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 147)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(848, 736);
        if (point_distance(played_basic.x, played_basic.y, 848, 736) < 5)
            timer += 1;
    } else if (timer == 4)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 157)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(808, 800);
        if (point_distance(played_basic.x, played_basic.y, 808, 800) < 5)
            timer += 1;
    } else if (timer == 5)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 167)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(784, 864);
        if (point_distance(played_basic.x, played_basic.y, 784, 864) < 5)
            timer += 1;
    } else if (timer == 6)
    {
        scr_tas_keyboard_key_press(vk_up);
        if (player_basic.z <= 177)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
        scr_rotate_camera_to_dir(736, 928);
        if (point_distance(played_basic.x, played_basic.y, 736, 928) < 5)
            timer += 1;
    } else if (timer == 7)
    {
        scr_rotate_camera_to_dir(672, 944);
        if (point_distance(played_basic.x, played_basic.y, 672, 944) > 10)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
            scr_tas_keyboard_key_press(vk_up);
        } else if (point_distance(played_basic.x, played_basic.y, 672, 944) > 5)
        {
            if (player_basic.z < 211)
            {
                keyboard_key_release(vk_space);
                scr_tas_keyboard_key_press(vk_space);
            }
            
            scr_tas_keyboard_key_press(vk_up);
        } else
            keyboard_key_release(vk_up);
    }
}

scr_tas_room7()
{
    if (internal_room != room7)
    {
        internal_room = room7;
        global.tas_perfect_mouse = true;
    }
    
    random_set_seed(135464354);
    if (player_basic.jump == 0 && point_distance(496,160,player_basic.x,player_basic.y) > 4)
    {
        while ((player_basic.z + player_basic.canjump - 0.5) > -20)
            scr_tas_execute_simulated_CAD_menu(1);
    }
    
    if (player_basic.z < -8 && player_basic.jump == 0)
    {
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
    } else
        keyboard_key_release(vk_space);
    
    scr_rotate_camera_to_dir(496, 160);
    
    if (point_distance(496,160,player_basic.x,player_basic.y) > 4)
        scr_tas_keyboard_key_press(vk_up);
    else
        keyboard_key_release(vk_up);
}

scr_tas_room8()
{
    if (internal_room != room8)
    {
        internal_room = room8;
        global.tas_perfect_mouse = false;
    }
        
    scr_rotate_camera_to_dir(32, 112);
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_execute_simulated_CAD_menu(100);
    
    if (instance_number(obj_playcam) > 0)
        scr_tas_keyboard_key_press(vk_space);
    else
        keyboard_key_release(vk_space);
}

scr_tas_room9()
{
    internal_room = room9;
    scr_set_tas_mouse_xy(display_get_width()/2,display_get_height()/2);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room10()
{
    if (internal_room != room10)
        internal_room = room10;
    
    if (player_basic.jump == 0 && player_basic.z == -0.5 && player_basic.canjump == -0.5)
        scr_tas_execute_simulated_CAD_menu(7);
    
    if (player_basic.z < -6)
    {
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
    } else
        keyboard_key_release(vk_space);
    
    scr_rotate_camera_to_dir(208, 200);
    
    if (point_distance(208,200,player_basic.x,player_basic.y) > 5)
        scr_tas_keyboard_key_press(vk_up);
    else
        keyboard_key_release(vk_up);
}

scr_tas_room12()
{
    internal_room = room12;
    scr_set_tas_mouse_xy(scr_get_display_get_width()/2,scr_get_display_get_height()/2);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room43()
{
    internal_room = room43;
    scr_set_tas_mouse_xy(scr_get_display_get_width()/2,scr_get_display_get_height()/2);
    scr_tas_keyboard_key_press(vk_enter);
    keyboard_key_release(vk_space);
}

scr_tas_room_world11()
{
    if (global.prgmnumb == 0 && internal_room != room_world11)
    {
        internal_room = room_world11;
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_enter);
    } else if (global.prgmnumb < 23)
    {
        internal_room = room_world11;
        scr_tas_keyboard_key_press(vk_up);
    } else if (global.prgmnumb == 23)
    {
        if (internal_room != room_world11)
        {
            timerB = 0
            timer = 2;
            internal_room = room_world11;
        }
    
        if (timer > 0)
        {
            scr_set_tas_mouse_xy(scr_get_display_get_width()/2 + 460,scr_get_display_get_height()/2);
            timer -= 1;
        } else
        {
            if (timer == 0 && (timerB < 200 || timerB == 610 || timerB > 730) && timerB < 750)
            {
                scr_tas_keyboard_key_press(vk_space);
                timer = -1;
            } else
            {
                keyboard_key_release(vk_space);
                timer = 0;
            }
            
            timerB += 1;
            
            if (timerB < 760)
                scr_tas_keyboard_key_press(vk_up);
            else
            {
                keyboard_key_release(vk_up);
                if (timerB == 769)
                    scr_set_tas_mouse_xy(scr_get_display_get_width()/2 + 288,scr_get_display_get_height()/2);
            }
            
            if (timerB == 380)
                scr_set_tas_mouse_xy(scr_get_display_get_width()/2 - 450,scr_get_display_get_height()/2);
            else if (timerB == 420)
                scr_set_tas_mouse_xy(scr_get_display_get_width()/2 - 450,scr_get_display_get_height()/2);
            else if (timerB == 430)
                scr_set_tas_mouse_xy(scr_get_display_get_width()/2 + 600,scr_get_display_get_height()/2);
            else if (timerB == 730)
                scr_set_tas_mouse_xy(scr_get_display_get_width()/2 - 360,scr_get_display_get_height()/2);
        }
    } else if (global.prgmnumb == 24 && global.gotjet == 0)
    {
        if (internal_room != room_world11)
        {
            timer = 0;
            internal_room = room_world11;
        }
        
        keyboard_key_release(vk_space);
        if (obj_linkplayer.z == -0.5)
            scr_tas_keyboard_key_press(vk_space);
        
        scr_rotate_camera_to_dir(48, 1952);
        if (point_distance(obj_linkplayer.x, obj_linkplayer.y, 48, 1952) > 5)
            scr_tas_keyboard_key_press(vk_up);
        else
            keyboard_key_release(vk_up);
    } else if (global.gotgrappin == 0 && global.gotjet == 1)
    {
        internal_room = room_world11;
        scr_rotate_camera_to_dir(784, 1312);
        scr_tas_keyboard_key_press(vk_space);
        scr_tas_keyboard_key_press(vk_up);
    } else if (global.gotgrappin == 1 && global.gothammer == 0)
    {
        internal_room = room_world11;
        if (obj_linkplayer.y > 736)
        {
            if (obj_linkplayer.z == 15.5)
                scr_tas_execute_simulated_CAD_menu(16);
            scr_tas_keyboard_key_press(vk_space);
            scr_rotate_camera_to_dir(1520, 1200);
        } else if (obj_linkplayer.y > 640)
            scr_rotate_camera_to_dir(1472, 624);
        else
            scr_rotate_camera_to_dir(1888, 256);
        
        if (point_distance(obj_linkplayer.x,obj_linkplayer.y,1888,256) > 4)
        {
            scr_tas_keyboard_key_press(vk_up);
            scr_tas_keyboard_key_press(vk_space);
        } else
        {
            keyboard_key_release(vk_up);
            keyboard_key_release(vk_space);
        }
    } else if (global.gothammer == 1)
    {
        if (internal_room != room_world11)
        {
            internal_room = room_world11;
            scr_tas_keyboard_key_press(vk_shift);
            keyboard_key_release(vk_shift);
            a = 0;
        }
        
        if (obj_linkplayer.x > 1392 && obj_linkplayer.y < 400)
            scr_rotate_camera_to_dir(1344, 272);
        else if (obj_linkplayer.z < 160 && obj_linkplayer.y < 1056)
            scr_rotate_camera_to_dir(1376, 400);
        else if (obj_linkplayer.y < 1056)
        {
            scr_tas_keyboard_key_press(vk_space);
            scr_rotate_camera_to_dir(1472, 1072);
        } else if (obj_linkplayer.x < 1632)
        {
            if (obj_linkplayer.z > 64)
                keyboard_key_release(vk_space);
            else
                scr_tas_keyboard_key_press(vk_space);
            scr_rotate_camera_to_dir(1712, 1248);
        } else
        {
            if (obj_linkplayer.z > 16 && obj_linkplayer.y > 1712)
                keyboard_key_release(vk_space);
            else
                scr_tas_keyboard_key_press(vk_space);
            
            scr_rotate_camera_to_dir(1656, 1872);
        }
        
        if (a == 0)
        {
            keyboard_key_release(ord('H'));
            a = 1;
        } else
        {
            scr_tas_keyboard_key_press(ord('H'));
            a = 0;
        }
        
        scr_tas_keyboard_key_press(vk_up);
    }
}

scr_tas_room105()
{
    if (internal_room != room105)
        internal_room = room105;
    
    if (obj_cam.direction < 180 || obj_cam.direction > 290)
    {
        scr_tas_keyboard_key_press(vk_right);
        keyboard_key_release(vk_up);
    } else
    {
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_right);
    }
}

scr_tas_gameover138()
{
    if (internal_room != gameover138)
    {
        internal_room = gameover138;
        scr_tas_keyboard_key_press(vk_escape);
    } else
        keyboard_key_release(vk_escape);
}

scr_tas_stage4_69()
{
    internal_room = stage4_69;
    scr_set_tas_mouse_xy(scr_get_display_get_width()/2,scr_get_display_get_height()/2);
    scr_tas_keyboard_key_press(vk_enter);
}

scr_tas_room36()
{
    if (internal_room != room36)
    {
        timer = 0;
        internal_room = room36;
    }
    
    if (timer < 1)
    {
        scr_rotate_camera_to_dir(176, 64);
        timer += 1;
    } else if (timer < 30)
    {
        scr_tas_keyboard_key_press(vk_up);
        timer += 1;
    } else if (timer < 31)
    {
        keyboard_key_release(vk_up);
        scr_tas_keyboard_key_press(vk_down);
        scr_tas_keyboard_key_press(vk_right);
        timer += 1;
    } else
    {
        keyboard_key_release(vk_right);
        scr_tas_keyboard_key_press(vk_down);
        timer += 1;
    }
}

scr_tas_room83()
{
    internal_room = room83;
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room79()
{
    if (internal_room != room79)
    {
        timer = 0;
        internal_room = room79;
        keyboard_key_release(vk_space);
    }
    
    if (timer < 1)
        scr_set_tas_mouse_xy(scr_get_display_get_width()/2 + 180,scr_get_display_get_height()/2);
    else if (timer < 115)
        scr_tas_keyboard_key_press(vk_up);
    else if (timer < 123)
    {
        scr_set_tas_mouse_xy(scr_get_display_get_width()/2 + 190,scr_get_display_get_height()/2);
        scr_tas_keyboard_key_press(vk_up);
    } else if (timer < 155)
        scr_tas_keyboard_key_press(vk_up);
    else if (timer < 180)
    {
        scr_tas_keyboard_key_press(vk_up);
        scr_tas_keyboard_key_press(vk_right);
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
    } else if (timer < 183)
    {
        keyboard_key_release(vk_up);
        keyboard_key_release(vk_right);
        scr_set_tas_mouse_xy(scr_get_display_get_width()/2 - 450,scr_get_display_get_height()/2);
    } else if (timer < 215)
        scr_tas_keyboard_key_press(vk_up);
    else if (timer < 218)
    {
        keyboard_key_release(vk_up);
        scr_set_tas_mouse_xy(scr_get_display_get_width()/2 - 375,scr_get_display_get_height()/2);
    } else if (timer < 300)
        scr_tas_keyboard_key_press(vk_up);
    else if (timer < 302)
    {
        scr_set_tas_mouse_xy(scr_get_display_get_width()/2 - 410,scr_get_display_get_height()/2);
        keyboard_key_release(vk_up);
    } else if (timer < 500)
        scr_tas_keyboard_key_press(vk_up);
    else
    {
        keyboard_key_release(vk_up);
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_down);
    }
    
    timer += 1;
}

scr_tas_room120()
{
    internal_room = room120;
}

scr_tas_room121()
{
    if (internal_room != room121)
    {
        random_set_seed(135464354);
        internal_room = room121;
    }
    internal_room = room121;
    keyboard_key_release(vk_space);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room123()
{
    if (internal_room != room123)
    {
        internal_room = room123;
        keyboard_key_release(vk_space);
        a = 0;
        b = 0;
        c = 0;
    }
    
    if (a == 0)
    {
        scr_tas_keyboard_key_press(vk_control);
        if (c == 0 || (obj_player.z < 8 && point_distance(obj_player.x, obj_player.y, 936, 944) > 5))
            scr_tas_keyboard_key_press(vk_space);
        a = 1;
    } else if (a == 1)
    {
        if (c == 0)
            keyboard_key_release(vk_control);
        keyboard_key_release(vk_space);
        a = 0;
    }
    
    if (obj_player.x < 672)
    {
        scr_rotate_camera_to_dir(obj_player.x+1, obj_player.y);
        b += 1;
    
        if (b < 40)
        {
            keyboard_key_release(vk_down);
            scr_tas_keyboard_key_press(vk_up);
        } else if (b < 45)
        {
            keyboard_key_release(vk_up);
            scr_tas_keyboard_key_press(vk_down);
        } else
            b = 0;
    } else if (obj_player.x < 768)
    {
        scr_rotate_camera_to_dir(936, 520);
        keyboard_key_release(vk_down);
        scr_tas_keyboard_key_press(vk_up);
    } else if (obj_player.y < 900)
    {
        scr_rotate_camera_to_dir(obj_player.x-0.2, obj_player.y+1);
        scr_tas_keyboard_key_press(vk_up);
        b = 0;
    } else
    {
        c = 1;
        scr_rotate_camera_to_dir(936, 944);
        keyboard_key_release(vk_down);
        if (point_distance(obj_player.x, obj_player.y, 936, 944) > 5)
            scr_tas_keyboard_key_press(vk_up);
        else
            keyboard_key_release(vk_up);
        
    }
}

scr_tas_room124()
{
    internal_room = room124;
    keyboard_key_release(vk_up);
    keyboard_key_release(vk_space);
    scr_tas_keyboard_key_press(vk_right);
}

scr_tas_room125()
{
    internal_room = room125;
    keyboard_key_release(vk_right);
    scr_tas_keyboard_key_press(vk_space);
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room126()
{
    internal_room = room126;
    keyboard_key_release(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room127()
{
    internal_room = room127;
    keyboard_key_release(vk_space);
    scr_tas_keyboard_key_press(vk_enter);
}

scr_tas_room129()
{
    internal_room = room129;
    keyboard_key_release(vk_enter);
    scr_tas_keyboard_key_press(vk_enter);
}

scr_tas_test_128()
{
    if (internal_room != test_128)
    {
        internal_room = test_128;
        keyboard_key_release(vk_control);
        keyboard_key_release(vk_enter);
        keyboard_key_release(vk_space);
        keyboard_key_release(vk_escape);
        scr_tas_keyboard_key_press(vk_escape);
    }
}

scr_tas_room192()
{
    if (internal_room != room192)
    {
        internal_room = room192;
        random_set_seed(135464354);
    }
    
    keyboard_key_release(vk_space);
    scr_tas_keyboard_key_press(vk_space);
    
    if (obj_linkplayer.x < 336)
        scr_rotate_camera_to_dir(352, 128);
    else if (obj_linkplayer.y > 96)
        scr_rotate_camera_to_dir(416, 64);
    else
        scr_rotate_camera_to_dir(960, 32);
    
    if (obj_linkplayer.x > 568 && obj_linkplayer.z >= -0.5)
        scr_tas_execute_simulated_CAD_menu(10);
        
    if (instance_number(obj_linkplayer) == 1)
    {
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_down);
    } else
    {
        keyboard_key_release(vk_up);
        scr_tas_keyboard_key_press(vk_down);
    }
}

scr_tas_room193()
{
    if (internal_room != room193)
    {
        internal_room = room193;
        keyboard_key_release(vk_down);
        keyboard_key_release(vk_space);
    }
        
    if (global.gotjet == 0)
    {
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(96, 64);
        scr_tas_keyboard_key_press(vk_up);
    } else
    {
        scr_rotate_camera_to_dir(528, 256);
        if (instance_number(obj_linkplayer) == 1)
        {
            scr_tas_keyboard_key_press(vk_up);
            keyboard_key_release(vk_down);
        } else
        {
            keyboard_key_release(vk_up);
            scr_tas_keyboard_key_press(vk_down);
        }
    }
}

scr_tas_room194()
{
    if (internal_room != room194)
    {
        internal_room = room194;
        a = 0;
    }
        
    if (a == 0)
    {
        scr_tas_keyboard_key_press(vk_control);
        a = 1;
    } else if (a == 1)
    {
        keyboard_key_release(vk_control);
        a = 0;
    }
        
    scr_rotate_camera_to_dir(496, 368);
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room196()
{
    if (internal_room != room196)
    {
        internal_room = room196;
        keyboard_key_release(vk_down);
    }
    
    keyboard_key_release(vk_space);
    scr_tas_keyboard_key_press(vk_space);
    scr_rotate_camera_to_dir(112, 256);
    
    if (instance_number(obj_linkplayer) == 1)
    {
        scr_tas_keyboard_key_press(vk_up);
        keyboard_key_release(vk_down);
    } else
    {
        keyboard_key_release(vk_up);
        scr_tas_keyboard_key_press(vk_down);
    }
}

scr_tas_room197()
{
    if (internal_room != room197)
        internal_room = room197;
    
    scr_tas_keyboard_key_press(vk_down);
    
    timer += 1;
    
    if (timer < 15)
        scr_tas_keyboard_key_press(vk_right);
    else if (timer < 60)
        keyboard_key_release(vk_right);
    else
        scr_tas_keyboard_key_press(vk_right);
}

scr_tas_room198()
{
    if (internal_room != room198)
    {
        internal_room = room198;
        keyboard_key_release(vk_down);
        keyboard_key_release(vk_right);
    }
    
    scr_tas_keyboard_key_press(vk_up);
    
    if (obj_linkplayer.x > 256)
    {
        scr_rotate_camera_to_dir(240, 384);
        if (obj_linkplayer.canjump <= -2.5 && obj_linkplayer.x > 384)
        {
            scr_tas_keyboard_key_press(vk_space);
            keyboard_key_release(vk_space);
        }
    } else
    {
        scr_rotate_camera_to_dir(112, 160);
        if (obj_linkplayer.canjump <= -2.5)
        {
            scr_tas_keyboard_key_press(vk_space);
            keyboard_key_release(vk_space);
        }
    }
}

scr_tas_room199()
{
    if (internal_room != room199)
        internal_room = room199;
    
    if (obj_linkplayer.y > 624)
    {
        scr_rotate_camera_to_dir(320, 648);
        scr_tas_keyboard_key_press(vk_up);
    } else
    {
        scr_rotate_camera_to_dir(obj_linkplayer.x+2, obj_linkplayer.y+16);
        scr_tas_keyboard_key_press(vk_up);
    }
}

scr_tas_room200()
{
    if (internal_room != room200)
    {
        internal_room = room200;
        keyboard_key_release(vk_down);
    }
    
    if (obj_linkplayer.y < 480)
    {
        if (obj_linkplayer.canjump < -4) 
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        }
    
        scr_rotate_camera_to_dir(obj_linkplayer.x, obj_linkplayer.y+16);
        scr_tas_keyboard_key_press(vk_up);
    } else
    {
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(128, 776);
        scr_tas_keyboard_key_press(vk_up);
    }
}

scr_tas_room201()
{
    if (internal_room != room201)
        internal_room = room201;
    
    if (instance_number(obj_playcam) == 1)
        scr_tas_keyboard_key_press(vk_space);
    else
    {
        if (obj_linkplayer.z > -64 && global.gotjet == 0)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        } else
            keyboard_key_release(vk_space);
        
        if (global.gotjet == 0)
        {
            scr_rotate_camera_to_dir(96, 80);
            scr_tas_keyboard_key_press(vk_up);
        } else
        {
            scr_tas_execute_simulated_CAD_menu(100)
            scr_rotate_camera_to_dir(448, 192);
            if (obj_linkplayer.x < 398)
                scr_tas_keyboard_key_press(vk_up);
            else
                keyboard_key_release(vk_up);
        }
    }
}

scr_tas_arwingbug85()
{
    if (internal_room != arwingbug85)
        internal_room = arwingbug85;
        
    if (instance_number(obj_playcam) == 1)
    {
        scr_tas_keyboard_key_press(vk_space);
        keyboard_key_release(ord('Q'));
    } else if (instance_number(obj_arwing_p1) > 0)
        scr_tas_keyboard_key_press(ord('Q'));
    else
        scr_tas_execute_simulated_CAD_menu(100);
}

scr_tas_room141()
{
    if (internal_room != room141)
        internal_room = room141;
    
    if (global.gotgrappin == 1)
        scr_rotate_camera_to_dir(192, 224);
    else
        scr_rotate_camera_to_dir(288, 160);
    
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room142()
{
    if (internal_room != room142)
        internal_room = room142;
    
    if (obj_linkplayer.x < 208)
        scr_rotate_camera_to_dir(272, 416);
    else
        scr_rotate_camera_to_dir(400, 304);
    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room143()
{
    if (internal_room != room143)
    {
        timer = 0;
        internal_room = room143;
    }
    
    if (timer == 0)
    {
        scr_tas_execute_simulated_CAD_menu(16);
        timer += 1;
    } else
        scr_rotate_camera_to_dir(496, 64);
    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room144()
{
    if (internal_room != room144)
        internal_room = room144;
    
    if (obj_linkplayer.y < 256)
        scr_rotate_camera_to_dir(240, 272);
    else
        scr_rotate_camera_to_dir(224, 320);
    
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room145()
{
    if (internal_room != room145)
        internal_room = room145;
    
    if (obj_linkplayer.y < 232)
        scr_rotate_camera_to_dir(352, 256);
    else
    {
        if (obj_linkplayer.jump == 0 && obj_linkplayer.z == -0.5 && obj_linkplayer.canjump == -0.5)
            scr_tas_execute_simulated_CAD_menu(7);
    
        if (obj_linkplayer.z < -6)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        } else
            keyboard_key_release(vk_space);
        
        if (obj_linkplayer.y < 296)
            scr_rotate_camera_to_dir(352, 348);
        else
            scr_rotate_camera_to_dir(112, 320);
    }
        
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room146()
{
    if (internal_room != room146)
        internal_room = room146;
    
    if (obj_linkplayer.y < 256)
        scr_rotate_camera_to_dir(240, 272);
    else
        scr_rotate_camera_to_dir(224, 320);
    
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room147()
{
    if (internal_room != room147)
    {
        timer = 0;
        internal_room = room147;
    }
    
    if (timer == 0 && obj_linkplayer.x < 320)
    {
        scr_tas_execute_simulated_CAD_menu(16);
        timer += 1;
    } else
        scr_rotate_camera_to_dir(112, 332);
    
    scr_tas_keyboard_key_press(vk_up);
    
    if (obj_linkplayer.x < 320)
        scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room148()
{
    if (internal_room != room148)
        internal_room = room148;
    
    if (obj_linkplayer.x < 416)
        scr_rotate_camera_to_dir(432, 208);
    else
        scr_rotate_camera_to_dir(1232, 224);
    
    if (obj_linkplayer.x < 392 || obj_linkplayer.x > 408)
        scr_tas_keyboard_key_press(vk_space);
    else
        keyboard_key_release(vk_space);
    
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room149()
{
    if (internal_room != room149)
        internal_room = room149;
    
    if (obj_linkplayer.y < 292 && obj_linkplayer.x < 2896)
        scr_tas_keyboard_key_press(vk_down);
    else
        keyboard_key_release(vk_down);
    
    if (obj_linkplayer.x > 2892)
        scr_tas_keyboard_key_press(vk_up);
    
    scr_tas_keyboard_key_press(vk_right);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room150()
{
    if (internal_room != room150)
        internal_room = room150;
    
    if (instance_number(obj_playcam) == 1)
        scr_tas_keyboard_key_press(vk_space);
    else
    {
        scr_rotate_camera_to_dir(304, 240);
    
        scr_tas_keyboard_key_press(vk_up);
        if (global.gotgrappin == 0)
        {
            if (obj_linkplayer.jump == 0 && obj_linkplayer.z == -0.5 && obj_linkplayer.canjump == -0.5)
                scr_tas_execute_simulated_CAD_menu(7);
    
            if (obj_linkplayer.z < -6)
            {
                keyboard_key_release(vk_space);
                scr_tas_keyboard_key_press(vk_space);
            } else
                keyboard_key_release(vk_space);
        } else
        {
            keyboard_key_release(vk_space);
            while ((obj_linkplayer.z <= -128 || health >= 0) && !keyboard_check(vk_space))
                scr_tas_execute_simulated_CAD_menu(1);
        }
    }
}

scr_tas_room_pipebug100()
{
    if (internal_room != room_pipebug100)
        internal_room = room_pipebug100;

    scr_rotate_camera_to_dir(288, 256);
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room15()
{
    if (internal_room != room15)
        internal_room = room15;
    
    if (obj_linkplayer.y > 48 && obj_linkplayer.x < 256)
    {
        if (obj_linkplayer.jump == 0 && obj_linkplayer.z == -0.5 && obj_linkplayer.canjump == -0.5)
            scr_tas_execute_simulated_CAD_menu(7);
    
        if (obj_linkplayer.z < -6)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        } else
            keyboard_key_release(vk_space);
    
        scr_rotate_camera_to_dir(obj_linkplayer.x, obj_linkplayer.y-5);
        scr_tas_keyboard_key_press(vk_up);
    } else if (obj_linkplayer.x < 2200)
    {
        scr_tas_keyboard_key_press(vk_up);
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(obj_linkplayer.x+10, obj_linkplayer.y+1);
    } else
    {
        if (obj_linkplayer.jump == 0 && obj_linkplayer.z == -0.5 && obj_linkplayer.canjump == -0.5)
            scr_tas_execute_simulated_CAD_menu(7);
    
        if (obj_linkplayer.z < -6)
        {
            keyboard_key_release(vk_space);
            scr_tas_keyboard_key_press(vk_space);
        } else if (obj_linkplayer.jump == 0)
            keyboard_key_release(vk_space);
            
        scr_tas_keyboard_key_press(vk_up);
        scr_rotate_camera_to_dir(2336, 585);
    }
    
    if (scr_get_tas_mouse_x() == scr_get_display_get_width()/2)
        scr_tas_keyboard_key_press(vk_up);
    else if (point_distance(obj_linkplayer.x,obj_linkplayer.y,2336,585) <= 5)
        keyboard_key_release(vk_up);
}

scr_tas_room16()
{
    if (internal_room != room16)
    {
        internal_room = room16;
        a = 0;
    }
    
    if (obj_linkplayer.z < 230 && point_distance(232,280,obj_linkplayer.x,obj_linkplayer.y) > 0)
    {
        scr_tas_keyboard_key_press(vk_space);
        if (a == 0 && instance_number(obj_grappinwep) == 0)
        {
            scr_tas_keyboard_key_press(ord('G'));
            a = 1;
        } else
        {
            keyboard_key_release(ord('G'));
            a = 0;
        }
        scr_aim_camera_to_dir(232,280,256-5);
    } else
    {
        keyboard_key_release(vk_space);
        scr_tas_keyboard_key_press(vk_up);
        
        if (global.gunner == 1)
        {
            scr_tas_keyboard_key_press(vk_shift);
            keyboard_key_release(vk_shift);
        }
        
        scr_rotate_camera_to_dir(192,192);
    }
}

scr_tas_room160()
{
    if (internal_room != room160)
        internal_room = room160;
    
    if (global.gothammer == 0)
    {
        scr_rotate_camera_to_dir(624, 144);
    
        scr_tas_keyboard_key_press(vk_up);
        if (obj_linkplayer.z < 100)
            scr_tas_keyboard_key_press(vk_space);
        else
            scr_tas_execute_simulated_CAD_menu(55);
    } else
    {
        if (obj_linkplayer.y < 304 && obj_linkplayer.z < 45)
        {
            scr_rotate_camera_to_dir(400, 336);
            scr_tas_keyboard_key_press(vk_up);
        } else
        {
            if (a == 0 && instance_number(obj_grappinwep) == 0)
            {
                scr_tas_keyboard_key_press(ord('G'));
                a = 1;
            } else
            {
                keyboard_key_release(ord('G'));
                a = 0;
            }
        
            if (obj_linkplayer.z < 15)
                scr_aim_camera_to_dir(208,312,65);
            else if (obj_linkplayer.z < 24)
                scr_aim_camera_to_dir(208,307,15);
            else if (obj_linkplayer.z < 45)
                scr_aim_camera_to_dir(208,313,64);
            else if (obj_linkplayer.z < 145)
                scr_aim_camera_to_dir(120,313,140);
            else if (obj_linkplayer.z < 251)
                scr_aim_camera_to_dir(118,182,251);
            else if (obj_linkplayer.z < 359)
                scr_aim_camera_to_dir(52,182,359);
        }
    }
}

scr_tas_room161()
{
    if (internal_room != room161)
    {
        timer = 0;
        internal_room = room161;
    }
    
    if (timer == 0)
    {
        scr_tas_execute_simulated_CAD_menu(16);
        timer += 1;
    }
    
    if (global.gothammer == 0)
        scr_rotate_camera_to_dir(304, 352);
    else
        scr_rotate_camera_to_dir(48, 272);
    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room164()
{
    if (internal_room != room164)
    {
        internal_room = room164;
        a = 0;
        keyboard_key_release(vk_space);
    }
    
    if (instance_number(obj_blob) > 4)
    {
        scr_rotate_camera_to_dir(112, 264);
        scr_tas_keyboard_key_press(vk_up);
    } else if (instance_number(obj_iguane) > 3)
    {
        scr_rotate_camera_to_dir(304, 256);
        scr_tas_keyboard_key_press(vk_up);
    } else if (obj_linkplayer.y < 304 && obj_linkplayer.z < 128)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(304, 320);
        scr_tas_keyboard_key_press(vk_up);
    } else if (obj_linkplayer.x < 368 && obj_linkplayer.z < 128 && obj_linkplayer.y < 384)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(384, 384);
        scr_tas_keyboard_key_press(vk_up);
    } else if (obj_linkplayer.z < 128)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(368, 464);
        scr_tas_keyboard_key_press(vk_up);
    } else if (instance_number(obj_bigblob) > 1)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(256, 448);
        scr_tas_keyboard_key_press(vk_up);
    } else if (instance_number(obj_bigblob) > 0)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(obj_bigblob.x, obj_bigblob.y);
        if (point_distance(obj_linkplayer.x, obj_linkplayer.y, obj_bigblob.x, obj_bigblob.y) > 28)
        {
            scr_tas_keyboard_key_press(vk_up);
            keyboard_key_release(vk_down);
        } else
        {
            scr_tas_keyboard_key_press(vk_down);
            keyboard_key_release(vk_up);
        }
    } else if (instance_number(obj_blob) > 0 && obj_linkplayer.y > 384)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(196, 72);
        scr_tas_keyboard_key_press(vk_up);
    } else if (instance_number(obj_blob) > 0)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(40, 64);
        scr_tas_keyboard_key_press(vk_up);
    } else if (instance_number(obj_iguane) > 0)
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(528, 208);
        scr_tas_keyboard_key_press(vk_up);
    } else
    {
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(624, 256);
        scr_tas_keyboard_key_press(vk_up);
    }
        
    if (a == 0)
    {
        scr_tas_keyboard_key_press(vk_control);
        a = 1;
    } else if (a == 1)
    {
        keyboard_key_release(vk_control);
        a = 0;
    }
}

scr_tas_room165()
{
    if (internal_room != room165)
    {
        internal_room = room165;
        keyboard_key_release(vk_control);
    }
    
    if (obj_linkplayer.z < 128 && instance_number(obj_metalbox) > 0)
    {
        scr_rotate_camera_to_dir(96, 132);
        scr_tas_keyboard_key_press(vk_space);
    } else if (instance_number(obj_metalbox) > 0 || obj_linkplayer.cantchose != 0)
    {
        scr_rotate_camera_to_dir(88, 96);
    
        if (a == 0)
        {
            scr_tas_keyboard_key_press(vk_control);
            a = 1;
        } else if (a == 1)
        {
            keyboard_key_release(vk_control);
            a = 0;
        }
        
        keyboard_key_release(vk_space);
    } else if (obj_linkplayer.x < 272)
    {
        while (obj_linkplayer.z >= -80 && !keyboard_check(vk_space))
            scr_tas_execute_simulated_CAD_menu(1);
        
        scr_tas_keyboard_key_press(vk_space);
        scr_rotate_camera_to_dir(288, 0);
    } else
        scr_rotate_camera_to_dir(416, 224);
    
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room166()
{
    if (internal_room != room166)
    {
        internal_room = room166;
        keyboard_key_release(vk_control);
    }
    
    if (obj_linkplayer.x < 272)
        scr_rotate_camera_to_dir(384, 208);
    else
        scr_rotate_camera_to_dir(368, 336);
    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room168()
{
    if (internal_room != room168)
        internal_room = room168;
    
    if (instance_number(obj_playcam) == 1)
        scr_tas_keyboard_key_press(vk_space);
    else
    {
        if (global.gothammer == 0)
        {
            scr_rotate_camera_to_dir(80, 304);
            scr_tas_keyboard_key_press(vk_space);
            scr_tas_keyboard_key_press(vk_up);
        } else
        {
            scr_tas_execute_simulated_CAD_menu(100);
            keyboard_key_release(vk_space);
            keyboard_key_release(vk_up);
        }
    }
}

scr_tas_room207()
{
    if (internal_room != room207)
        internal_room = room207;
    
    while (obj_linkplayer.z >= -40 && !keyboard_check(vk_space))
        scr_tas_execute_simulated_CAD_menu(1);
    
    if (obj_linkplayer.x < 312)
        scr_rotate_camera_to_dir(328, 160);
    else
        scr_rotate_camera_to_dir(400, 184);
        
    scr_tas_keyboard_key_press(vk_space);
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room208()
{
    if (internal_room != room208)
        internal_room = room208;
    
    scr_rotate_camera_to_dir(544, 768);
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room221()
{
    if (internal_room != room221)
        internal_room = room221;
    
    while (obj_linkplayer.z >= -40 && !keyboard_check(vk_space))
        scr_tas_execute_simulated_CAD_menu(1);
    
    if (obj_linkplayer.y < 892 && obj_linkplayer.x < 160)
        scr_rotate_camera_to_dir(obj_linkplayer.x, obj_linkplayer.y+1);
    else if (obj_linkplayer.x < 560)
        scr_rotate_camera_to_dir(obj_linkplayer.x+10, obj_linkplayer.y);
    else if (obj_linkplayer.x > 560)
        scr_rotate_camera_to_dir(608, 224);
    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room222()
{
    if (internal_room != room222)
    {
        random_set_seed(1609022243);
        internal_room = room222;
    }
    
    if (obj_linkplayer.z == -0.5)
        scr_tas_execute_simulated_CAD_menu(16);
    
    scr_rotate_camera_to_dir(96, 96);    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
}

scr_tas_room223()
{
    if (internal_room != room223)
    {
        internal_room = room223;
        a = 0;
    }
    
    scr_rotate_camera_to_dir(592, 224);
    
    if (obj_linkplayer.x > 500)
        keyboard_key_release(vk_space);
    
    if (obj_linkplayer.x < 500 && instance_number(obj_cowennemi) == 0)
        scr_tas_keyboard_key_press(vk_space);
    
    if (a == 0)
    {
        scr_tas_keyboard_key_press(ord('H'));
        a = 1;
    } else if (a == 1)
    {
        keyboard_key_release(ord('H'));
        a = 0;
    }
    
    scr_tas_keyboard_key_press(vk_up);
}

scr_tas_room225()
{
    if (internal_room != room225)
    {
        internal_room = room225;
        scr_tas_keyboard_key_press(ord('T'));
    }
}

scr_tas_room226()
{
    if (internal_room != room226)
    {
        internal_room = room226;
        a = 0;
        b = 0;
        keyboard_key_release(ord('H'));
        keyboard_key_release(ord('T'));
    }
        
    if (global.gunner == 1)
    {
        scr_tas_keyboard_key_press(vk_shift);
        keyboard_key_release(vk_shift);
    }
        
    if (instance_number(obj_squirtleboss) == 1)
    {
        if (obj_squirtleboss.shell == 1 && b == 0)
        {
            if (a == 0)
            {
                scr_tas_keyboard_key_press(ord('G'));
                a = 1;
            } else if (a == 1)
            {
                keyboard_key_release(ord('G'));
                a = 0;
            }
                
            if (keyboard_check(vk_control))
            {
                keyboard_key_release(vk_control);
                b = 0;
            }
        } else
        {
            a = 0;
            if (b == 0)
            {
                scr_tas_keyboard_key_press(vk_control);
                b = 1;
            } else if (b == 1)
            {
                keyboard_key_release(vk_control);
                b = 0;
            }
        }
            
        scr_rotate_camera_to_dir(obj_squirtleboss.x, obj_squirtleboss.y);
            
        if (point_distance(obj_linkplayer.x, obj_linkplayer.y, obj_squirtleboss.x, obj_squirtleboss.y) > 10)
        {
            scr_tas_keyboard_key_press(vk_up);
            keyboard_key_release(vk_down);
        } else
        {
            keyboard_key_release(vk_up);
            scr_tas_keyboard_key_press(vk_down);
        }
    } else if (instance_number(obj_ivyboss) == 1)
    {
        if (obj_ivyboss.para == 0 && b == 0)
        {
            if (a == 0 && (obj_linkplayer.ataktipe != 2) && (obj_linkplayer.ataktipe != 3))
            {
                scr_tas_keyboard_key_press(ord('H'));
                a = 1;
            } else if (a == 1)
            {
                keyboard_key_release(ord('H'));
                a = 0;
            }
        } else
        {
            a = 0;
            if (b == 0)
            {
                scr_tas_keyboard_key_press(vk_control);
                b = 1;
            } else if (b == 1)
            {
                keyboard_key_release(vk_control);
                b = 0;
            }
        }
            
        scr_rotate_camera_to_dir(obj_ivyboss.x, obj_ivyboss.y);
            
        if (point_distance(obj_linkplayer.x, obj_linkplayer.y, obj_ivyboss.x, obj_ivyboss.y) > 23)
        {
            scr_tas_keyboard_key_press(vk_up);
            keyboard_key_release(vk_down);
        } else if (point_distance(obj_linkplayer.x, obj_linkplayer.y, obj_ivyboss.x, obj_ivyboss.y) < 18)
        {
            keyboard_key_release(vk_up);
            scr_tas_keyboard_key_press(vk_down);
        } else
        {
            keyboard_key_release(vk_up);
            keyboard_key_release(vk_down);
        }
    } else if (instance_number(chariboss) == 1)
    {
        if (keyboard_check_pressed(vk_control))
            keyboard_key_release(vk_control);
        
        if (a == 0 && (obj_linkplayer.ataktipe == 0) && (obj_linkplayer.atak == 0))
        {
            scr_tas_keyboard_key_press(ord('H'));
            a = 1;
        } else if (a == 1 && keyboard_check(ord('H')) && !keyboard_check_pressed(ord('H')))
        {
            keyboard_key_release(ord('H'));
            a = 0;
        }
        
        if (chariboss.rochering == 0)
            scr_rotate_camera_to_dir(chariboss.x, chariboss.y);
        else
            scr_rotate_camera_to_dir(368, 240);
        
        scr_tas_keyboard_key_press(vk_up);
        if (obj_linkplayer.cantchose == 0)
            scr_tas_keyboard_key_press(vk_space);
        else
            keyboard_key_release(vk_space);
    } else
    {
        if (obj_medaillon6.use == 0)
            scr_rotate_camera_to_dir(obj_medaillon6.x, obj_medaillon6.y);
        else
            scr_tas_keyboard_key_press(vk_space);
        
        if (point_distance(obj_linkplayer.x, obj_linkplayer.y, obj_medaillon6.x, obj_medaillon6.y) < 18)
            keyboard_key_release(vk_space);
        
        scr_tas_keyboard_key_press(vk_up);
    }
}

scr_tas_room227()
{
    if (internal_room != room227)
        internal_room = room227;
        
    scr_tas_keyboard_key_press(vk_space);
}
    
scr_tas_room228()
{
    if (internal_room != room228)
        internal_room = room228;
        
    scr_tas_keyboard_key_press(vk_enter);
}
    
scr_tas_room229()
{
    if (internal_room != room229)
        internal_room = room229;
    
    scr_tas_keyboard_key_press(vk_up);
    scr_tas_keyboard_key_press(vk_space);
        
    if (obj_linkplayer.weapon == 0 && instance_number(obj_xhampded) == 0)
    {
        keyboard_key_release(vk_control);
        scr_rotate_camera_to_dir(256, 848);
    } else if (obj_linkplayer.weapon != 8)
    {
        keyboard_key_release(vk_control);
        scr_rotate_camera_to_dir(992, 448);
    } else
    {
        scr_rotate_camera_to_dir(640, 432);
        if (obj_linkplayer.x < 824)
            scr_tas_keyboard_key_press(vk_control);
    }
}

scr_tas_room230()
{
    show_message(string(frame_timer));
    game_end();
}

scr_tas_main()
{
    if (room == room2)
        scr_tas_room2();
    else if (room == room50)
        scr_tas_room50();
    else if (room == pause77)
        scr_tas_pause77();
    else if (room == room1)
        scr_tas_room1();
    else if (room == room3)
        scr_tas_room3();
    else if (room == room_alien)
        scr_tas_room_alien();
    else if (room == room5)
        scr_tas_room5();
    else if (room == room_start)
        scr_tas_room_start();
    else if (room == room7)
        scr_tas_room7();
    else if (room == room8)
        scr_tas_room8();
    else if (room == room9)
        scr_tas_room9();
    else if (room == room10)
        scr_tas_room10();
    else if (room == room12)
        scr_tas_room12();
    else if (room == room43)
        scr_tas_room43()
    else if (room == room_world11)
        scr_tas_room_world11();
    else if (room == room105)
        scr_tas_room105();
    else if (room == gameover138)
        scr_tas_gameover138();
    else if (room == stage4_69)
        scr_tas_stage4_69();
    else if (room == room36)
        scr_tas_room36();
    else if (room == room83)
        scr_tas_room83();
    else if (room == room79)
        scr_tas_room79();
    else if (room == room120)
        scr_tas_room120();
    else if (room == room121)
        scr_tas_room121();
    else if (room == room123)
        scr_tas_room123();
    else if (room == room124)
        scr_tas_room124();
    else if (room == room125)
        scr_tas_room125();
    else if (room == room126)
        scr_tas_room126();
    else if (room == room127)
        scr_tas_room127();
    else if (room == room129)
        scr_tas_room129();
    else if (room == test_128)
        scr_tas_test_128();
    else if (room == room192)
        scr_tas_room192();
    else if (room == room193)
        scr_tas_room193();
    else if (room == room194)
        scr_tas_room194();
    else if (room == room196)
        scr_tas_room196();
    else if (room == room197)
        scr_tas_room197();
    else if (room == room198)
        scr_tas_room198();
    else if (room == room199)
        scr_tas_room199();
    else if (room == room200)
        scr_tas_room200();
    else if (room == room201)
        scr_tas_room201();
    else if (room == arwingbug85)
        scr_tas_arwingbug85();
    else if (room == room141)
        scr_tas_room141();
    else if (room == room142)
        scr_tas_room142();
    else if (room == room143)
        scr_tas_room143();
    else if (room == room144)
        scr_tas_room144();
    else if (room == room145)
        scr_tas_room145();
    else if (room == room146)
        scr_tas_room146();
    else if (room == room147)
        scr_tas_room147();
    else if (room == room148)
        scr_tas_room148();
    else if (room == room149)
        scr_tas_room149();
    else if (room == room150)
        scr_tas_room150();
    else if (room == room_pipebug100)
        scr_tas_room_pipebug100();
    else if (room == room15)
        scr_tas_room15();
    else if (room == room16)
        scr_tas_room16();
    else if (room == room160)
        scr_tas_room160();
    else if (room == room161)
        scr_tas_room161();
    else if (room == room164)
        scr_tas_room164();
    else if (room == room165)
        scr_tas_room165();
    else if (room == room166)
        scr_tas_room166();
    else if (room == room168)
        scr_tas_room168();
    else if (room == room207)
        scr_tas_room207();
    else if (room == room208)
        scr_tas_room208();
    else if (room == room221)
        scr_tas_room221();
    else if (room == room222)
        scr_tas_room222();
    else if (room == room223)
        scr_tas_room223();
    else if (room == room225)
        scr_tas_room225();
    else if (room == room226)
        scr_tas_room226();
    else if (room == room227)
        scr_tas_room227();
    else if (room == room228)
        scr_tas_room228();
    else if (room == room229)
        scr_tas_room229();
    else if (room == room230)
        scr_tas_room230();
    
    frame_timer += 600/room_speed;
}
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.