Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_mainmenu_debug_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
scr_get_input
scr_get_input

function scr_get_input() //gml_Script_scr_get_input { if live_call() return global.live_result; scr_stick_press() global.down_key = (keyboard_check(vk_down) || gamepad_button_check(0, gp_padd) || gamepad_axis_value(0, gp_axislv)) global.left_key = (keyboard_check(vk_left) || gamepad_button_check(0, gp_padl) || (-(gamepad_axis_value(0, gp_axislh)))) global.right_key = (keyboard_check(vk_right) || gamepad_button_check(0, gp_padr) || gamepad_axis_value(0, gp_axislh)) global.up_key = (keyboard_check(vk_up) || gamepad_button_check(0, gp_padu) || (-(gamepad_axis_value(0, gp_axislv)))) global.down_keyp = (keyboard_check_pressed(vk_down) || gamepad_button_check_pressed(0, gp_padd) || down_stick) global.left_keyp = (keyboard_check_pressed(vk_left) || gamepad_button_check_pressed(0, gp_padl) || left_stick) global.right_keyp = (keyboard_check_pressed(vk_right) || gamepad_button_check_pressed(0, gp_padr) || right_stick) global.up_keyp = (keyboard_check_pressed(vk_up) || gamepad_button_check_pressed(0, gp_padu) || up_stick) if ((gamepad_button_check_pressed(0, gp_padd)) + (gamepad_button_check_pressed(0, gp_padu)) + (gamepad_button_check_pressed(0, gp_padl)) + (gamepad_button_check_pressed(0, gp_padr)) + down_stick + left_stick + right_stick + up_stick + (gamepad_button_check_pressed(0, global.button1)) + (gamepad_button_check_pressed(0, global.button2)) + (gamepad_button_check_pressed(0, global.button3)) + instance_exists(obj_phone_controls)) global.using_gamepad = true else if keyboard_check(vk_anykey) global.using_gamepad = false if global.using_gamepad { if (global.button1 == gp_face1) global.action_key = "A" else if (global.button1 == gp_face2) global.action_key = "B" else if (global.button1 == gp_face3) global.action_key = "X" else if (global.button1 == gp_face4) global.action_key = "Y" if (global.button2 == gp_face1) global.cancel_key = "A" else if (global.button2 == gp_face2) global.cancel_key = "B" else if (global.button2 == gp_face3) global.cancel_key = "X" else if (global.button2 == gp_face4) global.cancel_key = "Y" if (global.button3 == 32769) global.pause_key = "A" else if (global.button3 == 32770) global.pause_key = "B" else if (global.button3 == 32771) global.pause_key = "X" else if (global.button3 == 32772) global.pause_key = "Y" } else { global.pause_key = "C" global.action_key = "Z" global.cancel_key = "X" } if instance_exists(obj_phone_controls) { global.down_key += obj_phone_controls.phn_down global.left_key += obj_phone_controls.phn_left global.right_key += obj_phone_controls.phn_right global.up_key += obj_phone_controls.phn_up global.down_keyp = sign(global.down_keyp + obj_phone_controls.phn_downp) global.left_keyp = sign(global.left_keyp + obj_phone_controls.phn_leftp) global.right_keyp = sign(global.right_keyp + obj_phone_controls.phn_rightp) global.up_keyp = sign(global.up_keyp + obj_phone_controls.phn_upp) } }
()
4
if global.down_keyp
5
{
6
    if (menu_selection < 8)
7
        menu_selection += 1
8
    else
9
        menu_selection = 0
10
    audio_play_sound(snd_mo_pop, 1, 0)
11
}
12
if global.up_keyp
13
{
14
    if (menu_selection > 0)
15
        menu_selection -= 1
16
    else
17
        menu_selection = 8
18
    audio_play_sound(snd_mo_pop, 1, 0)
19
}
20
switch menu_selection
21
{
22
    case 0:
23
        if keyboard_multicheck_pressed(0)
24
            scr_loadgame
scr_loadgame

function scr_loadgame() //gml_Script_scr_loadgame { if file_exists("Save.sav") { scr_initialize() ini_open("Save.sav") var LoadedRoom = ini_read_string("Save1", "room", "rm_ruins00") obj_pl.x = ini_read_real("Save1", "pX", 320) obj_pl.y = ini_read_real("Save1", "pY", 320) obj_pl.direction = ini_read_real("Save1", "dir", 0) obj_controller.steps = ini_read_real("Save1", "SP", 0) global.player_attack = ini_read_real("Save1", "AT - Primary", 0) global.player_weapon_modifier_attack = ini_read_real("Save1", "AT - Secondary", 0) global.player_defense = ini_read_real("Save1", "DFP", 0) global.player_armor_modifier_defense = ini_read_real("Save1", "DFS", 0) global.player_level = ini_read_real("Save1", "LV", 1) global.player_exp = ini_read_real("Save1", "EXP", 0) global.player_weapon_modifier = ini_read_string("Save1", "Ammo", "Rubber Ammo") global.player_armor = ini_read_string("Save1", "Armor", "Worn Hat") global.player_armor_modifier = ini_read_string("Save1", "Accessory", "Patch") global.player_gold = ini_read_real("Save1", "Gold", 0) global.current_hp_self = ini_read_real("Save1", "HP", 1) global.max_hp_self = ini_read_real("Save1", "MAXHP", 20) global.player_weapon = ini_read_string("Save1", "Weapon", "Toy Gun") global.fun_value = ini_read_real("Save1", "FUN", 0) global.current_pp_self = ini_read_real("Save1", "PP", 0) global.max_pp_self = ini_read_real("Save1", "MAXPP", 20) global.current_sp_self = ini_read_real("Save1", "SP", 0) global.max_sp_self = ini_read_real("Save1", "MAXSP", 99) global.player_sprites = ini_read_string("Save1", "playerSprite", "normal") global.current_rp_self = ini_read_real("Save1", "RP", 0) global.max_rp_self = ini_read_real("Save1", "MAXRP", 0) global.player_can_run = ini_read_real("Save1", "playerCanRun", 1) global.saved_datetime = date_current_datetime() global.elapsed_seconds = ini_read_real("Playtime", "Seconds", 0) var _party_member = ini_read_string("Save1", "Follower", "noone") if (_party_member == "noone") global.party_member = noone else global.party_member = asset_get_index(_party_member) global.player_has_satchel = ini_read_real("Save1", "Satchel", 0) global.player_can_travel = ini_read_real("Save1", "FTravel", 0) for (var i = 0; i < array_length_1d(global.ruins_flag); i++) global.ruins_flag[i] = ini_read_real("RuinsFlags", string(i), false) for (i = 0; i < array_length_1d(global.flag); i++) global.flag[i] = ini_read_real("Flags", string(i), false) for (i = 0; i < array_length_1d(global.snowdin_flag); i++) global.snowdin_flag[i] = ini_read_real("SnowdinFlags", string(i), false) for (i = 0; i < array_length_1d(global.dunes_flag); i++) global.dunes_flag[i] = ini_read_real("DunesFlags", string(i), false) for (i = 0; i < array_length_1d(global.dunes_flag_ext); i++) global.dunes_flag_ext[i] = ini_read_real("DunesFlagsExt", string(i), false) for (i = 0; i < array_length_1d(global.sworks_flag); i++) global.sworks_flag[i] = ini_read_real("SworksFlags", string(i), false) global.factory_code = ini_read_string("SworksFlags", "code", "0000") global.factory_code_3 = ini_read_string("SworksFlags", "code3", "0000") var ds_factory_code_2 = ini_read_string("SworksFlags", "code2", "") ds_list_read(global.factory_code_2, ds_factory_code_2) global.sworks_robot_count = ini_read_real("SworksFlags", "RbCount", 0) for (i = 0; i < global.sworks_robot_count; i++) { global.sworks_robot_sprite[i] = ini_read_real("RbSprite", string(i), 0) global.sworks_robot_x[i] = ini_read_real("RbX", string(i), 0) global.sworks_robot_y[i] = ini_read_real("RbY", string(i), 0) global.sworks_robot_depth[i] = ini_read_real("RbD", string(i), 0) global.sworks_robot_scale[i] = ini_read_real("RbS", string(i), 0) global.sworks_robot_angle[i] = ini_read_real("RbA", string(i), 0) } ds_grid_read(global.sworks_id_grid, ini_read_string("SworksFlags", "sworks_id", "")) for (i = 0; i < array_length_1d(global.item_stock); i++) global.item_stock[i] = ini_read_real("ItemStock", string(i), false) for (i = 0; i < array_length_1d(global.hotland_flag); i++) global.hotland_flag[i] = ini_read_real("HotlandFlags", string(i), false) for (i = 0; i < array_length_1d(global.flowey_flag); i++) global.flowey_flag[i] = ini_read_real("FloweyFlags", string(i), false) global.flowey_save_number = ini_read_real("FloweyFlags", "savenumber", 0) global.save_count = ini_read_real("FloweyFlags", "savecount", 1) for (i = 0; i < array_length_1d(global.extra_flag); i++) global.extra_flag[i] = ini_read_real("ExtraFlags", string(i), false) for (i = 0; i < array_length_1d(global.mail_flag); i++) global.mail_flag[i] = ini_read_real("MailFlags", string(i), false) for (i = 0; i < array_length_1d(global.mail_flag); i++) global.mail_flag[i] = ini_read_real("MailFlags", string(i), false) global.mail_count = ini_read_real("Mail", "1", 0) global.mail_pinned = ini_read_real("Mail", "2", 0) global.tinypuzzle = ini_read_real("Misc", "01", 5) deaths = ini_read_real("Misc", "Deaths", false) for (i = 0; i < array_length(global.fun_event); i++) global.fun_event[i] = ini_read_real("Fun Events", string(i), 0) for (i = 1; i <= 8; i++) global.item_slot[i] = ini_read_string("Items", ("0" + (string(i - 1))), "Nothing") var ds_list_string = ini_read_string("DBox", 0, "0") ds_list_read(global.box_slot_list, ds_list_string) ds_list_string = ini_read_string("Mail", 0, "0") ds_list_read(global.mail_list, ds_list_string) ds_list_string = ini_read_string("Mail", "3", "0") ds_list_read(global.mail_list_read, ds_list_string) ds_list_string = ini_read_string("MailUnclaimed", 0, "0") ds_list_read(global.mail_unclaimed_list, ds_list_string) var ds_list_encounters = ini_read_string("Encounters", 0, "0") ds_list_read(global.encounter_list, ds_list_encounters) ...
()
25
        break
26
    case 1:
27
        var i = 0
28
        while (i < array_length(route_list))
29
        {
30
            if (route_selection == route_list[i])
31
            {
32
                if global.left_keyp
33
                {
34
                    if (i > 0)
35
                        route_selection = route_list[(i - 1)]
36
                    else
37
                        route_selection = route_list[(array_length(route_list) - 1)]
38
                    break
39
                }
40
                else if global.right_keyp
41
                {
42
                    if (i < (array_length(route_list) - 1))
43
                        route_selection = route_list[(i + 1)]
44
                    else
45
                        route_selection = route_list[0]
46
                    break
47
                }
48
                else
49
                {
50
                    i++
51
                    continue
52
                }
53
            }
54
            else
55
            {
56
                i++
57
                continue
58
            }
59
        }
60
        break
61
    case 2:
62
        if (global.left_keyp || global.right_keyp)
63
        {
64
            if (bonus_items == true)
65
                bonus_items = false
66
            else
67
                bonus_items = true
68
            break
69
        }
70
        else
71
            break
72
    case 3:
73
        i = 0
74
        while (i < array_length(follower_list))
75
        {
76
            if (follower_selection == follower_list[i])
77
            {
78
                if global.left_keyp
79
                {
80
                    if (i > 0)
81
                        follower_selection = follower_list[(i - 1)]
82
                    else
83
                        follower_selection = follower_list[(array_length(follower_list) - 1)]
84
                    break
85
                }
86
                else if global.right_keyp
87
                {
88
                    if (i < (array_length(follower_list) - 1))
89
                        follower_selection = follower_list[(i + 1)]
90
                    else
91
                        follower_selection = follower_list[0]
92
                    break
93
                }
94
                else
95
                {
96
                    i++
97
                    continue
98
                }
99
            }
100
            else
101
            {
102
                i++
103
                continue
104
            }
105
        }
106
        break
107
    case 4:
108
        var hold_left = false
109
        if global.left_key
110
        {
111
            hold_delay_left -= 1
112
            if (hold_delay_left <= 0)
113
            {
114
                hold_left = true
115
                hold_delay_left = hold_delay_max
116
            }
117
        }
118
        else
119
        {
120
            hold_delay_left = hold_delay_max * 4
121
            hold_left = false
122
        }
123
        var hold_right = false
124
        if global.right_key
125
        {
126
            hold_delay_right -= 1
127
            if (hold_delay_right <= 0)
128
            {
129
                hold_right = true
130
                hold_delay_right = hold_delay_max
131
            }
132
        }
133
        else
134
        {
135
            hold_delay_right = hold_delay_max * 4
136
            hold_right = false
137
        }
138
        var room_index_current = ds_list_find_index(room_list, room_selection)
139
        i = 0
140
        while (i < ds_list_size(room_list))
141
        {
142
            if (global.left_keyp || hold_left)
143
            {
144
                if (room_index_current > 0)
145
                    room_selection = ds_list_find_value(room_list, (room_index_current - 1))
146
                else
147
                    room_selection = ds_list_find_value(room_list, (ds_list_size(room_list) - 1))
148
                break
149
            }
150
            else if (global.right_keyp || hold_right)
151
            {
152
                if (room_index_current < (ds_list_size(room_list) - 1))
153
                    room_selection = ds_list_find_value(room_list, (room_index_current + 1))
154
                else
155
                    room_selection = ds_list_find_value(room_list, 0)
156
                break
157
            }
158
            else
159
            {
160
                i++
161
                continue
162
            }
163
        }
164
        break
165
    case 5:
166
        if keyboard_multicheck_pressed(0)
167
        {
168
            var world_value = 0
169
            scr_initialize
scr_initialize

function scr_initialize() //gml_Script_scr_initialize { randomize() global.player_level = 1 global.current_hp_self = 20 global.max_hp_self = 20 global.max_hp_boosted = 20 global.player_x = 150 global.player_y = 140 global.player_direction = "down" global.player_area = "" global.player_area_value = 0 global.player_can_run = true global.current_pp_self = 0 global.max_pp_self = 99 global.current_sp_self = 0 global.max_sp_self = 99 global.current_rp_self = 0 global.max_rp_self = 99 global.player_gold = 0 global.player_sprites = "normal" global.player_name = "Clover" global.party_member = -4 global.player_attack = 10 global.player_defense = 10 global.player_speed = 3 global.player_invulnerability = 30 global.player_exp = 0 global.player_weapon = "Toy Gun" global.player_armor = "Worn Hat" global.player_weapon_modifier = "Rubber Ammo" global.player_armor_modifier = "Patch" global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack) global.player_armor_defense = script_execute(gml_Script_scr_determine_armor_defense) global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack) global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense) global.player_has_satchel = false global.player_can_travel = false global.saved_datetime = date_current_datetime() global.elapsed_seconds = 0 global.last_room_overworld = "rm_ruins_01" global.story = 0 global.lastroom = 7 scr_init_flags_ruins() scr_init_flags_snowdin() scr_init_flags_dunes() scr_init_flags_steamworks() scr_init_flags_hotland() scr_init_flags_flowey() global.flowey_death_pop = 0 global.flowey_save_number = 1 global.fighting_flowey = 0 global.flowey_battle_1_phase = 0 global.save_count = 0 global.extra_flag[1] = false global.extra_flag[2] = false global.extra_flag[3] = false global.extra_flag[4] = false global.extra_flag[5] = false global.extra_flag[6] = false global.extra_flag[7] = false global.extra_flag[8] = false global.extra_flag[9] = false global.encounter_flag[0] = 0 global.route = 2 global.kill_number[0] = 9999 global.kill_area[0][0] = 9999 global.kill_number[1] = 20 for (var i = 0; i <= 6; i++) global.kill_area[1][i] = 5 global.kill_number[2] = 20 for (i = 0; i <= 7; i++) global.kill_area[2][i] = 5 global.kill_number[3] = 20 for (i = 0; i <= 8; i++) global.kill_area[3][i] = 3 global.kill_number[4] = 20 for (i = 0; i <= 12; i++) global.kill_area[4][i] = 3 global.kill_area_current = 0 global.flGenoCutscene = 0 global.geno_complete[1] = false global.geno_complete[2] = false global.geno_complete[3] = false global.geno_complete[4] = false global.geno_complete[5] = false global.item_stock[0] = 1 global.item_stock[1] = 1 global.item_stock[2] = 1 global.item_stock[3] = 1 global.item_stock[4] = 1 global.item_stock[5] = 1 global.item_stock[6] = 1 global.item_stock[7] = 1 global.item_stock[8] = 3 global.item_stock[9] = 1 global.item_stock[10] = 1 global.item_stock[11] = 1 global.item_stock[12] = 2 global.item_stock[13] = 2 global.item_stock[14] = 1 ...
()
170
            new_room = asset_get_index(room_selection)
171
            xx = 320
172
            yy = 240
173
            global.party_member = follower_selection
174
            switch route_selection
175
            {
176
                case "PACIFIST":
177
                    global.route = 2
178
                    break
179
                case "NEUTRAL":
180
                    global.route = 1
181
                    break
182
                case "GENO":
183
                    global.route = 1
184
                    break
185
            }
186
187
            if (bonus_items == true)
188
            {
189
                global.player_weapon = "Wild Revolver"
190
                global.player_armor_modifier = "Fancy Holster"
191
                global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense)
192
                global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack)
193
            }
