Undertale script viewer

← back to main script listing

gml_Object_obj_bara03_Step_0

(view raw script w/o annotations or w/e)
1
if (global.mnfight == 3)
2
{
3
    attacked = 0;
4
    with (obj_carrotstargen)
5
        instance_destroy();
6
}
7
if (alarm[5] > 0)
8
{
9
    if (global.monster[0] == 1)
10
    {
11
        if (global.monsterinstance[0].alarm[5] > alarm[5])
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
12
            alarm[5] = global.monsterinstance[0].alarm[5];
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
13
    }
14
    if (global.monster[1] == 1)
15
    {
16
        if (global.monsterinstance[1].alarm[5] > alarm[5])
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
17
            alarm[5] = global.monsterinstance[1].alarm[5];
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
18
    }
19
    if (global.monster[2] == 1)
20
    {
21
        if (global.monsterinstance[2].alarm[5] > alarm[5])
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
22
            alarm[5] = global.monsterinstance[2].alarm[5];
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
23
    }
24
}
25
if (global.mnfight == 1)
26
{
27
    if (talked == 0)
28
    {
29
        alarm[5] = 110;
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
30
        alarm[6] = 1;
gml_Object_obj_bara03_Alarm_6.gml

blcon = instance_create(x - blconx, y + 55, obj_blconsm); blcon.sprite_index = spr_blconsm2; gg = floor(random(3)); attacked = 0; mycommand = round(random(100)); if (mycommand >= 0 && mycommand < 25) global.msg[0] = "..."; if (mycommand >= 25) global.msg[0] = "..."; if (mycommand >= 50) global.msg[0] = "...&..."; if (mycommand >= 75) global.msg[0] = "..."; turn0 = 1; if (whatiheard == 3) global.msg[0] = "I know,&but..."; if (whatiheard == 1) { global.msg[0] = "Glove...&getting&looser."; if (shirtless == 1) global.msg[0] = "Nice&to meet&you???"; } pop = scr_monstersum(); if (pop < 2) { if (mycommand >= 0 && mycommand < 25) global.msg[0] = "..."; if (mycommand >= 25) global.msg[0] = "..."; if (mycommand >= 50) global.msg[0] = "..."; if (mycommand >= 75) global.msg[0] = "..."; if (freshdeath == 0 && mercymod < 1) global.msg[0] = "04...!!&Why&didn't&I..."; if (freshdeath == 0 && mercymod > 100) global.msg[0] = "04!?&You...&YOU...!"; freshdeath = 1; mercymod = -99999; } global.msg[1] = "%%%"; global.typer = 2; blconwd = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER); global.border = 15; obj_heart.x = round((global.idealborder[0] + global.idealborder[1]) / 2) - 8; obj_heart.y = round((global.idealborder[2] + global.idealborder[3]) / 2) - 8;
31
        talked = 1;
32
        global.heard = 0;
33
    }
