Deltarune script viewer

← back to main script listing

gml_Object_obj_overworldc_Step_0

(view raw script w/o annotations or w/e)
1
hasitems = global.litem[0] != 0;
2
if (global.interact == 5)
3
{
4
    currentmenu = global.menuno;
5
    if (global.menuno < 6)
6
        currentspot = global.menucoord[global.menuno];
7
    if (button1_p())
8
    {
9
        if (global.menuno == 5)
10
        {
11
            if (global.menucoord[5] == 0)
12
            {
13
                global.menuno = 9;
14
                script_execute(scr_litemuseb, global.menucoord[1], global.litem[global.menucoord[1]]);
15
            }
16
            if (global.menucoord[5] == 1)
17
            {
18
                global.menuno = 9;
19
                script_execute(scr_litemdesc, global.litem[global.menucoord[1]]);
20
                script_execute(scr_writetext, 0, "x", 0, 0);
21
            }
22
            if (global.menucoord[5] == 2)
23
            {
24
                dontthrow = 0;
25
                dontthrowtype = 0;
26
                global.menuno = 9;
27
                if (global.litem[global.menucoord[1]] == 5)
28
                    dontthrow = 1;
29
                if (global.litem[global.menucoord[1]] == 9)
30
                {
31
                    dontthrow = 1;
32
                    dontthrowtype = 1;
33
                }
34
                if (global.litem[global.menucoord[1]] == 11)
35
                {
36
                    dontthrow = 1;
37
                    dontthrowtype = 2;
38
                }
39
                if (dontthrow == 0)
40
                {
41
                    i = round(random(30));
42
                    if (i == 0)
43
                        global.msg[0] = stringsetsubloc("* You bid a quiet farewell to the ~1.", global.litemname[global.menucoord[1]], "obj_overworldc_slash_Step_0_gml_34_0_b");
44
                    if (i == 1)
45
                        global.msg[0] = stringsetsubloc("* You put the ~1 on the ground and gave it a little pat.", global.litemname[global.menucoord[1]], "obj_overworldc_slash_Step_0_gml_34_0");
46
                    if (i == 2)
47
                        global.msg[0] = stringsetsubloc("* You threw the ~1 on the ground like the piece of trash it is.", global.litemname[global.menucoord[1]], "obj_overworldc_slash_Step_0_gml_36_0");
48
                    if (i == 3)
49
                        global.msg[0] = stringsetsubloc("* You abandoned the ~1.", global.litemname[global.menucoord[1]], "obj_overworldc_slash_Step_0_gml_38_0_b");
50
                    if (i > 3)
51
                        global.msg[0] = stringsetsubloc("* The ~1 was thrown away.", global.litemname[global.menucoord[1]], "obj_overworldc_slash_Step_0_gml_38_0");
52
                    global.msg[0] += "/%";
53
                    if (global.litem[global.menucoord[1]] == 8)
54
                    {
55
                        global.msg[0] = stringsetloc(
* What Egg?Wait for inputClose Message
"* What Egg?/%", "obj_overworldc_slash_Step_0_gml_42_0"
);
56
                        if (global.flag[263 fridge_egg_status] == 0)
57
                            global.flag[263 fridge_egg_status] = 1;
58
                    }
59
                    script_execute(scr_writetext, 0, "x", 0, 0);
60
                    script_execute(scr_litemshift, global.menucoord[1], 0);
61
                }
62
                if (dontthrow == 1)
63
                {
64
                    if (dontthrowtype == 0)
65
                    {
66
                        global.msc = 10;
67
                        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);
68
                        script_execute(scr_writetext, 10, "x", 0, 0);
69
                    }
70
                    else if (dontthrowtype == 1)
71
                    {
72
                        msgsetloc(0, 
* (You fumbled and caught them.Delay 11 You can't throw these away!)Wait for inputClose Message
"* (You fumbled and caught them^1. You can't throw these away!)/%", "obj_overworldc_slash_Step_0_gml_61_0"
);
73
                        script_execute(scr_writetext, 0, "x", 0, 0);
74
                    }
75
                    else if (dontthrowtype == 2)
76
                    {
77
                        msgsetloc(0, 
* (You didn't quite understand why...)Wait for input
"* (You didn't quite understand why...)/", "obj_overworldc_slash_Step_0_gml_66_0"
);
78
                        msgnextloc(
* (But, the thought of discarding it felt very wrong.)Wait for inputClose Message
"* (But, the thought of discarding it felt very wrong.)/%", "obj_overworldc_slash_Step_0_gml_67_0"
);
79
                        script_execute(scr_writetext, 0, "x", 0, 0);
80
                    }
81
                }
82
            }
83
        }
84
        if (global.menuno == 3)
85
        {
86
            global.menuno = 9;
87
            script_execute(scr_litemuseb, global.menucoord[3], global.phone[global.menucoord[3]]);
88
        }
89
        if (global.menuno == 1)
90
        {
91
            global.menuno = 5;
92
            global.menucoord[5] = 0;
93
        }
94
        if (global.menuno == 0)
95
            global.menuno += (global.menucoord[0] + 1);
96
        if (global.menuno == 3)
97
        {
98
            script_execute(scr_phonename);
99
            global.menucoord[3] = 0;
100
        }
101
        if (global.menuno == 1)
102
        {
103
            if (global.litem[0] != 0)
104
            {
105
                global.menucoord[1] = 0;
106
                script_execute(scr_litemname);
107
            }
108
            else
109
            {
110
                global.menuno = 0;
111
            }
112
        }
113
    }
114
    if (up_p())
115
    {
116
        if (global.menuno == 0)
117
        {
118
            if (global.menucoord[0] != 0)
119
                global.menucoord[0] -= 1;
120
        }
121
        if (global.menuno == 1)
122
        {
123
            if (global.menucoord[1] != 0)
124
                global.menucoord[1] -= 1;
125
        }
126
        if (global.menuno == 3)
127
        {
128
            if (global.menucoord[3] != 0)
129
                global.menucoord[3] -= 1;
130
        }
131
    }
132
    if (down_p())
133
    {
134
        if (global.menuno == 0)
135
        {
136
            if (global.menucoord[0] != 2)
137
                global.menucoord[0] += 1;
138
        }
139
        if (global.menuno == 1)
140
        {
141
            if (global.menucoord[1] != 7)
142
            {
143
                if (global.litem[global.menucoord[1] + 1] != 0)
144
                    global.menucoord[1] += 1;
145
            }
146
        }
147
        if (global.menuno == 3)
148
        {
149
            if (global.menucoord[3] != 7)
150
            {
151
                if (global.phone[global.menucoord[3] + 1] != 0)
152
                    global.menucoord[3] += 1;
153
            }
154
        }
155
    }
156
    if (button2_p() && buffer >= 0)
157
    {
158
        if (global.menuno == 0)
159
        {
160
            global.menuno = -1;
161
            global.interact = 0;
162
        }
163
        else if (global.menuno <= 3)
164
        {
165
            global.menuno = 0;
166
        }
167
        if (global.menuno == 5)
168
            global.menuno = 1;
169
    }
170
    if (right_p())
171
    {
172
        if (global.menuno == 5)
173
        {
174
            if (global.menucoord[5] != 2)
175
                global.menucoord[5] += 1;
176
        }
177
    }
178
    if (left_p())
179
    {
180
        if (global.menuno == 5)
181
        {
182
            if (global.menucoord[5] != 0)
183
                global.menucoord[5] -= 1;
184
        }
185
    }
186
    if (button3_p() && threebuffer <= 0)
187
    {
188
        if (global.menuno == 0)
189
        {
190
            global.menuno = -1;
191
            global.interact = 0;
192
            with (obj_mainchara)
193
                threebuffer = 2;
194
        }
195
    }
196
    if (currentmenu < global.menuno && global.menuno != 9)
197
    {
198
        selnoise = 1;
199
    }
200
    else if (global.menuno >= 0 && global.menuno < 6)
201
    {
202
        if (currentspot != global.menucoord[global.menuno])
203
            movenoise = 1;
204
    }
205
}
206
if (global.menuno == 9 && instance_exists(obj_dialoguer) == false)
207
{
208
    global.menuno = -1;
209
    global.interact = 0;
210
}
211
if (selnoise == 1)
212
{
213
    snd_play(snd_select);
214
    selnoise = 0;
215
}
216
if (movenoise == 1)
217
{
218
    snd_play(snd_menumove);
219
    movenoise = 0;
220
}
221
if (scr_debug
scr_debug

function scr_debug() { if (global.debug == 1) return 1; }
())
222
{
223
    if (keyboard_check_pressed(ord("S")))
224
        instance_create(0, 0, obj_savemenu);
225
    if (keyboard_check_pressed(ord("F")))
226
        room_speed = 58;
227
    if (keyboard_check_pressed(ord("L")))
228
        scr_load
scr_load

function scr_load() { snd_free_all(); filechoicebk = global.filechoice; scr_gamestart(); global.filechoice = filechoicebk; file = "filech2_" + string(global.filechoice); myfileid = ossafe_file_text_open_read(file); global.truename = ossafe_file_text_read_string(myfileid); ossafe_file_text_readln(myfileid); if (global.is_console) { var othername_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(othername_list); i += 1) global.othername[i] = ds_list_find_value(othername_list, i); ds_list_destroy(othername_list); ossafe_file_text_readln(myfileid); } else { for (i = 0; i < 6; i += 1) { global.othername[i] = ossafe_file_text_read_string(myfileid); ossafe_file_text_readln(myfileid); } } global.char[0] = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.char[1] = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.char[2] = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.gold = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.xp = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.lv = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.inv = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.invc = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); global.darkzone = ossafe_file_text_read_real(myfileid); ossafe_file_text_readln(myfileid); if (global.is_console) { var hp_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(hp_list); i += 1) global.hp[i] = ds_list_find_value(hp_list, i); ds_list_destroy(hp_list); ossafe_file_text_readln(myfileid); var maxhp_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(maxhp_list); i += 1) global.maxhp[i] = ds_list_find_value(maxhp_list, i); ds_list_destroy(maxhp_list); ossafe_file_text_readln(myfileid); var at_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(at_list); i += 1) global.at[i] = ds_list_find_value(at_list, i); ds_list_destroy(at_list); ossafe_file_text_readln(myfileid); var df_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(df_list); i += 1) global.df[i] = ds_list_find_value(df_list, i); ds_list_destroy(df_list); ossafe_file_text_readln(myfileid); var mag_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(mag_list); i += 1) global.mag[i] = ds_list_find_value(mag_list, i); ds_list_destroy(mag_list); ossafe_file_text_readln(myfileid); var guts_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(guts_list); i += 1) global.guts[i] = ds_list_find_value(guts_list, i); ds_list_destroy(guts_list); ossafe_file_text_readln(myfileid); var charweapon_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(charweapon_list); i += 1) global.charweapon[i] = ds_list_find_value(charweapon_list, i); ds_list_destroy(charweapon_list); ossafe_file_text_readln(myfileid); var chararmor1_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(chararmor1_list); i += 1) global.chararmor1[i] = ds_list_find_value(chararmor1_list, i); ds_list_destroy(chararmor1_list); ossafe_file_text_readln(myfileid); var chararmor2_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(chararmor2_list); i += 1) global.chararmor2[i] = ds_list_find_value(chararmor2_list, i); ds_list_destroy(chararmor2_list); ossafe_file_text_readln(myfileid); var weaponstyle_list = scr_ds_list_read(myfileid); for (i = 0; i < ds_list_size(weaponstyle_list); i += 1) global.weaponstyle[i] = ds_list_find_value(weaponstyle_list, i); ds_list_destroy(weaponstyle_list); ossafe_file_text_readln(myfileid); } for (i = 0; i < 5; i += 1) { if (!global.is_console) { ...
();
229
    if (keyboard_check_pressed(ord("R")) && keyboard_check(vk_backspace))
230
        game_restart_true();
231
    if (keyboard_check_pressed(ord("R")))
232
    {
233
        room_restart();
234
        global.interact = 0;
235
    }
236
}
237
threebuffer--;