Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_big_boss_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (interact && !instance_exists(obj_dialogue))
3
    can_talk = 1;
4
if (can_talk)
5
{
6
    switch (npc_flag)
7
    {
8
        case 0:
9
            if (scene == 0)
10
            {
11
                if (global.geno_complete[2] == false)
12
                {
13
                    is_talking = 1;
14
                    scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
15
                    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
16
                    with (msg)
17
                    {
18
                        message[0] = "* Welcome to the Mining#  Co. Mines! (I wasn't#  expecting visitors...)";
19
                        message[1] = "* If you have an inquiry,#  please take it up with#  my assistant.";
20
                        prt[0] = 359;
21
                        prt[1] = 359;
22
                    }
23
                    if (!global.dialogue_open)
24
                    {
25
                        scene++;
26
                        timer = 30;
27
                    }
28
                }
29
                else
30
                {
31
                    is_talking = true;
32
                    can_talk = false;
33
                    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
34
                    with (msg)
35
                    {
36
                        message[0] = "* I heard some rumblings#  of danger back west.";
37
                        message[1] = "* Sent everyone home for#  now.";
38
                        message[2] = "* Waiting to see if it#  was a false alarm or#  not.";
39
                        message[3] = "* Sure hope everything's#  okay...";
40
                        prt[0] = 359;
41
                        prt[1] = 359;
42
                        prt[2] = 359;
43
                        prt[3] = 359;
44
                    }
45
                    npc_flag++;
46
                }
47
            }
48
            else if (scene == 1)
49
            {
50
                if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
51
                    exit;
52
                is_talking = 0;
53
                obj_miner_receptionist.is_talking = 1;
54
                scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
55
                with (msg)
56
                {
57
                    message[0] = "* Gilbert, please. We've#  been married 27 years.";
58
                    message[1] = "* You can handle the#  questions yourself.";
59
                    prt[0] = 365;
60
                    prt[1] = 363;
61
                }
62
                if (!global.dialogue_open)
63
                    scene++;
64
            }
65
            else if (scene == 2)
66
            {
67
                is_talking = 1;
68
                obj_miner_receptionist.is_talking = 0;
69
                scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
70
                with (msg)
71
                {
72
                    ch_msg = 7;
73
                    ch[1] = "Firing";
74
                    ch[2] = "Elevator";
75
                    message[0] = "* C-certainly dear!";
76
                    message[1] = "* Ahem...";
77
                    message[2] = "* If you're gonna ask#  about the hot#  conditions...";
78
                    message[3] = "* I'm ordering more#  Glacialstone Cold Packs#  later today.";
79
                    message[4] = "* And if you're gonna ask#  about the falling rocks,";
80
                    message[5] = "* I'm gonna investigate#  it soon!";
81
                    message[6] = "* No need to worry,#  everything is fine!";
82
                    message[7] = "* So... what is it?";
83
                    prt[0] = 361;
84
                    prt[1] = 359;
85
                    prt[2] = 359;
86
                    prt[3] = 359;
87
                    prt[4] = 359;
88
                    prt[5] = 359;
89
                    prt[6] = 359;
90
                    prt[7] = 361;
91
                    if (outcome == 1)
92
                    {
93
                        instance_destroy();
94
                        other.scene = 3;
95
                        exit;
96
                    }
97
                    else if (outcome == 2)
98
                    {
99
                        message[8] = "* The elevator was broken?#  That can't be right.";
100
                        message[9] = "* We refurbished it last#  month.";
101
                        message[10] = "* The company was given a#  repair budget for the#  whole mine.";
102
                        message[11] = "* Turns out marble walls#  and gold tiling adds up#  quick.";
103
                        message[12] = "* We ran out.";
104
                        message[13] = "* Gorgeous baseboard job,#  though. Totally worth#  it.";
105
                        prt[8] = 361;
106
                        prt[9] = 359;
107
                        prt[10] = 359;
108
                        prt[11] = 359;
109
                        prt[12] = 361;
110
                        prt[13] = 362;
111
                        other.npc_flag = 1;
112
                        other.can_talk = false;
113
                        global.cutscene = false;
114
                    }
115
                }
116
            }
117
            else if (scene == 3)
118
            {
119
                scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
120
                with (msg)
121
                {
122
                    if (message_current == 0 || message_current == 6)
123
                    {
124
                        other.is_talking = true;
125
                        obj_miner_receptionist.is_talking = false;
126
                    }
127
                    if (message_current == 5)
128
                    {
129
                        other.is_talking = false;
130
                        obj_miner_receptionist.is_talking = true;
131
                    }
132
                    message[0] = "* Someone isn't doing#  their job correctly?";
133
                    message[1] = "* Well I never!";
134
                    message[2] = "* They deserve a good#  slap on the wrist, that#  they do!";
135
                    message[3] = "* One more mistake and I#  might put them in the#  timeout corner!";
136
                    message[4] = "* I'll uh... send Angie#  down to confront them.";
137
                    prt[0] = 361;
138
                    prt[1] = 359;
139
                    prt[2] = 359;
140
                    prt[3] = 359;
141
                    prt[4] = 361;
142
                    message[5] = "* You won't fire them#  will you?";
143
                    prt[5] = 363;
144
                    message[6] = "* Of course not!";
145
                    message[7] = "* The only monster I ever#  fired was the health#  inspector.";
146
                    message[8] = "* Fired him before he#  arrived.";
147
                    prt[6] = 361;
148
                    prt[7] = 359;
149
                    prt[8] = 359;
150
                    if (message_current == 8)
151
                    {
152
                        other.npc_flag = 1;
153
                        other.can_talk = false;
154
                        global.cutscene = false;
155
                    }
156
                }
157
            }
158
            break;
159
        case 1:
160
            is_talking = true;
161
            can_talk = false;
162
            scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
163
            with (msg)
164
            {
165
                if (global.geno_complete[2] == false)
166
                {
167
                    sndfnt = 99;
168
                    message[0] = "* I take great pride in#  these mines.";
169
                    message[1] = "* Been supervising them#  for around thirty years!";
170
                    message[2] = "* Here every single day.";
171
                    message[3] = "* I did take a week off#  when my kiddo was born.";
172
                    message[4] = "* But was right back at#  it when the time came.";
173
                    message[5] = "* Strangely, the progress#  report for that week#  was above average.";
174
                    prt[0] = 361;
175
                    prt[1] = 359;
176
                    prt[2] = 359;
177
                    prt[3] = 359;
178
                    prt[4] = 361;
179
                    prt[5] = 361;
180
                }
181
                else
182
                {
183
                    message[0] = "* Haven't had an#  emergency like this#  since the old cave in.";
184
                    message[1] = "* Abandoned a good#  facility that day.";
185
                    prt[0] = 359;
186
                    prt[1] = 359;
187
                }
188
            }
189
            npc_flag++;
190
            break;
191
        case 2:
192
            is_talking = true;
193
            can_talk = false;
194
            scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
195
            with (msg)
196
            {
197
                sndfnt = 99;
198
                if (global.geno_complete[2] == false)
199
                {
200
                    message[0] = "* If you ever see my kid# out there,";
201
                    message[1] = "* Tell 'em that their#  old man misses 'em!";
202
                    prt[0] = 359;
203
                    prt[1] = 362;
204
                }
205
                else
206
                {
207
                    message[0] = "* If you're leaving, stay#  safe out there.";
208
                    message[1] = "* But I wouldn't#  recommend roaming around#  right now.";
209
                    prt[0] = 359;
210
                    prt[1] = 359;
211
                }
212
            }
213
            break;
214
    }
215
}
216
if (can_talk == true && !instance_exists(obj_dialogue))
217
    can_talk = false;