| 1 | 
        buffer += 1;  | 
    
    
    
        | 2 | 
        global.interact = 1;  | 
    
    
    
        | 3 | 
        if (buffer > 3)  | 
    
    
    
        | 4 | 
        { | 
    
    
    
        | 5 | 
            boxno = 300;  | 
    
    
    
        | 6 | 
            if (boxtype == 1)  | 
    
    
    
        | 7 | 
                boxno = 312;  | 
    
    
    
        | 8 | 
            xx = view_xview[view_current];  | 
    
    
    
        | 9 | 
            yy = view_yview[view_current] + 6;  | 
    
    
    
        | 10 | 
            var boxofs = 8;  | 
    
    
    
        | 11 | 
            var heartofs = 9;  | 
    
    
    
        | 12 | 
            var itemofs = 23;  | 
    
    
    
        | 13 | 
            if (global.language == "ja")  | 
    
    
    
        | 14 | 
            { | 
    
    
    
        | 15 | 
                boxofs = 6;  | 
    
    
    
        | 16 | 
                heartofs = 7;  | 
    
    
    
        | 17 | 
                itemofs = 19;  | 
    
    
    
        | 18 | 
            }  | 
    
    
    
        | 19 | 
            draw_set_color(c_white);  | 
    
    
    
        | 20 | 
            ossafe_fill_rectangle(xx + boxofs, yy + (boxofs - 6), xx + (320 - boxofs), yy + (234 - boxofs));  | 
    
    
    
        | 21 | 
            draw_set_color(c_black);  | 
    
    
    
        | 22 | 
            ossafe_fill_rectangle(xx + (boxofs + 3), yy + (boxofs - 3), xx + (317 - boxofs), yy + (231 - boxofs));  | 
    
    
    
        | 23 | 
            scr_setfontscr_setfontvar newfont = argument0;
if (global.language == "ja")
{
    if (newfont == fnt_main)
        newfont = fnt_ja_main;
    if (newfont == fnt_maintext)
        newfont = fnt_ja_maintext;
    if (newfont == fnt_plain)
        newfont = fnt_ja_plain;
}
draw_set_font(newfont);  (fnt_maintext);  | 
    
    
    
        | 24 | 
            draw_set_color(c_white);  | 
    
    
    
        | 25 | 
            scr_itemname();  | 
    
    
    
        | 26 | 
            for (i = 0; i < 8; i += 1)  | 
    
    
    
        | 27 | 
            { | 
    
    
    
        | 28 | 
                draw_set_color(c_white);  | 
    
    
    
        | 29 | 
                draw_text(xx + boxofs + 3 + itemofs, yy + 30 + (i * 16), global.itemname[i]);  | 
    
    
    
        | 30 | 
                if (global.item[i] == 0)  | 
    
    
    
        | 31 | 
                { | 
    
    
    
        | 32 | 
                    draw_set_color(c_red);  | 
    
    
    
        | 33 | 
                    draw_line(xx + boxofs + 3 + itemofs + 5, yy + 40 + (i * 16), xx + boxofs + 3 + itemofs + 95, yy + 40 + (i * 16));  | 
    
    
    
        | 34 | 
                }  | 
    
    
    
        | 35 | 
            }  | 
    
    
    
        | 36 | 
            draw_set_color(c_white);  | 
    
    
    
        | 37 | 
            scr_drawtext_centered(xx + boxofs + 3 + itemofs + 50, yy + 9, INVENTORYscr_gettextscr_gettextvar text_id = argument[0];
var text = ds_map_find_value(global.text_data_en, text_id);
if (is_undefined(text))
    text = "";
if (global.language == "ja")
{
    var loc_text = ds_map_find_value(global.text_data_ja, text_id);
    if (!is_undefined(loc_text))
        text = loc_text;
}
for (var i = 1; i <= (string_length(text) - 3); i++)
{
    if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]")
    {
        var sel = string_char_at(text, i + 2);
        var replace;
        if (sel == "C")
            replace = global.charname;
        else if (sel == "G")
            replace = string(global.gold);
        else if (sel == "I")
            replace = global.itemname[global.menucoord[1]];
        else if (sel == "1" && argument_count > 1)
            replace = argument[1];
        else if (sel == "2" && argument_count > 2)
            replace = argument[2];
        else if (sel == "3" && argument_count > 3)
            replace = argument[3];
        else if (sel == "4" && argument_count > 4)
            replace = argument[4];
        else if (sel == "5" && argument_count > 5)
            replace = argument[5];
        else if (sel == "6" && argument_count > 6)
            replace = argument[6];
        else if (sel == "7" && argument_count > 7)
            replace = argument[7];
        else if (sel == "8" && argument_count > 8)
            replace = argument[8];
        else if (sel == "9" && argument_count > 9)
            replace = argument[9];
        else
            replace = "";
        var before = string_copy(text, 1, i - 1);
        var after = string_copy(text, i + 4, string_length(text));
        text = before + replace + after;
        i += (string_length(replace) - 1);
    }
}
return text;  ("itembox_title_inventory")   );  | 
    
    
    
        | 38 | 
            scr_drawtext_centered(xx + 162 + itemofs + 50, yy + 9, BOXscr_gettextscr_gettextvar text_id = argument[0];
var text = ds_map_find_value(global.text_data_en, text_id);
if (is_undefined(text))
    text = "";
if (global.language == "ja")
{
    var loc_text = ds_map_find_value(global.text_data_ja, text_id);
    if (!is_undefined(loc_text))
        text = loc_text;
}
for (var i = 1; i <= (string_length(text) - 3); i++)
{
    if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]")
    {
        var sel = string_char_at(text, i + 2);
        var replace;
        if (sel == "C")
            replace = global.charname;
        else if (sel == "G")
            replace = string(global.gold);
        else if (sel == "I")
            replace = global.itemname[global.menucoord[1]];
        else if (sel == "1" && argument_count > 1)
            replace = argument[1];
        else if (sel == "2" && argument_count > 2)
            replace = argument[2];
        else if (sel == "3" && argument_count > 3)
            replace = argument[3];
        else if (sel == "4" && argument_count > 4)
            replace = argument[4];
        else if (sel == "5" && argument_count > 5)
            replace = argument[5];
        else if (sel == "6" && argument_count > 6)
            replace = argument[6];
        else if (sel == "7" && argument_count > 7)
            replace = argument[7];
        else if (sel == "8" && argument_count > 8)
            replace = argument[8];
        else if (sel == "9" && argument_count > 9)
            replace = argument[9];
        else
            replace = "";
        var before = string_copy(text, 1, i - 1);
        var after = string_copy(text, i + 4, string_length(text));
        text = before + replace + after;
        i += (string_length(replace) - 1);
    }
}
return text;  ("itembox_title_box")   );  | 
    
    
    
        | 39 | 
            scr_storagenamescr_storagenamefor (i = argument0; i < (argument0 + 11); i += 1)
    global.itemname[i - argument0] = " ";
