Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_newhome_trash_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
event_inherited();
4
if (interact)
5
{
6
    if (global.route == 3)
7
    {
8
        if (global.hotland_flag[9] >= 3)
9
        {
10
            if (!instance_exists(obj_dialogue_narrator))
11
            {
12
                var narrator = instance_create_depth(0, 0, -100, obj_dialogue_narrator);
13
                with (narrator)
14
                    message[0] = "* (Not of interest.)";
15
            }
16
            exit;
17
        }
18
    }
19
    waiter = 1;
20
}
21
if (waiter)
22
{
23
    if (npc_flag == 0)
24
    {
25
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
26
        with (msg)
27
        {
28
            sndfnt_array[0] = 391;
29
            ch_msg = 1;
30
            ch[1] = "Yes";
31
            ch[2] = "No";
32
            message[0] = "* (You dig around the bin and#  find a bottle of Sizzlin'#  Soda.)\t";
33
            message[1] = "* (Take it?)";
34
            if (outcome == 1)
35
            {
36
                if (global.party_member != -4)
37
                {
38
                    sndfnt_array[2] = 102;
39
                    message[2] = "* Do humans often eat#  from the garbage?";
40
                    message[3] = "* Shoot, I coulda left a#  trash bag out in Snowdin#  as a lure.";
41
                    message[4] = "* I'm only joking, of#  course!";
42
                    message[5] = "* I can't judge anyone's#  culinary preferences#  after today...";
43
                    prt[2] = 311;
44
                    prt[3] = 335;
45
                    prt[4] = 320;
46
                    prt[5] = 329;
47
                    sndfnt_array[6] = 391;
48
                }
49
                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; } } }
("Adult Soda"))
50
                {
51
                    var msg_number;
52
                    if (global.party_member != -4)
53
                        msg_number = 6;
54
                    else
55
                        msg_number = 2;
56
                    message[msg_number] = "* (You got some Adult Soda!)";
57
                    other.item_check = 1;
58
                }
59
                else
60
                {
61
                    var msg_number;
62
                    if (global.party_member != -4)
63
                        msg_number = 6;
64
                    else
65
                        msg_number = 2;
66
                    message[msg_number] = "* (Not enough space.)";
67
                    other.item_check = -1;
68
                }
69
            }
70
            else if (outcome == 2)
71
            {
72
                other.waiter = 0;
73
            }
74
            show_debug_message(message_current);
75
            if ((message_current == 6 || (message_current == 2 && global.party_member == -4)) && other.item_check != 0)
76
            {
77
                if (other.item_check == 1)
78
                    other.npc_flag = 1;
79
                else
80
                    audio_play_sound(snd_fail, 1, 0);
81
                other.item_check = 0;
82
                other.waiter = 0;
83
            }
84
        }
85
    }
86
    else
87
    {
88
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
89
        with (msg)
90
            message[0] = "* (Nothing of use here.)";
91
        waiter = 0;
92
    }
93
}