Deltarune script viewer

← back to main script listing

gml_Object_obj_town_event_Step_0

(view raw script w/o annotations or w/e)
1
if (room == room_town_mid)
2
{
3
    if (con == 20 && !d_ex())
4
    {
5
        alarm[4] = 5;
6
        con = 21;
7
    }
8
    if (con == 21)
9
        global.interact = 1;
10
    if (con == 22)
11
    {
12
        global.interact = 1;
13
        banim = 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; }
(bnpc.x - 1, bnpc.y - 14, spr_npc_icemascot_takeoff);
14
        banim.depth = bnpc.depth;
15
        with (bnpc)
16
            visible = 0;
17
        with (banim)
18
            image_speed = 0.334;
19
        con = 23;
20
        alarm[4] = 36;
21
    }
22
    if (con == 24)
23
    {
24
        with (bnpc)
25
            instance_destroy();
26
        bnpc = instance_create(banim.x + 9, banim.y + 18, obj_npc_room);
27
        with (bnpc)
28
            sprite_index = spr_npc_burgerpants;
29
        with (banim)
30
            instance_destroy();
31
        con = 25;
32
        alarm[4] = 20;
33
    }
34
    if (con == 26)
35
    {
36
        global.fc = 19;
37
        global.typer = 5;
38
        global.fe = 0;
39
        global.msc = 340;
40
        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 (i = 0; i < 12; i += 1) global.item[i] = 0; for (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);
41
        con = 27;
42
        instance_create(0, 0, obj_dialoguer);
43
    }
44
    if (con == 27 && !d_ex())
45
    {
46
        global.interact = 0;
47
        con = 28;
48
        if (global.flag[271 talk_pizzapants] == 0)
49
            global.flag[271 talk_pizzapants] = 1;
50
    }
51
    if (con == 70 && global.flag[273 talked_to_sans] == 1)
52
    {
53
        if (global.interact == 0)
54
        {
55
            if (obj_mainchara.x <= 1060 || obj_mainchara.x >= 1200 || obj_mainchara.y >= 120)
56
            {
57
                global.interact = 1;
58
                if (obj_mainchara.x <= 1060)
59
                    global.facing = 1;
60
                if (obj_mainchara.x >= 1200)
61
                    global.facing = 3;
62
                if (obj_mainchara.y >= 120)
63
                    global.facing = 2;
64
                con = 71;
65
                global.typer = 14;
66
                global.fc = 6;
67
                global.fe = 0;
68
                global.msc = 380;
69
                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 (i = 0; i < 12; i += 1) global.item[i] = 0; for (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);
70
                instance_create(0, 0, obj_dialoguer);
71
            }
72
        }
73
    }
74
    if (con == 71 && !d_ex())
75
    {
76
        con = 72;
77
        global.flag[273 talked_to_sans] = 2;
78
        global.interact = 0;
79
        global.facing = 0;
80
    }
81
}
82
if (room == room_town_south)
83
{
84
    if (con == 50 && !d_ex())
85
    {
86
        snd_play(snd_noise);
87
        con = 51;
88
        alarm[4] = 28;
89
    }
90
    if (con == 51)
91
    {
92
        global.interact = 1;
93
        with (policewindow)
94
            image_index += 0.1;
95
    }
96
    if (con == 52)
97
    {
98
        global.msg[0] = stringsetloc(
* (They just closed the blinds...)Wait for inputClose Message
"* (They just closed the blinds...)/%", "obj_town_event_slash_Step_0_gml_120_0"
);
99
        instance_create(0, 0, obj_dialoguer);
100
        con = 53;
101
    }
102
    if (con == 53 && !d_ex())
103
    {
104
        global.interact = 0;
105
        global.facing = 0;
106
        con = 55;
107
    }
108
}
109
if (room == room_torbathroom)
110
{
111
    if (con == 60 && !d_ex())
112
    {
113
        snd_pause(global.currentsong[1]);
114
        snd_play(snd_toilet);
115
        con = 61;
116
        alarm[4] = 30;
117
    }
118
    if (con == 61)
119
        global.interact = 1;
120
    if (con == 62)
121
    {
122
        specflush = 0;
123
        snd_play(snd_won);
124
        flush += 1;
125
        global.msg[0] = stringsetloc(
* (You flushed the toilet!)Wait for inputClose Message
"* (You flushed the toilet!)/%", "obj_town_event_slash_Step_0_gml_157_0"
);
126
        if (flush == 3)
127
            specflush = 1;
128
        if (flush == 6)
129
            specflush = 2;
130
        if (flush == 9)
131
            specflush = 3;
132
        instance_create(0, 0, obj_dialoguer);
133
        con = 63;
134
        if (specflush > 0 && global.plot >= 210)
135
            con = 67;
136
    }
137
    if (con == 63 && !d_ex())
138
    {
139
        snd_resume(global.currentsong[1]);
140
        con = 64;
141
        global.interact = 0;
142
        global.facing = 0;
143
    }
144
    if (con == 67 && !d_ex())
145
    {
146
        snd_play(snd_knock);
147
        con = 68;
148
        alarm[4] = 30;
149
    }
150
    if (con == 69)
151
    {
152
        if (specflush == 1)
153
        {
154
            scr_torface
scr_torface

function scr_torface(arg0, arg1) { global.msg[arg0] = stringsetsubloc("\\TX \\F0 \\E~1 \\FT \\TT %", string(arg1), "scr_torface_slash_scr_torface_gml_1_0"); }
(0, 1);
155
            global.msg[1] = stringsetloc(
* Kris...?Delay 11
* Is everything...Delay 11 alright in there?Wait for inputClose Message
"* Kris...^1?&* Is everything..^1. alright in there?/%", "obj_town_event_slash_Step_0_gml_186_0"
);
156
        }
157
        if (specflush == 2)
158
        {
159
            scr_torface
scr_torface

function scr_torface(arg0, arg1) { global.msg[arg0] = stringsetsubloc("\\TX \\F0 \\E~1 \\FT \\TT %", string(arg1), "scr_torface_slash_scr_torface_gml_1_0"); }
(0, 3);
160
            global.msg[1] = stringsetloc(
* Kris,Delay 11 WHAT are you doing?Wait for input
"* Kris^1, WHAT are you doing?/", "obj_town_event_slash_Step_0_gml_191_0"
);
161
            global.msg[2] = stringsetloc(
* You did not put a bath bomb in the toilet again,Delay 11 did you?Wait for inputClose Message
"* You did not put a bath bomb in the toilet again^1, did you?/%", "obj_town_event_slash_Step_0_gml_192_0"
);
162
        }
163
        if (specflush == 3)
164
        {
165
            scr_torface
scr_torface

function scr_torface(arg0, arg1) { global.msg[arg0] = stringsetsubloc("\\TX \\F0 \\E~1 \\FT \\TT %", string(arg1), "scr_torface_slash_scr_torface_gml_1_0"); }
(0, 5);
166
            global.msg[1] = stringsetloc(
* Kris,Delay 11 if anything bad happens,Delay 11 you are paying for the plumbing bill.Wait for inputClose Message
"* Kris^1, if anything bad happens^1, you are paying for the plumbing bill./%", "obj_town_event_slash_Step_0_gml_197_0"
);
167
        }
168
        instance_create(0, 0, obj_dialoguer);
169
        con = 63;
170
        specflush = 0;
171
    }
172
}