Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_shop1_Draw_0

(view raw script w/o annotations or w/e)
1
draw_sprite_ext(bg_seam_shop_ch2, 0, 0, 0, 2, 2, 0, c_white, 1);
2
draw_sprite_ext(bg_seam_shop_ch2, 2, 0, 0, 2, 2, 0, c_white, abs(sin(siner / 30)));
3
siner += 1;
4
if (menu == 1 || menu == 2)
5
{
6
    if (shopcharx > -20)
7
        shopcharx -= 4;
8
    if (shopcharx > -40)
9
        shopcharx -= 4;
10
    if (shopcharx > -80)
11
        shopcharx -= 4;
12
    if (shopcharx <= -80)
13
        shopcharx = -80;
14
}
15
else
16
{
17
    if (shopcharx < -50)
18
        shopcharx += 4;
19
    if (shopcharx < -30)
20
        shopcharx += 4;
21
    if (shopcharx < 0)
22
        shopcharx += 4;
23
    if (shopcharx > 0)
24
        shopcharx = 0;
25
}
26
talkanim = 0;
27
if (instance_exists(obj_writer))
28
{
29
    if (obj_writer.pos < obj_writer.length)
30
    {
31
        if (talkbuffer < 0)
32
            talkfacer = 0;
33
        talkbuffer = 16;
34
        talkanim = 1;
35
        idletimer = 0;
36
        idlefacer = 0;
37
        talkfacer += 0.2;
38
    }
39
}
40
shopkeepsprite = spr_seam_talk;
41
if (global.fe == 1)
42
    shopkeepsprite = spr_seam_oh;
43
if (global.fe == 2)
44
    shopkeepsprite = spr_seam_laugh;
45
if (global.fe == 3)
46
    shopkeepsprite = spr_seam_impatient;
47
qualify = 0;
48
if (global.fe != 0 && talkbuffer < 0)
49
    talkbuffer = 0;
50
if (talkbuffer >= 0)
51
{
52
    if (talkbuffer < 16)
53
    {
54
        if (((talkfacer + 1) % 3) != 0)
55
            talkfacer += 0.2;
56
    }
57
    draw_sprite_ext(shopkeepsprite, talkfacer, shopcharx + 160, 34, 2, 2, 0, c_white, 1);
58
    qualify = 1;
59
}
60
if (qualify == 0)
61
{
62
    idletimer += 1;
63
    if (idletimer >= 60)
64
        idlefacer += 0.2;
65
    if (idlefacer >= 5)
66
    {
67
        idletimer = 0;
68
        idlefacer = 0;
69
    }
70
    draw_sprite_ext(spr_seam_idle, idlefacer, shopcharx + 160, 34, 2, 2, 0, c_white, 1);
71
}
72
talkbuffer -= 1;
73
draw_set_color(c_black);
74
ossafe_fill_rectangle(0, 240, 640, 480, false);
75
scr_shopmenu
scr_shopmenu

