Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_new_mail_check

(view raw script w/o annotations or w/e)
1
function scr_new_mail_check
scr_new_mail_check

function scr_new_mail_check() //gml_Script_scr_new_mail_check { if (global.mail_flag[1] == false) { if (global.snowdin_flag[3] == 2 && global.snowdin_flag[13] != 0) { scr_mail_add_unclaimed("Slurpy Letter") global.mail_flag[1] = true } } if (global.mail_flag[2] == false) { if (global.dunes_flag[0] >= 1) { scr_mail_add_unclaimed("Mo Letter") global.mail_flag[2] = true } } if (global.flag[17 Dalv fate] == 1 && global.dunes_flag[24] != 0) { if (global.mail_flag[3] == 0 && global.route == 2) { scr_mail_add_unclaimed("Dalv Letter") global.mail_flag[3] = true } } if (global.dunes_flag[16] != 0) { if (global.mail_flag[4] == 0) { scr_mail_add_unclaimed("Shufflers Letter") global.mail_flag[4] = true } } if (global.dunes_flag[24] == 1 && global.sworks_flag[15] >= 1 && global.route == 1 && global.sworks_flag[61] == 0) { if (global.mail_flag[5] == 0) { scr_mail_add_unclaimed("Starlo Update") global.mail_flag[5] = true } } if (global.dunes_flag[24] == 1 && global.sworks_flag[15] >= 1 && global.route == 2) { if (global.mail_flag[6] == 0) { scr_mail_add_unclaimed("Starlo (Urgent)") global.mail_flag[6] = true } } if (global.snowdin_flag[3] == 2 && global.hotland_flag[6] > 0) { if (global.mail_flag[7] == 0) { scr_mail_add_unclaimed("Slurpy Letter 2") global.mail_flag[7] = true } } if (global.hotland_flag[6] > 0 && global.route == 1 && global.sworks_flag[61] == 0 && global.dunes_flag[24] == 1) { if (global.mail_flag[8] == 0) { scr_mail_add_unclaimed("Ceroba (Important)") global.mail_flag[8] = true } } if (global.hotland_flag[6] > 0 && global.sworks_flag[31] == 2) { if (global.mail_flag[9] == 0) { scr_mail_add_unclaimed("MAIL???") global.mail_flag[9] = true } } }
() //gml_Script_scr_new_mail_check
2
{
3
    if (global.mail_flag[1] == false)
4
    {
5
        if (global.snowdin_flag[3] == 2 && global.snowdin_flag[13] != 0)
6
        {
7
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Slurpy Letter")
8
            global.mail_flag[1] = true
9
        }
10
    }
11
    if (global.mail_flag[2] == false)
12
    {
13
        if (global.dunes_flag[0] >= 1)
14
        {
15
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Mo Letter")
16
            global.mail_flag[2] = true
17
        }
18
    }
19
    if (global.flag[17 Dalv fate] == 1 && global.dunes_flag[24] != 0)
20
    {
21
        if (global.mail_flag[3] == 0 && global.route == 2)
22
        {
23
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Dalv Letter")
24
            global.mail_flag[3] = true
25
        }
26
    }
27
    if (global.dunes_flag[16] != 0)
28
    {
29
        if (global.mail_flag[4] == 0)
30
        {
31
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Shufflers Letter")
32
            global.mail_flag[4] = true
33
        }
34
    }
35
    if (global.dunes_flag[24] == 1 && global.sworks_flag[15] >= 1 && global.route == 1 && global.sworks_flag[61] == 0)
36
    {
37
        if (global.mail_flag[5] == 0)
38
        {
39
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Starlo Update")
40
            global.mail_flag[5] = true
41
        }
42
    }
43
    if (global.dunes_flag[24] == 1 && global.sworks_flag[15] >= 1 && global.route == 2)
44
    {
45
        if (global.mail_flag[6] == 0)
46
        {
47
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Starlo (Urgent)")
48
            global.mail_flag[6] = true
49
        }
50
    }
51
    if (global.snowdin_flag[3] == 2 && global.hotland_flag[6] > 0)
52
    {
53
        if (global.mail_flag[7] == 0)
54
        {
55
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Slurpy Letter 2")
56
            global.mail_flag[7] = true
57
        }
58
    }
59
    if (global.hotland_flag[6] > 0 && global.route == 1 && global.sworks_flag[61] == 0 && global.dunes_flag[24] == 1)
60
    {
61
        if (global.mail_flag[8] == 0)
62
        {
63
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("Ceroba (Important)")
64
            global.mail_flag[8] = true
65
        }
66
    }
67
    if (global.hotland_flag[6] > 0 && global.sworks_flag[31] == 2)
68
    {
69
        if (global.mail_flag[9] == 0)
70
        {
71
            scr_mail_add_unclaimed
scr_mail_add_unclaimed

function scr_mail_add_unclaimed(argument0) //gml_Script_scr_mail_add_unclaimed { ds_list_add(global.mail_unclaimed_list, argument0) }
("MAIL???")
72
            global.mail_flag[9] = true
73
        }
74
    }
75
}