Undertale script viewer

← back to main script listing

gml_Object_obj_movedoge_Step_0

(view raw script w/o annotations or w/e)
1
if (global.mnfight == 3)
2
{
3
    global.msg[0] = 
* Doggo can't seem to
find anything.
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_movedoge_392")
;
4
    if (excited == 1)
5
        global.msg[0] = 
* Doggo is confirming the moving
object.
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_movedoge_393")
;
6
    if (mercymod > 100)
7
        global.msg[0] = 
* Doggo loves fetch!!!
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_movedoge_394")
;
8
    if (mercymod > 300)
9
        global.msg[0] = 
* Doggo has been pet.
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_movedoge_395")
;
10
    attacked = 0;
11
}
12
if (alarm[5] > 0)
13
{
14
    if (global.monster[0] == 1)
15
    {
16
        if (global.monsterinstance[0].alarm[5] > alarm[5])
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
17
            alarm[5] = global.monsterinstance[0].alarm[5];
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
18
    }
19
    if (global.monster[1] == 1)
20
    {
21
        if (global.monsterinstance[1].alarm[5] > alarm[5])
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
22
            alarm[5] = global.monsterinstance[1].alarm[5];
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
23
    }
24
    if (global.monster[2] == 1)
25
    {
26
        if (global.monsterinstance[2].alarm[5] > alarm[5])
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
27
            alarm[5] = global.monsterinstance[2].alarm[5];
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
28
    }
29
}
30
if (global.mnfight == 1)
31
{
32
    if (talked == 0)
33
    {
34
        alarm[5] = 110;
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
35
        alarm[6] = 1;
gml_Object_obj_movedoge_Alarm_6.gml

blcon = instance_create(x + 145, y + 52, obj_blconsm); gg = floor(random(3)); mycommand = round(random(100)); if (mercymod == -25 && scr_monstersum() == 1) mercymod = 0; global.msg[0] =
Don't
move an
inch!
scr_gettext("obj_movedoge_259")
; if (excited == 1) global.msg[0] =
It moved
!! It
didn't
NOT move!
scr_gettext("obj_movedoge_260")
; if (global.turn >= 1 && excited == 0) global.msg[0] =
Will it
move
this
time?
scr_gettext("obj_movedoge_261")
; if (mercymod > 100 && mercymod < 800) { global.msg[0] =
HUH!!!
A FUN
STICK
APPEARS!
scr_gettext("obj_movedoge_264")
; mypart1.alarm[0] = 30000; mercymod = 101; mypart1.excited = 1; } if (mercymod == 1000) { global.msg[0] =
WHAT!!!
I'VE
BEEN
PET!!!
scr_gettext("obj_movedoge_271")
; if (pets == 2) global.msg[0] =
WHERE'S
THAT
COMING
FROM!
scr_gettext("obj_movedoge_272")
; if (pets == 3) global.msg[0] =
THERE'S
NO END
TO IT!!
scr_gettext("obj_movedoge_273")
; if (pets == 4) global.msg[0] =
WELL,
THIS IS
THOROUGH
!!!
scr_gettext("obj_movedoge_274")
; mercymod = 999; global.monsterdef[myself] = -90; if (pets == 4 && mypart1.excited == 0) { global.msg[0] =
OK.
That's
enough.
scr_gettext("obj_movedoge_277")
; global.monsterdef[myself] = 0; } } global.msg[1] =
Close MessageClose MessageClose Message
scr_gettext("obj_movedoge_283")
; global.typer = 2; blconwd = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER); global.border = 6; obj_heart.x = round((global.idealborder[0] + global.idealborder[1]) / 2) - 8; obj_heart.y = round((global.idealborder[2] + global.idealborder[3]) / 2) - 8;
36
        talked = 1;
37
        global.heard = 0;
38
    }
39
}
40
if (control_check_pressed(0))
41
{
42
    if (alarm[5] > 5 && obj_lborder.x == global.idealborder[0] && alarm[6] < 0)
gml_Object_obj_movedoge_Alarm_6.gml

blcon = instance_create(x + 145, y + 52, obj_blconsm); gg = floor(random(3)); mycommand = round(random(100)); if (mercymod == -25 && scr_monstersum() == 1) mercymod = 0; global.msg[0] =
Don't
move an
inch!
scr_gettext("obj_movedoge_259")
; if (excited == 1) global.msg[0] =
It moved
!! It
didn't
NOT move!
scr_gettext("obj_movedoge_260")
; if (global.turn >= 1 && excited == 0) global.msg[0] =
Will it
move
this
time?
scr_gettext("obj_movedoge_261")
; if (mercymod > 100 && mercymod < 800) { global.msg[0] =
HUH!!!
A FUN
STICK
APPEARS!
scr_gettext("obj_movedoge_264")
; mypart1.alarm[0] = 30000; mercymod = 101; mypart1.excited = 1; } if (mercymod == 1000) { global.msg[0] =
WHAT!!!
I'VE
BEEN
PET!!!
scr_gettext("obj_movedoge_271")
; if (pets == 2) global.msg[0] =
WHERE'S
THAT
COMING
FROM!
scr_gettext("obj_movedoge_272")
; if (pets == 3) global.msg[0] =
THERE'S
NO END
TO IT!!
scr_gettext("obj_movedoge_273")
; if (pets == 4) global.msg[0] =
WELL,
THIS IS
THOROUGH
!!!
scr_gettext("obj_movedoge_274")
; mercymod = 999; global.monsterdef[myself] = -90; if (pets == 4 && mypart1.excited == 0) { global.msg[0] =
OK.
That's
enough.
scr_gettext("obj_movedoge_277")
; global.monsterdef[myself] = 0; } } global.msg[1] =
Close MessageClose MessageClose Message
scr_gettext("obj_movedoge_283")
; global.typer = 2; blconwd = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER); global.border = 6; obj_heart.x = round((global.idealborder[0] + global.idealborder[1]) / 2) - 8; obj_heart.y = round((global.idealborder[2] + global.idealborder[3]) / 2) - 8;
43
        alarm[5] = 2;