function
scr_shopmenu(arg0)
{ if (arg0 == 0) { if (menu == 1 || menu == 2) {
scr_darkbox_black(camerax() + 400, cameray() + minimenuy, camerax() + 640, cameray() + 255);
draw_set_color(c_white);
scr_84_set_draw_font("mainbig");
if (menuc[1] == 0) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[0])); if (menuc[1] == 1) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[1])); if (menuc[1] == 2) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[2])); if (menuc[1] == 3) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[3]));
scr_84_set_draw_font("dotumche");
if (itemtype[menuc[1]] == "weapon" || itemtype[menuc[1]] == "armor") { for (i = 0; i < 3; i += 1) { can_index = 0; facetype = spr_headkris; which = global.char[i]; if (global.char[i] == 1) facetype = spr_headkris; if (global.char[i] == 2) facetype = spr_headsusie; if (global.char[i] == 3) facetype = spr_headralsei; if (which != 0) { if (i == 0) { locx = 0; locy = 0; } if (i == 1) { locx = 100; locy = 0; } if (i == 2) { locx = 0; locy = 45; } if (canequip[menuc[1]][which] == 0) can_index = 8; draw_sprite(facetype, can_index, camerax() + 426 + locx, cameray() + minimenuy + 140 + locy); if (itemtype[menuc[1]] == "weapon" && can_index != 8) { draw_set_color(c_white); sum[0] = itematk[menuc[1]] - global.itemat[which][0]; sum[1] = itemmagic[menuc[1]] - global.itemmag[which][0]; for (j = 0; j < 2; j += 1) { dcolor = c_white; addt = ""; draw_set_color(c_white); if (sum[j] > 0) { draw_set_color(c_yellow); addt = "+"; } if (sum[j] < 0) draw_set_color(c_aqua); draw_sprite_ext(spr_shopicon, j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1); draw_text(camerax() + 490 + locx, cameray() + minimenuy + locy + 135 + (20 * j), string_hash_to_newline(addt + string(sum[j]))); } } if (itemtype[menuc[1]] == "armor" && can_index != 8) { sum[0] = itemdef[menuc[1]] - global.itemdf[which][1]; sum[1] = itemdef[menuc[1]] - global.itemdf[which][2]; for (j = 0; j < 2; j += 1) { dcolor = c_white; addt = ""; draw_set_color(c_white); if (sum[j] > 0) { draw_set_color(c_yellow); addt = "+"; } if (sum[j] < 0) draw_set_color(c_aqua); draw_sprite_ext(spr_shopicon, 2 + j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1); draw_text(camerax() + 490 + locx, cameray() + minimenuy + 135 + (20 * j) + locy, string_hash_to_newline(addt + string(sum[j]))); } } } } } } } if (arg0 == 4) { if (menu == 11 || menu == 15) { ...
(0);
76
if (menu <= 3 || menu >= 10)
77
{
78
    
scr_darkbox_black
scr_darkbox_black

function
scr_darkbox_black(arg0, arg1, arg2, arg3)
{ draw_set_color(c_black); ossafe_fill_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
}
(0, 240, 415, 480);
79
    
scr_darkbox_black
scr_darkbox_black

function
scr_darkbox_black(arg0, arg1, arg2, arg3)
{ draw_set_color(c_black); ossafe_fill_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
}
(400, 240, 640, 480);
80
}
81
if (menu == 4)
82
    
scr_darkbox_black
scr_darkbox_black

function
scr_darkbox_black(arg0, arg1, arg2, arg3)
{ draw_set_color(c_black); ossafe_fill_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
}
(0, 240, 640, 480);
83
if (menu == 0)
84
{
85
    sell = 0;
86
    selling = 0;
87
    sidemessage = 0;
88
    menuc[1] = 0;
89
    menuc[2] = 0;
90
    menuc[3] = 0;
91
    menuc[4] = 0;
92
    if (instance_exists(obj_writer) == false)
93
    {
94
        global.typer = 6;
95
        global.msg[0] = stringsetloc(
Face 0* Take your time...Delay 11
* Ain't like it's
better spent.
"\\E0* Take your time..^1.&* Ain't like it's&better spent.", "obj_shop1_slash_Draw_0_gml_98_0"
);
96
        if (mainmessage == 0)
97
            global.msg[0] = stringsetloc(
Face 0* Hee hee...Delay 11
* Welcome, travellers.
"\\E0* Hee hee..^1.&* Welcome, travellers.", "obj_shop1_slash_Draw_0_gml_99_0"
);
98
        instance_create(30, 270, obj_writer);
99
    }
100
    menumax = 3;
101
    draw_set_color(c_white);
102
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("mainbig");
103
    draw_text(480, 260, string_hash_to_newline(stringsetloc(
Buy
"Buy", "obj_shop1_slash_Draw_0_gml_106_0"
)));
104
    draw_text(480, 300, string_hash_to_newline(stringsetloc(
Sell
"Sell", "obj_shop1_slash_Draw_0_gml_107_0"
)));
105
    draw_text(480, 340, string_hash_to_newline(stringsetloc(
Talk
"Talk", "obj_shop1_slash_Draw_0_gml_108_0"
)));
106
    draw_text(480, 380, string_hash_to_newline(stringsetloc(
Exit
"Exit", "obj_shop1_slash_Draw_0_gml_109_0"
)));
107
    draw_sprite(spr_heart, 0, 450, (135 + (menuc[0] * 20)) * 2);
108
    if (button1_p())
109
    {
110
        onebuffer = 2;
111
        mainmessage = 1;
112
        with (obj_writer)
113
            instance_destroy();
114
        if (menuc[0] == 0)
115
            menu = 1;
116
        if (menuc[0] == 1)
117
        {
118
            menu = 10;
119
            sidemessage = 0;
120
        }
121
        if (menuc[0] == 2)
122
        {
123
            if (global.chapter == 1)
124
                menu = 3;
125
            if (global.chapter >= 2)
126
                menu = 4;
127
            sell = 10;
128
        }
129
        if (menuc[0] == 3)
130
        {
131
            sell = 2;
132
            menu = 4;
133
        }
134
    }
135
}
136
if (menu == 1 || menu == 2)
137
{
138
    draw_set_color(c_white);
139
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("mainbig");
140
    for (i = 0; i < itemtotal; i += 1)
141
    {
142
        draw_text(60, 260 + (i * 40), string_hash_to_newline(shopitemname[i]));
143
        draw_text(300, 260 + (i * 40), string_hash_to_newline(stringsetsubloc("$~1", string(buyvalue[i]), "obj_shop1_slash_Draw_0_gml_143_0")));
144
    }
145
    draw_text(60, 260 + (itemtotal * 40), string_hash_to_newline(stringsetloc(
Exit
"Exit", "obj_shop1_slash_Draw_0_gml_139_0"
)));
146
    if (menu == 1)
147
    {
148
        menumax = 4;
149
        if (instance_exists(obj_writer) == false)
150
        {
151
            if (sidemessage == 0)
152
                global.msg[0] = stringsetloc(
Face 0What do
you like
to buy?
"\\E0What do&you like&to buy?", "obj_shop1_slash_Draw_0_gml_148_0"
);
153
            if (sidemessage == 1)
154
                global.msg[0] = stringsetloc(
Face 2Thanks for
that.
"\\E2Thanks for&that.", "obj_shop1_slash_Draw_0_gml_149_0"
);
155
            if (sidemessage == 2)
156
                global.msg[0] = stringsetloc(
Face 0What,
not good
enough?
"\\E0What,&not good&enough?", "obj_shop1_slash_Draw_0_gml_150_0"
);
157
            if (sidemessage == 3)
158
                global.msg[0] = stringsetloc(
Face 3Not
enough
money.
"\\E3Not&enough&money.", "obj_shop1_slash_Draw_0_gml_151_0"
);
159
            if (sidemessage == 4)
160
                global.msg[0] = stringsetloc(
Face 3You're
carrying
too much.
"\\E3You're&carrying&too much.", "obj_shop1_slash_Draw_0_gml_152_0"
);
161
            if (sidemessage == 5)
162
                msgsetloc(0, 
Face 2Thanks, it'll
be in your
STORAGE.
"\\E2Thanks, it'll&be in your&STORAGE.", "obj_shop1_slash_Draw_0_gml_159_0"
);
163
            if (murder == 1)
164
                global.msg[0] = stringsetloc(
Wait for input*
"/*", "obj_shop1_slash_Draw_0_gml_153_0"
);
165
            instance_create(450, 260, obj_writer);
166
        }
167
        draw_sprite(spr_heart, 0, 30, 270 + (menuc[1] * 40));
168
        if (button1_p() && onebuffer < 0)
169
        {
170
            menu = 2;
171
            onebuffer = 2;
172
            with (obj_writer)
173
                instance_destroy();
174
            if (menuc[1] == menumax)
175
                menu = 0;
176
        }
177
        if (button2_p() && twobuffer < 0 && onebuffer < 2)
178
        {
179
            menu = 0;
180
            twobuffer = 2;
181
            minimenuy = 220;
182
            with (obj_writer)
183
                instance_destroy();
184
        }
185
        menuc[2] = 0;
186
    }
187
    if (menu == 2)
188
    {
189
        menumax = 1;
190
        draw_set_color(c_white);
191
        
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("mainbig");
192
        var y1_off = langopt(260, 290);
193
        var y2_off = langopt(290, 260);
194
        draw_text(460, y1_off, string_hash_to_newline(stringsetloc(
Buy it for
"Buy it for", "obj_shop1_slash_Draw_0_gml_167_0"
)));
195
        draw_text(460, y2_off, string_hash_to_newline(stringsetsubloc("$~1 ?", string(buyvalue[menuc[1]]), "obj_shop1_slash_Draw_0_gml_177_0")));
196
        draw_text(480, 340, string_hash_to_newline(stringsetloc(
Yes
"Yes", "obj_shop1_slash_Draw_0_gml_169_0"
)));
197
        draw_text(480, 370, string_hash_to_newline(stringsetloc(
No
"No", "obj_shop1_slash_Draw_0_gml_170_0"
)));
198
        draw_sprite(spr_heart, 0, 450, 350 + (menuc[2] * 30));
199
        if (button2_p() && twobuffer < 0)
200
        {
201
            menu = 1;
202
            sidemessage = 2;
203
            twobuffer = 2;
204
            onebuffer = 2;
205
        }
206
        if (button1_p() && onebuffer < 0 && twobuffer < 0)
207
        {
208
            if (menuc[2] == 0)
209
            {
210
                afford = 0;
211
                if (global.gold >= buyvalue[menuc[1]])
212
                    afford = 1;
213
                if (afford == 1)
214
                {
215
                    _pocketed = 0;
216
                    if (itemtype[menuc[1]] == "item")
217
                        
scr_itemget
scr_itemget

function
scr_itemget(arg0)
{ var __i = 0; var loop = 1; noroom = 0; _pocketed = 0; _noroominventory = 0; global.item[12] = 999; while (loop == 1) { if (global.item[__i] == 0) { global.item[__i] = arg0; break; } if (__i == 12) { _noroominventory = 1; noroom = 1; for (var __j = 0; __j < global.flag[64 storage_size]; __j++) { if (global.pocketitem[__j] == 0) { debug_message("Placed in pocket :" + string(__j)); global.pocketitem[__j] = arg0; _pocketed = 1; noroom = 0; break; } } break; } __i += 1; } script_execute(scr_iteminfo_all); debug_message("noroom=" + string(noroom)); debug_message("_pocketed=" + string(_pocketed)); debug_message("_noroominventory=" + string(_noroominventory)); }
(item[menuc[1]]);
218
                    if (itemtype[menuc[1]] == "weapon")
219
                        
scr_weaponget
scr_weaponget

function
scr_weaponget(arg0)
{ noroom = 0; var legacy = 0; var __i = 0; if (legacy == 0) { var __itemcount = 0; __weapon[0] = arg0; for (__i = 0; __i < 48; __i++) { if (global.weapon[__i] != 0) { __weapon[__itemcount + 1] = global.weapon[__i]; __itemcount++; } } if (__itemcount >= 48) { noroom = 1; } else { for (__i = 0; __i < 48; __i++) { if (__i <= __itemcount) global.weapon[__i] = __weapon[__i]; else global.weapon[__i] = 0; } } } else if (legacy) { loop = 1; global.weapon[48] = 999; while (loop == 1) { if (global.weapon[__i] == 0) { global.weapon[__i] = arg0; break; } if (__i == 48) { noroom = 1; break; } __i += 1; } } script_execute(scr_weaponinfo_all); }
(item[menuc[1]]);
220
                    if (itemtype[menuc[1]] == "armor")
221
                        
scr_armorget
scr_armorget

function
scr_armorget(arg0)
{ noroom = 0; var legacy = 0; var __i = 0; if (legacy == 0) { var __itemcount = 0; __armor[0] = arg0; for (__i = 0; __i < 48; __i++) { if (global.armor[__i] != 0) { __armor[__itemcount + 1] = global.armor[__i]; __itemcount++; } } if (__itemcount >= 48) { noroom = 1; } else { for (__i = 0; __i < 48; __i++) { if (__i <= __itemcount) global.armor[__i] = __armor[__i]; else global.armor[__i] = 0; } } } else if (legacy) { loop = 1; global.armor[48] = 999; while (loop == 1) { if (global.armor[__i] == 0) { global.armor[__i] = arg0; break; } if (__i == 48) { noroom = 1; break; } __i += 1; } } script_execute(scr_armorinfo_all); }
(item[menuc[1]]);
222
                    if (noroom == 0)
223
                    {
224
                        global.gold -= buyvalue[menuc[1]];
225
                        snd_play(snd_locker);
226
                        if (_pocketed == 1)
227
                            sidemessage = 5;
228
                        else
229
                            sidemessage = 1;
230
                    }
231
                    if (noroom == 1)
232
                        sidemessage = 4;
233
                }
234
                else
235
                {
236
                    sidemessage = 3;
237
                }
238
            }
239
            if (menuc[2] == 1)
240
                sidemessage = 2;
241
            menu = 1;
242
        }
243
    }
244
    if (menuc[1] != 4)
245
    {
246
        if (minimenuy <= 20)
247
            minimenuy = 20;
248
        if (minimenuy > 20)
249
            minimenuy -= 5;
250
        if (minimenuy > 50)
251
            minimenuy -= 5;
252
        if (minimenuy > 100)
253
            minimenuy -= 8;
254
        if (minimenuy > 150)
255
            minimenuy -= 10;
256
    }
257
    else if (minimenuy < 200)
258
    {
259
        minimenuy += 40;
260
    }
261
    if (minimenuy >= 200)
262
        minimenuy = 200;
263
}
264
if (menu == 3)
265
{
266
    menumax = 4;
267
    draw_set_color(c_white);
268
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("mainbig");
269
    draw_text(80, 260, string_hash_to_newline(stringsetloc(
About yourself
"About yourself", "obj_shop1_slash_Draw_0_gml_217_0"
)));
270
    draw_text(80, 300, string_hash_to_newline(stringsetloc(
Lightners
"Lightners", "obj_shop1_slash_Draw_0_gml_218_0"
)));
271
    if (global.flag[241 JEVIL_plot] < 6)
272
    {
273
        draw_text(80, 340, string_hash_to_newline(stringsetloc(
Kingdom
"Kingdom", "obj_shop1_slash_Draw_0_gml_220_0"
)));
274
    }
275
    else
276
    {
277
        draw_set_color(c_yellow);
278
        draw_text(80, 340, string_hash_to_newline(stringsetloc(
About JEVIL
"About JEVIL", "obj_shop1_slash_Draw_0_gml_224_0"
)));
279
    }
280
    if (global.flag[241 JEVIL_plot] == 0)
281
    {
282
        draw_text(80, 380, string_hash_to_newline(stringsetloc(
We're legendary
"We're legendary", "obj_shop1_slash_Draw_0_gml_227_0"
)));
283
    }
284
    else
285
    {
286
        _legendstring = stringsetloc(
Strange Prisoner
"Strange Prisoner", "obj_shop1_slash_Draw_0_gml_241_0"
);
287
        draw_set_color(c_yellow);
288
        if (global.flag[115 got_key_a] >= 1)
289
            draw_set_color(c_white);
290
        if (global.flag[241 JEVIL_plot] >= 6)
291
        {
292
            draw_set_color(c_yellow);
293
            _legendstring = stringsetloc(
We Won
"We Won", "obj_shop1_slash_Draw_0_gml_244_0"
);
294
        }
295
        draw_text(80, 380, string_hash_to_newline(_legendstring));
296
    }
297
    draw_set_color(c_white);
298
    draw_text(80, 420, string_hash_to_newline(stringsetloc(
Exit
"Exit", "obj_shop1_slash_Draw_0_gml_240_0"
)));
299
    if (instance_exists(obj_writer) == false)
300
    {
301
        global.msg[0] = stringsetloc(
Face 0Don't have
anything
better
to do.
"\\E0Don't have&anything&better&to do.", "obj_shop1_slash_Draw_0_gml_255_0"
);
302
        instance_create(440, 260, obj_writer);
303
    }
304
    draw_sprite(spr_heart, 0, 50, 270 + (menuc[3] * 40));
305
    if (button1_p() && onebuffer < 0)
306
    {
307
        onebuffer = 2;
308
        with (obj_writer)
309
            instance_destroy();
310
        if (menuc[3] < menumax)
311
        {
312
            sell = menuc[3] + 3;
313
            menu = 4;
314
        }
315
        else
316
        {
317
            menu = 0;
318
        }
319
    }
320
    else if (button2_p() && twobuffer < 0 && onebuffer < 0)
321
    {
322
        twobuffer = 2;
323
        menu = 0;
324
        with (obj_writer)
325
            instance_destroy();
326
    }
327
}
328
if (menu == 10)
329
{
330
    menuc[11] = 0;
331
    menuc[12] = 0;
332
    menuc[13] = 0;
333
    menumax = 4;
334
    draw_set_color(c_white);
335
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("mainbig");
336
    draw_text(80, 260, string_hash_to_newline(stringsetloc(
Sell Items
"Sell Items", "obj_shop1_slash_Draw_0_gml_278_0"
)));
337
    draw_text(80, 300, string_hash_to_newline(stringsetloc(
Sell Weapons
"Sell Weapons", "obj_shop1_slash_Draw_0_gml_279_0"
)));
338
    draw_text(80, 340, string_hash_to_newline(stringsetloc(
Sell Armor
"Sell Armor", "obj_shop1_slash_Draw_0_gml_280_0"
)));
339
    draw_text(80, 380, string_hash_to_newline(stringsetloc(
Sell Pocket Items
"Sell Pocket Items", "obj_shop1_slash_Draw_0_gml_292_0"
)));
340
    draw_text(80, 420, string_hash_to_newline(stringsetloc(
Return
"Return", "obj_shop1_slash_Draw_0_gml_293_0"
)));
341
    if (instance_exists(obj_writer) == false)
342
    {
343
        if (sidemessage == 0)
344
            global.msg[0] = stringsetloc(
Face 0What kind
of junk
you got?
"\\E0What kind&of junk&you got?", "obj_shop1_slash_Draw_0_gml_285_0"
);
345
        if (sidemessage == 1)
346
            global.msg[0] = stringsetloc(
Face 0That's it
for that.
"\\E0That's it&for that.", "obj_shop1_slash_Draw_0_gml_286_0"
);
347
        if (sidemessage == 2)
348
            global.msg[0] = stringsetloc(
Face 3You don't
have
anything!
"\\E3You don't&have&anything!", "obj_shop1_slash_Draw_0_gml_287_0"
);
349
        instance_create(460, 260, obj_writer);
350
    }
351
    draw_sprite(spr_heart, 0, 50, 270 + (menuc[10] * 40));
352
    if (button1_p() && onebuffer < 0)
353
    {
354
        pagemax = 0;
355
        sidemessage2 = 0;
356
        onebuffer = 2;
357
        with (obj_writer)
358
            instance_destroy();
359
        can = 1;
360
        idealmenu = menuc[10] + 11;
361
        if (idealmenu == 11)
362
        {
363
            
scr_itemcheck
scr_itemcheck

function
scr_itemcheck(arg0)
{ haveit = 0; itemcount = 0; for (var __i = 0; __i < 12; __i += 1) { if (global.item[__i] == arg0) haveit = 1; if (global.item[__i] == arg0) itemcount += 1; } return haveit; }
(0);
364
            if (itemcount == 12)
365
            {
366
                sidemessage = 2;
367
                can = 0;
368
            }
369
            nothingcount = itemcount;
370
            
scr_iteminfo_all
scr_iteminfo_all

function
scr_iteminfo_all()
{ for (i = 0; i < 12; i += 1) { itemid = global.item[i];
scr_iteminfo(itemid);
global.itemnameb[i] = itemnameb; global.itemdescb[i] = itemdescb; global.itemvalue[i] = value; global.itemusable[i] = usable; } }
();
371
            selltype = "item";
372
            selltotal = 12;
373
            for (i = 0; i < selltotal; i++)
374
            {
375
                itemsellvalue[i] = global.itemvalue[i];
376
                itemsellname[i] = global.itemnameb[i];
377
            }
378
        }
379
        if (idealmenu == 12)
380
        {
381
            
scr_weaponcheck_inventory
scr_weaponcheck_inventory

function
scr_weaponcheck_inventory(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 48; i += 1) { if (global.weapon[i] == arg0) haveit = 1; if (global.weapon[i] == arg0) itemcount += 1; } return haveit; }
(0);
382
            if (itemcount == 48)
383
            {
384
                sidemessage = 2;
385
                can = 0;
386
            }
387
            
scr_weaponinfo_all
scr_weaponinfo_all

function
scr_weaponinfo_all()
{ for (i = 0; i < 48; i += 1) {
scr_weaponinfo(global.weapon[i]);
weaponname[i] = weaponnametemp; weapondesc[i] = weapondesctemp; wmessage2[i] = wmessage2temp; wmessage3[i] = wmessage3temp; wmessage4[i] = wmessage4temp; weaponat[i] = weaponattemp; weapondf[i] = weapondftemp; weaponmag[i] = weaponmagtemp; weaponbolts[i] = weaponboltstemp; weaponstyle[i] = weaponstyletemp; weapongrazeamt[i] = weapongrazeamttemp; weapongrazesize[i] = weapongrazesizetemp; weaponchar1[i] = weaponchar1temp; weaponchar2[i] = weaponchar2temp; weaponchar3[i] = weaponchar3temp; weaponchar4[i] = weaponchar4temp; weaponvalue[i] = value; weaponability[i] = weaponabilitytemp; weaponabilityicon[i] = weaponabilityicontemp; weaponicon[i] = weaponicontemp; } }
();
388
        }
389
        if (idealmenu == 13)
390
        {
391
            
scr_armorcheck_inventory
scr_armorcheck_inventory

function
scr_armorcheck_inventory(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 48; i += 1) { if (global.armor[i] == arg0) haveit = 1; if (global.armor[i] == arg0) itemcount += 1; } return haveit; }
(0);
392
            if (itemcount == 48)
393
            {
394
                sidemessage = 2;
395
                can = 0;
396
            }
397
            
scr_armorinfo_all
scr_armorinfo_all

function
scr_armorinfo_all()
{ for (i = 0; i < 48; i += 1) {
scr_armorinfo(global.armor[i]);
armorname[i] = armornametemp; armordesc[i] = armordesctemp; amessage2[i] = amessage2temp; amessage3[i] = amessage3temp; amessage4[i] = amessage4temp; armorat[i] = armorattemp; armordf[i] = armordftemp; armormag[i] = armormagtemp; armorbolts[i] = armorboltstemp; armorgrazeamt[i] = armorgrazeamttemp; armorgrazesize[i] = armorgrazesizetemp; armorchar1[i] = armorchar1temp; armorchar2[i] = armorchar2temp; armorchar3[i] = armorchar3temp; armorchar4[i] = armorchar4temp; armorvalue[i] = value; armorability[i] = armorabilitytemp; armorabilityicon[i] = armorabilityicontemp; armoricon[i] = armoricontemp; armorelement[i] = armorelementtemp; armorelementamount[i] = armorelementamounttemp; } }
();
398
        }
399
        if (idealmenu == 14)
400
        {
401
            
scr_itemcheck_pocket
scr_itemcheck_pocket

function
scr_itemcheck_pocket(arg0)
{ haveit = 0; itemcount = 0; for (var __i = 0; __i < global.flag[64 storage_size]; __i += 1) { if (global.pocketitem[__i] == arg0) haveit = 1; if (global.pocketitem[__i] == arg0) itemcount += 1; } return haveit; }
(0);
402
            if (itemcount == global.flag[64 storage_size])
403
            {
404
                sidemessage = 2;
405
                can = 0;
406
            }
407
            selltype = "pocket";
408
            nothingcount = 0;
409
            selltotal = global.flag[64 storage_size];
410
            for (i = 0; i < global.flag[64 storage_size]; i++)
411
            {
412
                
scr_iteminfo
scr_iteminfo

function
scr_iteminfo(arg0)
{ usable = 0; replaceable = 0; value = 0; itemtarget = 0; itemnameb = " "; itemdescb = " "; switch (arg0) { case 0: itemnameb = " "; itemdescb = "---"; break; case 1: itemnameb = stringsetloc(
Darker Candy
"Darker Candy", "scr_iteminfo_slash_scr_iteminfo_gml_16_0_b"
);
itemdescb = stringsetloc(
Heals#120HP
"Heals#120HP", "scr_iteminfo_slash_scr_iteminfo_gml_17_0"
);
itemtarget = 1; value = 120; usable = 1; break; case 2: itemnameb = stringsetloc(
ReviveMint
"ReviveMint", "scr_iteminfo_slash_scr_iteminfo_gml_22_0"
);
itemdescb = stringsetloc(
Heal#Downed#Ally
"Heal#Downed#Ally", "scr_iteminfo_slash_scr_iteminfo_gml_23_0"
);
itemtarget = 1; value = 400; usable = 1; break; case 3: itemnameb = stringsetloc(
Glowshard
"Glowshard", "scr_iteminfo_slash_scr_iteminfo_gml_29_0"
);
itemdescb = stringsetloc(
Sell#at#shops
"Sell#at#shops", "scr_iteminfo_slash_scr_iteminfo_gml_30_0"
);
itemtarget = 0; value = 200 + (global.chapter * 100); usable = 0; break; case 4: itemnameb = stringsetloc(
Manual
"Manual", "scr_iteminfo_slash_scr_iteminfo_gml_36_0"
);
itemdescb = stringsetloc(
Read#out of#battle
"Read#out of#battle", "scr_iteminfo_slash_scr_iteminfo_gml_37_0"
);
itemtarget = 2; value = 1; usable = 0; break; case 5: itemnameb = stringsetloc(
BrokenCake
"BrokenCake", "scr_iteminfo_slash_scr_iteminfo_gml_43_0"
);
itemdescb = stringsetloc(
Heals#20HP
"Heals#20HP", "scr_iteminfo_slash_scr_iteminfo_gml_44_0"
);
itemtarget = 1; value = 5; usable = 1; break; case 6: itemnameb = stringsetloc(
Top Cake
"Top Cake", "scr_iteminfo_slash_scr_iteminfo_gml_50_0"
);
itemdescb = stringsetloc(
Heals#team#160HP
"Heals#team#160HP", "scr_iteminfo_slash_scr_iteminfo_gml_51_0"
);
itemtarget = 2; value = 150; usable = 1; break; case 7: var healamount = (global.chapter == 1) ? 80 : 140; if (global.chapter == 3) healamount = 150; if (global.chapter >= 4) healamount = 160; itemnameb = stringsetloc(
Spincake
"Spincake", "scr_iteminfo_slash_scr_iteminfo_gml_58_0"
);
itemdescb = stringsetsubloc("Heals#team#~1HP", string(healamount), "scr_iteminfo_slash_scr_iteminfo_gml_59_0"); itemtarget = 2; value = 5; usable = 1; break; case 8: itemnameb = stringsetloc(
Darkburger
"Darkburger", "scr_iteminfo_slash_scr_iteminfo_gml_65_0"
);
itemdescb = stringsetloc(
Heals#70HP
"Heals#70HP", "scr_iteminfo_slash_scr_iteminfo_gml_66_0"
);
itemtarget = 1; value = 70; usable = 1; break; case 9: itemnameb = stringsetloc(
LancerCookie
"LancerCookie", "scr_iteminfo_slash_scr_iteminfo_gml_72_0"
);
itemdescb = stringsetloc(
Heals#50HP
"Heals#50HP", "scr_iteminfo_slash_scr_iteminfo_gml_73_0"
);
itemtarget = 1; value = 10; usable = 1; break; case 10: itemnameb = stringsetloc(
GigaSalad
"GigaSalad", "scr_iteminfo_slash_scr_iteminfo_gml_79_0"
);
itemdescb = stringsetloc(
Heals#4HP
"Heals#4HP", "scr_iteminfo_slash_scr_iteminfo_gml_80_0"
);
itemtarget = 1; value = 10; usable = 1; break; case 11: itemnameb = stringsetloc(
ClubsSandwich
"ClubsSandwich", "scr_iteminfo_slash_scr_iteminfo_gml_86_0"
);
itemdescb = stringsetloc(
Heals#team#70HP
"Heals#team#70HP", "scr_iteminfo_slash_scr_iteminfo_gml_87_0"
);
itemtarget = 2; value = 70; usable = 1; break; case 12: itemnameb = stringsetloc(
HeartsDonut
"HeartsDonut", "scr_iteminfo_slash_scr_iteminfo_gml_93_0"
);
itemdescb = stringsetloc(
Healing#varies
"Healing#varies", "scr_iteminfo_slash_scr_iteminfo_gml_94_0"
);
itemtarget = 1; value = 40; ...
(global.pocketitem[i]);
413
                itemsellvalue[i] = value;
414
                itemsellname[i] = itemnameb;
415
            }
416
            idealmenu = 11;
417
        }
418
        if (menuc[10] < menumax)
419
        {
420
            if (can == 1)
421
                menu = idealmenu;
422
            sidemessage1 = 0;
423
        }
424
        else
425
        {
426
            menu = 0;
427
        }
428
        submenu = 0;
429
        submenuc[1] = 0;
430
    }
431
    if (button2_p() && twobuffer < 0 && onebuffer < 0)
432
    {
433
        twobuffer = 2;
434
        menu = 0;
435
        with (obj_writer)
436
            instance_destroy();
437
    }
438
}
439
if (menu == 11 || menu == 12 || menu == 13 || menu == 14)
440
{
441
    if (instance_exists(obj_writer) == false)
442
    {
443
        if (sidemessage2 == 0 && (menu == 11 || menu == 14))
444
            global.msg[0] = stringsetloc(
Face 0Alright,
give me
an ITEM.
"\\E0Alright,&give me&an ITEM.", "obj_shop1_slash_Draw_0_gml_347_0"
);
445
        if (sidemessage2 == 0 && menu == 12)
446
            global.msg[0] = stringsetloc(
Face 0What WEAPON
will you
give me?
"\\E0What WEAPON&will you&give me?", "obj_shop1_slash_Draw_0_gml_348_0"
);
447
        if (sidemessage2 == 0 && menu == 13)
448
            global.msg[0] = stringsetloc(
Face 0What ARMOR
will you
give me?
"\\E0What ARMOR&will you&give me?", "obj_shop1_slash_Draw_0_gml_349_0"
);
449
        if (sidemessage2 == 1)
450
            global.msg[0] = stringsetloc(
Face 2Thanks for
that.
"\\E2Thanks for&that.", "obj_shop1_slash_Draw_0_gml_350_0"
);
451
        if (sidemessage2 == 2)
452
            global.msg[0] = stringsetloc(
Face 0No?
"\\E0No?", "obj_shop1_slash_Draw_0_gml_351_0"
);
453
        if (sidemessage2 == 3)
454
            global.msg[0] = stringsetloc(
Face 3Y'think I
WANT that?
"\\E3Y'think I&WANT that?", "obj_shop1_slash_Draw_0_gml_352_0"
);
455
        if (sidemessage2 == 4)
456
            global.msg[0] = stringsetloc(
Face 0That's
nothing.
"\\E0That's&nothing.", "obj_shop1_slash_Draw_0_gml_353_0"
);
457
        instance_create(450, 260, obj_writer);
458
    }
459
}
460
scr_shopmenu
scr_shopmenu

function
scr_shopmenu(arg0)
{ if (arg0 == 0) { if (menu == 1 || menu == 2) {
scr_darkbox_black(camerax() + 400, cameray() + minimenuy, camerax() + 640, cameray() + 255);
draw_set_color(c_white);
scr_84_set_draw_font("mainbig");
if (menuc[1] == 0) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[0])); if (menuc[1] == 1) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[1])); if (menuc[1] == 2) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[2])); if (menuc[1] == 3) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[3]));
scr_84_set_draw_font("dotumche");
if (itemtype[menuc[1]] == "weapon" || itemtype[menuc[1]] == "armor") { for (i = 0; i < 3; i += 1) { can_index = 0; facetype = spr_headkris; which = global.char[i]; if (global.char[i] == 1) facetype = spr_headkris; if (global.char[i] == 2) facetype = spr_headsusie; if (global.char[i] == 3) facetype = spr_headralsei; if (which != 0) { if (i == 0) { locx = 0; locy = 0; } if (i == 1) { locx = 100; locy = 0; } if (i == 2) { locx = 0; locy = 45; } if (canequip[menuc[1]][which] == 0) can_index = 8; draw_sprite(facetype, can_index, camerax() + 426 + locx, cameray() + minimenuy + 140 + locy); if (itemtype[menuc[1]] == "weapon" && can_index != 8) { draw_set_color(c_white); sum[0] = itematk[menuc[1]] - global.itemat[which][0]; sum[1] = itemmagic[menuc[1]] - global.itemmag[which][0]; for (j = 0; j < 2; j += 1) { dcolor = c_white; addt = ""; draw_set_color(c_white); if (sum[j] > 0) { draw_set_color(c_yellow); addt = "+"; } if (sum[j] < 0) draw_set_color(c_aqua); draw_sprite_ext(spr_shopicon, j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1); draw_text(camerax() + 490 + locx, cameray() + minimenuy + locy + 135 + (20 * j), string_hash_to_newline(addt + string(sum[j]))); } } if (itemtype[menuc[1]] == "armor" && can_index != 8) { sum[0] = itemdef[menuc[1]] - global.itemdf[which][1]; sum[1] = itemdef[menuc[1]] - global.itemdf[which][2]; for (j = 0; j < 2; j += 1) { dcolor = c_white; addt = ""; draw_set_color(c_white); if (sum[j] > 0) { draw_set_color(c_yellow); addt = "+"; } if (sum[j] < 0) draw_set_color(c_aqua); draw_sprite_ext(spr_shopicon, 2 + j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1); draw_text(camerax() + 490 + locx, cameray() + minimenuy + 135 + (20 * j) + locy, string_hash_to_newline(addt + string(sum[j]))); } } } } } } } if (arg0 == 4) { if (menu == 11 || menu == 15) { ...
(4);
461
if (menu == 15 || menu == 16 || menu == 17 || menu == 18)
462
{
463
    menumax = 1;
464
    draw_set_color(c_white);
465
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("mainbig");
466
    var y1_off = langopt(260, 290);
467
    var y2_off = langopt(290, 260);
468
    draw_text(460, y1_off, string_hash_to_newline(stringsetloc(
Sell it for
"Sell it for", "obj_shop1_slash_Draw_0_gml_365_0"
)));
469
    draw_text(460, y2_off, string_hash_to_newline(stringsetsubloc("$~1 ?", string(sellvalue), "obj_shop1_slash_Draw_0_gml_407_0")));
470
    draw_text(480, 340, string_hash_to_newline(stringsetloc(
Yes
"Yes", "obj_shop1_slash_Draw_0_gml_367_0"
)));
471
    draw_text(480, 370, string_hash_to_newline(stringsetloc(
No
"No", "obj_shop1_slash_Draw_0_gml_368_0"
)));
472
    draw_sprite(spr_heart, 0, 450, 350 + (menuc[menu] * 30));
473
}
474
scr_shopmenu
scr_shopmenu

function
scr_shopmenu(arg0)
{ if (arg0 == 0) { if (menu == 1 || menu == 2) {
scr_darkbox_black(camerax() + 400, cameray() + minimenuy, camerax() + 640, cameray() + 255);
draw_set_color(c_white);
scr_84_set_draw_font("mainbig");
if (menuc[1] == 0) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[0])); if (menuc[1] == 1) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[1])); if (menuc[1] == 2) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[2])); if (menuc[1] == 3) draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[3]));
scr_84_set_draw_font("dotumche");
if (itemtype[menuc[1]] == "weapon" || itemtype[menuc[1]] == "armor") { for (i = 0; i < 3; i += 1) { can_index = 0; facetype = spr_headkris; which = global.char[i]; if (global.char[i] == 1) facetype = spr_headkris; if (global.char[i] == 2) facetype = spr_headsusie; if (global.char[i] == 3) facetype = spr_headralsei; if (which != 0) { if (i == 0) { locx = 0; locy = 0; } if (i == 1) { locx = 100; locy = 0; } if (i == 2) { locx = 0; locy = 45; } if (canequip[menuc[1]][which] == 0) can_index = 8; draw_sprite(facetype, can_index, camerax() + 426 + locx, cameray() + minimenuy + 140 + locy); if (itemtype[menuc[1]] == "weapon" && can_index != 8) { draw_set_color(c_white); sum[0] = itematk[menuc[1]] - global.itemat[which][0]; sum[1] = itemmagic[menuc[1]] - global.itemmag[which][0]; for (j = 0; j < 2; j += 1) { dcolor = c_white; addt = ""; draw_set_color(c_white); if (sum[j] > 0) { draw_set_color(c_yellow); addt = "+"; } if (sum[j] < 0) draw_set_color(c_aqua); draw_sprite_ext(spr_shopicon, j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1); draw_text(camerax() + 490 + locx, cameray() + minimenuy + locy + 135 + (20 * j), string_hash_to_newline(addt + string(sum[j]))); } } if (itemtype[menuc[1]] == "armor" && can_index != 8) { sum[0] = itemdef[menuc[1]] - global.itemdf[which][1]; sum[1] = itemdef[menuc[1]] - global.itemdf[which][2]; for (j = 0; j < 2; j += 1) { dcolor = c_white; addt = ""; draw_set_color(c_white); if (sum[j] > 0) { draw_set_color(c_yellow); addt = "+"; } if (sum[j] < 0) draw_set_color(c_aqua); draw_sprite_ext(spr_shopicon, 2 + j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1); draw_text(camerax() + 490 + locx, cameray() + minimenuy + 135 + (20 * j) + locy, string_hash_to_newline(addt + string(sum[j]))); } } } } } } } if (arg0 == 4) { if (menu == 11 || menu == 15) { ...
(5);
475
if (menu == 4)
476
{
477
    if (sell == 0)
478
        menu = 0;
479
    if (instance_exists(obj_writer) == false && selling == 0)
480
    {
481
        if (sell == 1)
482
        {
483
        }
484
        if (sell == 2)
485
            global.msg[0] = stringsetloc(
Face 0* See you again...Delay 11
* Or not.Delay 11
* Ha ha ha ha...Wait for inputClose Message
"\\E0* See you again..^1.&* Or not^1.&* Ha ha ha ha.../%", "obj_shop1_slash_Draw_0_gml_395_0"
);
486
        if (sell == 10)
487
        {
488
            var normal_route = true;
489
            var shadow_crystal_jevil = global.flag[954 gave_JEVIL_crystal] == 1;
490
            var shadow_crystal_sneo = global.flag[353 talk_two_crystals] >= 1;
491
            var has_shadow_mantle = 
scr_armorcheck_equipped_any
scr_armorcheck_equipped_any

function
scr_armorcheck_equipped_any(arg0)
{ var __totalwearing = 0; for (var __weari = 0; __weari < array_length_1d(global.chararmor1); __weari++) __totalwearing +=
scr_armorcheck_equipped(__weari, arg0);
return __totalwearing; }
(23) > 0 ||
scr_armorcheck_inventory
scr_armorcheck_inventory

function
scr_armorcheck_inventory(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 48; i += 1) { if (global.armor[i] == arg0) haveit = 1; if (global.armor[i] == arg0) itemcount += 1; } return haveit; }
(23) == 1;
492
            if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; } function scr_flag_name_get(arg0) { if (!global.is_console) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } else { return ""; } } function scr_getflag(arg0) { return
scr_flag_get(arg0);
}
(961) == 0)
493
            {
494
                if (shadow_crystal_jevil && shadow_crystal_sneo)
495
                {
496
                    if (global.flag[1047 knight_ch3_status] == 1)
497
                    {
498
                        normal_route = false;
499
                        if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; } function scr_flag_name_get(arg0) { if (!global.is_console) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } else { return ""; } } function scr_getflag(arg0) { return
scr_flag_get(arg0);
}
(856) == 0)
500
                        {
501
                            
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("seam");
502
                            msgsetloc(0, 
Face 0* Ah,Delay 11 I know what you're going to say. Now,Delay 11 now,Delay 11 there's no shame in it.Wait for input
"\\E0* Ah^1, I know what you're going to say. Now^1, now^1, there's no shame in it./", "obj_shop1_slash_Draw_0_gml_460_0_b"
);
503
                            msgnextloc(
Face 2* You fought the Knight,Delay 11 didn't you? Well,Delay 11 we all know there's no winning there...Wait for input
"\\E2* You fought the Knight^1, didn't you? Well^1, we all know there's no winning there.../", "obj_shop1_slash_Draw_0_gml_461_0_b"
);
504
                            msgnextloc(
Face 1* ...Delay 11 what!? You GOT the Shadow Crystal!?Wait for input
"\\E1* ..^1. what!? You GOT the Shadow Crystal!?/", "obj_shop1_slash_Draw_0_gml_462_0"
);
505
                            if (has_shadow_mantle)
506
                            {
507
                                msgnextloc(
Face 3* ...Delay 11 I see,Delay 11 so you were able to recover the Shadow Mantle.Wait for input
"\\E3* ..^1. I see^1, so you were able to recover the Shadow Mantle./", "obj_shop1_slash_Draw_0_gml_467_0"
);
508
                                msgnextloc(
Face 1* That's odd. Kris...Delay 11 where did you find it?Wait for input
"\\E1* That's odd. Kris..^1. where did you find it?/", "obj_shop1_slash_Draw_0_gml_468_0"
);
509
                            }
510
                            else
511
                            {
512
                                msgnextloc(
Face 1* ...Delay 11 And without even using the Shadow Mantle!?Wait for input
"\\E1* ..^1. And without even using the Shadow Mantle!?/", "obj_shop1_slash_Draw_0_gml_471_0"
);
513
                                msgnextloc(
Face 2* Hee hee...Delay 11 You three!Delay 11 You might be even sicker than that old clown!Wait for input
"\\E2* Hee hee..^1. You three^1! You might be even sicker than that old clown!/", "obj_shop1_slash_Draw_0_gml_472_0_b"
);
514
                                msgnextloc(
Face 0* Oh,Delay 11 it must've been a terrific match!Delay 11 If only I could've witnessed it...Wait for input
"\\E0* Oh^1, it must've been a terrific match^1! If only I could've witnessed it.../", "obj_shop1_slash_Draw_0_gml_473_0_b"
);
515
                            }
516
                        }
517
                    }
