Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_drop_Step_0

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

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
2
if (scr_determine_item_droppable_yellow
scr_determine_item_droppable_yellow

function scr_determine_item_droppable_yellow(arg0) { var item_slot = arg0; switch (item_slot) { case "Missing Poster": case "Snowdin Map": case "Matches": case "Lukewarm Coffee": case "Soggy Mitten": case "H. Acid": return false; break; case "Pickaxe": case "Flint": case "Steel Buckle": if (global.dunes_flag[4] >= 2) return true; else return false; break; default: return true; } }
(current_item) == true)
3
{
4
    with (msg)
5
    {
6
        message[0] = "* Are you sure you want to#  drop the " + other.current_item + "?";
7
        ch_msg = 0;
8
        ch[1] = "Yes";
9
        ch[2] = "No";
10
        if (outcome == 1)
11
        {
12
            scr_item_remove
scr_item_remove

function scr_item_remove(arg0) { for (i = 1; i <= 8; i += 1) { if (global.item_slot[i] == arg0) { while (i < 8) { global.item_slot[i] = global.item_slot[i + 1]; i += 1; } global.item_slot[8] = "Nothing"; return true; break; } else if (i == 8) { return false; } } }
(other.current_item);
13
            instance_destroy(other);
14
        }
15
        if (outcome == 2)
16
            instance_destroy(other);
17
    }
18
}
19
else
20
{
21
    with (msg)
22
        message[0] = "* You cannot drop the#  " + other.current_item + ".";
23
    if (!global.dialogue_open)
24
        instance_destroy();
25
}