gml_Object_obj_movedoge_Alarm_5.gml

with (blconwd) instance_destroy(); with (blcon) instance_destroy(); talked = 0; whatiheard = -1; global.mnfight = 2; global.border = 6;
44
}
45
if (global.hurtanim[myself] == 1)
46
{
47
    shudder = 16;
48
    alarm[3] = global.damagetimer;
gml_Object_obj_movedoge_Alarm_3.gml

if (image_index != 1) { with (mypart1) instance_destroy(); with (mypart2) instance_destroy(); with (mypart3) instance_destroy(); with (mypart4) instance_destroy(); dmgwriter = instance_create((x + (sprite_width / 2)) - 48, y, obj_dmgwriter); global.damage = takedamage; with (dmgwriter) dmg = global.damage; image_index = 1; snd_play(snd_damage); alarm[8] = 11; } x += shudder; if (shudder < 0) shudder = -(shudder + 2); else shudder = -shudder; if (shudder == 0) { global.hurtanim[myself] = 2; exit; } alarm[3] = 2;
49
    global.hurtanim[myself] = 3;
50
}
51
if (global.hurtanim[myself] == 2)
52
{
53
    global.monsterhp[myself] -= takedamage;
54
    with (dmgwriter)
55
alarm[2]
56
    if (global.monsterhp[myself] >= 1)
57
    {
58
        mypart1 = instance_create(x, y, part1);
59
        mypart2 = instance_create(x, y, part2);
60
        mypart3 = instance_create(x, y, part3);
61
        mypart4 = instance_create(x, y, part4);
62
        global.hurtanim[myself] = 0;
63
        image_index = 0;
64
        global.myfight = 0;
65
        global.mnfight = 1;
66
    }
67
    else
68
    {
69
        global.myfight = 0;
70
        global.mnfight = 1;
71
        killed = 1;
72
        instance_destroy();
73
    }
74
}
75
if (global.hurtanim[myself] == 5)
76
{
77
    global.damage = 0;
78
    instance_create((x + (sprite_width / 2)) - 48, y - 24, obj_dmgwriter);
79
    with (obj_dmgwriter)
80
alarm[2]
81
    global.myfight = 0;
82
    global.mnfight = 1;
83
    global.hurtanim[myself] = 0;
84
}
85
if (global.mnfight == 2)
86
{
87
    if (attacked == 0)
88
    {
89
        pop = scr_monstersum
scr_monstersum

return global.monster[0] + global.monster[1] + global.monster[2];
();
90
        global.turntimer = 120;
91
        global.firingrate = 15;
92
        if (pop == 3)
93
            global.firingrate = global.firingrate * 2.4;
94
        if (pop == 2)
95
            global.firingrate = global.firingrate * 1.7;
96
        if (mycommand >= 0 && mycommand <= 99.9)
97
        {
98
            global.firingrate = 13;
99
            gen = instance_create(global.idealborder[1] - 50, global.idealborder[3] - 45, blt_bluesword);
100
            gen.dmg = global.monsteratk[myself];
101
            global.border = 8;
102
        }
103
        else
104
        {
105
            global.firingrate += 10;
106
            gen = instance_create(x, y, obj_4sidegen);
107
            gen.bullettype = 0;
108
        }
109
        gen.myself = myself;
110
        attacked = 1;
111
    }
112
}
113
if (global.myfight == 2)
114
{
115
    if (whatiheard != -1)
116
    {
117
        if (global.heard == 0)
118
        {
119
            if (whatiheard == 0)
120
            {
121
                global.msc = 0;
122
                global.msg[0] = 
* DOGGO - ATK 13 DEF 7
* Easily excited by movement.
* Hobbies include:Delay 11 squirrels.Wait for input^
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_movedoge_502")
;
123
                OBJ_WRITER.halt = 3;
124
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
125
                with (iii)
126
                    halt = 0;
127
            }
128
            if (whatiheard == 3)
129
            {
130
                global.msc = 0;
131
                global.msg[0] = 
* Doggo is too suspicious of
your movements.Wait for input^
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_movedoge_511")
;
132
                if (excited == 0)
133
                {
134
                    global.msg[0] = 
* You pet Doggo.Wait for input^
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_movedoge_514")
;
135
                    global.msg[1] = 
* You pet Doggo.Wait for input^
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_movedoge_515")
;
136
                    global.flag[139 spared_doggo] = 1;
137
                    mercymod = 1000;
138
                    if (pets < 4)
139
                    {
140
                        pets += 1;
141
                        mypart1.excited = 1;
142
                        mypart1.alarm[0] = 999;
143
                    }
144
                    else
145
                    {
146
                        mypart1.excited = 0;
147
                        mypart1.alarm[0] = 3;
148
                        excited = 0;
149
                    }
150
                }
151
                OBJ_WRITER.halt = 3;
152
                iii = instance_create(global.idealborder[0], global.idealborder[2], OBJ_WRITER);
153
                with (iii)
154
                    halt = 0;
155
            }
156
            global.heard = 1;
157
        }
158
    }
159
}
160
if (global.myfight == 4)
161
{
162
    if (global.mercyuse == 0)
163
    {
164
        script_execute(scr_mercystandard);
165
        if (mercy < 0)
166
            instance_destroy();
167
    }
168
}
169
if (mercymod == 222 && instance_exists(OBJ_WRITER) == 0)
170
{
171
    script_execute(scr_mercystandard);
172
    if (mercy < 0)
173
        instance_destroy();
174
}