194
            obj_pl.x = xx
195
            obj_pl.y = yy
196
            obj_pl.direction = 90
197
            obj_pl.image_alpha = 1
198
            room = new_room
199
            if (global.party_member != noone)
200
                instance_create(obj_pl.x, obj_pl.y, global.party_member)
201
        }
202
        break
203
    case 6:
204
        if keyboard_multicheck_pressed(0)
205
        {
206
            scr_initialize
scr_initialize

function scr_initialize() //gml_Script_scr_initialize { randomize() global.player_level = 1 global.current_hp_self = 20 global.max_hp_self = 20 global.max_hp_boosted = 20 global.player_x = 150 global.player_y = 140 global.player_direction = "down" global.player_area = "" global.player_area_value = 0 global.player_can_run = true global.current_pp_self = 0 global.max_pp_self = 99 global.current_sp_self = 0 global.max_sp_self = 99 global.current_rp_self = 0 global.max_rp_self = 99 global.player_gold = 0 global.player_sprites = "normal" global.player_name = "Clover" global.party_member = -4 global.player_attack = 10 global.player_defense = 10 global.player_speed = 3 global.player_invulnerability = 30 global.player_exp = 0 global.player_weapon = "Toy Gun" global.player_armor = "Worn Hat" global.player_weapon_modifier = "Rubber Ammo" global.player_armor_modifier = "Patch" global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack) global.player_armor_defense = script_execute(gml_Script_scr_determine_armor_defense) global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack) global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense) global.player_has_satchel = false global.player_can_travel = false global.saved_datetime = date_current_datetime() global.elapsed_seconds = 0 global.last_room_overworld = "rm_ruins_01" global.story = 0 global.lastroom = 7 scr_init_flags_ruins() scr_init_flags_snowdin() scr_init_flags_dunes() scr_init_flags_steamworks() scr_init_flags_hotland() scr_init_flags_flowey() global.flowey_death_pop = 0 global.flowey_save_number = 1 global.fighting_flowey = 0 global.flowey_battle_1_phase = 0 global.save_count = 0 global.extra_flag[1] = false global.extra_flag[2] = false global.extra_flag[3] = false global.extra_flag[4] = false global.extra_flag[5] = false global.extra_flag[6] = false global.extra_flag[7] = false global.extra_flag[8] = false global.extra_flag[9] = false global.encounter_flag[0] = 0 global.route = 2 global.kill_number[0] = 9999 global.kill_area[0][0] = 9999 global.kill_number[1] = 20 for (var i = 0; i <= 6; i++) global.kill_area[1][i] = 5 global.kill_number[2] = 20 for (i = 0; i <= 7; i++) global.kill_area[2][i] = 5 global.kill_number[3] = 20 for (i = 0; i <= 8; i++) global.kill_area[3][i] = 3 global.kill_number[4] = 20 for (i = 0; i <= 12; i++) global.kill_area[4][i] = 3 global.kill_area_current = 0 global.flGenoCutscene = 0 global.geno_complete[1] = false global.geno_complete[2] = false global.geno_complete[3] = false global.geno_complete[4] = false global.geno_complete[5] = false global.item_stock[0] = 1 global.item_stock[1] = 1 global.item_stock[2] = 1 global.item_stock[3] = 1 global.item_stock[4] = 1 global.item_stock[5] = 1 global.item_stock[6] = 1 global.item_stock[7] = 1 global.item_stock[8] = 3 global.item_stock[9] = 1 global.item_stock[10] = 1 global.item_stock[11] = 1 global.item_stock[12] = 2 global.item_stock[13] = 2 global.item_stock[14] = 1 ...
()
207
            scene = 0
208
            cutscene_timer = 0
209
            cutscene_battle_initiate("ceroba", "true", false)
210
            instance_create_depth(0, 0, -1000, obj_ceroba_debugger)
211
        }
