Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shop_vending_Draw_0

(view raw script w/o annotations or w/e)
1
depth = 5000;
2
if (!is_interacting)
3
    exit;
4
if (global.interact == 0)
5
    global.interact = 1;
6
if (is_talking)
7
{
8
    if (!d_ex())
9
        is_talking = false;
10
    else
11
        exit;
12
}
13
else if (d_ex())
14
{
15
    exit;
16
}
17
if (menu_display_type == 0)
18
{
19
    if (shopcharx > -20)
20
        shopcharx -= 4;
21
    if (shopcharx > -40)
22
        shopcharx -= 4;
23
    if (shopcharx > -80)
24
        shopcharx -= 4;
25
    if (shopcharx <= -80)
26
        shopcharx = -80;
27
}
28
else
29
{
30
    if (shopcharx < -50)
31
        shopcharx += 4;
32
    if (shopcharx < -30)
33
        shopcharx += 4;
34
    if (shopcharx < 0)
35
        shopcharx += 4;
36
    if (shopcharx > 0)
37
        shopcharx = 0;
38
}
39
talkbuffer -= 1;
40
draw_set_color(c_black);
41
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);
42
if (menu_display_type == 0)
43
{
44
    
scr_darkbox_black
scr_darkbox_black

function
scr_darkbox_black(arg0, arg1, arg2, arg3)
{ draw_set_color(c_black); draw_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
}
(camerax(), cameray() + 240, camerax() + 415, cameray() + 480);
45
    
scr_darkbox_black
scr_darkbox_black

function
scr_darkbox_black(arg0, arg1, arg2, arg3)
{ draw_set_color(c_black); draw_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
}
(camerax() + 400, cameray() + 240, camerax() + 640, cameray() + 480);
46
}
47
else if (menu_display_type == 1)
48
{
49
    
scr_darkbox_black
scr_darkbox_black

function
scr_darkbox_black(arg0, arg1, arg2, arg3)
{ draw_set_color(c_black); draw_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
}
(camerax(), cameray() + 240, camerax() + 640, cameray() + 480);
50
}
51
if (menu == 0)
52
{
53
    sidemessage = 0;
54
    menuc[1] = 0;
55
    menuc[2] = 0;
56
    menuc[3] = 0;
57
    menuc[4] = 0;
58
    menu_display_type = 0;
59
    if (instance_exists(obj_writer) == false)
60
    {
61
        global.typer = 6;
62
        global.msg[0] = default_text;
63
        var writer = instance_create(camerax() + 30, cameray() + 270, obj_writer);
64
    }
65
    menumax = array_length(menu_list) - 1;
66
    draw_set_color(c_white);
67
    
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");
68
    for (var i = 0; i < array_length(menu_list); i++)
69
        draw_text(camerax() + 480, cameray() + ((130 + (i * 20)) * 2), string_hash_to_newline(menu_list[i].option_text));
70
    menuc[0] = min(menuc[0], menumax);
71
    draw_sprite(spr_heart, 0, camerax() + 450, (135 + (menuc[0] * 20)) * 2);
72
    if (button1_p() && onebuffer < 0)
73
    {
74
        onebuffer = 2;
75
        mainmessage = 1;
76
        with (obj_writer)
77
            instance_destroy();
78
        menu = menu_list[menuc[0]].menu_type;
79
        if (menu == 99)
80
        {
81
            alarm[10]
 = 1;
gml_Object_obj_shop_vending_Alarm_10.gml

is_interacting = false; sell = 0; selling = 0; sidemessage = 0; menuc[0] = 0; menuc[1] = 0; menuc[2] = 0; menuc[3] = 0; menuc[4] = 0; menu = 0; submenu = 0; global.interact = 0; instance_destroy();
82
            exit;
83
        }
84
        else
85
        {
86
            menu_list[menuc[0]].times_selected++;
87
            menu_display_type = 0;
88
            if (menu == 4 || menu == 6)
89
            {
90
                menu_talk_flag = menu_list[menuc[0]].talk_flag;
91
                menu_talk_style = menu_list[menuc[0]].talk_style;
92
                menu_display_type = 1;
93
                menu_talk_con = 0;
94
            }
95
        }
96
    }
97
}
98
if (menu == 1 || menu == 2)
99
{
100
    draw_set_color(c_white);
101
    
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");
102
    var sold_out_text = stringsetloc(
SOLD OUT
"SOLD OUT", "obj_shop_vending_slash_Draw_0_gml_153_0"
);
103
    for (var i = 0; i < itemtotal; i += 1)
104
    {
105
        if (itemtype[i] == "key")
106
        {
107
            var sold_value = stringsetsubloc("~1 PTs", string(buyvalue[i]), "obj_shop_vending_slash_Draw_0_gml_122_0");
108
            var sold_out = false;
109
            if (
scr_keyitemcheck
scr_keyitemcheck

function
scr_keyitemcheck(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 12; i += 1) { if (global.keyitem[i] == arg0) haveit = 1; if (global.keyitem[i] == arg0) itemcount += 1; } return haveit; }
(item[i]))
110
                sold_out = true;
111
            if (sold_out)
112
            {
113
                draw_set_color(c_gray);
114
                sold_value = sold_out_text;
115
            }
116
            draw_text(camerax() + 60, 260 + (i * 40), string_hash_to_newline(shopitemname[i]));
117
            draw_text(camerax() + 300, 260 + (i * 40), string_hash_to_newline(sold_value));
118
            draw_set_color(c_white);
119
        }
120
        else if (itemtype[i] == "event")
121
        {
122
            var sold_out = false;
123
            if (array_length(sold_flag[i]) > 0)
124
            {
125
                var _flag = sold_flag[i][0];
126
                var _min_value = sold_flag[i][1];
127
                sold_out = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(_flag) >= _min_value;
128
            }
129
            if (sold_out)
130
            {
131
                draw_set_color(c_gray);
132
                draw_text(camerax() + 60, 260 + (i * 40), sold_out_text);
133
                draw_set_color(c_white);
134
            }
135
            else
136
            {
137
                draw_text(camerax() + 60, 260 + (i * 40), string_hash_to_newline(shopitemname[i]));
138
                draw_text(camerax() + 300, 260 + (i * 40), string_hash_to_newline(price_label[i]));
139
            }
140
        }
141
        else
142
        {
143
            draw_text(camerax() + 60, 260 + (i * 40), string_hash_to_newline(shopitemname[i]));
144
            if (menu_dollar)
145
                draw_text(camerax() + 300, 260 + (i * 40), string_hash_to_newline(stringsetsubloc("$~1", string(buyvalue[i]), "obj_shop_vending_slash_Draw_0_gml_149_0")));
146
            else
147
                draw_text(camerax() + 300, 260 + (i * 40), string_hash_to_newline(stringsetsubloc("~1 PTs", string(buyvalue[i]), "obj_shop_vending_slash_Draw_0_gml_162_0")));
148
        }
149
    }
