Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_factory_04_trashcan_Step_0

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

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
7
    with (msg)
8
    {
9
        if (other.npc_flag == 0)
10
        {
11
            message[0] = "* (A sheet of neatly typed#  bullet points lies crumpled in#  the trash.)";
12
            message[1] = "* (You stash it in your mail#  bag.)";
13
            if (message_current == 1)
14
            {
15
                audio_play_sound(snd_success, 1, 0);
16
                scr_mail_add
scr_mail_add

function scr_mail_add(arg0) { ds_list_add(global.mail_list, arg0); if (irandom(global.spam_mail_chance) == 1) { show_debug_message("success"); ds_list_add(global.mail_list, choose("Spam Letter 1", "Spam Letter 2", "Spam Letter 3", "Spam Letter 4", "Spam Letter 5", "Spam Letter 6", "Spam Letter 7", "Spam Letter 8", "Spam Letter 9")); global.spam_mail_chance = 30; } else { global.spam_mail_chance = clamp(global.spam_mail_chance - 1, 1, 999); } scr_mail_sort(); }
("Bullet Points");
17
                other.npc_flag = 1;
18
                other.waiter = 0;
19
            }
20
        }
21
        else
22
        {
23
            message[0] = "* (Nothing useful here.)";
24
            other.waiter = 0;
25
        }
26
    }
27
}