Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_newhome_special_bench_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (interact)
3
    waiter = 1;
4
if (waiter)
5
{
6
    if (npc_flag == 0)
7
    {
8
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
9
        with (msg)
10
        {
11
            sndfnt_array[0] = 391;
12
            ch_msg = 1;
13
            ch[1] = "Yes";
14
            ch[2] = "No";
15
            message[0] = "* (You spot a discarded bag of#  Popato Chisps under the#  bench.)\t";
16
            message[1] = "* (Take it?)";
17
            if (outcome == 1)
18
            {
19
                if (scr_item
scr_item

function scr_item(arg0) { nm = arg0; for (var i = 1; i <= 8; i++) { if (global.item_slot[i] == "Nothing") { global.item_slot[i] = nm; return true; break; } else if (i == 8) { return false; } } }
("Popato Chisps"))
20
                {
21
                    message[2] = "* (You got Popato Chisps!)";
22
                    other.npc_flag = 1;
23
                    other.waiter = 0;
24
                }
25
                else
26
                {
27
                    message[2] = "* (Not enough space.)";
28
                    other.waiter = 0;
29
                }
30
            }
31
            else if (outcome == 2)
32
            {
33
                other.waiter = 0;
34
            }
35
        }
36
    }
37
    else
38
    {
39
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
40
        with (msg)
41
            message[0] = "* (A sturdy park bench.)";
42
        waiter = 0;
43
    }
44
}