150
    draw_text(camerax() + 60, 260 + (itemtotal * 40), string_hash_to_newline(stringsetloc(
Exit
"Exit", "obj_shop1_slash_Draw_0_gml_139_0"
)));
151
    if (menu == 1)
152
    {
153
        menumax = itemtotal;
154
        if (instance_exists(obj_writer) == false)
155
        {
156
            msgset(0, sidemessage_list[sidemessage]);
157
            instance_create(camerax() + 450, 260, obj_writer);
158
        }
159
        menuc[1] = min(menuc[1], menumax);
160
        draw_sprite(spr_heart, 0, camerax() + 30, 270 + (menuc[1] * 40));
161
        var can_buy = true;
162
        if (itemtype[menuc[1]] == "key")
163
        {
164
            if (
scr_keyitemcheck
scr_keyitemcheck

function
scr_keyitemcheck(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 12; i += 1) { if (global.keyitem[i] == arg0) haveit = 1; if (global.keyitem[i] == arg0) itemcount += 1; } return haveit; }
(item[menuc[1]]))
165
                can_buy = false;
166
        }
167
        else if (itemtype[menuc[1]] == "event")
168
        {
169
            if (array_length(sold_flag[menuc[1]]) > 0)
170
            {
171
                var _flag = sold_flag[menuc[1]][0];
172
                var _min_value = sold_flag[menuc[1]][1];
173
                can_buy = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(_flag) < _min_value;
174
                if (!can_buy)
175
                    shopdesc[menuc[1]] = "";
176
            }
177
        }
178
        if (can_buy && button1_p() && onebuffer < 0)
179
        {
180
            menu = 2;
181
            onebuffer = 2;
182
            with (obj_writer)
183
                instance_destroy();
184
            if (menuc[1] == menumax)
185
                menu = 0;
186
        }
187
        if (button2_p() && twobuffer < 0 && onebuffer < 2)