518
                    if (global.flag[1047 knight_ch3_status] == 2)
519
                    {
520
                        normal_route = false;
521
                        
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("seam");
522
                        msgsetloc(0, 
Face 0* Ah,Delay 11 I know what you're going to say. Now,Delay 11 now,Delay 11 there's no shame in it.Wait for input
"\\E0* Ah^1, I know what you're going to say. Now^1, now^1, there's no shame in it./", "obj_shop1_slash_Draw_0_gml_498_0"
);
523
                        msgnextloc(
Face 3* You fought the Knight,Delay 11 didn't you? Well,Delay 11 we all know there's no winning there...Wait for input
"\\E3* You fought the Knight^1, didn't you? Well^1, we all know there's no winning there.../", "obj_shop1_slash_Draw_0_gml_499_0"
);
524
                        if (has_shadow_mantle)
525
                        {
526
                            msgnextloc(
Face 0* Even with the SHADOW MANTLE,Delay 11 you might have had a chance...Wait for input
"\\E0* Even with the SHADOW MANTLE^1, you might have had a chance.../", "obj_shop1_slash_Draw_0_gml_503_0_b"
);
527
                            msgnextloc(
Face 3* But even then,Delay 11 getting the SHADOW CRYSTAL would be...Delay 11 challenging.Wait for input
"\\E3* But even then^1, getting the SHADOW CRYSTAL would be..^1. challenging./", "obj_shop1_slash_Draw_0_gml_504_0_b"
);
528
                        }
529
                        else
530
                        {
531
                            msgnextloc(
Face 1* If only you had the SHADOW MANTLE,Delay 11 your luck might have gone another way.Wait for input
"\\E1* If only you had the SHADOW MANTLE^1, your luck might have gone another way./", "obj_shop1_slash_Draw_0_gml_507_0_b"
);
532
                            msgnextloc(
Face 0* But,Delay 11 it's over now,Delay 11 isn't it? No mantle,Delay 11 no crystal.Wait for input
"\\E0* But^1, it's over now^1, isn't it? No mantle^1, no crystal./", "obj_shop1_slash_Draw_0_gml_508_0"
);
533
                        }
534
                        msgnextloc(
Face 0* Don't have a long face,Delay 11 now. We all knew nothing would come of this.Wait for input
"\\E0* Don't have a long face^1, now. We all knew nothing would come of this./", "obj_shop1_slash_Draw_0_gml_511_0"
);
535
                        msgnextloc(
Face 2* But it was fun...Delay 11 to pretend it might,Delay 11 for a little while.Wait for input
"\\E2* But it was fun..^1. to pretend it might^1, for a little while./", "obj_shop1_slash_Draw_0_gml_512_0"
);
536
                        msgnextloc(
Face 0* Thank you.Wait for inputClose Message
"\\E0* Thank you./%", "obj_shop1_slash_Draw_0_gml_513_0"
);
537
                        
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; if (
scr_debug())
show_debug_message("*** flag [" + string(arg0) + "] updated: " + string(arg1) + " | " + scr_flag_name_get(arg0)); } function scr_setflag(arg0, arg1) {
scr_flag_set(arg0, arg1);
}
(961, 1);
538
                    }