212
        break
213
    case 7:
214
        if keyboard_multicheck_pressed(0)
215
        {
216
            scr_initialize
scr_initialize

function scr_initialize() //gml_Script_scr_initialize { randomize() global.player_level = 1 global.current_hp_self = 20 global.max_hp_self = 20 global.max_hp_boosted = 20 global.player_x = 150 global.player_y = 140 global.player_direction = "down" global.player_area = "" global.player_area_value = 0 global.player_can_run = true global.current_pp_self = 0 global.max_pp_self = 99 global.current_sp_self = 0 global.max_sp_self = 99 global.current_rp_self = 0 global.max_rp_self = 99 global.player_gold = 0 global.player_sprites = "normal" global.player_name = "Clover" global.party_member = -4 global.player_attack = 10 global.player_defense = 10 global.player_speed = 3 global.player_invulnerability = 30 global.player_exp = 0 global.player_weapon = "Toy Gun" global.player_armor = "Worn Hat" global.player_weapon_modifier = "Rubber Ammo" global.player_armor_modifier = "Patch" global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack) global.player_armor_defense = script_execute(gml_Script_scr_determine_armor_defense) global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack) global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense) global.player_has_satchel = false global.player_can_travel = false global.saved_datetime = date_current_datetime() global.elapsed_seconds = 0 global.last_room_overworld = "rm_ruins_01" global.story = 0 global.lastroom = 7 scr_init_flags_ruins() scr_init_flags_snowdin() scr_init_flags_dunes() scr_init_flags_steamworks() scr_init_flags_hotland() scr_init_flags_flowey() global.flowey_death_pop = 0 global.flowey_save_number = 1 global.fighting_flowey = 0 global.flowey_battle_1_phase = 0 global.save_count = 0 global.extra_flag[1] = false global.extra_flag[2] = false global.extra_flag[3] = false global.extra_flag[4] = false global.extra_flag[5] = false global.extra_flag[6] = false global.extra_flag[7] = false global.extra_flag[8] = false global.extra_flag[9] = false global.encounter_flag[0] = 0 global.route = 2 global.kill_number[0] = 9999 global.kill_area[0][0] = 9999 global.kill_number[1] = 20 for (var i = 0; i <= 6; i++) global.kill_area[1][i] = 5 global.kill_number[2] = 20 for (i = 0; i <= 7; i++) global.kill_area[2][i] = 5 global.kill_number[3] = 20 for (i = 0; i <= 8; i++) global.kill_area[3][i] = 3 global.kill_number[4] = 20 for (i = 0; i <= 12; i++) global.kill_area[4][i] = 3 global.kill_area_current = 0 global.flGenoCutscene = 0 global.geno_complete[1] = false global.geno_complete[2] = false global.geno_complete[3] = false global.geno_complete[4] = false global.geno_complete[5] = false global.item_stock[0] = 1 global.item_stock[1] = 1 global.item_stock[2] = 1 global.item_stock[3] = 1 global.item_stock[4] = 1 global.item_stock[5] = 1 global.item_stock[6] = 1 global.item_stock[7] = 1 global.item_stock[8] = 3 global.item_stock[9] = 1 global.item_stock[10] = 1 global.item_stock[11] = 1 global.item_stock[12] = 2 global.item_stock[13] = 2 global.item_stock[14] = 1 ...
()
217
            scene = 0
218
            cutscene_timer = 0
219
            global.battle_enemy_name = "flowey"
220
            global.battling_boss = true
221
            global.battle_start = true
222
            global.sound_carry_overworld = false
223
            room_goto(rm_battle_flowey Flowey - Phase 1 Battle Room)
224
            global.death_count[7] = 1
225
            alarm[0] = 1
alarm[0]

obj_battle_flowey_body_1.image_alpha = 1 global.image_alpha_enemy_attacking = 1 persistent = false instance_create_depth(0, 0, 0, obj_battle_flowey_background_ui) instance_destroy(obj_dialogue_box_battle_transformation_any_out) with (obj_dialogue_box_battle_transformation_any) event_user(0) instance_destroy() obj_battle_flowey_body_1.depth = 0 obj_battle_flowey_body_1.can_draw_ghost = true instance_destroy()
226
            persistent = true
227
            global.cutscene = true
228
            obj_pl.image_alpha = 0
229
            global.flag[15 Decibat fate] = 3
230
            global.dunes_flag[24] = 2
231
            global.sworks_flag[20] = 3
232
            global.sworks_flag[31] = 3
233
            global.flag[17 Dalv fate] = 2
234
            global.dunes_flag[40] = 1
235
        }