188
        {
189
            menu = 0;
190
            twobuffer = 2;
191
            minimenuy = 220;
192
            with (obj_writer)
193
                instance_destroy();
194
        }
195
        menuc[2] = 0;
196
    }
197
    if (menu == 2)
198
    {
199
        menumax = 1;
200
        draw_set_color(c_white);
201
        
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");
202
        var y1_off = langopt(260, 290);
203
        var y2_off = langopt(290, 260);
204
        draw_text(camerax() + 460, y1_off, string_hash_to_newline(stringsetloc(
Buy it for
"Buy it for", "obj_shop_vending_slash_Draw_0_gml_223_0"
)));
205
        if (menu_dollar)
206
            draw_text(camerax() + 460, y2_off, string_hash_to_newline(stringsetsubloc("$~1 ?", string(buyvalue[menuc[1]]), "obj_shop_vending_slash_Draw_0_gml_196_0")));
207
        else
208
            draw_text(camerax() + 460, y2_off, string_hash_to_newline(stringsetsubloc("~1 PTs?", string(buyvalue[menuc[1]]), "obj_shop_vending_slash_Draw_0_gml_224_0")));
209
        draw_text(camerax() + 480, 340, string_hash_to_newline(stringsetloc(
Yes
"Yes", "obj_shop_vending_slash_Draw_0_gml_225_0"
)));
210
        draw_text(camerax() + 480, 370, string_hash_to_newline(stringsetloc(
No
"No", "obj_shop_vending_slash_Draw_0_gml_226_0"
)));
211
        menuc[2] = min(menuc[2], menumax);
212
        draw_sprite(spr_heart, 0, camerax() + 450, 350 + (menuc[2] * 30));
213
        if (button2_p() && twobuffer < 0)
214
        {
215
            menu = 1;
216
            sidemessage = 0;
217
            twobuffer = 2;
218
            onebuffer = 2;
219
        }
220
        if (button1_p() && onebuffer < 0 && twobuffer < 0)
221
        {
222
            if (menuc[2] == 0)
223
            {
224
                if (itemtype[menuc[1]] == "event")
225
                {
226
                    if (button1_p() && onebuffer < 0)
227
                    {
228
                        event_active = true;
229
                        sidemessage = 0;
230
                        menu = 1;
231
                        exit;
232
                    }
233
                }
234
                else
235
                {
236
                    afford = 0;
237
                    if (menu_dollar)
238
                    {
239
                        if (global.gold >= buyvalue[menuc[1]])
240
                            afford = 1;
241
                    }
242
                    else if (global.flag[1044 points] >= buyvalue[menuc[1]])
243
                    {
244
                        afford = 1;
245
                    }
246
                    if (afford == 1)
247
                    {
248
                        _pocketed = 0;
249
                        if (itemtype[menuc[1]] == "item")
250
                            
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]]);
251
                        if (itemtype[menuc[1]] == "weapon")
252
                            
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]]);
253
                        if (itemtype[menuc[1]] == "armor")
254
                            
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]]);
255
                        if (itemtype[menuc[1]] == "key")
256
                            
scr_keyitemget
scr_keyitemget

function
scr_keyitemget(arg0)
{ i = 0; loop = 1; noroom = 0; global.item[12] = 999; while (loop == 1) { if (global.keyitem[i] == 0) { global.keyitem[i] = arg0; break; } if (i == 12) { noroom = 1; break; } i += 1; } script_execute(scr_keyiteminfo_all); }
(item[menuc[1]]);
257
                        if (menu_dollar)
258
                        {
259
                            if (noroom == 0)
260
                            {
261
                                global.gold -= buyvalue[menuc[1]];
262
                                snd_play(snd_locker);
263
                                if (_pocketed == 1)
264
                                    sidemessage = 4;
265
                                else
266
                                    sidemessage = 1;
267
                            }
268
                        }
269
                        else if (noroom == 0)
270
                        {
271
                            global.flag[1044 points] -= buyvalue[menuc[1]];
272
                            snd_play(snd_locker);
273
                            if (_pocketed == 1)
274
                                sidemessage = 4;
275
                            else
276
                                sidemessage = 1;
277
                        }
278
                        if (noroom == 1)
279
                            sidemessage = 3;
280
                    }
281
                    else
282
                    {
283
                        sidemessage = 2;
284
                    }
285
                }
286
            }
287
            if (menuc[2] == 1)
288
                sidemessage = 0;
289
            menu = 1;
290
        }
291
    }
292
    if (menuc[1] != itemtotal)
