Undertale script viewer

← back to main script listing

gml_Object_obj_sansb_Create_0

(view raw script w/o annotations or w/e)
1
if (global.plot < 201)
2
    global.plot = 201;
3
scr_monstersetup
scr_monstersetup

myself = 0; if (global.monster[1] == 1) { myself = 2; global.monster[2] = 1; } if (global.monster[0] == 1 && myself != 2) { myself = 1; global.monster[1] = 1; } if (global.monster[0] == 0) { myself = 0; global.monster[0] = 1; } if (global.monstertype[myself] == 1TestFroggit) { global.monstername[myself] =
TestFroggit
scr_gettext("monstername_1")
; global.monstermaxhp[myself] = 23; global.monsterhp[myself] = 23; global.monsteratk[myself] = 4; global.monsterdef[myself] = 1; global.xpreward[myself] = 2; global.goldreward[myself] = 2; global.itemrewardid = 1; global.itemrewardchance = 50; } if (global.monstertype[myself] == 2Dummy) { global.monstername[myself] =
Dummy
scr_gettext("monstername_2")
; global.monstermaxhp[myself] = 15; global.monsterhp[myself] = 15; global.monsteratk[myself] = 0; global.monsterdef[myself] = -5; global.xpreward[myself] = 0; global.goldreward[myself] = 0; global.itemrewardid = 0; global.itemrewardchance = 0; } if (global.monstertype[myself] == 3Froggit) { global.monstername[myself] =
Froggit
scr_gettext("monstername_3")
; global.monstermaxhp[myself] = 20; global.monsterhp[myself] = 20; global.monsteratk[myself] = 4; global.monsterdef[myself] = 1; global.xpreward[myself] = 10; global.goldreward[myself] = 20; global.itemrewardid = 1; global.itemrewardchance = 50; } if (global.monstertype[myself] == 4Froggit) { global.monstername[myself] =
Froggit
scr_gettext("monstername_4")
; global.monstermaxhp[myself] = 30; global.monsterhp[myself] = 30; global.monsteratk[myself] = 4; global.monsterdef[myself] = 4; global.xpreward[myself] = 3; global.goldreward[myself] = 2; global.itemrewardid = 1; global.itemrewardchance = 50; } if (global.monstertype[myself] == 5Whimsun) { global.monstername[myself] =
Whimsun
scr_gettext("monstername_5")
; global.monstermaxhp[myself] = 10; global.monsterhp[myself] = 10; global.monsteratk[myself] = 4; global.monsterdef[myself] = 0; global.xpreward[myself] = 2; global.goldreward[myself] = 2; global.itemrewardid = 1; global.itemrewardchance = 50; } if (global.monstertype[myself] == 6Moldsmal) { global.monstername[myself] =
Moldsmal
scr_gettext("monstername_6")
; global.monstermaxhp[myself] = 50; global.monsterhp[myself] = 50; global.monsteratk[myself] = 4; global.monsterdef[myself] = 0; global.xpreward[myself] = 3; global.goldreward[myself] = 3; global.itemrewardid = 1; global.itemrewardchance = 50; } if (global.monstertype[myself] == 7Migosp) { global.monstername[myself] =
Migosp
scr_gettext("monstername_7")
; global.monstermaxhp[myself] = 40; global.monsterhp[myself] = 40; global.monsteratk[myself] = 5; global.monsterdef[myself] = 4; global.xpreward[myself] = 5; global.goldreward[myself] = 4; global.itemrewardid = 1; global.itemrewardchance = 50; } if (global.monstertype[myself] == 8Vegetoid) ...
();
4
image_speed = 0;
5
part1 = 518;
6
mypart1 = instance_create(x, y, part1);
7
alarm[9] = 8;
gml_Object_obj_sansb_Alarm_9.gml

mypart1.parent = global.monsterinstance[myself];
8
hurtanim = 0;
9
hurtsound = snd_nosound;
10
talked = 0;
11
whatiheard = -1;
12
attacked = 0;
13
killed = 0;
14
global.heard = 0;
15
takedamage = 0;
16
mercymod = -99999;
17
sha = 0;
18
shb = 0;
19
ht = 100;
20
wd = 120;
21
con = 1;
22
alarm[4] = 30;
23
obj_borderparent.visible = false;
24
global.mnfight = 99;
25
global.myfight = 99;
26
global.faceemotion = 4;
27
normalfight = 0;
28
obj_heart.visible = false;
29
beamsfx = caster_load("music/sfx/sfx_rainbowbeam_1.ogg");
30
beamsfx_a = caster_load("music/sfx/sfx_a_gigatalk.ogg");
31
beam_up_sfx = caster_load("music/sfx/sfx_segapower.ogg");
32
cutsfx = caster_load("music/sfx/sfx_cinematiccut.ogg");
33
p_cut = 0;
34
p_beam = 0;
35
p_power = 0;
36
hit_try = 0;
37
hit_reached = 0;
38
timer_on = 0;
39
turn = 0;
40
turns = 0;
41
part = 0;
42
skip = 0;
43
if (skip == 0)
44
{
45
    birdnoise = caster_load("music/birdnoise.ogg");
46
    caster_loop(birdnoise, 1, 1);
47
}
48
if (skip == 1)
49
{
50
    con = -1;
51
    with (mypart1)
52
        bounce = 1;
53
    obj_borderparent.visible = true;
54
    global.msg[0] = 
* Skipped ahead.
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_sansb_90")
;
55
    global.mnfight = 3;
56
    global.myfight = 0;
57
    global.faceemotion = 0;
58
    normalfight = 1;
59
    obj_heart.visible = true;
60
    global.flag[271 fighting_sans] = 1;
61
    caster_loop(global.batmusic, 0.95, 0.95);
62
}
63
drama = 0;
64
mercy_death = 0;
65
nx = 0;
66
global.seriousbattle = 1;
67
ossafe_ini_open("undertale.ini");
68
ini_f = ini_read_real("Sans", "F", 0);
69
intro = ini_read_real("Sans", "Intro", 0);
70
ini_write_real("Sans", "F", ini_f + 1);
71
ossafe_ini_close();
72
ossafe_savedata_save();