Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_churchc_savepoint_judgmentbell_Step_0

(view raw script w/o annotations or w/e)
1
if (myinteract == 3)
2
{
3
    global.interact = 1;
4
    global.msc = -99;
5
    global.choice = -1;
6
    global.choicemsg[0] = stringsetloc(
#Ring
"#Ring", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_11_0"
);
7
    global.choicemsg[1] = stringsetloc(
#Do Not
"#Do Not", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_12_0"
);
8
    global.choicemsg[2] = stringset("");
9
    global.choicemsg[3] = stringset("");
10
    
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");
11
    msgsetloc(0, 
* (It's a bell. Ring out judgment?)Wait for input
"* (It's a bell. Ring out judgment?)/", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_16_0"
);
12
    msgnext("\\C2 ");
13
    myinteract = 4;
14
    d_make();
15
    talked++;
16
}
17
if (myinteract == 4 && global.choice != -1)
18
{
19
    k_d();
20
    if (global.choice == 0)
21
        myinteract = 5;
22
    if (global.choice == 1)
23
        myinteract = 999;
24
}
25
if (myinteract == 5)
26
{
27
    timer++;
28
    if (timer == 1)
29
        snd_play(snd_bell);
30
    if (timer >= 20)
31
    {
32
        myinteract = 6;
33
        timer = 0;
34
    }
35
}
36
if (myinteract == 6)
37
{
38
    var bellcase = 0;
39
    var bad = false;
40
    var regrecruit = scr_enemyrecruitcheck("guei") + scr_enemyrecruitcheck("balthizard") + scr_enemyrecruitcheck("bibliox") + scr_enemyrecruitcheck("mizzle") + scr_enemyrecruitcheck("wicabel") + scr_enemyrecruitcheck("winglade") + scr_enemyrecruitcheck("organikk");
41
    var lostrecruit = scr_enemylostcheck("guei") + scr_enemylostcheck("balthizard") + scr_enemylostcheck("bibliox") + scr_enemylostcheck("mizzle") + scr_enemylostcheck("wicabel") + scr_enemylostcheck("winglade") + scr_enemylostcheck("organikk") + scr_enemylostcheck("miss");
42
    if (regrecruit < 7)
43
        bellcase = 1;
44
    if (regrecruit == 7)
45
        bellcase = 2;
46
    if (regrecruit == 7 && scr_enemyrecruitcheck("miss"))
47
        bellcase = 3;
48
    debug_print("regrecruit=" + string(regrecruit));
49
    debug_print("lostrecruit=" + string(lostrecruit));
50
    if (lostrecruit > 0)
51
    {
52
        bad = true;
53
        bellcase = 0;
54
    }
55
    show_debug_message_concat("Miss Mizzle Recruit=", scr_enemyrecruitcheck("miss"), "|", "regrecruit=", regrecruit, "| lostrecruit=", lostrecruit, " | bellcase=", string(bellcase));
56
    if (bad == false)
57
    {
58
        msgsetloc(0, 
* (Judgment was decreed. You have been kind...)Wait for input
"* (Judgment was decreed. You have been kind...)/", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_95_0"
);
59
    }
60
    else
61
    {
62
        
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");
63
        msgsetloc(0, 
* (...Delay 11 but the bell rung hollow.)Wait for inputClose Message
"* (..^1. but the bell rung hollow.)/%", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_100_0"
);
64
    }
65
    switch (bellcase)
66
    {
67
        case 1:
68
            msgnextloc(
* (...Delay 11 But,Delay 11 you haven't spared everyone you could yet.)Wait for input
"* (..^1. But^1, you haven't spared everyone you could yet.)/", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_106_0"
);
69
            msgnextloc(
* (...Delay 11 Should you go forward? The bell leaves it up to you.)Wait for inputClose Message
"* (..^1. Should you go forward? The bell leaves it up to you.)/%", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_107_0"
);
70
            break;
71
        case 2:
72
            msgnextloc(
* (...Delay 11 But,Delay 11 there is a foe you haven't met and spared yet.)Wait for input
"* (..^1. But^1, there is a foe you haven't met and spared yet.)/", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_110_0"
);
73
            msgnextloc(
* (It might not matter. The bell leaves it up to you.)Wait for inputClose Message
"* (It might not matter. The bell leaves it up to you.)/%", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_111_0"
);
74
            break;
75
        case 3:
76
            msgnextloc(
* (...Delay 11 It seems you have spared everyone you could.)Wait for inputClose Message
"* (..^1. It seems you have spared everyone you could.)/%", "obj_dw_churchc_savepoint_judgmentbell_slash_Step_0_gml_114_0"
);
77
            break;
78
    }
79
    d_make();
80
    myinteract = 999;
81
}
82
if (myinteract == 999 && !d_ex())
83
{
84
    myinteract = 0;
85
    global.interact = 0;
86
}