Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_save_flowey_endgame

(view raw script w/o annotations or w/e)
1
function 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 ...
() //gml_Script_scr_save_flowey_endgame
2
{
3
    var current_room = room_get_name(room)
4
    current_save_number = 1
5
    scr_determine_save_area
scr_determine_save_area

function scr_determine_save_area() //gml_Script_scr_determine_save_area { var current_room = room_get_name(room) switch current_room { case "rm_darkruins_03": current_save_number = 1 global.saveroom = "Dark Ruins - Entrance" break case "rm_darkruins_08": current_save_number = 2 global.saveroom = "Dark Ruins - Atrium" break case "rm_darkruins_10": current_save_number = 3 global.saveroom = "Dark Ruins - Cliff" break case "rm_darkruins_12": current_save_number = 4 global.saveroom = "Dark Ruins - Puzzle" break case "rm_darkruins_16": current_save_number = 5 global.saveroom = "Dark Ruins - Hall" break case "rm_snowdin_03_yellow": current_save_number = 1 global.saveroom = "Snowdin - Delta Rock" break case "rm_snowdin_08_yellow": current_save_number = 2 global.saveroom = "Snowdin - Ruined Shack" break case "rm_snowdin_12_yellow": current_save_number = 3 global.saveroom = "Snowdin - Pathway" break case "rm_snowdin_14_yellow": current_save_number = 4 global.saveroom = "Snowdin - Resort" break case "rm_snowdin_20_yellow": current_save_number = 5 global.saveroom = "Snowdin - Corridor" break case "rm_dunes_02": current_save_number = 1 global.saveroom = "Dunes - Cave" break case "rm_dunes_08": current_save_number = 2 global.saveroom = "Dunes - Tree" break case "rm_dunes_14": current_save_number = 3 global.saveroom = "Mines - Elevator" break case "rm_dunes_20": current_save_number = 4 global.saveroom = "Mines - Minecart" break case "rm_dunes_25": current_save_number = 5 global.saveroom = "Dunes - Mountaintop" break case "rm_dunes_28": current_save_number = 6 global.saveroom = "Dunes - Playground" break case "rm_dunes_34": current_save_number = 7 global.saveroom = "Dunes - Well" break case "rm_dunes_37": current_save_number = 8 global.saveroom = "Wild East - Town" break case "rm_dunes_39": current_save_number = 9 global.saveroom = "Wild East - Outskirts" break case "rm_dunes_41": current_save_number = 10 global.saveroom = "Wild East - Sunnyside" break case "rm_steamworks_05": current_save_number = 11 global.saveroom = "Steamw. - Generator" break case "rm_steamworks_09": current_save_number = 12 global.saveroom = "Steamw. - Raised Path" break case "rm_steamworks_15": current_save_number = 13 global.saveroom = "Steamw. - Lake" break case "rm_steamworks_19": current_save_number = 14 global.saveroom = "Steamw. - Offices" break ...
()
6
    if (global.flowey_save_number < current_save_number)
7
        global.flowey_save_number = current_save_number
8
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
9
    with (msg)
10
    {
11
        sndfnt = 96
12
        switch current_room
13
        {
14
            case "rm_hotland_complex_1":
15
                if (global.route == 1 || global.route == 2)
16
                {
17
                    switch global.flowey_flag[36]
18
                    {
19
                        case 0:
20
                            var death_count = global.death_count_total
21
                            message[0] = "* ..."
22
                            message[1] = "* Oh-Howdy!"
23
                            message[2] = "* We're nearing the#  Castle now."
24
                            message[3] = "* What an eventful day!"
25
                            message[4] = "* For kicks and giggles,#  why don't we tally up#  your death total?"
26
                            message[5] = "* Drum roll please!"
27
                            message[6] = "* Badabadabadabadaba..."
28
                            prt[0] = 353
29
                            prt[1] = 348
30
                            prt[2] = 348
31
                            prt[3] = 347
32
                            prt[4] = 3251
33
                            prt[5] = 348
34
                            prt[6] = 348
35
                            if (global.save_count > 0)
36
                            {
37
                                message[7] = "* You died " + string(death_count) + " times!"
38
                                if (death_count == 1)
39
                                    message[7] = "* You died " + string(death_count) + " time!"
40
                                prt[7] = 348
41
                                if (death_count >= 1)
42
                                {
43
                                    message[8] = "* Wow!"
44
                                    message[9] = "* If I wasn't here to#  help, this all would've#  been a disaster!"
45
                                    message[10] = "* Maybe jumping down a#  chasm gung-ho wasn't the#  brightest idea..."
46
                                    message[11] = "* But hey, all's well#  that ends well!"
47
                                    prt[8] = 348
48
                                    prt[9] = 3251
49
                                    prt[10] = 347
50
                                    prt[11] = 348
51
                                    global.flowey_flag[36] = 1
52
                                }
53
                                else
54
                                {
55
                                    message[8] = "* Uh... "
56
                                    message[9] = "* That can't be right..."
57
                                    message[10] = "* Zero? Really?"
58
                                    message[11] = "* Geez..."
59
                                    message[12] = "* I offered my services#  for a reason."
60
                                    message[13] = "* I mean come on! Die a#  little!"
61
                                    prt[8] = 353
62
                                    prt[9] = 352
63
                                    prt[10] = 356
64
                                    prt[11] = 354
65
                                    prt[12] = 357
66
                                    prt[13] = 349
67
                                    global.flowey_flag[36] = 2
68
                                }
69
                            }
70
                            else
71
                            {
72
                                message[7] = "* Oh wait, it's ZERO."
73
                                message[8] = "* For you to be standing#  in this building, it has#  to be zero.	"
74
                                message[9] = "* I honestly can't#  believe you made it#  here."
75
                                message[10] = "* You are a piece of work#  sometimes, you know#  that?	"
76
                                message[11] = "* Sigh..."
77
                                message[12] = "* Yeah, go on.	"
78
                                message[13] = "* Save, don't save, your#  choice."
79
                                message[14] = "* Just remember that I#  was always here for you."
80
                                message[15] = "* Like a good friend#  should be."
81
                                prt[7] = 3640
82
                                prt[8] = 353
83
                                prt[9] = 352
84
                                prt[10] = 348
85
                                prt[11] = 352
86
                                prt[12] = 353
87
                                prt[13] = 352
88
                                prt[14] = 352
89
                                prt[15] = 347
90
                                global.flowey_flag[36] = 2
91
                            }
92
                            break
93
                        case 1:
94
                            message[0] = "* What? Confused?"
95
                            message[1] = "* Or do ya think keeping#  a death tally is morbid?"
96
                            message[2] = "* Knowing what could've#  been keeps you humble!"
97
                            message[3] = "* Grateful for everyone#  who helped you get where#  you are!"
98
                            message[4] = "* At least that's my#  \"flowosophy.\""
99
                            prt[0] = 348
100
                            prt[1] = 347
101
                            prt[2] = 3251
102
                            prt[3] = 348
103
                            prt[4] = 349
104
                            global.flowey_flag[36] = global.flowey_flag[36] + 1
105
                            break
106
                        case 2:
107
                            message[0] = "* We got places to be,#  pal!"
108
                            message[1] = "* Chop chop!"
109
                            prt[0] = 348
110
                            prt[1] = 347
111
                            break
112
                    }
113
114
                    global.menu_sprite = 3091
115
                    return;
116
                }
117
                else
118
                {
119
                    switch global.flowey_flag[36]
120
                    {
121
                        case 0:
122
                            message[0] = "* Well."
123
                            message[1] = "* Word sure gets around."
124
                            message[2] = "* This is what'cha get#  when you toss out#  “subtlety.”"
125
                            message[3] = "* Waging war without a#  care for#  repercussions..."
126
                            message[4] = "* I tried to warn you but#  it's too late now."
127
                            message[5] = "* Sigh..."
128
                            message[6] = "* Play it cool from here#  on out, will you?"
129
                            prt[0] = 352
130
                            prt[1] = 353
131
                            prt[2] = 353
132
                            prt[3] = 352
133
                            prt[4] = 353
134
                            prt[5] = 352
135
                            prt[6] = 352
136
                            global.flowey_flag[36] = 1
137
                            break
138
                        case 1:
139
                            message[0] = "* We need to reach the#  Castle."
140
                            message[1] = "* The King awaits..."
141
                            prt[0] = 353
142
                            prt[1] = 348
143
                            global.flowey_flag[36] = global.flowey_flag[36] + 1
144
                            break
145
                        case 2:
146
                            message[0] = "* ..."
147
                            prt[0] = 353
148
                            break
149
                    }
150
151
                    global.menu_sprite = 3091
152
                    return;
153
                }
154
                break
155
            default:
156
                switch global.flowey_flag[38]
157
                {
158
                    case 0:
159
                        message[0] = "* Quite the turn of#  events, huh?"
160
                        message[1] = "* Well good thing I'm on#  the winning side, haha!"
161
                        message[2] = "* I bet you'll handle#  Ceroba like it's#  nothing!"
162
                        prt[0] = 348
163
                        prt[1] = 347
164
                        prt[2] = 348
165
                        global.flowey_flag[38] += 1
166
                        break
167
                    case 1:
168
                        message[0] = "* Best be heading to#  Hotland!"
169
                        message[1] = "* Who knows how long ya#  got?"
170
                        prt[0] = 347
171
                        prt[1] = 348
172
                        global.flowey_flag[38] += 1
173
                        break
174
                    case 2:
175
                        message[0] = "* You know that elevator#  at the end of the#  Steamworks?"
176
                        message[1] = "* I believe it's your#  ticket!"
177
                        message[2] = "* Let's deal with that#  backstabber already!"
178
                        prt[0] = 348
179
                        prt[1] = 3251
180
                        prt[2] = 348
181
                        break
182
                }
183
184
                break
185
        }
186
187
    }
188
}