Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_churchb_windows_Step_0

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

function
scr_populatechars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "noelle")) noelle = 0; if (kris == 0) { with (obj_mainchara) other.kris = id; } if (susie == 0) { with (obj_caterpillarchara) { if (name == "susie") other.susie = id; } } if (ralsei == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ralsei = id; } } if (noelle == 0) { with (obj_caterpillarchara) { if (name == "noelle") other.noelle = id; } } }
();
2
if (!init)
3
{
4
    with (obj_doorAny)
5
    {
6
        if (doorRoom == room_dw_churchb_bookshelf)
7
            other.door1 = id;
8
        if (doorRoom == room_dw_churchb_man)
9
            other.door2 = id;
10
        if (global.plot >= 242)
11
        {
12
            if (doorRoom == room_dw_churchb_rotatingtower)
13
                doorRoom = room_dw_churchc_angelprophecy_encounter;
14
            with (obj_hsv_shifter)
15
                instance_destroy();
16
        }
17
    }
18
    if (i_ex(door1) && i_ex(door2))
19
        init = 1;
20
}
21
if (con == 0)
22
{
23
    if (
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("leave"))
24
    {
25
        con = 1;
26
        global.flag[1573]++;
27
        var doortogo = door1;
28
        if (global.flag[1573] == 8)
29
            doortogo = door2;
30
        with (doortogo)
31
            setxy(obj_mainchara.x, obj_mainchara.bbox_top);
32
    }
33
}
34
for (var i = 0; i < array_length(npc); i++)
35
{
36
    with (npc[i])
37
    {
38
        if (myinteract == 3)
39
        {
40
            global.interact = 1;
41
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
42
            msgsetloc(0, 
* What do you call a man with one eye?Wait for inputClose Message
"* What do you call a man with one eye?/%", "obj_dw_churchb_windows_slash_Step_0_gml_64_0"
);
43
            if (i == 1)
44
                msgsetloc(0, 
* Why does the angel make its cry?Wait for inputClose Message
"* Why does the angel make its cry?/%", "obj_dw_churchb_windows_slash_Step_0_gml_65_0"
);
45
            if (i == 2)
46
                msgsetloc(0, 
* Who will call the girl who snows?Wait for inputClose Message
"* Who will call the girl who snows?/%", "obj_dw_churchb_windows_slash_Step_0_gml_66_0"
);
47
            if (i == 3)
48
                msgsetloc(0, 
* I don't know...Delay 11 ha ha ha...Delay 11 I don't know!Wait for inputClose Message
"* I don't know..^1. ha ha ha..^1. I don't know!/%", "obj_dw_churchb_windows_slash_Step_0_gml_67_0"
);
49
            d_make();
50
            myinteract = 999;
51
        }
52
        if (myinteract > 3 && d_ex())
53
        {
54
            var trig = 0;
55
            if (!i_ex(obj_writer))
56
                trig = 1;
57
            with (obj_writer)
58
            {
59
                if (halt)
60
                    trig = 1;
61
            }
62
            if (!trig)
63
                marker.image_index += 0.25;
64
        }
65
        if (myinteract == 999 && !d_ex())
66
        {
67
            myinteract = 0;
68
            marker.image_index = 0;
69
            global.interact = 0;
70
        }
71
    }
72
}
73
with (moss)
74
{
75
    if (myinteract == 3)
76
    {
77
        global.interact = 1;
78
        global.msc = -99;
79
        global.choice = -1;
80
        global.choicemsg[0] = stringsetloc(
#Eat
"#Eat", "obj_dw_churchb_windows_slash_Step_0_gml_99_0"
);
81
        global.choicemsg[1] = stringsetloc(
#Do Not
"#Do Not", "obj_dw_churchb_windows_slash_Step_0_gml_100_0"
);
82
        global.choicemsg[2] = stringset("");
83
        global.choicemsg[3] = stringset("");
84
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
85
        msgsetloc(0, 
* (It's sacred moss.)Wait for input
"* (It's sacred moss.)/", "obj_dw_churchb_windows_slash_Step_0_gml_105_0"
);
86
        msgnextloc(
* (Eat it?)Wait for input
"* (Eat it?)/", "obj_dw_churchb_windows_slash_Step_0_gml_106_0"
);
87
        msgnext("\\C2 ");
88
        d_make();
89
        myinteract = 5;
90
    }
91
    if (myinteract == 5 && global.choice != -1)
92
    {
93
        k_d(1);
94
        if (global.choice == 0)
95
        {
96
            with (obj_event_manager)
97
                trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_12);
98
            snd_play(snd_moss_fanfare);
99
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
100
            msgsetloc(0, 
* (The moss was consumed with gusto!)Wait for inputClose Message
"* (The moss was consumed with gusto!)/%", "obj_dw_churchb_windows_slash_Step_0_gml_120_0"
);
101
            d_make();
102
            global.flag[1592] = 1;
103
            myinteract = 999;
104
            setxy(room_width, room_height);
105
        }
106
        if (global.choice == 1)
107
        {
108
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
109
            msgsetloc(0, 
* (You left the moss for the next person. Pass it on...)Wait for inputClose Message
"* (You left the moss for the next person. Pass it on...)/%", "obj_dw_churchb_windows_slash_Step_0_gml_130_0"
);
110
            d_make();
111
            myinteract = 999;
112
            global.flag[1592] = 2;
113
        }
114
    }
115
    if (myinteract == 999 && !d_ex())
116
    {
117
        myinteract = 0;
118
        marker.image_index = 0;
119
        global.interact = 0;
120
    }
121
}
122
123
enum UnknownEnum
124
{
125
    Value_0,
126
    Value_12 = 12
127
}