Deltarune (Chapter 1) 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[1] =
#Yes
scr_84_get_lang_string("scr_text_slash_scr_text_gml_7_0")
; global.choicemsg[0] =
#No
scr_84_get_lang_string("scr_text_slash_scr_text_gml_8_0")
; global.choicemsg[2] = " "; global.choicemsg[3] = " "; global.msg[0] =
* You really didn't want to throw it away.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_11_0")
; global.msg[1] =
* Throw it away anyway?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_12_0")
; global.msg[2] =
\C2
scr_84_get_lang_string("scr_text_slash_scr_text_gml_13_0")
; break; case 11: if (global.choice == 0) { global.msg[0] =
* You felt a feeling of relief.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_19_0")
; } else { global.msg[0] =
* Hand shaking,Delay 11 you dropped the ball of junk on the ground.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_23_0")
; global.msg[1] =
* It broke into pieces.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_24_0")
; global.msg[2] =
* You felt bitter.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_25_0")
; script_execute(scr_litemshift, global.menucoord[1], 0); for (i = 0; i < 12; i += 1) { global.item[i] = 0; global.weapon[i] = 0; global.armor[i] = 0; } } break; case 100: global.msg[0] =
* Hey, Kris!Delay 11 What's up?Delay 11
* Didja lose your pencil again?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_38_0")
; global.msg[1] =
\E4* Here,Delay 11 you want the candy-cane one or the one with lights on it?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_39_0")
; global.msg[2] =
\E1* Huh?Delay 11
* You want to be partners?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_40_0")
; global.msg[3] =
\E4* Ummm...Delay 11 Sorry...Delay 11
* Berdly already asked me...Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_41_0")
; global.msg[4] =
\E0* But I could ask Ms. Alphys if we could make a group of 3!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_42_0")
; global.msg[5] =
\E4* I'll ask if you're sure!

Not yet Yes. Ask.\C1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_43_0")
; global.msg[6] = " "; break; case 101: if (global.choice == 1) { global.msg[0] =
\E0* OK,Delay 11 I'll ask!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_50_0")
; global.msg[1] =
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_51_0")
; with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] =
\E4* Yeah,Delay 11 I'm sure there's someone else you can ask!Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_56_0")
; break; case 102: global.msg[0] =
\E0* Do you wanna be partners?
Not yet Yes\C1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_61_0")
; global.msg[1] = " "; break; case 103: if (global.choice == 1) { global.msg[0] =
\E0* OK,Delay 11 I'll ask!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_68_0")
; global.msg[1] =
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_69_0")
; with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] =
\E4* Umm,Delay 11 OK.Delay 11
* You just keep doing your thing,Delay 11 Kris.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_74_0")
; break; case 104: global.msg[0] =
\E0* Alright.Delay 11
* Let's get this over with.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_79_0")
; global.msg[1] =
* We'll get more chalk.Delay 11
* Mosey back to class.Delay 11
* And then,Delay 11 Kris...Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_80_0")
; global.msg[2] =
\E2* YOU'LL do our project.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_81_0")
; global.msg[3] =
* How's that sound?

