Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_savefl_Step_0

(view raw script w/o annotations or w/e)
1
depth = (-y)
2
if (instance_exists(obj_dialogue) && obj_dialogue.sndfnt == 96)
3
{
4
    if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current]))
5
    {
6
        image_speed = 0
7
        image_index = 0
8
    }
9
    else
10
        image_speed = 0.2
11
}
12
if (waiter > 0 && waiter < 3)
13
{
14
    switch (direction div 90)
15
    {
16
        case 0:
17
            sprite_index = rightsprite
18
            break
19
        case 1:
20
            sprite_index = upsprite
21
            break
22
        case 2:
23
            sprite_index = leftsprite
24
            break
25
        case 3:
26
            sprite_index = downsprite
27
            break
28
    }
29
30
}
31
if (waiter == 1)
32
{
33
    if global.flowey_death_pop
34
    {
35
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
36
        with (msg)
37
        {
38
            sndfnt = 96
39
            message[0] = "* Welcome back!"
40
            prt[0] = 348
41
        }
42
        if (!global.dialogue_open)
43
        {
44
            waiter = 3
45
            sprite_index = leavesprite
46
            image_speed = 0.2
47
        }
48
        return;
49
    }
50
    else if (global.dunes_flag[41] >= 5)
51
        scr_save_flowey_endgame
scr_save_flowey_endgame

function scr_save_flowey_endgame() //gml_Script_scr_save_flowey_endgame { var current_room = room_get_name(room) current_save_number = 1 scr_determine_save_area() if (global.flowey_save_number < current_save_number) global.flowey_save_number = current_save_number scr_text() with (msg) { sndfnt = 96 switch current_room { case "rm_hotland_complex_1": if (global.route == 1 || global.route == 2) { switch global.flowey_flag[36] { case 0: var death_count = global.death_count_total message[0] = "* ..." message[1] = "* Oh-Howdy!" message[2] = "* We're nearing the# Castle now." message[3] = "* What an eventful day!" message[4] = "* For kicks and giggles,# why don't we tally up# your death total?" message[5] = "* Drum roll please!" message[6] = "* Badabadabadabadaba..." prt[0] = 353 prt[1] = 348 prt[2] = 348 prt[3] = 347 prt[4] = 3251 prt[5] = 348 prt[6] = 348 if (global.save_count > 0) { message[7] = "* You died " + string(death_count) + " times!" if (death_count == 1) message[7] = "* You died " + string(death_count) + " time!" prt[7] = 348 if (death_count >= 1) { message[8] = "* Wow!" message[9] = "* If I wasn't here to# help, this all would've# been a disaster!" message[10] = "* Maybe jumping down a# chasm gung-ho wasn't the# brightest idea..." message[11] = "* But hey, all's well# that ends well!" prt[8] = 348 prt[9] = 3251 prt[10] = 347 prt[11] = 348 global.flowey_flag[36] = 1 } else { message[8] = "* Uh... " message[9] = "* That can't be right..." message[10] = "* Zero? Really?" message[11] = "* Geez..." message[12] = "* I offered my services# for a reason." message[13] = "* I mean come on! Die a# little!" prt[8] = 353 prt[9] = 352 prt[10] = 356 prt[11] = 354 prt[12] = 357 prt[13] = 349 global.flowey_flag[36] = 2 } } else { message[7] = "* Oh wait, it's ZERO." message[8] = "* For you to be standing# in this building, it has# to be zero. " message[9] = "* I honestly can't# believe you made it# here." message[10] = "* You are a piece of work# sometimes, you know# that? " message[11] = "* Sigh..." message[12] = "* Yeah, go on. " message[13] = "* Save, don't save, your# choice." message[14] = "* Just remember that I# was always here for you." message[15] = "* Like a good friend# should be." prt[7] = 3640 prt[8] = 353 prt[9] = 352 prt[10] = 348 prt[11] = 352 prt[12] = 353 prt[13] = 352 prt[14] = 352 prt[15] = 347 global.flowey_flag[36] = 2 } break case 1: message[0] = "* What? Confused?" message[1] = "* Or do ya think keeping# a death tally is morbid?" message[2] = "* Knowing what could've# been keeps you humble!" message[3] = "* Grateful for everyone# who helped you get where# you are!" message[4] = "* At least that's my# \"flowosophy.\"" prt[0] = 348 prt[1] = 347 prt[2] = 3251 ...
()
52
    else
53
    {
54
        var current_world_value = scr_determine_world_value_yellow
scr_determine_world_value_yellow

function scr_determine_world_value_yellow() //gml_Script_scr_determine_world_value_yellow { if (room != rm_battle && room != rm_shop && room != rm_mainmenu && room != rm_death_screen) global.current_room_overworld = room_get_name(room) var current_room_overworld = global.current_room_overworld switch current_room_overworld { case "rm_ruins_01_yellow": case "rm_ruins_02_yellow": case "rm_ruins_03_yellow": case "rm_ruins_04_yellow": case "rm_ruins_05_yellow": case "rm_ruins_06_yellow": return 0; case "rm_darkruins_01": case "rm_darkruins_02": case "rm_darkruins_03": case "rm_darkruins_04": case "rm_darkruins_05": case "rm_darkruins_06": case "rm_darkruins_07": case "rm_darkruins_08": case "rm_darkruins_08b": case "rm_darkruins_09": case "rm_darkruins_09b": case "rm_darkruins_10": case "rm_darkruins_11": case "rm_darkruins_12": case "rm_darkruins_13": case "rm_darkruins_14": case "rm_darkruins_14b": case "rm_darkruins_15": case "rm_darkruins_16": case "rm_darkruins_16b": case "rm_darkruins_16c": case "rm_darkruins_17": case "rm_darkruins_18": case "rm_dalvhallway": case "rm_dalvshouse": case "rm_dalvsroom": case "rm_dalvroomhall": case "rm_dalvExit": return 1; case "rm_snowdin_01_yellow": case "rm_snowdin_02_yellow": case "rm_snowdin_03_yellow": case "rm_snowdin_03b_yellow": case "rm_snowdin_04_yellow": case "rm_snowdin_05_yellow": case "rm_snowdin_06_yellow": case "rm_snowdin_07_yellow": case "rm_snowdin_08_yellow": case "rm_snowdin_08b_yellow": case "rm_snowdin_09_yellow": case "rm_snowdin_10_yellow": case "rm_snowdin_11_yellow": case "rm_snowdin_12_yellow": case "rm_snowdin_13_yellow": case "rm_snowdin_14_yellow": case "rm_snowdin_14b_yellow": case "rm_snowdin_14c_yellow": case "rm_snowdin_14d_yellow": case "rm_snowdin_14e_yellow": case "rm_snowdin_15_yellow": case "rm_snowdin_16_yellow": case "rm_snowdin_16b_yellow": case "rm_snowdin_17_yellow": case "rm_snowdin_18_yellow": case "rm_snowdin_19_yellow": case "rm_snowdin_20_yellow": case "rm_snowdin_21_yellow": case "rm_snowdin_22_yellow": return 2; case "rm_dunes_01": case "rm_dunes_02": case "rm_dunes_03": case "rm_dunes_04": case "rm_dunes_05": case "rm_dunes_06": case "rm_dunes_07": case "rm_dunes_08": case "rm_dunes_08b": case "rm_dunes_09": case "rm_dunes_10": case "rm_dunes_11": case "rm_dunes_12": case "rm_dunes_12b": case "rm_dunes_13": case "rm_dunes_14": case "rm_dunes_15": case "rm_dunes_16": case "rm_dunes_17": case "rm_dunes_18": case "rm_dunes_19": case "rm_dunes_19B": case "rm_dunes_20": case "rm_dunes_21": case "rm_dunes_22": case "rm_dunes_23": case "rm_dunes_24": case "rm_dunes_25": ...
()
55
        switch current_world_value
56
        {
57
            case 1:
58
                scr_save_flowey_dark_ruins
scr_save_flowey_dark_ruins

function scr_save_flowey_dark_ruins() //gml_Script_scr_save_flowey_dark_ruins { var current_room = room_get_name(room) current_save_number = 1 scr_determine_save_area() if (global.flowey_save_number < current_save_number) global.flowey_save_number = current_save_number scr_text() with (msg) { sndfnt = 96 var kill_number = global.kill_number[1] if (global.kill_number[1] <= 15 && global.flowey_flag[6] == 0) { global.flowey_flag[6] = 1 if (kill_number <= 10) { instance_destroy() scr_save_flowey_dark_ruins() return; } message[0] = "* Gee, it's getting a# little dusty around here,# huh?" prt[0] = 357 } else if (global.kill_number[1] <= 10 && global.flowey_flag[6] == 1) { global.flowey_flag[6] = 2 if (kill_number <= 5) { instance_destroy() scr_save_flowey_dark_ruins() return; } col_modif[0] = 255 message[0] = "* Not too fond of that# whole mercy thing?" message[1] = "* That's alright, whatever# gets you to ASGORE# friend!" message_col[0][1] = " # ASGORE" prt[0] = 353 prt[1] = 348 } else if (global.kill_number[1] <= 5 && global.flowey_flag[6] == 2) { global.flowey_flag[6] = 3 if (kill_number <= 0) { instance_destroy() scr_save_flowey_dark_ruins() return; } message[0] = "* You've really got some# passion there." message[1] = "* There's only " + string(global.kill_number[scr_determine_world_value_yellow()]) + " of the# monsters left not# counting the weirdo." message[2] = "* Good luck, pal!" prt[0] = 357 prt[1] = 348 prt[2] = 347 global.flowey_flag[6] = 3 } else if (global.kill_number[1] <= 0 && global.flowey_flag[6] == 3) { message[0] = "* Wow, it sure is quiet# around here." message[1] = "* I gotta say, it's# a bit nice with no# disturbances." message[2] = "* Well, nothing left to# do here I guess. Let's# keep going!" prt[0] = 347 prt[1] = 348 prt[2] = 348 global.flowey_flag[6] = 4 } else if (global.flowey_flag[6] == 4 && current_room != "rm_darkruins_16") { message[0] = "* Let's keep moving!" prt[0] = 348 } else if (other.current_save_number < global.flowey_save_number) { message[0] = "* What are you doing back# here? The exit's the# other way, silly!" message[1] = "* Let's get going." prt[0] = 352 prt[1] = 348 } else { switch current_room { case "rm_darkruins_03": switch global.flowey_flag[0] { case 0: message[0] = "* Howdy!#* Looks like you got# it then! " prt[0] = 348 global.flowey_flag[0] = global.flowey_flag[0] + 1 break case 1: message[0] = "* Why the long face, pal?" message[1] = "* Don't worry, this place# is way better than up# there!" message[2] = "* That old lady would've# just spoiled all of# our fun!" message[3] = "* Come on, let's not stand# around here all day!" prt[0] = 348 prt[1] = 347 prt[2] = 357 prt[3] = 348 global.flowey_flag[0] = global.flowey_flag[0] + 1 ...
()
59
                break
60
            case 2:
61
                scr_save_flowey_snowdin
scr_save_flowey_snowdin

function scr_save_flowey_snowdin() //gml_Script_scr_save_flowey_snowdin { var current_room = room_get_name(room) global.menu_sprite = 1245 current_save_number = 1 scr_determine_save_area() if (global.flowey_save_number < current_save_number) global.flowey_save_number = current_save_number scr_text() with (msg) { sndfnt = 96 var kill_number = global.kill_number[2] if global.player_can_travel { message[0] = "* Let's get going." prt[0] = 348 } else if (global.snowdin_flag[13] != 0) { if (global.route == 3) { switch global.flowey_flag[12] { case 0: message[0] = "* Howdy!" message[1] = "* ..." message[2] = "* Let's head to the river# up ahead." message[3] = "* We'll soon be outta# here." prt[0] = 348 prt[1] = 357 prt[2] = 348 prt[3] = 347 global.flowey_flag[12] = global.flowey_flag[12] + 1 break case 1: message[0] = "* ..." prt[0] = 353 break } } else if (global.snowdin_flag[13] == 1) { switch global.flowey_flag[12] { case 0: message[0] = "* Howdy!" message[1] = "* Great job, once again!" message[2] = "* I hate that so many# monsters are ruthlessly# attacking you," message[3] = "* But you're handling it# with grace!" message[4] = "* I'm not sure I trust# this one." message[5] = "* Lucky for us, she# doesn't seem too put# together." message[6] = "* We can ditch her as# soon as she messes# something up." message[7] = "* I'm sure it won't take# long, haha!" prt[0] = 348 prt[1] = 348 prt[2] = 357 prt[3] = 348 prt[4] = 347 prt[5] = 347 prt[6] = 349 prt[7] = 348 global.flowey_flag[12] = global.flowey_flag[12] + 1 break case 1: message[0] = "* Come on, Clover,# Martlet's waiting for# us." prt[0] = 348 break } } else if (global.snowdin_flag[13] >= 2) { switch global.flowey_flag[12] { case 0: message[0] = "* Howdy!" message[1] = "* Let's head to the river# up ahead." message[2] = "* We'll soon be outta# here!" prt[0] = 348 prt[1] = 348 prt[2] = 348 global.flowey_flag[12] = global.flowey_flag[12] + 1 break case 1: message[0] = "* Howdy!" prt[0] = 348 break } } } else if (global.kill_number[1] <= 0 && global.kill_number[2] <= 15 && global.flowey_flag[13] == 0) { global.flowey_flag[13] = 1 if (kill_number <= 10) { instance_destroy() scr_save_flowey_snowdin() return; ...
()
62
                break
63
            case 3:
64
                scr_save_flowey_dunes
scr_save_flowey_dunes

function scr_save_flowey_dunes() //gml_Script_scr_save_flowey_dunes { var current_room = room_get_name(room) current_save_number = 1 scr_determine_save_area() global.menu_sprite = 3298 if (global.flowey_save_number < current_save_number) global.flowey_save_number = current_save_number scr_text() with (msg) { sndfnt = 96 var kill_number = global.kill_number[3] if (global.kill_number[2] <= 0 && global.kill_number[3] <= 15 && global.flowey_flag[35] == 0) { global.flowey_flag[35] = 1 if (kill_number <= 10) { instance_destroy() scr_save_flowey_dunes() return; } message[0] = "* Always a treat to see# your gunslinging skills!" message[1] = "* Let's get you saved!" prt[0] = 348 prt[1] = 348 } else if (global.kill_number[3] <= 10 && global.flowey_flag[35] == 1) { global.flowey_flag[35] = 2 if (kill_number <= 5) { instance_destroy() scr_save_flowey_dunes() return; } message[0] = "* Golly, monsters 'round# here sure have it out# for you!" message[1] = "* How could they keep# attacking a poor human# so willingly? " message[2] = "* We can't have that! Not# at all!" prt[0] = 348 prt[1] = 347 prt[2] = 3251 } else if (global.kill_number[3] <= 5 && global.flowey_flag[35] == 2) { global.flowey_flag[35] = 3 if (kill_number <= 0) { instance_destroy() scr_save_flowey_dunes() return; } message[0] = "* I don't see many more# enemies roaming about." message[1] = "* Once you encounter the# rest, show 'em who's# boss!" prt[0] = 348 prt[1] = 349 } else if (global.kill_number[3] <= 0 && global.flowey_flag[35] == 3) { message[0] = "* You are... whoa, haha.# Talented, for sure!" message[1] = "* You laid waste to this# wasteland!" message[2] = "* This place definitely# wasn't big enough for# the both of you!" prt[0] = 352 prt[1] = 347 prt[2] = 348 global.flowey_flag[35] = 4 } else if (global.flowey_flag[35] == 4) { message[0] = "* Keep on movin', buddy!" message[1] = "* We're getting ever so# closer to your REAL# target!" prt[0] = 348 prt[1] = 348 global.flowey_flag[35] = 5 } else if (global.flowey_flag[35] == 5) { message[0] = "* ..." prt[0] = 352 } else if (other.current_save_number < global.flowey_save_number) { message[0] = "* What are you doing back# here? The exit's the# other way, silly!" message[1] = "* Let's get going." prt[0] = 352 prt[1] = 348 } else { switch current_room { case "rm_dunes_02": switch global.flowey_flag[15] { case 0: message[0] = "* This cave is a little# claustrophobic for my# taste." message[1] = "* Get out there and see# what we're really# dealing with!" prt[0] = 348 prt[1] = 348 if (global.geno_complete[2] == 1) { ...
()
65
                break
66
            case 4:
67
                scr_save_flowey_steamworks
scr_save_flowey_steamworks

function scr_save_flowey_steamworks() //gml_Script_scr_save_flowey_steamworks { if live_call() return global.live_result; var current_room = room_get_name(room) global.menu_sprite = 3691 current_save_number = 1 scr_determine_save_area() if (global.flowey_save_number < current_save_number) global.flowey_save_number = current_save_number scr_text() with (msg) { sndfnt = 96 var kill_number = global.kill_number[4] if (current_room == "rm_steamworks_36" && global.route == 3 && global.sworks_flag[31] == 4 && global.hotland_flag[6] == 0) { message[0] = "* Are we gonna talk about# what you just did?" message[1] = "* I've seriously had it# with this behavior." message[2] = "* I aid you for so long# yet I have to deal with# your angst?" message[3] = "* Ever heard of \"don't# bite the hand that feeds# you?\"" message[4] = "* But, oh, \"it's okay to# bite Flowey because he# doesn't have hands.\"" message[5] = "* Well I used to!" message[6] = "* ..." message[7] = "* I um..." message[8] = "* Heh..." message[9] = "* ..." message[10] = "* I made a promise to# help you all the way to# the Castle." message[11] = "* So... I will." message[12] = "* Just had to make my# grievances known, ya# know?" message[13] = "* A little respect goes a# long way." prt[0] = 353 prt[1] = 351 prt[2] = 351 prt[3] = 351 prt[4] = 3692 prt[5] = 351 prt[6] = 352 prt[7] = 353 prt[8] = 357 prt[9] = 357 prt[10] = 352 prt[11] = 353 prt[12] = 348 prt[13] = 3251 global.sworks_flag[31] = 5 } else if (global.kill_number[3] <= 0 && kill_number <= 17 && global.flowey_flag[37] == 0) { global.flowey_flag[37] = 1 if (kill_number <= 10) { with (other) scr_save_flowey_steamworks() return; } message[0] = "* These undead piles of# junk aren't very# threatening." message[1] = "* Not really worth the# trouble." prt[0] = 353 prt[1] = 357 } else if (kill_number <= 12 && global.flowey_flag[37] == 1) { global.flowey_flag[37] = 2 if (kill_number <= 5) { with (other) scr_save_flowey_steamworks() return; } message[0] = "* Still at it, huh?" message[1] = "* Sorry but I'm runnin'# low on witty comments at# this point." prt[0] = 3692 prt[1] = 353 } else if (kill_number <= 8 && global.flowey_flag[37] == 2) { global.flowey_flag[37] = 3 if (kill_number <= 0) { with (other) scr_save_flowey_steamworks() return; } message[0] = "* ...What? You want me to# keep inflating your ego?" message[1] = "* This was novel back in# like, Snowdin, but now?" message[2] = "* I don't know... Aren't# you bored?" message[3] = "* ..." message[4] = "* Right." prt[0] = 352 prt[1] = 353 prt[2] = 3692 prt[3] = 3692 prt[4] = 353 } else if (kill_number <= 5 && global.flowey_flag[37] == 3) { global.flowey_flag[37] = 4 if (kill_number <= 0) { with (other) ...
()
68
                break
69
            case 5:
70
                scr_save_flowey_endgame
scr_save_flowey_endgame

function scr_save_flowey_endgame() //gml_Script_scr_save_flowey_endgame { var current_room = room_get_name(room) current_save_number = 1 scr_determine_save_area() if (global.flowey_save_number < current_save_number) global.flowey_save_number = current_save_number scr_text() with (msg) { sndfnt = 96 switch current_room { case "rm_hotland_complex_1": if (global.route == 1 || global.route == 2) { switch global.flowey_flag[36] { case 0: var death_count = global.death_count_total message[0] = "* ..." message[1] = "* Oh-Howdy!" message[2] = "* We're nearing the# Castle now." message[3] = "* What an eventful day!" message[4] = "* For kicks and giggles,# why don't we tally up# your death total?" message[5] = "* Drum roll please!" message[6] = "* Badabadabadabadaba..." prt[0] = 353 prt[1] = 348 prt[2] = 348 prt[3] = 347 prt[4] = 3251 prt[5] = 348 prt[6] = 348 if (global.save_count > 0) { message[7] = "* You died " + string(death_count) + " times!" if (death_count == 1) message[7] = "* You died " + string(death_count) + " time!" prt[7] = 348 if (death_count >= 1) { message[8] = "* Wow!" message[9] = "* If I wasn't here to# help, this all would've# been a disaster!" message[10] = "* Maybe jumping down a# chasm gung-ho wasn't the# brightest idea..." message[11] = "* But hey, all's well# that ends well!" prt[8] = 348 prt[9] = 3251 prt[10] = 347 prt[11] = 348 global.flowey_flag[36] = 1 } else { message[8] = "* Uh... " message[9] = "* That can't be right..." message[10] = "* Zero? Really?" message[11] = "* Geez..." message[12] = "* I offered my services# for a reason." message[13] = "* I mean come on! Die a# little!" prt[8] = 353 prt[9] = 352 prt[10] = 356 prt[11] = 354 prt[12] = 357 prt[13] = 349 global.flowey_flag[36] = 2 } } else { message[7] = "* Oh wait, it's ZERO." message[8] = "* For you to be standing# in this building, it has# to be zero. " message[9] = "* I honestly can't# believe you made it# here." message[10] = "* You are a piece of work# sometimes, you know# that? " message[11] = "* Sigh..." message[12] = "* Yeah, go on. " message[13] = "* Save, don't save, your# choice." message[14] = "* Just remember that I# was always here for you." message[15] = "* Like a good friend# should be." prt[7] = 3640 prt[8] = 353 prt[9] = 352 prt[10] = 348 prt[11] = 352 prt[12] = 353 prt[13] = 352 prt[14] = 352 prt[15] = 347 global.flowey_flag[36] = 2 } break case 1: message[0] = "* What? Confused?" message[1] = "* Or do ya think keeping# a death tally is morbid?" message[2] = "* Knowing what could've# been keeps you humble!" message[3] = "* Grateful for everyone# who helped you get where# you are!" message[4] = "* At least that's my# \"flowosophy.\"" prt[0] = 348 prt[1] = 347 prt[2] = 3251 ...
()
71
                break
72
        }
73
74
    }
75
    waiter = 2
76
}
77
if ((!instance_exists(obj_dialogue)) && waiter == 2)
78
{
79
    box = instance_create(((__view_get((0 << 0), 0)) + 160), ((__view_get((1 << 0), 0)) + 120), obj_savebox)
80
    audio_play_sound(snd_mainmenu_select, 1, 0)
81
    waiter = 3
82
}