Undertale script viewer

← back to main script listing

gml_Object_obj_monsterkidtrigger6_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0 && instance_exists(obj_mainchara))
2
{
3
    if (obj_mainchara.x > 120)
4
    {
5
        with (mkid)
6
        {
7
            follow = 99;
8
            move_towards_point(320, 100, 4);
9
            sprite_index = rsprite;
10
            image_speed = 0.25;
11
        }
12
        con = 1;
13
    }
14
}
15
if (con == 1)
16
{
17
    with (mkid)
18
        sprite_index = rsprite;
19
    ganer += 0.334;
20
    if (instance_exists(mkid))
21
        mkid.image_index = ganer;
22
    if (mkid.x >= 316)
23
    {
24
        mkid2 = mkid;
25
        mkid = instance_create(mkid2.x, mkid2.y, obj_townnpc_monsterkid1);
26
        mkid.direction = 0;
27
        with (mkid)
28
            sprite_index = spr_mkid_rt;
29
        with (mkid2)
30
            instance_destroy();
31
        con = 2;
32
    }
33
}
34
if (con == 4)
35
{
36
    con = 5;
37
    alarm[4] = 120;
38
}
39
if (con == 6 && instance_exists(OBJ_WRITER) == 0 && global.interact == 0)
40
{
41
    unbuffer += 1;
42
    with (obj_mainchara)
43
        uncan = 1;
44
}
45
else if (con == 6)
46
{
47
    unbuffer = 0;
48
    with (obj_mainchara)
49
        uncan = 0;
50
}
51
if (con == 6 && instance_exists(OBJ_WRITER) == 0 && global.interact == 0 && unbuffer >= 4)
52
{
53
    with (obj_mainchara)
54
        uncan = 1;
55
    with (obj_dialoguer)
56
        instance_destroy();
57
    with (OBJ_WRITER)
58
        instance_destroy();
59
    with (obj_choicer)
60
        instance_destroy();
61
    global.interact = 1;
62
    with (mkid)
63
    {
64
        fun = 1;
65
        scr_npc_watch
scr_npc_watch

if (argument0 == 0) { if (instance_exists(obj_mainchara)) { xdist = (obj_mainchara.x + (obj_mainchara.sprite_width / 2)) - (x + (sprite_width / 2)); ydist = obj_mainchara.bbox_top - bbox_top; if (abs(xdist) >= abs(ydist)) { if (xdist >= 0) sprite_index = rtsprite; else sprite_index = ltsprite; } else if (ydist >= 0) { sprite_index = dtsprite; } else { sprite_index = utsprite; } } } if (argument0 == 1) { if (instance_exists(obj_mainchara)) { xdist = (obj_mainchara.x + (obj_mainchara.sprite_width / 2)) - (x + (sprite_width / 2)); ydist = obj_mainchara.bbox_top - bbox_top; if (abs(xdist) >= abs(ydist)) { if (xdist >= 0) sprite_index = rsprite; else sprite_index = lsprite; } else if (ydist >= 0) { sprite_index = dsprite; } else { sprite_index = usprite; } } }
(0);
66
        image_speed = 0.25;
67
    }
68
    global.msg[0] = 
* Yo,Delay 11 you wanna see
Undyne,Delay 11 right...?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_monsterkidtrigger6_192")
;
69
    global.msg[1] = 
* Climb on my shoulders.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_monsterkidtrigger6_193")
;
70
    if (global.flag[85 have_umbrella] == 1)
71
        global.msg[1] = 
* Put up your umbrella and
climb on my shoulders.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_monsterkidtrigger6_195")
;
72
    scr_regulartext
scr_regulartext

global.typer = 5; global.facechoice = 0; global.faceemotion = 0; global.msc = 0; instance_create(0, 0, obj_dialoguer);
();
73
    con = 7;
74
}
75
if (con == 7 && instance_exists(OBJ_WRITER) == 0)
76
{
77
    alarm[7] = 5;
gml_Object_obj_monsterkidtrigger6_Alarm_7.gml

with (obj_mainchara) uncan = 0;
78
    global.plot = 112;
79
    mkid.fun = 1;
80
    mkid.sprite_index = spr_mkid_prostrate;
81
    con = 8;
82
    global.interact = 0;
83
}
84
if (con == 10)
85
{
86
    global.phasing = 1;
87
    global.interact = 1;
88
    mkid.solid = 0;
89
    obj_mainchara.facing = 1;
90
    global.facing = 1;
91
    obj_mainchara.image_speed = 0.25;
92
    difx = mkid.x - obj_mainchara.x;
93
    dify = mkid.y - 18 - obj_mainchara.y;
94
    con = 11;
95
    alarm[4] = 10;
96
}
97
if (con == 11)
98
{
99
    obj_mainchara.x += (difx / 10);
100
    obj_mainchara.y += (dify / 10);
101
}
102
if (con == 12)
103
{
104
    con = 13;
105
    alarm[4] = 20;
106
    difx = 345 - obj_mainchara.x;
107
    dify = 70 - obj_mainchara.y;
108
}
109
if (con == 14)
110
{
111
    con = 15;
112
    alarm[4] = 10;
113
}
114
if (con == 15)
115
{
116
    obj_mainchara.x += (difx / 10);
117
    obj_mainchara.y += (dify / 10);
118
}
119
if (con == 16)
120
{
121
    con = 17;
122
    alarm[4] = 30;
123
    obj_mainchara.image_speed = 0;
124
}
125
if (con == 18)
126
{
127
    mkid.image_speed = 0;
128
    mkid.sprite_index = mkid.rtsprite;
129
    con = 19;
130
    alarm[4] = 20;
131
}
132
if (con == 20)
133
{
134
    side = 1;
135
    ledgewall.x -= 20;
136
    mkid.image_speed = 0.25;
137
    global.msg[0] = 
* Yo,Delay 11 you go on ahead.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_monsterkidtrigger6_272")
;
138
    global.msg[1] = 
* Don't worry about me.Delay 11
* I always find a way to
get through!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_monsterkidtrigger6_273")
;
139
    if (scr_murderlv
scr_murderlv

mrd = 0; if (global.flag[202 kills_ruins] >= 20) mrd = 1; if (mrd == 1 && global.flag[45 status_toriel] == 4) mrd = 2; if (mrd == 2 && global.flag[52 status_doggo] == 1) mrd = 3; if (mrd == 3 && global.flag[53 status_dogcouple] == 1) mrd = 4; if (mrd == 4 && global.flag[54 status_greaterdog] == 1) mrd = 5; if (mrd == 5 && global.flag[57 status_snowdrake] == 2) mrd = 6; if (mrd == 6 && global.flag[203 kills_tundra] >= 16) mrd = 7; if (mrd == 7 && global.flag[67 status_papyrus] == 1) mrd = 8; if (mrd == 8 && global.flag[81 status_shyren] == 1) mrd = 9; if (mrd == 9 && global.flag[252 killed_glad_dummy] == 1) mrd = 10; if (mrd == 10 && global.flag[204 kills_water] >= 18) mrd = 11; if (mrd == 11 && global.flag[251 killed_undyne_ex] == 1 && global.flag[350 status_undyne] == 1) mrd = 12; if (mrd == 12 && global.flag[402 killed_rg] == 1) mrd = 13; if (mrd == 13 && global.flag[397 killed_muffet] == 1) mrd = 14; if (mrd == 14 && global.flag[205 kills_hotland] >= 40) mrd = 15; if (mrd == 15 && global.flag[425 killed_mettaton] == 1 && global.flag[27 spared_specific] == 0) mrd = 16; murderboy = mrd; if (global.flag[26 murderlevel_override] > 0) mrd = global.flag[26 murderlevel_override]; return mrd;
() >= 9 && global.flag[27 spared_specific] == 0)
140
    {
141
        global.msg[0] = 
* Owww...Delay 11
* Yo,Delay 11 try being a little
less rough,Delay 11 haha.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_monsterkidtrigger6_276")
;
142
        global.msg[1] = 
* Anyway,Delay 11 I'll look for
another way through.Delay 11
* Later!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_monsterkidtrigger6_277")
;
143
    }
144
    scr_regulartext
scr_regulartext

global.typer = 5; global.facechoice = 0; global.faceemotion = 0; global.msc = 0; instance_create(0, 0, obj_dialoguer);
();
145
    con = 21;
146
    global.phasing = 0;
147
}
148
if (con == 21 && instance_exists(OBJ_WRITER) == 0)
149
{
150
    mkid.direction = 180;
151
    mkid.fun = 0;
152
    mkid.hspeed = -5;
153
    con = 25;
154
    alarm[4] = 12;
155
}
156
if (con == 26)
157
{
158
    mkid.hspeed = 0;
159
    mkid.fun = 1;
160
    mkid.image_index = 0;
161
    mkid.image_speed = 0.334;
162
    mkid.sprite_index = spr_mkid_trip_l;
163
    con = 49.2;
164
}
165
if (con == 49.2)
166
{
167
    if (mkid.image_index >= 19)
168
    {
169
        mkid.image_index = 0;
170
        mkid.x -= 13;
171
        mkid.sprite_index = mkid.lsprite;
172
        con = 22;
173
        alarm[4] = 25;
174
    }
175
}
176
if (con == 23)
177
{
178
    mkid.hspeed = -3;
179
    global.plot = 113;
180
    global.flag[91 trash_save_mkid_pos] = 10;
181
    global.interact = 0;
182
    con = 24;
183
}