Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_gold_cache_steamworks_factory_03_Step_0

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

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
10
    if (npc_flag == 0)
11
    {
12
        with (msg)
13
        {
14
            message[0] = "* (60G sits abandoned in the#  machine.)"
15
            message[1] = "* (Take it?)"
16
            ch_msg = 1
17
            ch[1] = "Yes"
18
            ch[2] = "No"
19
            if (outcome == 1)
20
            {
21
                message[2] = "* (You got 60 G!)"
22
                instance_create_depth(433, 424, 300, obj_factory_03_empty_cache)
23
                audio_play_sound(snd_success, 1, 0)
24
                global.player_gold += 60
25
                other.npc_flag += 1
26
                other.waiter = 0
27
            }
28
            if (outcome == 2)
29
            {
30
                global.dialogue_open = false
31
                other.waiter = 0
32
            }
33
        }
34
    }
35
    else if (npc_flag == 1)
36
    {
37
        msg.message[0] = "* (The machine is now empty.)"
38
        waiter = 0
39
    }
40
}