Deltarune (Chapter 5) 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 = 0; noroom = 1; global.litem[8] = 999; for (i = 0; i < 8; i++) { if (global.litem[i] == 0) { global.litem[i] = arg0; noroom = 0; break; } }
scr_litemname();
}
(arg0)
2
{
3
    i = 0;
4
    loop = 0;
5
    noroom = 1;
6
    global.litem[8] = 999;
7
    for (i = 0; i < 8; i++)
8
    {
9
        if (global.litem[i] == 0)
10
        {
11
            global.litem[i] = arg0;
12
            noroom = 0;
13
            break;
14
        }
15
    }
16
    
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"
);
if (itemid == 15) global.litemname[i] = stringsetloc(
Holiday Pencil
"Holiday Pencil", "scr_litemname_slash_scr_litemname_gml_21_0"
);
if (itemid == 16) global.litemname[i] = stringsetloc(
CactusNeedle
"CactusNeedle", "scr_litemname_slash_scr_litemname_gml_22_0"
);
if (itemid == 17) global.litemname[i] = stringsetloc(
BlackShard
"BlackShard", "scr_litemname_slash_scr_litemname_gml_23_0"
);
if (itemid == 18) global.litemname[i] = stringsetloc(
QuillPen
"QuillPen", "scr_litemname_slash_scr_litemname_gml_24_0_b"
);
if (itemid == 19) global.litemname[i] = stringsetloc(
Honey Toast
"Honey Toast", "scr_litemname_slash_scr_litemname_gml_25_0"
);
if (itemid == 20) global.litemname[i] = stringsetloc(
Bread
"Bread", "scr_litemname_slash_scr_litemname_gml_26_0"
);
if (itemid == 21) global.litemname[i] = stringsetloc(
Seeds
"Seeds", "scr_litemname_slash_scr_litemname_gml_27_0"
);
if (itemid == 22) global.litemname[i] = stringsetloc(
Pencil2
"Pencil2", "scr_litemname_slash_scr_litemname_gml_28_0"
);
if (itemid == 23) global.litemname[i] = stringsetloc(
Petal
"Petal", "scr_litemname_slash_scr_litemname_gml_29_0"
);
} }
();
17
}