Good Bad\C1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_82_0")
; global.msg[4] = " "; break; case 105: global.msg[0] = " %%"; break; case 110: global.choicemsg[0] =
#Yes
scr_84_get_lang_string("scr_text_slash_scr_text_gml_91_0")
; global.choicemsg[1] =
#No
scr_84_get_lang_string("scr_text_slash_scr_text_gml_92_0")
; global.choicemsg[2] = " "; global.choicemsg[3] = " "; if (global.flag[100 got_glowshard] == 0) { global.msg[0] =
* (There's something glowing inside.)Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_97_0")
; global.msg[1] =
* (Take it?)Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_98_0")
; global.msg[2] =
\C2
scr_84_get_lang_string("scr_text_slash_scr_text_gml_99_0")
; } else { global.msg[0] =
* (It's dark inside.)Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_103_0")
; } break; case 111: if (global.choice == 0) { global.msg[0] =
* (You got the Glowshard.)Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_111_0")
; global.flag[100 got_glowshard] = 1; scr_itemget(3); ...
(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[1] =
#Yes
scr_84_get_lang_string("scr_text_slash_scr_text_gml_7_0")
; global.choicemsg[0] =
#No
scr_84_get_lang_string("scr_text_slash_scr_text_gml_8_0")
; global.choicemsg[2] = " "; global.choicemsg[3] = " "; global.msg[0] =
* You really didn't want to throw it away.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_11_0")
; global.msg[1] =
* Throw it away anyway?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_12_0")
; global.msg[2] =
\C2
scr_84_get_lang_string("scr_text_slash_scr_text_gml_13_0")
; break; case 11: if (global.choice == 0) { global.msg[0] =
* You felt a feeling of relief.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_19_0")
; } else { global.msg[0] =
* Hand shaking,Delay 11 you dropped the ball of junk on the ground.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_23_0")
; global.msg[1] =
* It broke into pieces.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_24_0")
; global.msg[2] =
* You felt bitter.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_25_0")
; script_execute(scr_litemshift, global.menucoord[1], 0); for (i = 0; i < 12; i += 1) { global.item[i] = 0; global.weapon[i] = 0; global.armor[i] = 0; } } break; case 100: global.msg[0] =
* Hey, Kris!Delay 11 What's up?Delay 11
* Didja lose your pencil again?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_38_0")
; global.msg[1] =
\E4* Here,Delay 11 you want the candy-cane one or the one with lights on it?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_39_0")
; global.msg[2] =
\E1* Huh?Delay 11
* You want to be partners?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_40_0")
; global.msg[3] =
\E4* Ummm...Delay 11 Sorry...Delay 11
* Berdly already asked me...Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_41_0")
; global.msg[4] =
\E0* But I could ask Ms. Alphys if we could make a group of 3!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_42_0")
; global.msg[5] =
\E4* I'll ask if you're sure!

Not yet Yes. Ask.\C1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_43_0")
; global.msg[6] = " "; break; case 101: if (global.choice == 1) { global.msg[0] =
\E0* OK,Delay 11 I'll ask!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_50_0")
; global.msg[1] =
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_51_0")
; with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] =
\E4* Yeah,Delay 11 I'm sure there's someone else you can ask!Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_56_0")
; break; case 102: global.msg[0] =
\E0* Do you wanna be partners?
Not yet Yes\C1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_61_0")
; global.msg[1] = " "; break; case 103: if (global.choice == 1) { global.msg[0] =
\E0* OK,Delay 11 I'll ask!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_68_0")
; global.msg[1] =
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_69_0")
; with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] =
\E4* Umm,Delay 11 OK.Delay 11
* You just keep doing your thing,Delay 11 Kris.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_74_0")
; break; case 104: global.msg[0] =
\E0* Alright.Delay 11
* Let's get this over with.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_79_0")
; global.msg[1] =
* We'll get more chalk.Delay 11
* Mosey back to class.Delay 11
* And then,Delay 11 Kris...Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_80_0")
; global.msg[2] =
\E2* YOU'LL do our project.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_81_0")
; global.msg[3] =
* How's that sound?

Good Bad\C1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_82_0")
; global.msg[4] = " "; break; case 105: global.msg[0] = " %%"; break; case 110: global.choicemsg[0] =
#Yes
scr_84_get_lang_string("scr_text_slash_scr_text_gml_91_0")
; global.choicemsg[1] =
#No
scr_84_get_lang_string("scr_text_slash_scr_text_gml_92_0")
; global.choicemsg[2] = " "; global.choicemsg[3] = " "; if (global.flag[100 got_glowshard] == 0) { global.msg[0] =
* (There's something glowing inside.)Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_97_0")
; global.msg[1] =
* (Take it?)Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_98_0")
; global.msg[2] =
\C2
scr_84_get_lang_string("scr_text_slash_scr_text_gml_99_0")
; } else { global.msg[0] =
* (It's dark inside.)Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_103_0")
; } break; case 111: if (global.choice == 0) { global.msg[0] =
* (You got the Glowshard.)Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_111_0")
; global.flag[100 got_glowshard] = 1; scr_itemget(3); ...
(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] = 
* (They just closed the blinds...)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_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] = 
* (You flushed the toilet!)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_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)
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] = scr_84_get_subst_string(
\TX \F0 \E~1 \FT \TT Close Message
scr_84_get_lang_string("scr_torface_slash_scr_torface_gml_1_0")
, string(arg1)); }
(0, 1);
155
            global.msg[1] = 
* Kris...?Delay 11
* Is everything...Delay 11 alright in 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_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] = scr_84_get_subst_string(
\TX \F0 \E~1 \FT \TT Close Message
scr_84_get_lang_string("scr_torface_slash_scr_torface_gml_1_0")
, string(arg1)); }
(0, 3);
160
            global.msg[1] = 
* Kris,Delay 11 WHAT are you doing?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_town_event_slash_Step_0_gml_191_0")
;
161
            global.msg[2] = 
* You did not put a bath bomb in the toilet again,Delay 11 did 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_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] = scr_84_get_subst_string(
\TX \F0 \E~1 \FT \TT Close Message
scr_84_get_lang_string("scr_torface_slash_scr_torface_gml_1_0")
, string(arg1)); }
(0, 5);
166
            global.msg[1] = 
* Kris,Delay 11 if anything bad happens,Delay 11 you are paying for the plumbing bill.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_town_event_slash_Step_0_gml_197_0")
;
167
        }
168
        instance_create(0, 0, obj_dialoguer);
169
        con = 63;
170
        specflush = 0;
171
    }
172
}