293
    {
294
        if (minimenuy <= 20)
295
            minimenuy = 20;
296
        if (minimenuy > 20)
297
            minimenuy -= 5;
298
        if (minimenuy > 50)
299
            minimenuy -= 5;
300
        if (minimenuy > 100)
301
            minimenuy -= 8;
302
        if (minimenuy > 150)
303
            minimenuy -= 10;
304
        if (itemtype[menuc[1]] == "event")
305
        {
306
            if (array_length(sold_flag[menuc[1]]) > 0)
307
            {
308
                var _flag = sold_flag[menuc[1]][0];
309
                var _min_value = sold_flag[menuc[1]][1];
310
                var can_buy = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(_flag) < _min_value;
311
                if (!can_buy)
312
                {
313
                    if (minimenuy < 200)
314
                        minimenuy += 40;
315
                    if (minimenuy >= 200)
316
                        minimenuy = 200;
317
                }
318
            }
319
        }
320
    }
321
    else
322
    {
323
        if (minimenuy < 200)
324
            minimenuy += 40;
325
        if (minimenuy >= 200)
326
            minimenuy = 200;
327
    }
328
}
329
if (menu == 4 || menu == 6)
330
{
331
    if (instance_exists(obj_writer) == false && menu_talk_con == 0)
332
    {
333
        talk_counter = menu_list[menuc[0]].times_selected;
334
        event_user(2);
335
        if (menu_talk_style == 1)
336
            d_make();
337
        else if (menu_talk_style == 2)
338
            alarm[10]
 = 1;
gml_Object_obj_shop_vending_Alarm_10.gml

is_interacting = false; sell = 0; selling = 0; sidemessage = 0; menuc[0] = 0; menuc[1] = 0; menuc[2] = 0; menuc[3] = 0; menuc[4] = 0; menu = 0; submenu = 0; global.interact = 0; instance_destroy();
339
        else
340
            instance_create(camerax() + 30, cameray() + 270, obj_writer);
341
        is_talking = true;
342
        menu_talk_con = 1;
343
    }
344
    if (menu_talk_con == 1 && instance_exists(obj_writer) == false)
345
    {
346
        if (event_active)
347
        {
348
            event_active = false;
349
            event_con = 0;
350
        }
351
        if (menu == 4)
352
        {
353
            menu = 0;
354
            menu_talk_con = 0;
355
        }
356
        if (menu == 6)
357
        {
358
            menu_display_type = 99;
359
            if (!d_ex())
360
            {
361
                menu = 0;
362
                menu_talk_con = 0;
363
                alarm[10]
 = 1;
gml_Object_obj_shop_vending_Alarm_10.gml

is_interacting = false; sell = 0; selling = 0; sidemessage = 0; menuc[0] = 0; menuc[1] = 0; menuc[2] = 0; menuc[3] = 0; menuc[4] = 0; menu = 0; submenu = 0; global.interact = 0; instance_destroy();
364
                exit;
365
            }
366
        }
367
    }
368
}
369
if (menu == 10)
370
{
371
    menuc[11] = 0;
372
    menuc[12] = 0;
373
    menuc[13] = 0;
374
    menumax = 4;
375
    draw_set_color(c_white);
376
    
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");
377
    draw_text(camerax() + 80, cameray() + 260, string_hash_to_newline(stringsetloc(
Sell Items
"Sell Items", "obj_shop_vending_slash_Draw_0_gml_339_0"
)));
378
    draw_text(camerax() + 80, cameray() + 300, string_hash_to_newline(stringsetloc(
Sell Weapons
"Sell Weapons", "obj_shop_vending_slash_Draw_0_gml_340_0"
)));
379
    draw_text(camerax() + 80, cameray() + 340, string_hash_to_newline(stringsetloc(
Sell Armor
"Sell Armor", "obj_shop_vending_slash_Draw_0_gml_341_0"
)));
380
    draw_text(camerax() + 80, cameray() + 380, string_hash_to_newline(stringsetloc(
Sell Pocket Items
"Sell Pocket Items", "obj_shop_vending_slash_Draw_0_gml_342_0"
)));
381
    draw_text(camerax() + 80, cameray() + 420, string_hash_to_newline(stringsetloc(
Return
"Return", "obj_shop_vending_slash_Draw_0_gml_343_0"
)));
382
    if (instance_exists(obj_writer) == false)
383
    {
384
        if (sidemessage == 0)
385
            global.msg[0] = stringsetloc(
Select an
object.
"Select an&object.", "obj_shop_vending_slash_Draw_0_gml_348_0"
);
386
        if (sidemessage == 1)
387
            global.msg[0] = stringsetloc(
Object
sold.
"Object&sold.", "obj_shop_vending_slash_Draw_0_gml_349_0"
);
388
        if (sidemessage == 2)
389
            global.msg[0] = stringsetloc(
Nothing
to sell.
"Nothing&to sell.", "obj_shop_vending_slash_Draw_0_gml_350_0"
);
390
        instance_create(camerax() + 460, cameray() + 260, obj_writer);
391
    }
392
    menuc[10] = min(menuc[10], menumax);
393
    draw_sprite(spr_heart, 0, camerax() + 50, cameray() + 270 + (menuc[10] * 40));
394
    if (button1_p() && onebuffer < 0)
395
    {
396
        pagemax = 0;
397
        sidemessage2 = 0;
398
        onebuffer = 2;
399
        with (obj_writer)
400
            instance_destroy();
401
        can = 1;
402
        idealmenu = menuc[10] + 11;
403
        if (idealmenu == 11)
404
        {
405
            
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);
406
            if (itemcount == 12)
407
            {
408
                sidemessage = 2;
409
                can = 0;
410
            }
411
            nothingcount = itemcount;
412
            
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; } }
();
413
            selltype = "item";