for (i = 0; i < 11; i += 1)
{
    itemid = global.flag[argument0 + i];
     scr_itemnamelist();
}  (boxno);  | 
    
    
    
        | 40 | 
            for (i = 0; i < 10; i += 1)  | 
    
    
    
        | 41 | 
            { | 
    
    
    
        | 42 | 
                draw_set_color(c_white);  | 
    
    
    
        | 43 | 
                draw_text(xx + 162 + itemofs, yy + 30 + (i * 16), global.itemname[i]);  | 
    
    
    
        | 44 | 
                if (global.flag[boxno + i] == 0)  | 
    
    
    
        | 45 | 
                { | 
    
    
    
        | 46 | 
                    draw_set_color(c_red);  | 
    
    
    
        | 47 | 
                    draw_line(xx + 162 + itemofs + 5, yy + 40 + (i * 16), xx + 162 + itemofs + 95, yy + 40 + (i * 16));  | 
    
    
    
        | 48 | 
                }  | 
    
    
    
        | 49 | 
            }  | 
    
    
    
        | 50 | 
            draw_set_color(c_white);  | 
    
    
    
        | 51 | 
            draw_line(xx + 160, yy + 40, xx + 160, yy + 190);  | 
    
    
    
        | 52 | 
            draw_line(xx + 161, yy + 40, xx + 161, yy + 190);  | 
    
    
    
        | 53 | 
            scr_drawtext_iconsscr_drawtext_iconsvar xx = argument[0];
