Deltarune 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(argument0) //gml_Script_scr_litemget { i = 0 loop = 1 noroom = 0 global.litem[8] = 999 while (loop == 1) { if (global.litem[i] == 0) { global.litem[i] = argument0 break } else if (i == 8) { noroom = 1 break } else { i += 1 continue } } scr_litemname() }
(argument0) //gml_Script_scr_litemget
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] = argument0
12
            break
13
        }
14
        else if (i == 8)
15
        {
16
            noroom = 1
17
            break
18
        }
19
        else
20
        {
21
            i += 1
22
            continue
23
        }
24
    }
25
    scr_litemname
scr_litemname

function scr_litemname() //gml_Script_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] =
Hot Chocolate
stringsetloc("Hot Chocolate", "scr_litemname_slash_scr_litemname_gml_6_0")
if (itemid == 2) global.litemname[i] =
Pencil
stringsetloc("Pencil", "scr_litemname_slash_scr_litemname_gml_7_0")
if (itemid == 3) global.litemname[i] =
Bandage
stringsetloc("Bandage", "scr_litemname_slash_scr_litemname_gml_8_0")
if (itemid == 4) global.litemname[i] =
Bouquet
stringsetloc("Bouquet", "scr_litemname_slash_scr_litemname_gml_9_0")
if (itemid == 5) global.litemname[i] =
Ball of Junk
stringsetloc("Ball of Junk", "scr_litemname_slash_scr_litemname_gml_10_0")
if (itemid == 6) global.litemname[i] =
Halloween Pencil
stringsetloc("Halloween Pencil", "scr_litemname_slash_scr_litemname_gml_11_0")
if (itemid == 7) global.litemname[i] =
Lucky Pencil
stringsetloc("Lucky Pencil", "scr_litemname_slash_scr_litemname_gml_12_0")
if (itemid == 8) global.litemname[i] =
Egg
stringsetloc("Egg", "scr_litemname_slash_scr_litemname_gml_13_0")
if (itemid == 9) global.litemname[i] =
Cards
stringsetloc("Cards", "scr_litemname_slash_scr_litemname_gml_14_0")
if (itemid == 10) global.litemname[i] =
Box of Heart Candy
stringsetloc("Box of Heart Candy", "scr_litemname_slash_scr_litemname_gml_15_0")
if (itemid == 11) global.litemname[i] =
Glass
stringsetloc("Glass", "scr_litemname_slash_scr_litemname_gml_16_0")
if (itemid == 12) global.litemname[i] =
Eraser
stringsetloc("Eraser", "scr_litemname_slash_scr_litemname_gml_17_0")
if (itemid == 13) global.litemname[i] =
Mech. Pencil
stringsetloc("Mech. Pencil", "scr_litemname_slash_scr_litemname_gml_18_0")
if (itemid == 14) global.litemname[i] =
Wristwatch
stringsetloc("Wristwatch", "scr_litemname_slash_scr_litemname_gml_19_0")
} }
()
26
}