Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_green_pants_dunes_30_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (live_call())
3
    return global.live_result;
4
if (waiter == 0)
5
{
6
    if (interact)
7
        waiter = 1;
8
}
9
if (waiter == 1)
10
{
11
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
12
    if (npc_flag == 0)
13
    {
14
        with (msg)
15
        {
16
            message[0] = "* (You found 30G in one of the#  pants' pockets!)";
17
            message[1] = "* (Take it?)";
18
            ch_msg = 1;
19
            ch[1] = "Yes";
20
            ch[2] = "No";
21
            if (outcome == 1)
22
            {
23
                message[2] = "* (You got 30G!)";
24
                audio_play_sound(snd_success, 1, 0);
25
                global.player_gold += 30;
26
                other.npc_flag += 1;
27
                other.waiter = 0;
28
            }
29
            if (outcome == 2)
30
            {
31
                global.dialogue_open = false;
32
                other.waiter = 0;
33
            }
34
        }
35
    }
36
    else if (npc_flag == 1)
37
    {
38
        if (global.route == 3)
39
            msg.message[0] = "* (A tacky pair of pants.)";
40
        else
41
            msg.message[0] = "* (Neon green pants. Your#  favorite!)";
42
        waiter = 0;
43
    }
44
}