Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_npc_dojo_Step_0

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

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
2
if (myinteract == 3)
3
{
4
    if (global.flag[20 other_text_command] == 0)
5
    {
6
        if (global.chapter == 4)
7
            sprite_index = spr_npc_puzzlepiece_cringe;
8
        else
9
            sprite_index = spr_npc_puzzlepiece;
10
        image_speed = 0.2;
11
    }
12
    if (global.flag[20 other_text_command] == 1)
13
    {
14
        sprite_index = spr_npc_puzzlepiece_shock1;
15
        image_speed = 0.25;
16
    }
17
    if (global.flag[20 other_text_command] == 2)
18
    {
19
        sprite_index = spr_npc_puzzlepiece_shock2;
20
        image_speed = 0.334;
21
    }
22
    if (i_ex(mydialoguer) == false)
23
    {
24
        if (!instance_exists(obj_fusionmenu))
25
        {
26
            global.interact = 0;
27
            with (obj_mainchara)
28
                onebuffer = 5;
29
        }
30
        myinteract = 0;
31
    }
32
}
33
if (con == 10)
34
{
35
    con = 11;
36
    alarm[4]
 = 40;
gml_Object_obj_npc_dojo_Alarm_4.gml

con++;
37
}
38
if (con == 12 && global.fighting == 0)
39
{
40
    con = 13;
41
    alarm[4]
 = 15;
gml_Object_obj_npc_dojo_Alarm_4.gml

con++;
42
}
43
if (con == 14)
44
{
45
    
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; ...
("noone");
46
    if (global.flag[36 dojo_failure] == 0)
47
    {
48
        if (global.flag[dojoFlag] == 0)
49
        {
50
            if (dojoFlag == 815)
51
            {
52
                msgsetloc(0, 
* An amazing battle!Wait for input
"* An amazing battle!/", "obj_npc_dojo_slash_Step_0_gml_45_0"
);
53
                msgnextloc(
* As promised,Delay 11 here is your reward!Wait for input
"* As promised^1, here is your reward!/", "obj_npc_dojo_slash_Step_0_gml_46_0"
);
54
                
scr_itemget_anytype
scr_itemget_anytype

function
scr_itemget_anytype(arg0, arg1)
{ noroom = 0; if (arg1 == "item")
scr_itemget(arg0);
if (arg1 == "weapon")
scr_weaponget(arg0);
if (arg1 == "armor")
scr_armorget(arg0);
if (arg1 == "key")
scr_keyitemget(arg0);
if (arg1 == "money") global.gold += arg0; }
(dojoPrizeValue, dojoPrizeType);
55
                if (noroom != 0)
56
                {
57
                    msgnextloc(
* Boss! Delay 11Your inventory is full!!Wait for input
"* Boss!^1 Your inventory is full!!/", "obj_npc_dojo_slash_Step_0_gml_56_0"
);
58
                    msgnextloc(
* You'll just have to try again,Delay 11 boss!Wait for inputClose Message
"* You'll just have to try again^1, boss!/%", "obj_npc_dojo_slash_Step_0_gml_65_0"
);
59
                    global.flag[dojoFlag] = 0;
60
                }
61
                else
62
                {
63
                    msgnextsubloc("* (You received ~1!)/%", dojoPrizeName, "obj_npc_dojo_slash_Step_0_gml_51_0");
64
                    global.flag[dojoFlag] = 2;
65
                }
66
            }
67
        }
68
        else if (dojoFlag == 815)
69
        {
70
            msgsetloc(0, 
* An amazing battle!Wait for input
"* An amazing battle!/", "obj_npc_dojo_slash_Step_0_gml_45_0"
);
71
            msgnextloc(
* But you already won that prize,Delay 11 so we don't have another!Wait for inputClose Message
"* But you already won that prize^1, so we don't have another!/%", "obj_npc_dojo_slash_Step_0_gml_99_0"
);
72
        }
73
    }
74
    else if (dojoFlag == 815)
75
    {
76
        msgsetloc(0, 
* You beefed it! Better luck next time,Delay 11 boss!Wait for inputClose Message
"* You beefed it! Better luck next time^1, boss!/%", "obj_npc_dojo_slash_Step_0_gml_61_0"
);
77
    }
78
    d_make();
79
    con = 15;
80
}
81
if (con == 15 && !d_ex())
82
{
83
    
scr_healall
scr_healall

function
scr_healall(arg0)
{ for (i = 0; i < 3; i += 1) { if (global.char[i] != 0)
scr_heal(i, arg0);
} }
(999);
84
    global.flag[35 gameover_mode] = 0;
85
    global.flag[36 dojo_failure] = 0;
86
    global.flag[37 dojo_active] = 0;
87
    global.flag[38 no_battle_end_msg] = 0;
88
    global.flag[39 dojo_abort?] = 0;
89
    global.flag[60 dojo_next_encounter] = 0;
90
    global.flag[61 disable_recruiting] = 0;
91
    con = 0;
92
    global.interact = 0;
93
    global.facing = 0;
94
}