539
                }
540
                else if (scr_get_total_shadow_crystal_amount() == 3)
541
                {
542
                    normal_route = false;
543
                    if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; } function scr_flag_name_get(arg0) { if (!global.is_console) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } else { return ""; } } function scr_getflag(arg0) { return
scr_flag_get(arg0);
}
(856) == 0)
544
                    {
545
                        
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("seam");
546
                        msgsetloc(0, 
Face 1* What!? Is that...Delay 11 a Shadow Crystal!?Wait for input
"\\E1* What!? Is that..^1. a Shadow Crystal!?/", "obj_shop1_slash_Draw_0_gml_515_0"
);
547
                        msgnextloc(
Face 3* Meaning,Delay 11 you must have...Wait for input
"\\E3* Meaning^1, you must have.../", "obj_shop1_slash_Draw_0_gml_516_0"
);
548
                    }
549
                }
550
            }
551
            if (normal_route)
552
            {
553
                if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; } function scr_flag_name_get(arg0) { if (!global.is_console) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } else { return ""; } } function scr_getflag(arg0) { return
scr_flag_get(arg0);
}
(855) == 0)
554
                {
555
                    
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; if (
scr_debug())
show_debug_message("*** flag [" + string(arg0) + "] updated: " + string(arg1) + " | " + scr_flag_name_get(arg0)); } function scr_setflag(arg0, arg1) {
scr_flag_set(arg0, arg1);
}
(855, 1);
556
                    
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("seam");
557
                    msgsetloc(0, 
Face 0* I've got a funny story. You see,Delay 11 the Addisons wanted to buy out my store.Wait for input
"\\E0* I've got a funny story. You see^1, the Addisons wanted to buy out my store./", "obj_shop1_slash_Draw_0_gml_529_0"
);
558
                    msgnextloc(
Face 2* So I bet them for it on a game of cards.Wait for input
"\\E2* So I bet them for it on a game of cards./", "obj_shop1_slash_Draw_0_gml_530_0"
);
559
                    msgnextloc(
Face 3* Hand after hand,Delay 11 they lost and lost,Delay 11 stubbornly doubling their bet each time.Wait for input
"\\E3* Hand after hand^1, they lost and lost^1, stubbornly doubling their bet each time./", "obj_shop1_slash_Draw_0_gml_531_0"
);
560
                    msgnextloc(
Face 0* After a while,Delay 11 they'd lost their store,Delay 11 their money,Delay 11 and even some of their clothes...Wait for input
"\\E0* After a while^1, they'd lost their store^1, their money^1, and even some of their clothes.../", "obj_shop1_slash_Draw_0_gml_532_0"
);
561
                    msgnextloc(
Face 2* Hahaha!Wait for input
"\\E2* Hahaha!/", "obj_shop1_slash_Draw_0_gml_533_0"
);
562
                    msgnextloc(
Face 0* Of course,Delay 11 in the end,Delay 11 I laughed and gave it all back.Wait for input
"\\E0* Of course^1, in the end^1, I laughed and gave it all back./", "obj_shop1_slash_Draw_0_gml_534_0"
);
563
                    msgnextloc(
Face 2* But it was fun to give them a little scare.Wait for input
"\\E2* But it was fun to give them a little scare./", "obj_shop1_slash_Draw_0_gml_535_0"
);
564
                    msgnextloc(
Face 3* ...Delay 11 Although,Delay 11 not as fun as if they could actually win.Wait for inputClose Message
"\\E3* ..^1. Although^1, not as fun as if they could actually win./%", "obj_shop1_slash_Draw_0_gml_536_0"
);
565
                }
