Undertale script viewer

← back to main script listing

gml_Object_obj_chairiel_Alarm_0

(view raw script w/o annotations or w/e)
1
myinteract = 3;
2
if (chair == 0)
3
{
4
    global.msc = 527;
5
    if (global.flag[103 got_bscotch_pie] > 0)
6
        global.msc = 528;
7
    if (global.plot == 19.1)
8
        global.msc = 528;
9
    if (global.plot == 19.2)
10
        global.msc = 529;
11
    if (global.plot == 19.3)
12
        global.msc = 530;
13
    if (global.plot == 19.4)
14
        global.msc = 531;
15
    global.choice = -1;
16
    global.typer = 4;
17
    global.facechoice = 1;
18
    global.faceemotion = 99;
19
    mydialoguer = instance_create(0, 0, obj_dialoguer);
20
    talkedto += 1;
21
}
22
else
23
{
24
    myinteract = 3;
25
    global.msc = 0;
26
    global.typer = 5;
27
    global.facechoice = 0;
28
    global.faceemotion = 0;
29
    if (chair != 9)
30
    {
31
        global.msg[0] = 
* (Seems like the right size
for Toriel.)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_chairiel_118")
;
32
        mydialoguer = instance_create(0, 0, obj_dialoguer);
33
    }
34
    else
35
    {
36
        global.msg[0] = 
* (It's a great reading chair.)Delay 11
* (But it doesn't seem like
anyone uses it.)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_chairiel_123")
;
37
        mydialoguer = instance_create(0, 0, obj_dialoguer);
38
    }
39
}