34
}
35
if (control_check_pressed(0))
36
{
37
    if (alarm[5] > 5 && obj_lborder.x == global.idealborder[0])
38
        alarm[5] = 2;
gml_Object_obj_bara03_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; global.mnfight = 2; global.border = 16;
39
}
40
if (global.hurtanim[myself] == 1)
41
{
42
    shudder = 8;
43
    alarm[3] = global.damagetimer;
gml_Object_obj_bara03_Alarm_3.gml

if (mypart1.pause != 1) { dmgwriter = instance_create((x + (sprite_width / 2)) - 48, y - 24, obj_dmgwriter); global.damage = takedamage; with (dmgwriter) dmg = global.damage; with (mypart1) pause = 1; snd_play(snd_damage); alarm[8] = 11; } if (sha == 0) sha = x; x = sha + shudder; if (shudder < 0) shudder = -(shudder + 1); else shudder = -shudder; if (shudder == 0) { sha = 0; global.hurtanim[myself] = 2; exit; } alarm[3] = 2;
44
    global.hurtanim[myself] = 3;
45
}
46
if (global.hurtanim[myself] == 2)
47
{
48
    global.monsterhp[myself] -= takedamage;
49
    with (dmgwriter)
50
alarm[2]
51
    if (global.monsterhp[myself] >= 1)
52
    {
53
        mypart1.pause = 0;
54
        global.hurtanim[myself] = 0;
55
        global.myfight = 0;
56
        global.mnfight = 1;
57
    }
58
    else
59
    {
60
        global.myfight = 0;
61
        global.mnfight = 1;
62
        killed = 1;
63
        instance_destroy();
64
    }
65
}
66
if (global.hurtanim[myself] == 5)
67
{
68
    global.damage = 0;
69
    instance_create((x + (sprite_width / 2)) - 48, y - 24, obj_dmgwriter);
70
    with (obj_dmgwriter)
71
alarm[2]
72
    global.myfight = 0;
73
    global.mnfight = 1;
74
    global.hurtanim[myself] = 0;
75
}
76
if (global.mnfight == 2)
77
{
78
    if (obj_uborder.y > global.idealborder[2])
79
        obj_heart.y = (obj_uborder.y + obj_dborder.y) / 2;
80
    if (attacked == 0)
81
    {
82
        pop = scr_monstersum
scr_monstersum

return global.monster[0] + global.monster[1] + global.monster[2];
();
83
        global.turntimer = 180;
84
        if (instance_exists(obj_carrotstargen) == 0)
85
        {
86
            if (whatiheard == 1 && con == 0 && pop > 1)
87
                mycommand = 80;
88
            if (mycommand >= 0 && mycommand <= 50)
89
            {
90
                global.firingrate = 25;
91
                gen = instance_create(x, y, obj_xbulletgen);
92
                gen.dmg = global.monsteratk[myself];
93
            }
94
            else
95
            {
96
                global.firingrate = 20;
97
                if (whatiheard == 1 && con == 0 && pop > 1)
98
                {
99
                    instance_create((room_width / 2) - 15, (room_height / 2) - 80, obj_greenarmor);
100
                    global.firingrate = 35;
101
                }
102
                gen = instance_create(x, y, obj_warplinegen);
103
                gen.dmg = global.monsteratk[myself];
104
                gen.alarm[1] = 8;
105
                if (con > 6)
106
                    gen.shake = 1;
107
            }
108
            gen.myself = myself;
109
        }
110
        if (mycommand >= 0)
111
            global.msg[0] = "* 03 rubs her glove quietly.";
112
        if (mycommand >= 25)
113
            global.msg[0] = "* 04 hums and looks the other&  way.";
114
        if (mycommand >= 50)
115
            global.msg[0] = "* 03 stands guard.";
116
        if (mycommand >= 75)
117
            global.msg[0] = "* 04's twitches her tail.";
118
        if (mycommand >= 90)
119
            global.msg[0] = "* Smells like a military zoo.";
120
        pop = scr_monstersum
scr_monstersum

return global.monster[0] + global.monster[1] + global.monster[2];
();
121
        if (pop == 1)
122
        {
123
            if (mycommand >= 0)
124
                global.msg[0] = "* 03 is trembling.";
125
            if (mycommand >= 25)
126
                global.msg[0] = "* 03 is holding her face in&  her hands.";
127
            if (mycommand >= 50)
128
                global.msg[0] = "* 03 stands still.";
129
            if (mycommand >= 75)
130
                global.msg[0] = "* 03 seems sick.";
131
        }
132
        if (global.monsterhp[myself] < 30)
133
            global.msg[0] = "* 03's breathing intensifies.";
134
        attacked = 1;
135
        whatiheard = -1;
136
    }
137
}
138
if (global.myfight == 2)
139
{
140
    if (whatiheard != -1)
141
    {
142
        if (global.heard == 0)
143
        {
144
            if (whatiheard == 0)
145
            {
146
                global.msc = 0;
147
                global.msg[0] = "* RG 03 " + string(global.monsteratk[myself]) + " ATK " + string(global.monsterdef[myself]) + " DEF&* Royal Guard member with&  stuffy armor./^";
148
                OBJ_WRITER.halt = 3;
149
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
150
                with (iii)
151
                    halt = 0;
152
                whatiheard = 9;
153
            }
154
            if (whatiheard == 1)
155
            {
156
                global.msc = 0;
157
                global.msg[0] = "* You touch RG 03's glove^1.&* It starts to come loose./^";
158
                if (shirtless == 1)
159
                {
160
                    global.msg[0] = "* You shake RG 03's claw./^";
161
                    if (instance_exists(obj_bara01))
162
                        obj_bara01.whatiheard = 12;
163
                }
164
                OBJ_WRITER.halt = 3;
165
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
166
                with (iii)
167
                    halt = 0;
168
            }
169
            if (whatiheard == 3)
170
            {
171
                global.msc = 0;
172
                global.msg[0] = "* You tell RG 03 that she&  should stand up for herself./^";
173
                OBJ_WRITER.halt = 3;
174
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
175
                with (iii)
176
                    halt = 0;
177
            }
178
            global.heard = 1;
179
        }
180
    }
181
}
182
if (alphaup == 1 && image_alpha < 1)
183
    image_alpha += 0.05;
