Undertale script viewer

← back to main script listing

gml_Object_obj_mett_bossintro_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    con = 0.1;
4
    alarm[4] = 30;
5
}
6
if (con == 1.1)
7
{
8
    obj_mettb_body.myblend = 0;
9
    obj_mettb_body.myalpha = 0;
10
    obj_mettb_body.sineron = 0;
11
    n = instance_create(10, -100, obj_npc_marker);
12
    n.visible = true;
13
    n.sprite_index = spr_stagelight_bad;
14
    n.image_xscale = 2;
15
    n.image_yscale = 2;
16
    n.image_speed = 0;
17
    n.vspeed = 2;
18
    n2 = instance_create(630, -100, obj_npc_marker);
19
    n2.visible = true;
20
    n2.sprite_index = spr_stagelight_bad;
21
    n2.image_xscale = -2;
22
    n2.image_yscale = 2;
23
    n2.image_speed = 0;
24
    n2.vspeed = 2;
25
    n.depth = 11;
26
    n2.depth = 11;
27
    con = 1;
28
    alarm[4] = 50;
29
}
30
if (con == 2)
31
{
32
    snd_play(snd_noise);
33
    n.vspeed = 0;
34
    n2.vspeed = 0;
35
    con = 3;
36
    alarm[4] = 30;
37
}
38
if (con == 4)
39
{
40
    snd_play(snd_noise);
41
    n.image_index = 1;
42
    n2.image_index = 1;
43
    cloud = 1;
44
    con = 5;
45
    alarm[4] = 60;
46
    alpha = 0;
47
}
48
if (cloud == 1)
49
{
50
    cltimer -= 1;
51
    if (cltimer < 1)
52
    {
53
        ccc = instance_create(160, 0, obj_stagecloud);
54
        if (otr == 0)
55
        {
56
            otr = 1;
57
            ccc.hspeed = -ccc.hspeed;
58
        }
59
        else
60
        {
61
            otr = 0;
62
        }
63
        cltimer = 9;
64
    }
65
}
66
if (con == 6)
67
{
68
    if (obj_mettb_body.myalpha == 0)
69
        caster_loop(presong, 0.7, 0.85);
70
    obj_mettb_body.myalpha += 0.015;
71
    if (obj_mettb_body.myalpha >= 1)
72
        con = 7;
73
}
74
if (con == 7)
75
{
76
    global.msc = 0;
77
    global.typer = 51;
78
    global.msg[0] = 
Ohhhh my.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_mett_bossintro_174")
;
79
    global.msg[1] = 
If you flipped my
switch, that can
only mean one
thing.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_mett_bossintro_175")
;
80
    global.msg[2] = 
You're desperate
for the premiere
of my new body.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_mett_bossintro_176")
;
81
    global.msg[3] = 
How rude...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_mett_bossintro_177")
;
82
    global.msg[4] = 
Lucky for you,
I've been aching
to show this off
for a long time.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_mett_bossintro_178")
;
83
    global.msg[5] = 
So...Delay 11 as thanks,Delay 11
I'll give you a
handsome reward.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_mett_bossintro_179")
;
84
    global.msg[6] = 
I'll make your
last living
moments...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_mett_bossintro_180")
;
85
    scr_blcon
scr_blcon

writer = instance_create(argument0 + 30, argument1 + 10, OBJ_WRITER); blcon = instance_create(writer.x - 30, writer.y - 10, obj_blconwideslave); blcon.parent = writer; if (argument2 == 1) blcon.sprite_index = spr_blconwdshrt_l; if (argument2 == 2) { blcon.sprite_index = spr_blconabove; writer.writingy -= 20; writer.writingx -= 20; } if (argument2 == 3) { blcon.sprite_index = spr_blconwdshrt; writer.writingy -= 20; } if (argument2 == 4) { blcon.sprite_index = spr_blconbelow; writer.writingx -= 10; }
(220, 250, 4);
86
    blcon.depth = -6000;
87
    writer.depth = -6001;
88
    blcon.y += 20;
89
    con = 7.1;
90
    vol = 0.7;
91
}
92
if (con == 7.1 && instance_exists(OBJ_WRITER) == 1)
93
{
94
    if (OBJ_WRITER.stringno > 6)
95
    {
96
        if (vol > 0)
97
            vol -= 0.01;
98
        caster_set_volume(presong, vol);
99
    }
100
}
101
if (con == 7.1 && instance_exists(OBJ_WRITER) == 0)
102
{
103
    flasher = 1;
104
    flashamt = 0;
105
    con = 8;
106
}
107
if (con == 9)
108
{
109
    con = 10;
110
    alarm[4] = 20;
111
}
112
if (con == 11)
113
{
114
    global.msg[0] = 
ABSOLUTELY beautiful!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_mett_bossintro_213")
;
115
    scr_blcon
scr_blcon

writer = instance_create(argument0 + 30, argument1 + 10, OBJ_WRITER); blcon = instance_create(writer.x - 30, writer.y - 10, obj_blconwideslave); blcon.parent = writer; if (argument2 == 1) blcon.sprite_index = spr_blconwdshrt_l; if (argument2 == 2) { blcon.sprite_index = spr_blconabove; writer.writingy -= 20; writer.writingx -= 20; } if (argument2 == 3) { blcon.sprite_index = spr_blconwdshrt; writer.writingy -= 20; } if (argument2 == 4) { blcon.sprite_index = spr_blconbelow; writer.writingx -= 10; }
(obj_mettb_body.x - 260, 60, 1);
116
    con = 12;
117
}
118
if (con == 12 && instance_exists(OBJ_WRITER) == 0)
119
{
120
    global.monster[0] = 0;
121
    global.monster[1] = 0;
122
    global.monsterinstance[0] = 0;
123
    with (obj_mettatonb_third)
124
        instance_destroy();
125
    global.monstertype[0] = 51Mettaton EX;
126
    global.msc = 0;
127
    obj_mettb_body.depth = 10;
128
    global.monsterinstance[0] = instance_create(210, 60, obj_mettatonex);
129
    global.msg[0] = 
* Mettaton EX makes his premiere!
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;
("scr_battlegroup_1221")
;
130
    caster_loop(global.batmusic, 1, 0.95);
131
    global.mnfight = 3;
132
    global.myfight = -1;
133
    global.bmenuno = 0;
134
    con = 13;
135
    instance_destroy();
136
}