var yy = argument[1];
var str =  scr_replace_buttons_pc(argument[2]);
var icon_scale = 1;
if (argument_count >= 4)
    icon_scale = argument[3];
var i = string_pos("\*", str);
while (i != 0)
{
    if (i > 1)
    {
        var s = substr(str, 1, i - 1);
        draw_text(xx, yy, s);
        xx += round(string_width(s));
    }
    var ch = string_char_at(str, i + 2);
    var sprite =  scr_getbuttonsprite(ch, 0);
    if (sprite != -4)
    {
        draw_sprite_ext(sprite, 0, xx, yy, icon_scale, icon_scale, 0, c_white, 1);
        xx += ((sprite_get_width(sprite) + 1) * icon_scale);
    }
    str = substr(str, i + 3);
    i = string_pos("\*", str);
}
if (string_length(str) > 0)
    draw_text(xx, yy, str);  (xx + 100, yy + 197, Press \*X to Finishscr_gettextscr_gettextvar text_id = argument[0];
var text = ds_map_find_value(global.text_data_en, text_id);
if (is_undefined(text))
    text = "";
if (global.language == "ja")
{
    var loc_text = ds_map_find_value(global.text_data_ja, text_id);
    if (!is_undefined(loc_text))
        text = loc_text;
}
for (var i = 1; i <= (string_length(text) - 3); i++)
{
    if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]")
    {
        var sel = string_char_at(text, i + 2);
        var replace;
        if (sel == "C")
            replace = global.charname;
        else if (sel == "G")
            replace = string(global.gold);
        else if (sel == "I")
            replace = global.itemname[global.menucoord[1]];
        else if (sel == "1" && argument_count > 1)
            replace = argument[1];
        else if (sel == "2" && argument_count > 2)
            replace = argument[2];
        else if (sel == "3" && argument_count > 3)
            replace = argument[3];
        else if (sel == "4" && argument_count > 4)
            replace = argument[4];
        else if (sel == "5" && argument_count > 5)
            replace = argument[5];
        else if (sel == "6" && argument_count > 6)
            replace = argument[6];
        else if (sel == "7" && argument_count > 7)
            replace = argument[7];
        else if (sel == "8" && argument_count > 8)
            replace = argument[8];
        else if (sel == "9" && argument_count > 9)
            replace = argument[9];
        else
            replace = "";
        var before = string_copy(text, 1, i - 1);
        var after = string_copy(text, i + 4, string_length(text));
        text = before + replace + after;
        i += (string_length(replace) - 1);
    }
}
return text;  ("itembox_close")   );  | 
    
    
    
        | 54 | 
            if (keyboard_check_pressed(vk_right))  | 
    
    
    
        | 55 | 
            { | 
    
    
    
        | 56 | 
                if (column != 1)  | 
    
    
    
        | 57 | 
                { | 
    
    
    
        | 58 | 
                    column = 1;  | 
    
    
    
        | 59 | 
                    c1y = c0y;  | 
    
    
    
        | 60 | 
                }  | 
    
    
    
        | 61 | 
            }  | 
    
    
    
        | 62 | 
            if (keyboard_check_pressed(vk_left))  | 
    
    
    
        | 63 | 
            { | 
    
    
    
        | 64 | 
                if (column != 0)  | 
    
    
    
        | 65 | 
                { | 
    
    
    
        | 66 | 
                    column = 0;  | 
    
    
    
        | 67 | 
                    c0y = c1y;  | 
    
    
    
        | 68 | 
                    if (c0y > 7)  | 
    
    
    
        | 69 | 
                        c0y = 7;  | 
    
    
    
        | 70 | 
                }  | 
    
    
    
        | 71 | 
            }  | 
    
    
    
        | 72 | 
            if (keyboard_check_pressed(vk_up))  | 
    
    
    
        | 73 | 
            { | 
    
    
    
        | 74 | 
                if (column == 0 && c0y > 0)  | 
    
    
    
        | 75 | 
                    c0y -= 1;  | 
    
    
    
        | 76 | 
                if (column == 1 && c1y > 0)  | 
    
    
    
        | 77 | 
                    c1y -= 1;  | 
    
    
    
        | 78 | 
            }  | 
    
    
    
        | 79 | 
            if (keyboard_check_pressed(vk_down))  | 
    
    
    
        | 80 | 
            { | 
    
    
    
        | 81 | 
                if (column == 0 && c0y < 7)  | 
    
    
    
        | 82 | 
                    c0y += 1;  | 
    
    
    
        | 83 | 
                if (column == 1 && c1y < 9)  | 
    
    
    
        | 84 | 
                    c1y += 1;  | 
    
    
    
        | 85 | 
            }  | 
    
    
    
        | 86 | 
            if (column == 0)  | 
    
    
    
        | 87 | 
                draw_sprite(spr_heartsmall, 0, xx + boxofs + 3 + heartofs, yy + 35 + (16 * c0y));  | 
    
    
    
        | 88 | 
            if (column == 1)  | 
    
    
    
        | 89 | 
                draw_sprite(spr_heartsmall, 0, xx + 162 + heartofs, yy + 35 + (16 * c1y));  | 
    
    
    
        | 90 | 
            if (control_check_pressed(0) && buffer > 6)  | 
    
    
    
        | 91 | 
            { | 
    
    
    
        | 92 | 
                if (column == 0)  | 
    
    
    
        | 93 | 
                { | 
    
    
    
        | 94 | 
                    script_execute(scr_storageget, global.item[c0y], boxno);  | 
    
    
    
        | 95 | 
                    if (noroom == 0)  | 
    
    
    
        | 96 | 
                        script_execute(scr_itemshift, c0y, 0);  | 
    
    
    
        | 97 | 
                }  | 
    
    
    
        | 98 | 
                if (column == 1)  | 
    
    
    
        | 99 | 
                { | 
    
    
    
        | 100 | 
                    script_execute(scr_itemget, global.flag[c1y + boxno]);  | 
    
    
    
        | 101 | 
                    if (noroom == 0)  | 
    
    
    
        | 102 | 
                        scr_storageshiftscr_storageshiftglobal.flag[argument2 + 10] = argument1;
for (i = argument0; i < 10; i += 1)
    global.flag[i + argument2] = global.flag[i + argument2 + 1];
script_execute(scr_itemnameb);
script_execute(scr_storagename, 300);  (c1y, 0, boxno);  | 
    
    
    
        | 103 | 
                }  | 
    
    
    
        | 104 | 
            }  | 
    
    
    
        | 105 | 
            if (control_check_pressed(1))  | 
    
    
    
        | 106 | 
            { | 
    
    
    
        | 107 | 
                global.interact = 0;  | 
    
    
    
        | 108 | 
                if (spec == 1)  | 
    
    
    
        | 109 | 
                    global.menuno = 0;  | 
    
    
    
        | 110 | 
                obj_overworldcontroller.buffer = -2;  | 
    
    
    
        | 111 | 
                instance_destroy();  | 
    
    
    
        | 112 | 
                exit;  | 
    
    
    
        | 113 | 
            }  | 
    
    
    
        | 114 | 
        }  |