566
                else
567
                {
568
                    
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("seam");
569
                    msgsetloc(0, 
Face 0* ...Delay 11 It's funny you insist on hanging around here.Wait for input
"\\E0* ..^1. It's funny you insist on hanging around here./", "obj_shop1_slash_Draw_0_gml_540_0"
);
570
                    msgnextloc(
Face 2* I won't sell nor say anything new,Delay 11 I'm afraid.Wait for input
"\\E2* I won't sell nor say anything new^1, I'm afraid./", "obj_shop1_slash_Draw_0_gml_541_0"
);
571
                    msgnextloc(
Face 3* I'll brew a cup of tea and get out the blankets,Delay 11 but leave when you please.Wait for inputClose Message
"\\E3* I'll brew a cup of tea and get out the blankets^1, but leave when you please./%", "obj_shop1_slash_Draw_0_gml_542_0"
);
572
                }
573
            }
574
            else if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; } function scr_flag_name_get(arg0) { if (!global.is_console) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } else { return ""; } } function scr_getflag(arg0) { return
scr_flag_get(arg0);
}
(961) == 0)
575
            {
576
                if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; } function scr_flag_name_get(arg0) { if (!global.is_console) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } else { return ""; } } function scr_getflag(arg0) { return
scr_flag_get(arg0);
}
(856) == 0)
577
                {
578
                    
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; if (
scr_debug())
show_debug_message("*** flag [" + string(arg0) + "] updated: " + string(arg1) + " | " + scr_flag_name_get(arg0)); } function scr_setflag(arg0, arg1) {
scr_flag_set(arg0, arg1);
}
(856, 1);
579
                    msgnextloc(
Face 2* ...Delay 11 Well,Delay 11 never mind that!Delay 11 You got the Crystal,Delay 11 that's all that matters!Wait for input
"\\E2* ..^1. Well^1, never mind that^1! You got the Crystal^1, that's all that matters!/", "obj_shop1_slash_Draw_0_gml_477_0_b"
);
580
                    msgnextloc(
Face 0* Now you've got three. Only two more,Delay 11 and we should have enough...Wait for input
"\\E0* Now you've got three. Only two more^1, and we should have enough.../", "obj_shop1_slash_Draw_0_gml_478_0_b"
);
581
                    msgnextloc(
Face 2* ...Delay 11 to make something I think you'll quite enjoy. Now good luck...Delay 11 and I'll be taking that Shadow Crystal.Wait for inputClose Message
"\\E2* ..^1. to make something I think you'll quite enjoy. Now good luck..^1. and I'll be taking that Shadow Crystal./%", "obj_shop1_slash_Draw_0_gml_479_0_b"
);
582
                    