236
        if keyboard_multicheck_pressed(1)
237
        {
238
            scr_initialize
scr_initialize

function scr_initialize() //gml_Script_scr_initialize { randomize() global.player_level = 1 global.current_hp_self = 20 global.max_hp_self = 20 global.max_hp_boosted = 20 global.player_x = 150 global.player_y = 140 global.player_direction = "down" global.player_area = "" global.player_area_value = 0 global.player_can_run = true global.current_pp_self = 0 global.max_pp_self = 99 global.current_sp_self = 0 global.max_sp_self = 99 global.current_rp_self = 0 global.max_rp_self = 99 global.player_gold = 0 global.player_sprites = "normal" global.player_name = "Clover" global.party_member = -4 global.player_attack = 10 global.player_defense = 10 global.player_speed = 3 global.player_invulnerability = 30 global.player_exp = 0 global.player_weapon = "Toy Gun" global.player_armor = "Worn Hat" global.player_weapon_modifier = "Rubber Ammo" global.player_armor_modifier = "Patch" global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack) global.player_armor_defense = script_execute(gml_Script_scr_determine_armor_defense) global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack) global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense) global.player_has_satchel = false global.player_can_travel = false global.saved_datetime = date_current_datetime() global.elapsed_seconds = 0 global.last_room_overworld = "rm_ruins_01" global.story = 0 global.lastroom = 7 scr_init_flags_ruins() scr_init_flags_snowdin() scr_init_flags_dunes() scr_init_flags_steamworks() scr_init_flags_hotland() scr_init_flags_flowey() global.flowey_death_pop = 0 global.flowey_save_number = 1 global.fighting_flowey = 0 global.flowey_battle_1_phase = 0 global.save_count = 0 global.extra_flag[1] = false global.extra_flag[2] = false global.extra_flag[3] = false global.extra_flag[4] = false global.extra_flag[5] = false global.extra_flag[6] = false global.extra_flag[7] = false global.extra_flag[8] = false global.extra_flag[9] = false global.encounter_flag[0] = 0 global.route = 2 global.kill_number[0] = 9999 global.kill_area[0][0] = 9999 global.kill_number[1] = 20 for (var i = 0; i <= 6; i++) global.kill_area[1][i] = 5 global.kill_number[2] = 20 for (i = 0; i <= 7; i++) global.kill_area[2][i] = 5 global.kill_number[3] = 20 for (i = 0; i <= 8; i++) global.kill_area[3][i] = 3 global.kill_number[4] = 20 for (i = 0; i <= 12; i++) global.kill_area[4][i] = 3 global.kill_area_current = 0 global.flGenoCutscene = 0 global.geno_complete[1] = false global.geno_complete[2] = false global.geno_complete[3] = false global.geno_complete[4] = false global.geno_complete[5] = false global.item_stock[0] = 1 global.item_stock[1] = 1 global.item_stock[2] = 1 global.item_stock[3] = 1 global.item_stock[4] = 1 global.item_stock[5] = 1 global.item_stock[6] = 1 global.item_stock[7] = 1 global.item_stock[8] = 3 global.item_stock[9] = 1 global.item_stock[10] = 1 global.item_stock[11] = 1 global.item_stock[12] = 2 global.item_stock[13] = 2 global.item_stock[14] = 1 ...
()
239
            scene = 0
240
            cutscene_timer = 0
241
            global.battling_boss = true
242
            global.battle_start = true
243
            global.sound_carry_overworld = false
244
            room_goto(rm_battle_flowey_phase_2 Flowey - Phase 2 Battle Room)
245
            global.cutscene = true
246
            obj_pl.image_alpha = 0
247
        }
