Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_npc_hammerguy_Step_0

(view raw script w/o annotations or w/e)
1
if (myinteract == 3)
2
{
3
}
4
if (myinteract == 3 && con == 0)
5
{
6
    if (i_ex(mydialoguer) == false)
7
    {
8
        sprite_index = spr_hammerguy;
9
        image_speed = 0.1;
10
        global.interact = 0;
11
        myinteract = 0;
12
        with (obj_mainchara)
13
            onebuffer = 5;
14
    }
15
}
16
if (con >= 5)
17
{
18
    if (con == 10 || con == 30 || con == 50)
19
    {
20
        if (!d_ex())
21
        {
22
            snd_pause(global.currentsong[1]);
23
            sprite_index = spr_hammerguy_powerup;
24
            image_index = 0;
25
            image_speed = 0.5;
26
            snd_play(snd_noise);
27
            con += 1;
28
            alarm[4] = 30;
29
            charcycle = 0;
30
            charamt = 0;
31
            if (global.char[1] > 0)
32
                charamt = 1;
33
            if (global.char[2] > 0)
34
                charamt = 2;
35
            charcycle = charamt;
36
        }
37
    }
38
    if (con == 12 || con == 32 || con == 52 || con == 72)
39
    {
40
        hitmode = 1;
41
        sprite_index = spr_hammerguy_hit;
42
        image_speed = 0.5;
43
        image_index = 0;
44
        con += 1;
45
    }
46
    if (con == 15)
47
    {
48
        with (char)
49
            instance_destroy();
50
        with (global.cinstance[0])
51
            visible = 1;
52
        with (global.cinstance[1])
53
            visible = 1;
54
        obj_mainchara.visible = 1;
55
        con = 13;
56
        charcycle -= 1;
57
        if (charcycle < 0)
58
            con = 16;
59
    }
60
    if (con == 13)
61
    {
62
        chartype = global.char[charcycle];
63
        if (charcycle == 0)
64
        {
65
            with (obj_mainchara)
66
                visible = 0;
67
            var xpos = (global.chapter == 1) ? 390 : (x + 105);
68
            var ypos = (global.chapter == 1) ? 125 : (y + 30);
69
            char = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(xpos, ypos, spr_krisd_dark);
70
            with (char)
71
                depth = 400000;
72
        }
73
        if (charcycle == 1 || charcycle == 2)
74
        {
75
            with (global.cinstance[charcycle - 1])
76
                visible = 0;
77
            if (chartype == 2)
78
            {
79
                var xpos = (global.chapter == 1) ? 380 : (x + 85);
80
                var ypos = (global.chapter == 1) ? 110 : (y + 15);
81
                char = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(xpos, ypos, spr_susie_shock);
82
                with (char)
83
                    depth = 400000;
84
            }
85
            if (chartype == 3)
86
            {
87
                var xpos = (global.chapter == 1) ? 390 : (x + 90);
88
                var ypos = (global.chapter == 1) ? 140 : (y + 35);
89
                var ral_sprite = (global.chapter == 1) ? spr_ralsei_shock_overworld : spr_ralsei_hurt;
90
                char = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(xpos, ypos, ral_sprite);
91
                with (char)
92
                    depth = 400000;
93
            }
94
        }
95
        con = 14;
96
        alarm[4] = 36;
97
    }
98
    if (con == 16 || con == 36 || con == 56 || con == 76)
99
    {
100
        hitmode = 0;
101
        sprite_index = spr_hammerguy;
102
        image_speed = 0.05;
103
        image_index = 0;
104
        snd_resume(global.currentsong[1]);
105
        con += 1;
106
    }
107
    if (con == 17)
108
    {
109
        global.hp[1] = global.maxhp[1];
110
        global.hp[2] = global.maxhp[2];
111
        global.hp[3] = global.maxhp[3];
112
        global.typer = 6;
113
        global.fc = 0;
114
        snd_play(snd_power);
115
        global.msg[0] = stringsetloc(
* (Somehow,Delay 11 everyone's HP was restored.)Wait for input
"* (Somehow^1, everyone's HP was restored.)/", "obj_npc_hammerguy_slash_Step_0_gml_108_0"
);
116
        global.msg[1] = stringsetloc(
* Well,Delay 11 well!Delay 11 Don't you feel better after a nice massage?Delay 11 Huh-Hah!!Wait for inputClose Message
"* Well^1, well^1! Don't you feel better after a nice massage^1? Huh-Hah!!/%", "obj_npc_hammerguy_slash_Step_0_gml_109_0"
);
117
        mydialoguer = instance_create(0, 0, obj_dialoguer);
118
        con = 18;
119
    }
120
    if (con == 18 || con == 38 || con == 58)
121
    {
122
        if (!d_ex())
123
        {
124
            myinteract = 0;
125
            global.interact = 0;
126
            with (obj_mainchara)
127
                onebuffer = 10;
128
            con = 0;
129
        }
130
    }
131
    if (hitmode == 1)
132
    {
133
        if (image_index == 4)
134
            snd_play(snd_squeaky);
135
        if (image_index >= 10)
136
            image_index = 0;
137
    }
138
    if (con == 33)
139
    {
140
        char = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(385, 160, spr_brokencake);
141
        with (char)
142
            depth = 400000;
143
        con = 34;
144
        alarm[4] = 50;
145
    }
146
    if (con == 35)
147
    {
148
        with (char)
149
            instance_destroy();
150
        con = 36;
151
    }
152
    if (con == 37)
153
    {
154
        scr_keyitemremove
scr_keyitemremove

function scr_keyitemremove(arg0) { removed = 0; scr_keyitemcheck(arg0); if (haveit == 1) { loc = 0; skip = 0; if (global.keyitem[0] == arg0 && skip == 0) { loc = 0; skip = 1; } if (global.keyitem[1] == arg0 && skip == 0) { loc = 1; skip = 1; } if (global.keyitem[2] == arg0 && skip == 0) { loc = 2; skip = 1; } if (global.keyitem[3] == arg0 && skip == 0) { loc = 3; skip = 1; } if (global.keyitem[4] == arg0 && skip == 0) { loc = 4; skip = 1; } if (global.keyitem[5] == arg0 && skip == 0) { loc = 5; skip = 1; } if (global.keyitem[6] == arg0 && skip == 0) { loc = 6; skip = 1; } if (global.keyitem[7] == arg0 && skip == 0) { loc = 7; skip = 1; } if (global.keyitem[8] == arg0 && skip == 0) { loc = 8; skip = 1; } if (global.keyitem[9] == arg0 && skip == 0) { loc = 9; skip = 1; } if (global.keyitem[10] == arg0 && skip == 0) { loc = 10; skip = 1; } if (global.keyitem[11] == arg0 && skip == 0) { loc = 11; skip = 1; } scr_keyitemshift(loc, 0); removed = 1; } }
(3);
155
        global.typer = 6;
156
        global.fc = 0;
157
        snd_play(snd_item);
158
        global.msg[0] = stringsetloc(
* (The Broken Cake was fixed beyond recognition.)Wait for input
"* (The Broken Cake was fixed beyond recognition.)/", "obj_npc_hammerguy_slash_Step_0_gml_153_0"
);
159
        global.msg[1] = stringsetloc(
* (The Broken Cake became the TOPCAKE.)Wait for input
"* (The Broken Cake became the TOPCAKE.)/", "obj_npc_hammerguy_slash_Step_0_gml_154_0"
);
160
        global.msg[2] = stringsetloc(
* This is truly a tremendous cake.Delay 11
* Use its power wisely...Wait for inputClose Message
"* This is truly a tremendous cake^1.&* Use its power wisely.../%", "obj_npc_hammerguy_slash_Step_0_gml_155_0"
);
161
        mydialoguer = instance_create(0, 0, obj_dialoguer);
162
        con = 38;
163
    }
164
    if (con == 53)
165
    {
166
        char = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(390, 170, spr_brokenkey);
167
        with (char)
168
            depth = 400000;
169
        con = 54;
170
        alarm[4] = 50;
171
    }
172
    if (con == 55)
173
    {
174
        with (char)
175
            instance_destroy();
176
        con = 56;
177
    }
178
    if (con == 57)
179
    {
180
        scr_keyitemremove
scr_keyitemremove

function scr_keyitemremove(arg0) { removed = 0; scr_keyitemcheck(arg0); if (haveit == 1) { loc = 0; skip = 0; if (global.keyitem[0] == arg0 && skip == 0) { loc = 0; skip = 1; } if (global.keyitem[1] == arg0 && skip == 0) { loc = 1; skip = 1; } if (global.keyitem[2] == arg0 && skip == 0) { loc = 2; skip = 1; } if (global.keyitem[3] == arg0 && skip == 0) { loc = 3; skip = 1; } if (global.keyitem[4] == arg0 && skip == 0) { loc = 4; skip = 1; } if (global.keyitem[5] == arg0 && skip == 0) { loc = 5; skip = 1; } if (global.keyitem[6] == arg0 && skip == 0) { loc = 6; skip = 1; } if (global.keyitem[7] == arg0 && skip == 0) { loc = 7; skip = 1; } if (global.keyitem[8] == arg0 && skip == 0) { loc = 8; skip = 1; } if (global.keyitem[9] == arg0 && skip == 0) { loc = 9; skip = 1; } if (global.keyitem[10] == arg0 && skip == 0) { loc = 10; skip = 1; } if (global.keyitem[11] == arg0 && skip == 0) { loc = 11; skip = 1; } scr_keyitemshift(loc, 0); removed = 1; } }
(4);
181
        scr_keyitemremove
scr_keyitemremove

function scr_keyitemremove(arg0) { removed = 0; scr_keyitemcheck(arg0); if (haveit == 1) { loc = 0; skip = 0; if (global.keyitem[0] == arg0 && skip == 0) { loc = 0; skip = 1; } if (global.keyitem[1] == arg0 && skip == 0) { loc = 1; skip = 1; } if (global.keyitem[2] == arg0 && skip == 0) { loc = 2; skip = 1; } if (global.keyitem[3] == arg0 && skip == 0) { loc = 3; skip = 1; } if (global.keyitem[4] == arg0 && skip == 0) { loc = 4; skip = 1; } if (global.keyitem[5] == arg0 && skip == 0) { loc = 5; skip = 1; } if (global.keyitem[6] == arg0 && skip == 0) { loc = 6; skip = 1; } if (global.keyitem[7] == arg0 && skip == 0) { loc = 7; skip = 1; } if (global.keyitem[8] == arg0 && skip == 0) { loc = 8; skip = 1; } if (global.keyitem[9] == arg0 && skip == 0) { loc = 9; skip = 1; } if (global.keyitem[10] == arg0 && skip == 0) { loc = 10; skip = 1; } if (global.keyitem[11] == arg0 && skip == 0) { loc = 11; skip = 1; } scr_keyitemshift(loc, 0); removed = 1; } }
(6);
182
        scr_keyitemremove
scr_keyitemremove

function scr_keyitemremove(arg0) { removed = 0; scr_keyitemcheck(arg0); if (haveit == 1) { loc = 0; skip = 0; if (global.keyitem[0] == arg0 && skip == 0) { loc = 0; skip = 1; } if (global.keyitem[1] == arg0 && skip == 0) { loc = 1; skip = 1; } if (global.keyitem[2] == arg0 && skip == 0) { loc = 2; skip = 1; } if (global.keyitem[3] == arg0 && skip == 0) { loc = 3; skip = 1; } if (global.keyitem[4] == arg0 && skip == 0) { loc = 4; skip = 1; } if (global.keyitem[5] == arg0 && skip == 0) { loc = 5; skip = 1; } if (global.keyitem[6] == arg0 && skip == 0) { loc = 6; skip = 1; } if (global.keyitem[7] == arg0 && skip == 0) { loc = 7; skip = 1; } if (global.keyitem[8] == arg0 && skip == 0) { loc = 8; skip = 1; } if (global.keyitem[9] == arg0 && skip == 0) { loc = 9; skip = 1; } if (global.keyitem[10] == arg0 && skip == 0) { loc = 10; skip = 1; } if (global.keyitem[11] == arg0 && skip == 0) { loc = 11; skip = 1; } scr_keyitemshift(loc, 0); removed = 1; } }
(7);
183
        scr_keyitemget
scr_keyitemget

function scr_keyitemget(arg0) { i = 0; loop = 1; noroom = 0; global.item[12] = 999; while (loop == 1) { if (global.keyitem[i] == 0) { global.keyitem[i] = arg0; break; } if (i == 12) { noroom = 1; break; } i += 1; } script_execute(scr_keyiteminfo_all); }
(5);
184
        global.typer = 6;
185
        global.fc = 0;
186
        snd_play(snd_item);
187
        global.msg[0] = stringsetloc(
* (The Broken Key parts were fixed beyond recognition.)Wait for input
"* (The Broken Key parts were fixed beyond recognition.)/", "obj_npc_hammerguy_slash_Step_0_gml_184_0"
);
188
        global.msg[1] = stringsetloc(
* (The Broken Key parts became the Prison Key.)Wait for input
"* (The Broken Key parts became the Prison Key.)/", "obj_npc_hammerguy_slash_Step_0_gml_185_0"
);
189
        global.msg[2] = stringsetloc(
* .... Hmm,Delay 11 this KEY has a terrible energy coming from it...Wait for input
"* .... Hmm^1, this KEY has a terrible energy coming from it.../", "obj_npc_hammerguy_slash_Step_0_gml_186_0"
);
190
        global.msg[3] = stringsetloc(
* Please understand that I only fixed it...Wait for input
"* Please understand that I only fixed it.../", "obj_npc_hammerguy_slash_Step_0_gml_187_0"
);
191
        global.msg[4] = stringsetloc(
* So that you will never have to use it.Wait for inputClose Message
"* So that you will never have to use it./%", "obj_npc_hammerguy_slash_Step_0_gml_188_0"
);
192
        mydialoguer = instance_create(0, 0, obj_dialoguer);
193
        con = 58;
194
    }
195
}
196
if (con == 70 && !instance_exists(obj_fusionmenu))
197
{
198
    global.interact = 1;
199
    times_fused++;
200
    if (times_fused == 1)
201
    {
202
        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 == "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; } if (global.fighting == 1) ...
("no_name");
203
        msgsetloc(0, 
* Huh-hah!Delay 11 Let's feel my technique!Wait for inputClose Message
"* Huh-hah^1! Let's feel my technique!/%", "obj_npc_hammerguy_slash_Step_0_gml_216_0"
);
204
        d_make();
205
    }
206
    else if (times_fused >= 2)
207
    {
208
        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 == "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; } if (global.fighting == 1) ...
("no_name");
209
        msgsetloc(0, 
* Let's pick up the pace.Wait for inputClose Message
"* Let's pick up the pace./%", "obj_npc_hammerguy_slash_Step_0_gml_221_0"
);
210
        d_make();
211
    }
212
    con = 71;
213
}
214
if (con == 71)
215
    global.interact = 1;
216
if (con == 71 && !d_ex())
217
    con = 72;
218
if (con == 73)
219
{
220
    con = 75;
221
    alarm[4] = (times_fused == 1) ? 50 : 18;
222
}
223
if (con == 77)
224
{
225
    con = 78;
226
    msgsetsubloc(0, "* (You got ~1!)/%", fusionResultName, "obj_npc_hammerguy_slash_Step_0_gml_251_0");
227
    snd_play(snd_item);
228
    d_make();
229
}
230
if (con == 78 && !d_ex())
231
{
232
    con = 0;
233
    global.interact = 0;
234
    myinteract = 0;
235
}