scr_keyitemremove
scr_keyitemremove

function
scr_keyitemremove(arg0)
{ removed = 0;
scr_keyitemcheck(arg0);
if (haveit == 1) { loc = 0; skip = 0; if (global.keyitem[0] == arg0 && skip == 0) { loc = 0; skip = 1; } if (global.keyitem[1] == arg0 && skip == 0) { loc = 1; skip = 1; } if (global.keyitem[2] == arg0 && skip == 0) { loc = 2; skip = 1; } if (global.keyitem[3] == arg0 && skip == 0) { loc = 3; skip = 1; } if (global.keyitem[4] == arg0 && skip == 0) { loc = 4; skip = 1; } if (global.keyitem[5] == arg0 && skip == 0) { loc = 5; skip = 1; } if (global.keyitem[6] == arg0 && skip == 0) { loc = 6; skip = 1; } if (global.keyitem[7] == arg0 && skip == 0) { loc = 7; skip = 1; } if (global.keyitem[8] == arg0 && skip == 0) { loc = 8; skip = 1; } if (global.keyitem[9] == arg0 && skip == 0) { loc = 9; skip = 1; } if (global.keyitem[10] == arg0 && skip == 0) { loc = 10; skip = 1; } if (global.keyitem[11] == arg0 && skip == 0) { loc = 11; skip = 1; }
scr_keyitemshift(loc, 0);
removed = 1; } } function scr_keyitemremove_all(arg0) { var count = 0; for (var i = 0; i < array_length(global.keyitem); i++) { if (global.keyitem[i] == arg0) count++; } repeat (count)
scr_keyitemremove(arg0);
}
(13);
583
                    took_crystal = true;