248
        break
249
    case 8:
250
        if keyboard_multicheck_pressed(0)
251
        {
252
            scr_initialize
scr_initialize

function scr_initialize() //gml_Script_scr_initialize { randomize() global.player_level = 1 global.current_hp_self = 20 global.max_hp_self = 20 global.max_hp_boosted = 20 global.player_x = 150 global.player_y = 140 global.player_direction = "down" global.player_area = "" global.player_area_value = 0 global.player_can_run = true global.current_pp_self = 0 global.max_pp_self = 99 global.current_sp_self = 0 global.max_sp_self = 99 global.current_rp_self = 0 global.max_rp_self = 99 global.player_gold = 0 global.player_sprites = "normal" global.player_name = "Clover" global.party_member = -4 global.player_attack = 10 global.player_defense = 10 global.player_speed = 3 global.player_invulnerability = 30 global.player_exp = 0 global.player_weapon = "Toy Gun" global.player_armor = "Worn Hat" global.player_weapon_modifier = "Rubber Ammo" global.player_armor_modifier = "Patch" global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack) global.player_armor_defense = script_execute(gml_Script_scr_determine_armor_defense) global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack) global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense) global.player_has_satchel = false global.player_can_travel = false global.saved_datetime = date_current_datetime() global.elapsed_seconds = 0 global.last_room_overworld = "rm_ruins_01" global.story = 0 global.lastroom = 7 scr_init_flags_ruins() scr_init_flags_snowdin() scr_init_flags_dunes() scr_init_flags_steamworks() scr_init_flags_hotland() scr_init_flags_flowey() global.flowey_death_pop = 0 global.flowey_save_number = 1 global.fighting_flowey = 0 global.flowey_battle_1_phase = 0 global.save_count = 0 global.extra_flag[1] = false global.extra_flag[2] = false global.extra_flag[3] = false global.extra_flag[4] = false global.extra_flag[5] = false global.extra_flag[6] = false global.extra_flag[7] = false global.extra_flag[8] = false global.extra_flag[9] = false global.encounter_flag[0] = 0 global.route = 2 global.kill_number[0] = 9999 global.kill_area[0][0] = 9999 global.kill_number[1] = 20 for (var i = 0; i <= 6; i++) global.kill_area[1][i] = 5 global.kill_number[2] = 20 for (i = 0; i <= 7; i++) global.kill_area[2][i] = 5 global.kill_number[3] = 20 for (i = 0; i <= 8; i++) global.kill_area[3][i] = 3 global.kill_number[4] = 20 for (i = 0; i <= 12; i++) global.kill_area[4][i] = 3 global.kill_area_current = 0 global.flGenoCutscene = 0 global.geno_complete[1] = false global.geno_complete[2] = false global.geno_complete[3] = false global.geno_complete[4] = false global.geno_complete[5] = false global.item_stock[0] = 1 global.item_stock[1] = 1 global.item_stock[2] = 1 global.item_stock[3] = 1 global.item_stock[4] = 1 global.item_stock[5] = 1 global.item_stock[6] = 1 global.item_stock[7] = 1 global.item_stock[8] = 3 global.item_stock[9] = 1 global.item_stock[10] = 1 global.item_stock[11] = 1 global.item_stock[12] = 2 global.item_stock[13] = 2 global.item_stock[14] = 1 ...
()
253
            scene = 0
254
            cutscene_timer = 0
255
            cutscene_battle_initiate("martlet genocide final", "true", false)
256
            instance_create_depth(0, 0, -1000, obj_martlet_debugger)
257
        }
258
}