414
            selltotal = 12;
415
            for (var i = 0; i < selltotal; i++)
416
            {
417
                itemsellvalue[i] = global.itemvalue[i];
418
                itemsellname[i] = global.itemnameb[i];
419
            }
420
        }
421
        if (idealmenu == 12)
422
        {
423
            
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);
424
            if (itemcount == 48)
425
            {
426
                sidemessage = 2;
427
                can = 0;
428
            }
429
            
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; } }
();
430
        }
431
        if (idealmenu == 13)
432
        {
433
            
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);
434
            if (itemcount == 48)
435
            {
436
                sidemessage = 2;
437
                can = 0;
438
            }
439
            
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; } }
();
440
        }
441
        if (idealmenu == 14)
442
        {
443
            
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);
444
            if (itemcount == global.flag[64 storage_size])
445
            {
446
                sidemessage = 2;
447
                can = 0;
448
            }
449
            selltype = "pocket";
450
            nothingcount = 0;
451
            selltotal = global.flag[64 storage_size];
452
            for (var i = 0; i < global.flag[64 storage_size]; i++)
453
            {
454
                
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(
Dark Candy
"Dark Candy", "scr_iteminfo_slash_scr_iteminfo_gml_15_0"
);
itemdescb = stringsetloc(
Heals#40HP
"Heals#40HP", "scr_iteminfo_slash_scr_iteminfo_gml_16_0"
);
itemtarget = 1; value = 25; 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]);
455
                itemsellvalue[i] = value;
456
                itemsellname[i] = itemnameb;
457
            }
458
            idealmenu = 11;
459
        }
460
        if (menuc[10] < menumax)
461
        {
462
            if (can == 1)
463
                menu = idealmenu;
464
            sidemessage1 = 0;
465
        }
466
        else
467
        {
468
            menu = 0;
469
        }
470
        submenu = 0;
471
        submenuc[1] = 0;
472
    }
473
    if (button2_p() && twobuffer < 0 && onebuffer < 0)
474
    {
475
        twobuffer = 2;
476
        menu = 0;
477
        with (obj_writer)
478
            instance_destroy();
479
    }