584
                }
585
                else
586
                {
587
                    
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("seam");
588
                    msgsetloc(0, 
Face 0* It's strange. By all reasonable means,Delay 11 the strength of your next opponent...Wait for input
"\\E0* It's strange. By all reasonable means^1, the strength of your next opponent.../", "obj_shop1_slash_Draw_0_gml_486_0_b"
);
589
                    msgnextloc(
Face 1* Should be enough to already ring the bell on your defeat.Wait for input
"\\E1* Should be enough to already ring the bell on your defeat./", "obj_shop1_slash_Draw_0_gml_487_0"
);
590
                    msgnextloc(
Face 0* But,Delay 11 for some reason...Delay 11 I can't help but think you may win.Wait for input
"\\E0* But^1, for some reason..^1. I can't help but think you may win./", "obj_shop1_slash_Draw_0_gml_488_0"
);
591
                    msgnextloc(
Face 2* What is this feeling? ...Delay 11 Hope? Hahaha!Delay 11 Whatever it is,Delay 11 it's quite funny!Wait for inputClose Message
"\\E2* What is this feeling? ..^1. Hope? Hahaha^1! Whatever it is^1, it's quite funny!/%", "obj_shop1_slash_Draw_0_gml_489_0"
);
592
                }
593
            }
594
        }
