Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_intro_generator_Create_0

(view raw script w/o annotations or w/e)
1
if file_exists("Save.sav")
2
{
3
    ini_open("Save.sav")
4
    global.fighting_flowey = ini_read_real("Misc2", "10", 0)
5
    ini_close()
6
    if (global.fighting_flowey > 0)
7
    {
8
        scr_loadgame
scr_loadgame

function scr_loadgame() //gml_Script_scr_loadgame { if file_exists("Save.sav") { scr_initialize() ini_open("Save.sav") var LoadedRoom = ini_read_string("Save1", "room", "rm_ruins00") obj_pl.x = ini_read_real("Save1", "pX", 320) obj_pl.y = ini_read_real("Save1", "pY", 320) obj_pl.direction = ini_read_real("Save1", "dir", 0) obj_controller.steps = ini_read_real("Save1", "SP", 0) global.player_attack = ini_read_real("Save1", "AT - Primary", 0) global.player_weapon_modifier_attack = ini_read_real("Save1", "AT - Secondary", 0) global.player_defense = ini_read_real("Save1", "DFP", 0) global.player_armor_modifier_defense = ini_read_real("Save1", "DFS", 0) global.player_level = ini_read_real("Save1", "LV", 1) global.player_exp = ini_read_real("Save1", "EXP", 0) global.player_weapon_modifier = ini_read_string("Save1", "Ammo", "Rubber Ammo") global.player_armor = ini_read_string("Save1", "Armor", "Worn Hat") global.player_armor_modifier = ini_read_string("Save1", "Accessory", "Patch") global.player_gold = ini_read_real("Save1", "Gold", 0) global.current_hp_self = ini_read_real("Save1", "HP", 1) global.max_hp_self = ini_read_real("Save1", "MAXHP", 20) global.player_weapon = ini_read_string("Save1", "Weapon", "Toy Gun") global.fun_value = ini_read_real("Save1", "FUN", 0) global.current_pp_self = ini_read_real("Save1", "PP", 0) global.max_pp_self = ini_read_real("Save1", "MAXPP", 20) global.current_sp_self = ini_read_real("Save1", "SP", 0) global.max_sp_self = ini_read_real("Save1", "MAXSP", 99) global.player_sprites = ini_read_string("Save1", "playerSprite", "normal") global.current_rp_self = ini_read_real("Save1", "RP", 0) global.max_rp_self = ini_read_real("Save1", "MAXRP", 0) global.player_can_run = ini_read_real("Save1", "playerCanRun", 1) global.saved_datetime = date_current_datetime() global.elapsed_seconds = ini_read_real("Playtime", "Seconds", 0) var _party_member = ini_read_string("Save1", "Follower", "noone") if (_party_member == "noone") global.party_member = noone else global.party_member = asset_get_index(_party_member) global.player_has_satchel = ini_read_real("Save1", "Satchel", 0) global.player_can_travel = ini_read_real("Save1", "FTravel", 0) for (var i = 0; i < array_length_1d(global.ruins_flag); i++) global.ruins_flag[i] = ini_read_real("RuinsFlags", string(i), false) for (i = 0; i < array_length_1d(global.flag); i++) global.flag[i] = ini_read_real("Flags", string(i), false) for (i = 0; i < array_length_1d(global.snowdin_flag); i++) global.snowdin_flag[i] = ini_read_real("SnowdinFlags", string(i), false) for (i = 0; i < array_length_1d(global.dunes_flag); i++) global.dunes_flag[i] = ini_read_real("DunesFlags", string(i), false) for (i = 0; i < array_length_1d(global.dunes_flag_ext); i++) global.dunes_flag_ext[i] = ini_read_real("DunesFlagsExt", string(i), false) for (i = 0; i < array_length_1d(global.sworks_flag); i++) global.sworks_flag[i] = ini_read_real("SworksFlags", string(i), false) global.factory_code = ini_read_string("SworksFlags", "code", "0000") global.factory_code_3 = ini_read_string("SworksFlags", "code3", "0000") var ds_factory_code_2 = ini_read_string("SworksFlags", "code2", "") ds_list_read(global.factory_code_2, ds_factory_code_2) global.sworks_robot_count = ini_read_real("SworksFlags", "RbCount", 0) for (i = 0; i < global.sworks_robot_count; i++) { global.sworks_robot_sprite[i] = ini_read_real("RbSprite", string(i), 0) global.sworks_robot_x[i] = ini_read_real("RbX", string(i), 0) global.sworks_robot_y[i] = ini_read_real("RbY", string(i), 0) global.sworks_robot_depth[i] = ini_read_real("RbD", string(i), 0) global.sworks_robot_scale[i] = ini_read_real("RbS", string(i), 0) global.sworks_robot_angle[i] = ini_read_real("RbA", string(i), 0) } ds_grid_read(global.sworks_id_grid, ini_read_string("SworksFlags", "sworks_id", "")) for (i = 0; i < array_length_1d(global.item_stock); i++) global.item_stock[i] = ini_read_real("ItemStock", string(i), false) for (i = 0; i < array_length_1d(global.hotland_flag); i++) global.hotland_flag[i] = ini_read_real("HotlandFlags", string(i), false) for (i = 0; i < array_length_1d(global.flowey_flag); i++) global.flowey_flag[i] = ini_read_real("FloweyFlags", string(i), false) global.flowey_save_number = ini_read_real("FloweyFlags", "savenumber", 0) global.save_count = ini_read_real("FloweyFlags", "savecount", 1) for (i = 0; i < array_length_1d(global.extra_flag); i++) global.extra_flag[i] = ini_read_real("ExtraFlags", string(i), false) for (i = 0; i < array_length_1d(global.mail_flag); i++) global.mail_flag[i] = ini_read_real("MailFlags", string(i), false) for (i = 0; i < array_length_1d(global.mail_flag); i++) global.mail_flag[i] = ini_read_real("MailFlags", string(i), false) global.mail_count = ini_read_real("Mail", "1", 0) global.mail_pinned = ini_read_real("Mail", "2", 0) global.tinypuzzle = ini_read_real("Misc", "01", 5) deaths = ini_read_real("Misc", "Deaths", false) for (i = 0; i < array_length(global.fun_event); i++) global.fun_event[i] = ini_read_real("Fun Events", string(i), 0) for (i = 1; i <= 8; i++) global.item_slot[i] = ini_read_string("Items", ("0" + (string(i - 1))), "Nothing") var ds_list_string = ini_read_string("DBox", 0, "0") ds_list_read(global.box_slot_list, ds_list_string) ds_list_string = ini_read_string("Mail", 0, "0") ds_list_read(global.mail_list, ds_list_string) ds_list_string = ini_read_string("Mail", "3", "0") ds_list_read(global.mail_list_read, ds_list_string) ds_list_string = ini_read_string("MailUnclaimed", 0, "0") ds_list_read(global.mail_unclaimed_list, ds_list_string) var ds_list_encounters = ini_read_string("Encounters", 0, "0") ds_list_read(global.encounter_list, ds_list_encounters) ...
()
9
        return;
10
    }
11
}
12
if file_exists("Save02.sav")
13
{
14
    ini_open("Save02.sav")
15
    global.game_finished_pacifist = ini_read_real("00", "02", 0)
16
    global.game_finished_pacifist_kill = ini_read_real("00", "03", 0)
17
    global.game_finished_murder = ini_read_real("00", "04", 0)
18
    ini_close()
19
    if ((global.game_finished_pacifist + global.game_finished_pacifist_kill + global.game_finished_murder) > 0)
20
    {
21
        room = rm_menu_flowey
22
        return;
23
    }
24
}
25
instance_create(0, 0, obj_intro_fade_screen)
26
instance_create(57, 170, obj_intro_text)
27
audio_sound_gain(mus_intro, 1, 0)
28
audio_play_sound(mus_intro, 1, 0)