Undertale script viewer

← back to main script listing

gml_Object_obj_torielboss_Alarm_10

(view raw script w/o annotations or w/e)
1
if (instance_exists(blcon))
2
{
3
    with (blcon)
4
        instance_destroy();
5
}
6
if (image_alpha > 0.1)
7
{
8
    sprite_index = spr_torielboss_kneelsmile2;
9
    y += 56;
10
    image_xscale = 1;
11
    image_yscale = 1;
12
    killed = 1;
13
    room_speed = 20;
14
    instance_create(obj_heart.x, (sprite_height / 2) + y, obj_torheart);
15
    global.flag[45 status_toriel] = 4;
16
    ossafe_ini_open("undertale.ini");
17
    TK = ini_read_real("Toriel", "TK", 0);
18
    ini_write_real("Toriel", "TK", TK + 1);
19
    ossafe_ini_close();
20
    ossafe_savedata_save();
21
    instance_destroy();
22
    image_alpha -= 0.05;
23
    alarm[10] = 1;
gml_Object_obj_torielboss_Alarm_10.gml

if (instance_exists(blcon)) { with (blcon) instance_destroy(); } if (image_alpha > 0.1) { sprite_index = spr_torielboss_kneelsmile2; y += 56; image_xscale = 1; image_yscale = 1; killed = 1; room_speed = 20; instance_create(obj_heart.x, (sprite_height / 2) + y, obj_torheart); global.flag[45 status_toriel] = 4; ossafe_ini_open("undertale.ini"); TK = ini_read_real("Toriel", "TK", 0); ini_write_real("Toriel", "TK", TK + 1); ossafe_ini_close(); ossafe_savedata_save(); instance_destroy(); image_alpha -= 0.05; alarm[10] = 1; } else { caster_stop(global.batmusic); caster_free(global.batmusic); global.typer = 1; script_execute(scr_writetext, 0,
* YOU WON!
* You lost 1 experience point.Wait for inputClose Message
scr_gettext("obj_torielboss_240")
, 0, 0); alarm[11] = 1; }
24
}
25
else
26
{
27
    caster_stop(global.batmusic);
28
    caster_free(global.batmusic);
29
    global.typer = 1;
30
    script_execute(scr_writetext, 0, 
* YOU WON!
* You lost 1 experience point.Wait for inputClose 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_torielboss_240")
, 0, 0);
31
    alarm[11] = 1;
gml_Object_obj_torielboss_Alarm_11.gml

if (instance_exists(OBJ_WRITER) == 0) alarm[7] = 2; else alarm[11] = 1;
32
}