184
if (global.myfight == 4)
185
{
186
    if (global.mercyuse == 0)
187
    {
188
        script_execute(scr_mercystandard);
189
        if (mercy < 0)
190
            instance_destroy();
191
    }
192
}
193
if (mercymod == 222 && instance_exists(OBJ_WRITER) == 0)
194
{
195
    script_execute(scr_mercystandard);
196
    if (mercy < 0)
197
        instance_destroy();
198
}
199
if (fuckyou == 1)
200
    global.mnfight = 5;
201
if (global.mnfight == 5)
202
{
203
    if (con == 0)
204
    {
205
        fuckyou = 1;
206
        obj_heart.x = -800;
207
        obj_heart.movement = -1;
208
        global.border = 0;
209
        alarm[4] = 15;
210
        con = 1;
211
    }
212
    if (con == 2)
213
    {
214
        blcon = instance_create(x - blconx, y + blcony, obj_blconsm);
215
        blcon.sprite_index = spr_blconsm2;
216
        global.typer = 2;
217
        global.msg[0] = "My glove&...!/%%";
218
        writer = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER);
219
        con = 3;
220
    }
221
    if (con == 3 && instance_exists(OBJ_WRITER) == 0)
222
    {
223
        with (blcon)
224
            instance_destroy();
225
        snd_play(snd_grab);
226
        with (mypart1)
227
            hand1pic = spr_barafist_bug;
228
        con = 4;
229
        alarm[4] = 60;
230
    }
231
    if (con == 5 && instance_exists(OBJ_WRITER) == 0)
232
    {
233
        if (instance_exists(obj_bara04))
234
        {
235
            with (obj_bara04)
236
            {
237
                blcon = instance_create(x + blconx, y + blcony, obj_blconsm);
238
                global.typer = 2;
239
                global.msg[0] = "03...&Is that&...?/%%";
240
                writer = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER);
241
            }
242
        }
243
        con = 6;
244
    }
245
    if (con == 6 && instance_exists(OBJ_WRITER) == 0)
246
    {
247
        if (instance_exists(obj_bara04))
248
        {
249
            with (obj_bara04)
250
            {
251
                with (blcon)
252
                    instance_destroy();
253
            }
254
        }
255
        blcon = instance_create(x - blconx, y + blcony, obj_blconsm);
256
        blcon.sprite_index = spr_blconsm2;
257
        global.typer = 2;
258
        global.msg[0] = "Yes.&It is./";
259
        global.msg[1] = "Go&ahead.&Laugh at&me./%%";
260
        writer = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER);
261
        con = 7;
262
    }
263
    if (con == 7 && instance_exists(OBJ_WRITER) == 0)
264
    {
265
        with (blcon)
266
            instance_destroy();
267
        if (instance_exists(obj_bara04))
268
        {
269
            with (obj_bara04)
270
            {
271
                blcon = instance_create(x + blconx, y + blcony, obj_blconsm);
272
                global.typer = 2;
273
                global.msg[0] = "No, I.../%%";
274
                writer = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER);
275
            }
276
        }
277
        con = 8;
278
    }
279
    if (con == 8 && instance_exists(OBJ_WRITER) == 0)
280
    {
281
        if (instance_exists(obj_bara04))
282
        {
283
            with (obj_bara04.blcon)
284
                instance_destroy();
285
        }
286
        con = 9;
287
    }
288
    if (con == 9 && instance_exists(OBJ_WRITER) == 0)
289
    {
290
        fuckyou = 0;
291
        shirtless = 1;
292
        with (blcon)
293
            instance_destroy();
294
        global.msg[0] = "* RG 04 is looking at her own&  glove.";
295
        con = 10;
296
        global.mnfight = 3;
297
        obj_bara04.shake = 1;
298
        obj_heart.movement = 1;
299
    }
300
}