Undertale script viewer

← back to main script listing

gml_Object_obj_dummymonster_Step_0

(view raw script w/o annotations or w/e)
1
if (global.mnfight == 3)
2
    attacked = 0;
3
if (alarm[5] > 0)
4
{
5
    if (global.monster[0] == 1)
6
    {
7
        if (global.monsterinstance[0].alarm[5] > alarm[5])
gml_Object_obj_dummymonster_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
8
            alarm[5] = global.monsterinstance[0].alarm[5];
gml_Object_obj_dummymonster_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
9
    }
10
    if (global.monster[1] == 1)
11
    {
12
        if (global.monsterinstance[1].alarm[5] > alarm[5])
gml_Object_obj_dummymonster_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
13
            alarm[5] = global.monsterinstance[1].alarm[5];
gml_Object_obj_dummymonster_Alarm_5.gml

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

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
18
            alarm[5] = global.monsterinstance[2].alarm[5];
gml_Object_obj_dummymonster_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
19
    }
20
}
21
if (global.mnfight == 1)
22
{
23
    if (talked == 0)
24
    {
25
        attacked = 0;
26
        alarm[5] = 80;
gml_Object_obj_dummymonster_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
27
        alarm[6] = 1;
gml_Object_obj_dummymonster_Alarm_6.gml

blcon = instance_create(x + sprite_width, y, obj_blconsm); mycommand = round(random(100)); if (mycommand >= 0 && mycommand < 100) global.msg[0] =
.Delay 11.Delay 11.Delay 11.Delay 11.Delay 11
scr_gettext("obj_dummymonster_213")
; global.msg[1] =
Close MessageClose MessageClose Message
scr_gettext("obj_dummymonster_222")
; global.typer = 2; blconwd = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER);
28
        talked = 1;
29
        global.heard = 0;
30
    }
31
}
32
if (control_check_pressed(0))
33
{
34
    if (alarm[5] > 5 && obj_lborder.x == global.idealborder[0])
35
        alarm[5] = 2;
gml_Object_obj_dummymonster_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2;
36
}
37
if (global.hurtanim[myself] == 1)
38
{
39
    shudder = 16;
40
    alarm[3] = global.damagetimer;
gml_Object_obj_dummymonster_Alarm_3.gml

if (image_index != 1) { dmgwriter = instance_create((x + (sprite_width / 2)) - 48, y - 24, obj_dmgwriter); global.damage = takedamage; with (dmgwriter) dmg = global.damage; image_index = 1; snd_play(hurtsound); } x += shudder; if (shudder < 0) shudder = -(shudder + 2); else shudder = -shudder; if (shudder == 0) { global.hurtanim[myself] = 2; exit; } alarm[3] = 2;
41
    global.hurtanim[myself] = 3;
42
}
43
if (global.hurtanim[myself] == 2)
44
{
45
    global.monsterhp[myself] -= takedamage;
46
    with (dmgwriter)
47
alarm[2]
48
    if (global.monsterhp[myself] >= 1)
49
    {
50
        global.hurtanim[myself] = 0;
51
        image_index = 0;
52
        global.myfight = 0;
53
        global.mnfight = 1;
54
    }
55
    else
56
    {
57
        global.myfight = 0;
58
        global.mnfight = 1;
59
        killed = 1;
60
        instance_destroy();
61
    }
62
}
63
if (global.hurtanim[myself] == 5)
64
{
65
    global.damage = 0;
66
    instance_create((x + (sprite_width / 2)) - 48, y - 24, obj_dmgwriter);
67
    with (obj_dmgwriter)
68
alarm[2]
69
    global.myfight = 0;
70
    global.mnfight = 1;
71
    global.hurtanim[myself] = 0;
72
}
73
if (global.mnfight == 2)
74
{
75
    if (attacked == 0)
76
    {
77
        global.turntimer = 1;
78
        global.firingrate = 1;
79
        if (mycommand >= 0)
80
            global.msg[0] = 
* Dummy looks like it's
going to fall over.
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_394")
;
81
        if (mycommand >= 50)
82
            global.msg[0] = 
* Dummy stands around
absentmindedly.
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_395")
;
83
        global.mnfight = 3;
84
        if (global.turn > 6)
85
        {
86
            if (outside == 0)
87
            {
88
                global.msg[0] = 
* Dummy tires of your
aimless shenanigans.
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_400")
;
89
                global.flag[13 bored_last] = 1;
90
                alarm[7] = 2;
gml_Object_obj_dummymonster_Alarm_7.gml

action_move("000000010", 4); snd_play(snd_slidewhist);
91
                global.mnfight = 2;
92
                global.typer = 1;
93
                global.msc = 0;
94
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
95
            }
96
        }
97
        attacked = 1;
98
    }
99
}
100
if (whatiheard == 0)
101
{
102
    if (instance_exists(OBJ_WRITER) == 0)
103
    {
104
        global.mnfight = 1;
105
        global.myfight = 0;
106
    }
107
}
108
if (whatiheard == 3)
109
{
110
    if (instance_exists(OBJ_WRITER) == 0)
111
    {
112
        global.flag[10 spared_last] = 1;
113
        global.monster[myself] = 0;
114
    }
115
}
116
if (global.myfight == 2)
117
{
118
    if (whatiheard != -1)
119
    {
120
        if (global.heard == 0)
121
        {
122
            if (whatiheard == 0)
123
            {
124
                global.msc = 0;
125
                global.msg[0] = 
* DUMMY - ATK 0 DEF 0 Delay 11
* A cotton heart and a button eyeDelay 11* You are the apple of my eyeWait for inputClose MessageClose Message
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_437")
;
126
                OBJ_WRITER.halt = 3;
127
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
128
                with (iii)
129
                    halt = 0;
130
            }
131
            if (whatiheard == 3)
132
            {
133
                global.msc = 0;
134
                global.msg[0] = 
* You talk to the DUMMY.Delay 22
* ...Wait for input
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_445")
;
135
                global.msg[1] = 
* It doesn't seem much for
conversation.Wait for input
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_446")
;
136
                global.msg[2] = 
* TORIEL seems happy with you.Wait for inputClose MessageClose Message
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_dummymonster_447")
;
137
                global.flag[14 status_dummy] = 2;
138
                OBJ_WRITER.halt = 3;
139
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
140
                with (iii)
141
                    halt = 0;
142
            }
143
            global.heard = 1;
144
        }
145
    }
146
}
147
if (global.myfight == 4)
148
{
149
    if (global.mercyuse == 0)
150
        script_execute(scr_mercystandard);
151
}