Undertale script viewer

← back to main script listing

gml_Object_obj_joypadmenu_Create_0

(view raw script w/o annotations or w/e)
1
fun = 0;
2
if (ossafe_file_exists("undertale.ini") && ossafe_file_exists("file0"))
3
{
4
    fun = 1;
5
    ossafe_ini_open("undertale.ini");
6
    tr = ini_read_real("EndF", "EndF", -1);
7
    if (tr >= 2)
8
        fun = 0;
9
}
10
menu = 0;
11
menu_engage = 0;
12
buffer = 5;
13
if (obj_time.j_ch > 0)
14
{
15
    if (!joystick_has_pov(obj_time.j_ch))
16
        global.joypad_dir = 1;
17
}
18
r_line = 
RESETTED...
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;
("joyconfig_resetted")
;
19
o_o = 0;
20
siner = 0;
21
r_buffer = 0;
22
intro = 0;
23
weather = 0;
24
extreme2 = 0;
25
extreme = 0;
26
rectile = 0;
27
harp = 0;
28
weathermusic = 0;
29
if (fun == 1)
30
{
31
    intro = 1;
32
    menu_engage = -1;
33
    weather = 1;
34
    month = current_month;
35
    if (month == 12 || month == 1 || month == 2)
36
        weather = 1;
37
    if (month == 3 || month == 4 || month == 5)
38
        weather = 2;
39
    if (month == 6 || month == 7 || month == 8)
40
        weather = 3;
41
    if (month == 9 || month == 10 || month == 11)
42
        weather = 4;
43
}