Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_rurus_event_Step_0

(view raw script w/o annotations or w/e)
1
if (room == room_cc_rurus1)
2
{
3
    if (con == 0 && global.interact == 0)
4
    {
5
        cinstancecheck = 0;
6
        if (instance_exists(global.cinstance[0]) && instance_exists(global.cinstance[1]))
7
        {
8
            if (global.cinstance[0].x >= 125 && global.cinstance[1].x >= 125)
9
                cinstancecheck = 1;
10
        }
11
        if (obj_mainchara.x >= 125 && cinstancecheck == 1)
12
        {
13
            with (flashobj)
14
                instance_destroy();
15
            global.interact = 1;
16
            snd_free_all();
17
            snd_play(snd_impact);
18
            instance_create(0, 0, obj_shake);
19
            for (i = 0; i < 4; i += 1)
20
                spike[i].image_index = 0;
21
            spikewall1 = instance_create(spike[0].x, spike[0].y, obj_soliddark);
22
            spikewall2 = instance_create(spike[2].x, spike[2].y, obj_soliddark);
23
            spikewall1.image_yscale = 2;
24
            spikewall2.image_yscale = 2;
25
            con = 1;
26
            alarm[4] = 30;
27
        }
28
    }
29
    if (con == 2)
30
    {
31
        darkfade = scr_marker
scr_marker

function scr_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(-10, -10, spr_pixel_white);
32
        darkfade.image_xscale = 700;
33
        darkfade.image_yscale = 400;
34
        darkfade.image_alpha = 0;
35
        darkfade.depth = 800000;
36
        darkfade.image_blend = c_black;
37
        fade = 0;
38
        con = 3;
39
    }
40
    if (con == 3)
41
    {
42
        fade += 0.01;
43
        darkfade.image_alpha = fade;
44
        if (fade >= 0.6)
45
        {
46
            con = 4;
47
            alarm[4] = 20;
48
        }
49
    }
50
    if (con == 5)
51
    {
52
        global.facing = 2;
53
        with (obj_caterpillarchara)
54
        {
55
            fun = 1;
56
            sprite_index = usprite;
57
        }
58
        global.msg[0] = 
So the worms have decided
to crawl out and play...Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_58_0")
;
59
        global.typer = 42;
60
        instance_create(120, 50, obj_writer);
61
        con = 6;
62
    }
63
    if (con == 6 && !instance_exists(obj_writer))
64
    {
65
        global.fc = 2;
66
        global.fe = 3;
67
        global.typer = 31;
68
        global.msg[0] = 
* Who's there!?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_71_0")
;
69
        con = 7;
70
        instance_create(0, 0, obj_dialoguer);
71
    }
72
    if (con == 7 && !d_ex())
73
    {
74
        global.msg[0] = 
Geh ha ha ha ha!
Thoust FOOLS!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_78_0")
;
75
        global.typer = 42;
76
        instance_create(200, 50, obj_writer);
77
        con = 8;
78
    }
79
    if (con == 8 && !instance_exists(obj_writer))
80
    {
81
        snd_play(snd_rurus_appear);
82
        appear = instance_create(x, y, obj_rurus_appear);
83
        visible = 0;
84
        con = 14;
85
        alarm[4] = 60;
86
    }
87
    if (con == 15)
88
    {
89
        visible = 1;
90
        with (appear)
91
            instance_destroy();
92
        vspeed = 0;
93
        con = 16;
94
        alarm[4] = 21;
95
    }
96
    if (con == 16)
97
    {
98
        with (darkfade)
99
        {
100
            image_alpha -= 0.03;
101
            if (image_alpha <= 0)
102
                image_alpha = 0;
103
        }
104
    }
105
    if (con == 17)
106
    {
107
        global.currentsong[0] = snd_init("ruruskaado.ogg");
108
        global.currentsong[1] = mus_loop(global.currentsong[0]);
109
        global.fc = 18;
110
        global.fe = 0;
111
        global.typer = 6;
112
        global.msg[0] = 
\E0* I am Rouxls Kaard,Delay 11 thou're greatest adversary!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_121_0")
;
113
        global.msg[1] = 
\E4* Thou may have clawedst past all thouse otherest conundrums...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_122_0")
;
114
        global.msg[2] = 
\E2* But THOUSE were created by UTTER WEAKLINGS!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_123_0")
;
115
        global.msg[3] = 
\E3* Now,Delay 11 prepare thouself.Delay 11
* For the STRONGEST puzzle of THOUST LIFE!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_124_0")
;
116
        d = instance_create(0, 0, obj_dialoguer);
117
        d.side = 1;
118
        con = 18;
119
    }
120
    if (con == 18 && !d_ex())
121
    {
122
        snd_play(snd_power);
123
        fade = 0;
124
        con = 19;
125
        with (darkfade)
126
        {
127
            image_blend = c_white;
128
            depth = -200;
129
        }
130
    }
131
    if (con == 19)
132
    {
133
        fade += 0.1;
134
        darkfade.image_alpha = fade;
135
        if (darkfade.image_alpha >= 1)
136
        {
137
            con = 20;
138
            block = instance_create(320, 240, obj_pushableblock);
139
            block.event = 0;
140
            tile = instance_create(280, 240, obj_blocktile);
141
        }
142
    }
143
    if (con == 20)
144
    {
145
        fade -= 0.1;
146
        darkfade.image_alpha = fade;
147
        if (fade <= 0)
148
        {
149
            with (darkfade)
150
                instance_destroy();
151
            con = 21;
152
            global.msg[0] = 
\E2* TOIL,Delay 11 Worms!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_164_0")
;
153
            d = instance_create(0, 0, obj_dialoguer);
154
            d.side = 1;
155
        }
156
    }
157
    if (con == 21 && !d_ex())
158
    {
159
        with (floorwall)
160
            instance_destroy();
161
        interactable = instance_create(280, 160, obj_readable_room1);
162
        interactable.image_xscale = 4;
163
        interactable.image_yscale = 2;
164
        global.facing = 0;
165
        with (obj_caterpillarchara)
166
            fun = 0;
167
        global.interact = 0;
168
        con = 25;
169
    }
170
    if (con == 25)
171
    {
172
        if (block.sprite_index == spr_npc_block_solved && global.interact == 0)
173
        {
174
            snd_free_all();
175
            global.interact = 1;
176
            snd_play(snd_won);
177
            with (spikewall1)
178
                instance_destroy();
179
            with (spikewall2)
180
                instance_destroy();
181
            with (interactable)
182
                instance_destroy();
183
            for (i = 0; i < 4; i += 1)
184
                spike[i].image_index = 1;
185
            con = 26;
186
            alarm[4] = 30;
187
        }
188
    }
189
    if (con == 27)
190
    {
191
        global.fc = 18;
192
        global.fe = 1;
193
        global.typer = 42;
194
        global.msg[0] = 
* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_208_0")
;
195
        global.msg[1] = 
\E1* GODWait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_209_0")
;
196
        global.msg[2] = 
* DAMN ITWait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_210_0")
;
197
        d = instance_create(0, 0, obj_dialoguer);
198
        d.side = 1;
199
        con = 28;
200
    }
201
    if (con == 28 && !d_ex())
202
    {
203
        vspeed = -8;
204
        con = 29;
205
    }
206
    if (con == 29 && !d_ex())
207
    {
208
        global.interact = 0;
209
        global.facing = 0;
210
        global.flag[217 solved_rouxls_puzz] = 1;
211
        scr_tempsave
scr_tempsave

function scr_tempsave() { filechoicebk2 = global.filechoice; global.filechoice = 9; scr_saveprocess(global.filechoice); global.filechoice = filechoicebk2; }
();
212
        con = 30;
213
    }
214
}
215
if (room == room_cc_rurus2)
216
{
217
    if (con == 0 && global.interact == 0)
218
    {
219
        cinstancecheck = 0;
220
        if (instance_exists(global.cinstance[0]) && instance_exists(global.cinstance[1]))
221
        {
222
            if (global.cinstance[0].x >= 125 && global.cinstance[1].x >= 125)
223
                cinstancecheck = 1;
224
        }
225
        if (obj_mainchara.x >= 125 && cinstancecheck == 1)
226
        {
227
            with (flashobj)
228
                instance_destroy();
229
            global.interact = 1;
230
            snd_free_all();
231
            snd_play(snd_impact);
232
            instance_create(0, 0, obj_shake);
233
            for (i = 0; i < 4; i += 1)
234
                spike[i].image_index = 0;
235
            spikewall1 = instance_create(spike[0].x, spike[0].y, obj_soliddark);
236
            spikewall2 = instance_create(spike[2].x, spike[2].y, obj_soliddark);
237
            spikewall1.image_yscale = 2;
238
            spikewall2.image_yscale = 2;
239
            con = 7;
240
            alarm[4] = 30;
241
        }
242
    }
243
    if (con == 8 && !instance_exists(obj_writer))
244
    {
245
        snd_play(snd_rurus_appear);
246
        appear = instance_create(x, y, obj_rurus_appear);
247
        visible = 0;
248
        con = 14;
249
        alarm[4] = 60;
250
    }
251
    if (con == 15)
252
    {
253
        visible = 1;
254
        with (appear)
255
            instance_destroy();
256
        vspeed = 0;
257
        con = 16;
258
        alarm[4] = 21;
259
    }
260
    if (con == 17)
261
    {
262
        global.currentsong[0] = snd_init("ruruskaado.ogg");
263
        global.currentsong[1] = mus_loop(global.currentsong[0]);
264
        snd_pitch(global.currentsong[1], 1.1);
265
        global.fc = 18;
266
        global.fe = 0;
267
        global.typer = 6;
268
        global.msg[0] = 
\E4* Geh ha ha...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_295_0")
;
269
        global.msg[1] = 
* Thoust guys really think that was all I hadst!?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_296_0")
;
270
        global.msg[2] = 
\E1* WRONGE!Delay 11 It's time for you to feel my Reale Powere!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_297_0")
;
271
        global.msg[3] = 
\E2* Behold!Delay 11
* My ULTIMATE Puzzle!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_298_0")
;
272
        d = instance_create(0, 0, obj_dialoguer);
273
        d.side = 1;
274
        con = 18;
275
    }
276
    if (con == 18 && !d_ex())
277
    {
278
        snd_play(snd_power);
279
        fade = 0;
280
        con = 19;
281
        darkfade = scr_marker
scr_marker

function scr_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(-10, -10, spr_pixel_white);
282
        darkfade.image_xscale = 700;
283
        darkfade.image_yscale = 400;
284
        with (darkfade)
285
        {
286
            image_blend = c_white;
287
            depth = -200;
288
        }
289
    }
290
    if (con == 19)
291
    {
292
        fade += 0.1;
293
        darkfade.image_alpha = fade;
294
        if (darkfade.image_alpha >= 1)
295
        {
296
            con = 20;
297
            block = instance_create(340, 240, obj_pushableblock);
298
            block.event = 0;
299
            tile = instance_create(260, 240, obj_blocktile);
300
        }
301
    }
302
    if (con == 20)
303
    {
304
        fade -= 0.1;
305
        darkfade.image_alpha = fade;
306
        if (fade <= 0)
307
        {
308
            with (darkfade)
309
                instance_destroy();
310
            con = 21;
311
            global.msg[0] = 
\E2* HAVE AT YOU!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_341_0")
;
312
            d = instance_create(0, 0, obj_dialoguer);
313
            d.side = 1;
314
        }
315
    }
316
    if (con == 21 && !d_ex())
317
    {
318
        interactable = instance_create(280, 160, obj_readable_room1);
319
        interactable.image_xscale = 4;
320
        interactable.image_yscale = 2;
321
        with (floorwall)
322
            instance_destroy();
323
        global.facing = 0;
324
        with (obj_caterpillarchara)
325
            fun = 0;
326
        global.interact = 0;
327
        con = 25;
328
    }
329
    if (con == 25)
330
    {
331
        if (block.sprite_index == spr_npc_block_solved && global.interact == 0)
332
        {
333
            snd_free_all();
334
            global.interact = 1;
335
            snd_play(snd_won);
336
            with (interactable)
337
                instance_destroy();
338
            with (spikewall1)
339
                instance_destroy();
340
            with (spikewall2)
341
                instance_destroy();
342
            for (i = 0; i < 4; i += 1)
343
                spike[i].image_index = 1;
344
            con = 26;
345
            alarm[4] = 30;
346
        }
347
    }
348
    if (con == 27)
349
    {
350
        global.fc = 18;
351
        global.fe = 1;
352
        global.typer = 6;
353
        global.msg[0] = 
\E1* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_385_0")
;
354
        global.msg[1] = 
\E6* ....................Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_386_0")
;
355
        global.msg[2] = 
\E5* Ahhh...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_387_0")
;
356
        global.msg[3] = 
\E5* Ahh... Ha...!Delay 11
* Ha ha ha!Delay 11
* Gullible worms!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_388_0")
;
357
        global.msg[4] = 
\E5* That wasn'tst REALLY my ultimate puzzle!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_389_0")
;
358
        global.msg[5] = 
\E4* I have a wayst better one right...Delay 11 here!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_390_0")
;
359
        scr_ralface
scr_ralface

function scr_ralface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(6, 1);
360
        global.msg[7] = 
* Can...Delay 11
* Can we see it?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_392_0")
;
361
        d = instance_create(0, 0, obj_dialoguer);
362
        d.side = 1;
363
        con = 28;
364
    }
365
    if (con == 28 && !d_ex())
366
    {
367
        global.fc = 18;
368
        global.fe = 1;
369
        global.typer = 6;
370
        global.msg[0] = 
* NoWait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_rurus_event_slash_Step_0_gml_404_0")
;
371
        d = instance_create(0, 0, obj_dialoguer);
372
        d.side = 1;
373
        hspeed = 12;
374
        con = 29;
375
    }
376
    if (con == 29 && !d_ex())
377
    {
378
        global.interact = 0;
379
        global.facing = 0;
380
        global.flag[218 solved_rouxls_puzz_2] = 1;
381
        scr_tempsave
scr_tempsave

function scr_tempsave() { filechoicebk2 = global.filechoice; global.filechoice = 9; scr_saveprocess(global.filechoice); global.filechoice = filechoicebk2; }
();
382
        con = 30;
383
    }
384
}