Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_swordroute_consolestarter_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    timer = 0;
4
    buff--;
5
}
6
var _krx = 300;
7
var _kry = 298;
8
if (con == 0 || con == 99999)
9
{
10
    global.flag[7 disable_menu?] = 0;
11
    with (obj_gameshow_swordroute)
12
    {
13
        depth = 999980;
14
        bg.depth = 999994;
15
        gameconsole.depth = 999985;
16
    }
17
    depth = 999980;
18
    with (obj_board_controller)
19
        depth = 999980;
20
    with (obj_marker)
21
    {
22
        if (x == 0 && y == 380)
23
            depth = 999979;
24
    }
25
    with (obj_mainchara)
26
    {
27
        ignoredepth = 1;
28
        depth = 999979;
29
    }
30
}
31
else
32
{
33
    global.flag[7 disable_menu?] = 1;
34
    with (obj_gameshow_swordroute)
35
    {
36
        depth = 5000;
37
        bg.depth = 99994;
38
        gameconsole.depth = 99985;
39
    }
40
    with (obj_mainchara)
41
        ignoredepth = 0;
42
    with (obj_board_controller)
43
        depth = 99900;
44
}
45
if (con == 1)
46
{
47
    global.interact = 1;
48
    timer++;
49
    if (timer == 1)
50
    {
51
        depth = 100000;
52
        with (kris)
53
        {
54
            fun = 1;
55
            var dist = round(abs(_krx - x) / 2);
56
            other.walktime = dist;
57
            debug_message("dist=" + string(dist));
58
            if (dist > 0)
59
            {
60
                
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
(_krx, _kry, dist);
61
                if (x < _krx)
62
                    sprite_index = spr_krisr_dark;
63
                else
64
                    sprite_index = spr_krisl_dark;
65
                image_speed = 0.25;
66
            }
67
        }
68
    }
69
    if (timer >= (1 + walktime))
70
    {
71
        kris.x = _krx;
72
        kris.y = _kry;
73
        kris.image_speed = 0;
74
        kris.image_index = 0;
75
        kris.sprite_index = spr_krisu_dark;
76
        timer = 0;
77
        con = 2;
78
        if (specialskip == 1)
79
            con = 120;
80
    }
81
}
82
if (con == 2)
83
{
84
    
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
85
    global.msc = 1252;
86
    
scr_text
scr_text

function
scr_text(arg0)
{ switch (arg0) { case 0: break; case 10: global.choicemsg[0] = stringsetloc(
#Yes
"#Yes", "scr_text_slash_scr_text_gml_8_0"
);
global.choicemsg[1] = stringsetloc(
#No
"#No", "scr_text_slash_scr_text_gml_9_0"
);
global.choicemsg[2] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_12_0_b"
);
global.choicemsg[3] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_13_0_b"
);
global.msg[0] = stringsetloc(
* You really didn't want to throw it away.Wait for input
"* You really didn't want to throw it away./", "scr_text_slash_scr_text_gml_12_0"
);
global.msg[1] = stringsetloc(
* Throw it away anyway?Wait for input
"* Throw it away anyway?/", "scr_text_slash_scr_text_gml_13_0"
);
global.msg[2] = stringsetloc(
Choice type 2
"\\C2 ", "scr_text_slash_scr_text_gml_14_0"
);
if (global.chapter >= 2) msgsetloc(0,
* You took it from your pocket.Delay 11
* You have a very,Delay 11 very,Delay 11 bad feeling about throwing it away.Wait for input
"* You took it from your pocket^1.&* You have a \\cYvery^1, very^1, bad feeling\\c0 about throwing it away./", "scr_text_slash_scr_text_gml_19_0"
);
break; case 11: if (global.choice == 0) { global.flag[466 junkball_dropped] = 1; snd_play(snd_bageldefeat); global.msg[0] = stringsetloc(
* Hand shaking,Delay 11 you dropped the ball of junk on the ground.Wait for input
"* Hand shaking^1, you dropped the ball of junk on the ground./", "scr_text_slash_scr_text_gml_20_0"
);
global.msg[1] = stringsetloc(
* It broke into pieces.Wait for input
"* It broke into pieces./", "scr_text_slash_scr_text_gml_21_0"
);
global.msg[2] = stringsetloc(
* You felt bitter.Wait for inputClose Message
"* You felt bitter./%", "scr_text_slash_scr_text_gml_22_0"
);
script_execute(scr_litemshift, global.menucoord[1], 0); for (var i = 0; i < 12; i += 1) global.item[i] = 0; for (var i = 0; i < 48; i += 1) { global.armor[i] = 0; global.weapon[i] = 0; } } else { global.msg[0] = stringsetloc(
* You felt a feeling of relief.Wait for inputClose Message
"* You felt a feeling of relief./%", "scr_text_slash_scr_text_gml_34_0"
);
} break; case 100: global.msg[0] = stringsetloc(
* Hey, Kris!Delay 11 What's up?Delay 11
* Didja lose your pencil again?Wait for input
"* Hey, Kris^1! What's up^1?&* Didja lose your pencil again?/", "scr_text_slash_scr_text_gml_39_0"
);
global.msg[1] = stringsetloc(
Face 4* Here,Delay 11 you want the candy-cane one or the one with lights on it?Wait for input
"\\E4* Here^1, you want the candy-cane one or the one with lights on it?/", "scr_text_slash_scr_text_gml_40_0"
);
global.msg[2] = stringsetloc(
Face 1* Huh?Delay 11
* You want to be partners?Wait for input
"\\E1* Huh^1?&* You want to be partners?/", "scr_text_slash_scr_text_gml_41_0"
);
global.msg[3] = stringsetloc(
Face 4* Ummm...Delay 11 Sorry...Delay 11
* Berdly already asked me...Wait for input
"\\E4* Ummm..^1. Sorry..^1.&* Berdly already asked me.../", "scr_text_slash_scr_text_gml_42_0"
);
global.msg[4] = stringsetloc(
Face 0* But I could ask Ms. Alphys if we could make a group of 3!Wait for input
"\\E0* But I could ask Ms. Alphys if we could make a group of 3!/", "scr_text_slash_scr_text_gml_43_0"
);
global.msg[5] = stringsetloc(
Face 4* I'll ask if you're sure!

Not yet Yes. Ask.Choice type 1
"\\E4* I'll ask if you're sure!& &Not yet Yes. Ask.\\C1 ", "scr_text_slash_scr_text_gml_44_0"
);
global.msg[6] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_47_0"
);
break; case 101: if (global.choice == 1) { global.msg[0] = stringsetloc(
Face 0* OK,Delay 11 I'll ask!Wait for input
"\\E0* OK^1, I'll ask!/", "scr_text_slash_scr_text_gml_51_0"
);
global.msg[1] = stringsetloc(
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
"* Miss Alphys^1!&* Umm^1, is it OK if we have a group of 3?/%", "scr_text_slash_scr_text_gml_52_0"
);
with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] = stringsetloc(
Face 4* Yeah,Delay 11 I'm sure there's someone else you can ask!Wait for inputClose Message
"\\E4* Yeah^1, I'm sure there's someone else you can ask!/%", "scr_text_slash_scr_text_gml_57_0"
);
break; case 102: global.msg[0] = stringsetloc(
Face 0* Do you wanna be partners?
Not yet YesChoice type 1
"\\E0* Do you wanna be partners?&Not yet Yes\\C1 ", "scr_text_slash_scr_text_gml_62_0"
);
global.msg[1] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_65_0"
);
break; case 103: if (global.choice == 1) { global.msg[0] = stringsetloc(
Face 0* OK,Delay 11 I'll ask!Wait for input
"\\E0* OK^1, I'll ask!/", "scr_text_slash_scr_text_gml_69_0"
);
global.msg[1] = stringsetloc(
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
"* Miss Alphys^1!&* Umm^1, is it OK if we have a group of 3?/%", "scr_text_slash_scr_text_gml_70_0"
);
with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] = stringsetloc(
Face 4* Umm,Delay 11 OK.Delay 11
* You just keep doing your thing,Delay 11 Kris.Wait for inputClose Message
"\\E4* Umm^1, OK^1.&* You just keep doing your thing^1, Kris./%", "scr_text_slash_scr_text_gml_75_0"
);
break; case 104: global.msg[0] = stringsetloc(
Face 0* Alright.Delay 11
* Let's get this over with.Wait for input
"\\E0* Alright^1.&* Let's get this over with./", "scr_text_slash_scr_text_gml_80_0"
);
global.msg[1] = stringsetloc(
* We'll get more chalk.Delay 11
* Mosey back to class.Delay 11
* And then,Delay 11 Kris...Wait for input
"* We'll get more chalk^1.&* Mosey back to class^1.&* And then^1, Kris.../", "scr_text_slash_scr_text_gml_81_0"
);
global.msg[2] = stringsetloc(
Face 2* YOU'LL do our project.Wait for input
"\\E2* YOU'LL do our project./", "scr_text_slash_scr_text_gml_82_0"
);
global.msg[3] = stringsetloc(
* How's that sound?

Good BadChoice type 1
"* How's that sound?& &Good Bad\\C1 ", "scr_text_slash_scr_text_gml_83_0"
);
global.msg[4] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_86_0"
);
break; case 105: global.msg[0] = stringsetloc(
Close MessageClose Message
" %%", "scr_text_slash_scr_text_gml_90_0"
);
break; case 110: global.choicemsg[0] = stringsetloc(
#Yes
"#Yes", "scr_text_slash_scr_text_gml_92_0"
);
global.choicemsg[1] = stringsetloc(
#No
"#No", "scr_text_slash_scr_text_gml_93_0"
);
global.choicemsg[2] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_96_0"
);
global.choicemsg[3] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_97_0"
);
if (global.flag[100 got_glowshard] == 0) { global.msg[0] = stringsetloc(
* (There's something glowing inside.)Wait for input
"* (There's something glowing inside.)/", "scr_text_slash_scr_text_gml_98_0"
);
global.msg[1] = stringsetloc(
* (Take it?)Wait for input
"* (Take it?)/ ", "scr_text_slash_scr_text_gml_99_0"
);
global.msg[2] = stringsetloc(
Choice type 2
" \\C2", "scr_text_slash_scr_text_gml_100_0"
);
} else { global.msg[0] = stringsetloc(
* (It's dark inside.)Wait for inputClose Message
"* (It's dark inside.)/%", "scr_text_slash_scr_text_gml_104_0"
);
} break; case 111: ...
(global.msc);
87
    d_make();
88
    con = 3;
89
}
90
if (con == 3 && !i_ex(obj_choicer_neo) && !d_ex())
91
{
92
    timer = 0;
93
    if (global.choice == 0)
94
    {
95
        if (ver == 0)
96
            con = 10;
97
    }
98
    if (global.choice == 1)
99
    {
100
        kris.fun = 0;
101
        global.facing = 0;
102
        global.interact = 0;
103
        con = 0;
104
        buff = 3;
105
    }
106
}
107
if (con == 10)
108
{
109
    timer++;
110
    if (timer == 1)
111
    {
112
        depth = 100000;
113
        obj_board_controller.drawcrt = true;
114
        snd_play(snd_tv_poweron2);
115
        draw_green_intro = true;
116
    }
117
    if (timer == 31)
118
    {
119
        draw_green_intro = false;
120
        draw_blue = true;
121
    }
122
    if (timer == 55)
123
    {
124
        draw_blue = false;
125
        draw_green = true;
126
    }
127
    if (timer == 77)
128
    {
129
        draw_blue = true;
130
        draw_green = false;
131
    }
132
    if (timer == 100)
133
    {
134
        draw_blue = false;
135
        with (obj_gameshow_swordroute)
136
            screencolor = c_black;
137
        if (standalone == 1)
138
            instance_destroy();
139
    }
140
    if (timer == 110)
141
    {
142
        if (standalone == 2)
143
            snd_play(snd_nes_intro_extended);
144
        else
145
            snd_play(snd_nes_intro);
146
        drawlogo = true;
147
        logocolor = merge_color(c_black, #1F289F, 0);
148
        createstars = 1;
149
    }
150
    if (timer == 111)
151
    {
152
        if (standalone == 2)
153
        {
154
            timer = 0;
155
            con = 10.1;
156
            with (obj_GSA02_B0)
157
                con = 2;
158
        }
159
    }
160
    if (timer == 154)
161
    {
162
        drawboxcolor = true;
163
        drawcolor = #1B2063;
164
        logocolor = merge_color(c_black, #1F289F, 0.4);
165
    }
166
    if (timer == 174)
167
    {
168
        drawboxcolor = true;
169
        drawcolor = #2F38B0;
170
        logocolor = merge_color(c_black, #1F289F, 1);
171
    }
172
    if (timer == 194)
173
        drawboxcolor = true;
174
    if (timer == 214)
175
    {
176
        createstars = 2;
177
        snd_free_all();
178
        drawboxcolor = false;
179
        drawlogo = false;
180
        draw_blue = true;
181
        controllerprompt = true;
182
        snd_play(snd_nes_nocontroller);
183
    }
184
    if (timer >= 274)
185
    {
186
        snd_free_all();
187
        timer = 0;
188
        var havecontroller = 
scr_keyitemcheck
scr_keyitemcheck

function
scr_keyitemcheck(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 12; i += 1) { if (global.keyitem[i] == arg0) haveit = 1; if (global.keyitem[i] == arg0) itemcount += 1; } return haveit; }
(16);
189
        if (havecontroller)
190
        {
191
            con = 12;
192
        }
193
        else
194
        {
195
            con = 11;
196
            if (global.flag[1176 oddcontroller_state] == 0)
197
                global.flag[1176 oddcontroller_state] = 1;
198
        }
199
    }
200
}
201
if (con == 11)
202
{
203
    timer++;
204
    if (timer == 1)
205
    {
206
        controllerprompt = false;
207
        draw_static = true;
208
        snd_play(snd_tv_static);
209
    }
210
    if (timer == 10)
211
    {
212
        snd_stop(snd_tv_static);
213
        obj_board_controller.drawcrt = false;
214
        draw_blue = false;
215
        draw_static = false;
216
        drawlogo = false;
217
        controllerprompt = false;
218
        draw_green = false;
219
        boxy = 0;
220
        draw_green_intro = false;
221
        screenlerp = false;
222
        drawboxcolor = false;
223
        drawcolor = c_black;
224
        startimer = 0;
225
        starindex = 0;
226
        draw_stars = 0;
227
        logoalpha = 0;
228
        with (obj_gameshow_swordroute)
229
            screencolor = c_black;
230
        controllerprompt = false;
231
    }
232
    if (timer == 40)
233
    {
234
        con = 0;
235
        obj_mainchara.fun = 0;
236
        global.facing = 0;
237
        with (obj_mainchara)
238
        {
239
            walktimer = 0;
240
            setxy(300, 298);
241
        }
242
        global.interact = 0;
243
        timer = 0;
244
    }
245
}
246
if (con == 120)
247
    room_goto(roomtogoto);
248
if (con == 12)
249
{
250
}
251
if (createstars == 1)
252
{
253
    startimer++;
254
    if ((startimer % 4) == 0)
255
    {
256
        var vxx = board_tilex(irandom(22) / 2);
257
        var vyy = board_tiley(irandom(14) / 2);
258
        var star = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(vxx, vyy, spr_5x5shine, 0.125, depth - 1, 2, true);
259
    }
260
}
261
if (createstars == 2)
262
{
263
    with (obj_board_marker)
264
        instance_destroy();
265
    createstars = 3;
266
}