595
        instance_create(30, 270, obj_writer);
596
        selling = 1;
597
    }
598
    if (selling == 1 && instance_exists(obj_writer) == false)
599
    {
600
        if (took_crystal)
601
        {
602
            took_crystal = false;
603
            snd_play(snd_item);
604
        }
605
        if (sell == 2)
606
        {
607
            selling = 2;
608
            event_user(1);
609
        }
610
        else
611
        {
612
            if (sell == 1 || sell == 7 || sell == 10)
613
                menu = 0;
614
            else
615
                menu = 3;
616
            sell = 0;
617
            selling = 0;
618
        }
619
    }
620
}
621
if (down_p())
622
{
623
    if (menu != 11 && menu != 12 && menu != 13)
624
    {
625
        menuc[menu] += 1;
626
        if (menuc[menu] > menumax)
627
            menuc[menu] = 0;
628
    }
629
}
630
if (up_p())
631
{
632
    if (menu != 11 && menu != 12 && menu != 13)
633
    {
634
        menuc[menu] -= 1;
635
        if (menuc[menu] < 0)
636
            menuc[menu] = menumax;
637
    }
638
}
639
if (menu < 4 || menu >= 10)
640
{
641
    draw_text(440, 420, "$" + string_hash_to_newline(string(global.gold)));
642
    if (menu == 1 || menu == 2)
643
    {
644
        if (menuc[1] < 4)
645
            
scr_shop_space_display
scr_shop_space_display

function
scr_shop_space_display(arg0, arg1 = 545, arg2 = 398)
{ var item_id = item[arg0]; var __cx = camerax(); var __cy = cameray(); if (itemtype[arg0] == "item") {
scr_itemcheck(0);
var inventory_space = 12 - itemcount; var inventory_amount = "00"; if (inventory_space < 10) inventory_amount = "0" + string(inventory_space); else inventory_amount = string(inventory_space); var y_offset = (global.lang == "ja") ? 4 : 0; var base_y_pos = __cy + arg2 + y_offset; var line_height = 12; draw_sprite_ext(
scr_84_get_sprite("spr_shop_space_ui"), 0, __cx + arg1, base_y_pos, 1, 1, 0, c_white, 1);
draw_set_font(fnt_8bit); draw_text_ext_transformed(__cx + arg1 + 1, base_y_pos + line_height + 4, inventory_amount + "/12", 1, 999, 0.5, 0.5, 0); draw_set_font(fnt_main); draw_sprite_ext(
scr_84_get_sprite("spr_shop_space_ui"), 2, __cx + arg1, base_y_pos + (line_height * 2) + 8, 1, 1, 0, c_white, 1);
scr_itemcheck_pocket(0);
var storage_space = global.flag[64 storage_size] - itemcount; var storage_amount = "00"; if (storage_space < 10) storage_amount = "0" + string(storage_space); else storage_amount = string(storage_space); draw_set_font(fnt_8bit); draw_text_ext_transformed(__cx + arg1 + 1, base_y_pos + (line_height * 3) + 12, storage_amount + "/" + string(global.flag[64 storage_size]), 1, 999, 0.5, 0.5, 0); draw_set_font(fnt_main); } else { var inventory_space = 0; if (itemtype[arg0] == "weapon") {
scr_weaponcheck_inventory(0);
inventory_space = 48 - itemcount; } else {
scr_armorcheck_inventory(0);
inventory_space = 48 - itemcount; } var inventory_amount = "00"; if (inventory_space < 10) inventory_amount = "0" + string(inventory_space); else inventory_amount = string(inventory_space); var base_y_pos = (__cy + arg2 + 20) - 8; var line_height = 12; var header_index = (itemtype[arg0] == "weapon") ? 3 : 4; var header_y_pos = langopt(base_y_pos, base_y_pos + line_height); draw_sprite_ext(
scr_84_get_sprite("spr_shop_space_ui"), header_index, __cx + arg1, header_y_pos, 1, 1, 0, c_white, 1);
var inventory_y_pos = langopt(base_y_pos + line_height, base_y_pos); var inventory_index = (global.lang == "ja") ? 1 : 0; draw_sprite_ext(
scr_84_get_sprite("spr_shop_space_ui"), inventory_index, __cx + arg1, inventory_y_pos, 1, 1, 0, c_white, 1);
draw_set_font(fnt_8bit); draw_text_ext_transformed(__cx + arg1 + 1, base_y_pos + (line_height * 2) + 4, inventory_amount + "/48", 1, 999, 0.5, 0.5, 0); draw_set_font(fnt_main); } } function scr_shopspace_displaybox(arg0 = "item", arg1 = 413, arg2 = 161, arg3 = true, arg4 = false) { var cx = camerax(); var cy = cameray(); var xpos = cx + (arg1 - 8); var ypos = cy + (arg2 - 8); var wid = 211; var hei = 97; if (arg3) { draw_sprite_ext(spr_pxwhite, 0, xpos + 18, ypos + 18, wid - 36, hei - 36, 0, c_black, 1);
scr_darkbox(xpos, ypos, xpos + wid, ypos + hei);
if (arg4) draw_sprite_ext(spr_pxwhite, 0, xpos + 22, (ypos - 2) + 8, 168, 2, 0, #9DA2C4, 1); } draw_set_color(c_white); draw_set_font(fnt_mainbig); draw_text(xpos + 39 + 8, ypos + 24 + 8, "$" + string(global.gold)); item = [0]; itemtype = [arg0];
scr_shop_space_display(0, (xpos - cx) + 131, (ypos - cy) + 21);
}
(menuc[1]);
646
    }
647
}
648
onebuffer -= 1;
649
twobuffer -= 1;