480
}
481
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);
482
if (menu == 11 || menu == 12 || menu == 13 || menu == 14)
483
{
484
    if (instance_exists(obj_writer) == false)
485
    {
486
        if (sidemessage2 == 0 && (menu == 11 || menu == 14))
487
            global.msg[0] = stringsetloc(
Select
ITEM
to sell.
"Select&ITEM&to sell.", "obj_shop_vending_slash_Draw_0_gml_435_0"
);
488
        if (sidemessage2 == 0 && menu == 12)
489
            global.msg[0] = stringsetloc(
Select
WEAPON
to sell.
"Select&WEAPON&to sell.", "obj_shop_vending_slash_Draw_0_gml_436_0"
);
490
        if (sidemessage2 == 0 && menu == 13)
491
            global.msg[0] = stringsetloc(
Select
ARMOR
to sell.
"Select&ARMOR&to sell.", "obj_shop_vending_slash_Draw_0_gml_437_0"
);
492
        if (sidemessage2 == 1)
493
            global.msg[0] = stringsetloc(
Thank
you for
the sale.
"Thank&you for&the sale.", "obj_shop_vending_slash_Draw_0_gml_438_0"
);
494
        if (sidemessage2 == 2)
495
            global.msg[0] = stringsetloc(
What
will
you do?
"What&will&you do?", "obj_shop_vending_slash_Draw_0_gml_439_0"
);
496
        if (sidemessage2 == 3)
497
            global.msg[0] = stringsetloc(
It won't
fit.
"It won't&fit.", "obj_shop_vending_slash_Draw_0_gml_440_0"
);
498
        if (sidemessage2 == 4)
499
            global.msg[0] = stringsetloc(
No
value.
"No&value.", "obj_shop_vending_slash_Draw_0_gml_441_0"
);
500
        instance_create(camerax() + 450, cameray() + 260, obj_writer);
501
    }
502
}
503
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);
504
if (menu == 15 || menu == 16 || menu == 17 || menu == 18)
505
{
506
    menumax = 1;
507
    draw_set_color(c_white);
508
    
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");
509
    var y1_off = langopt(260, 290);
510
    var y2_off = langopt(290, 260);
511
    draw_text(camerax() + 460, y1_off, string_hash_to_newline(stringsetloc(
Sell it for
"Sell it for", "obj_shop_vending_slash_Draw_0_gml_455_0"
)));
512
    draw_text(camerax() + 460, y2_off, string_hash_to_newline(stringsetsubloc("$~1 ?", string(sellvalue), "obj_shop_vending_slash_Draw_0_gml_456_0")));
513
    draw_text(camerax() + 480, cameray() + 340, string_hash_to_newline(stringsetloc(
Yes
"Yes", "obj_shop_vending_slash_Draw_0_gml_457_0"
)));
514
    draw_text(camerax() + 480, cameray() + 370, string_hash_to_newline(stringsetloc(
No
"No", "obj_shop_vending_slash_Draw_0_gml_458_0"
)));
515
    menuc[menu] = min(menuc[menu], menumax);
516
    draw_sprite(spr_heart, 0, camerax() + 450, cameray() + 350 + (menuc[menu] * 30));
517
}
518
if (down_p())
519
{
520
    if (menu != 11 && menu != 12 && menu != 13)
521
    {
522
        menuc[menu] += 1;
523
        if (menuc[menu] > menumax)
524
            menuc[menu] = 0;
525
    }
526
}
527
if (up_p())
528
{
529
    if (menu != 11 && menu != 12 && menu != 13)
530
    {
531
        menuc[menu] -= 1;
532
        if (menuc[menu] < 0)
533
            menuc[menu] = menumax;
534
    }
535
}
536
if (menu < itemtotal || menu >= 10)
537
{
538
    if (menu >= 10 && menu < 18)
539
        draw_text(camerax() + 440, 420, "$" + string_hash_to_newline(string(global.gold)));
540
    else if (menu_dollar)
541
        draw_text(camerax() + 440, 420, string_hash_to_newline("$" + string(global.gold)));
542
    else
543
        draw_text((camerax() + 440) - 10, 420, string_hash_to_newline(string(global.flag[1044 points])) + " PTs");
544
    if (itemtype[menuc[1]] != "key" && itemtype[menuc[1]] != "event")
545
    {
546
        if (menu == 1 || menu == 2)
547
        {
548
            if (menuc[1] < itemtotal)
549
                
scr_shop_space_display
scr_shop_space_display

function
scr_shop_space_display(arg0)
{ var item_id = item[arg0]; 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 base_y_pos = (cameray() + 418) - 20; var line_height = 12; draw_sprite_ext(
scr_84_get_sprite("spr_shop_space_ui"), 0, camerax() + 555, base_y_pos, 1, 1, 0, c_white, 1);
draw_set_font(fnt_8bit); draw_text_ext_transformed(camerax() + 555 + 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, camerax() + 555, 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(camerax() + 555 + 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 = (cameray() + 418) - 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, camerax() + 555, 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, camerax() + 555, inventory_y_pos, 1, 1, 0, c_white, 1);
draw_set_font(fnt_8bit); draw_text_ext_transformed(camerax() + 555 + 1, base_y_pos + (line_height * 2) + 4, inventory_amount + "/48", 1, 999, 0.5, 0.5, 0); draw_set_font(fnt_main); } }
(menuc[1]);
550
        }
551
    }
552
}
553
onebuffer -= 1;
554
twobuffer -= 1;