Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_litemget

(view raw script w/o annotations or w/e)
1
function scr_litemget
scr_litemget

function scr_litemget(arg0) { i = 0; loop = 1; noroom = 0; global.litem[8] = 999; while (loop == 1) { if (global.litem[i] == 0) { global.litem[i] = arg0; break; } if (i == 8) { noroom = 1; break; } i += 1; } scr_litemname(); }
(arg0)
2
{
3
    i = 0;
4
    loop = 1;
5
    noroom = 0;
6
    global.litem[8] = 999;
7
    while (loop == 1)
8
    {
9
        if (global.litem[i] == 0)
10
        {
11
            global.litem[i] = arg0;
12
            break;
13
        }
14
        if (i == 8)
15
        {
16
            noroom = 1;
17
            break;
18
        }
19
        i += 1;
20
    }
21
    scr_litemname
scr_litemname

function scr_litemname() { global.litemname[0] = " "; for (i = 0; i < 8; i += 1) { itemid = global.litem[i]; if (itemid == 0) global.litemname[i] = " "; if (itemid == 1) global.litemname[i] = stringsetloc(
Hot Chocolate
"Hot Chocolate", "scr_litemname_slash_scr_litemname_gml_6_0"
); if (itemid == 2) global.litemname[i] = stringsetloc(
Pencil
"Pencil", "scr_litemname_slash_scr_litemname_gml_7_0"
); if (itemid == 3) global.litemname[i] = stringsetloc(
Bandage
"Bandage", "scr_litemname_slash_scr_litemname_gml_8_0"
); if (itemid == 4) global.litemname[i] = stringsetloc(
Bouquet
"Bouquet", "scr_litemname_slash_scr_litemname_gml_9_0"
); if (itemid == 5) global.litemname[i] = stringsetloc(
Ball of Junk
"Ball of Junk", "scr_litemname_slash_scr_litemname_gml_10_0"
); if (itemid == 6) global.litemname[i] = stringsetloc(
Halloween Pencil
"Halloween Pencil", "scr_litemname_slash_scr_litemname_gml_11_0"
); if (itemid == 7) global.litemname[i] = stringsetloc(
Lucky Pencil
"Lucky Pencil", "scr_litemname_slash_scr_litemname_gml_12_0"
); if (itemid == 8) global.litemname[i] = stringsetloc(
Egg
"Egg", "scr_litemname_slash_scr_litemname_gml_13_0"
); if (itemid == 9) global.litemname[i] = stringsetloc(
Cards
"Cards", "scr_litemname_slash_scr_litemname_gml_14_0"
); if (itemid == 10) global.litemname[i] = stringsetloc(
Box of Heart Candy
"Box of Heart Candy", "scr_litemname_slash_scr_litemname_gml_15_0"
); if (itemid == 11) global.litemname[i] = stringsetloc(
Glass
"Glass", "scr_litemname_slash_scr_litemname_gml_16_0"
); if (itemid == 12) global.litemname[i] = stringsetloc(
Eraser
"Eraser", "scr_litemname_slash_scr_litemname_gml_17_0"
); if (itemid == 13) global.litemname[i] = stringsetloc(
Mech. Pencil
"Mech. Pencil", "scr_litemname_slash_scr_litemname_gml_18_0"
); if (itemid == 14) global.litemname[i] = stringsetloc(
Wristwatch
"Wristwatch", "scr_litemname_slash_scr_litemname_gml_19_0"
); } }
();
22
}