Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_hathyfightevent_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1 && obj_mainchara.x >= 1300 && obj_mainchara.y > 900 && global.interact == 0)
2
{
3
    global.interact = 1;
4
    con = 2;
5
    sprite_index = spr_lancer_lt;
6
    instance_create(x + (sprite_width / 2), y - 10, obj_excblcon);
7
    alarm[4] = 30;
8
}
9
if (con > 2)
10
{
11
    if (con == 3)
12
    {
13
        global.fc = 5;
14
        global.typer = 32;
15
        global.fe = 0;
16
        global.msg[0] = 
* Ho ho ho!Delay 11
* Somehow,Delay 11 you survived the maze!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_19_0")
;
17
        global.msg[1] = 
\E1* But don't count your blessings before they hatch...!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_20_0")
;
18
        global.msg[2] = 
\E2* Let's see how you fare against THIS team!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_21_0")
;
19
        instance_create(0, 0, obj_dialoguer);
20
        con = 4;
21
    }
22
    if (con == 4 && d_ex() == 0)
23
    {
24
        hspeed = 16;
25
        con = 5;
26
        alarm[4] = 10;
27
    }
28
    if (con == 6)
29
    {
30
        instance_create(0, 0, obj_battleback);
31
        global.encounterno = 9;
32
        scr_encountersetup
scr_encountersetup

function scr_encountersetup(arg0) { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); for (i = 0; i < 3; i += 1) { global.heromakex[i] = xx + 80; global.heromakey[i] = yy + 50 + (80 * i); global.monsterinstancetype[i] = obj_lancerboss; global.monstertype[i] = 1Enemy (placeholder/G-BODY); global.monstermakex[i] = xx + 540; global.monstermakey[i] = yy + 160 + (80 * i); } if (global.char[0] != 0 && global.char[1] == 0 && global.char[2] == 0) global.heromakey[0] = yy + 140; if (global.char[0] != 0 && global.char[1] != 0 && global.char[2] == 0) { global.heromakey[0] = yy + 100; global.heromakey[1] = yy + 180; } switch (arg0) { case 0: break; case 1: global.monsterinstancetype[0] = obj_placeholderenemy; global.monstertype[0] = 1Enemy (placeholder/G-BODY); global.monstermakex[0] = xx + 480; global.monstermakey[0] = yy + 110; global.monsterinstancetype[1] = obj_placeholderenemy; global.monstertype[1] = 1Enemy (placeholder/G-BODY); global.monstermakex[1] = xx + 500; global.monstermakey[1] = yy + 200; global.monstertype[2] = 0(None); break; case 2: global.monsterinstancetype[0] = obj_lancerboss; global.monstertype[0] = 2Lancer; global.monstermakex[0] = xx + 540; global.monstermakey[0] = yy + 200; global.monstertype[1] = 0(None); global.monstertype[2] = 0(None); break; case 3: global.monsterinstancetype[0] = obj_dummyenemy; global.monstertype[0] = 3Dummy; global.monstermakex[0] = xx + 500; global.monstermakey[0] = yy + 160; if (instance_exists(obj_npc_room)) { global.monstermakex[0] = obj_npc_room.xstart; global.monstermakey[0] = obj_npc_room.ystart; } global.monstertype[1] = 0(None); global.monstertype[2] = 0(None); break; case 4: global.monsterinstancetype[0] = obj_diamondenemy; global.monstertype[0] = 5Rudinn; global.monstermakex[0] = xx + 480; global.monstermakey[0] = yy + 140; global.monstertype[1] = 0(None); global.monstertype[2] = 0(None); global.battlemsg[0] =
* Rudinn drew near!
scr_84_get_lang_string("scr_encountersetup_slash_scr_encountersetup_gml_82_0")
; if (global.flag[500 times_rudinn_fought] >= 1) global.battlemsg[0] =
* A different Rudinn from last time drew near!
scr_84_get_lang_string("scr_encountersetup_slash_scr_encountersetup_gml_83_0")
; if (global.flag[500 times_rudinn_fought] == 2) global.battlemsg[0] =
* Assumedly another different Rudinn appeared!
scr_84_get_lang_string("scr_encountersetup_slash_scr_encountersetup_gml_84_0")
; break; case 5: global.monsterinstancetype[0] = obj_diamondenemy; global.monstertype[0] = 5Rudinn; global.monstermakex[0] = xx + 480; global.monstermakey[0] = yy + 110; global.monsterinstancetype[1] = obj_diamondenemy; global.monstertype[1] = 5Rudinn; global.monstermakex[1] = xx + 500; global.monstermakey[1] = yy + 200; global.monstertype[2] = 0(None); global.battlemsg[0] =
* A necklace of Rudinns blocks your path.
scr_84_get_lang_string("scr_encountersetup_slash_scr_encountersetup_gml_100_0")
; break; case 6: global.monsterinstancetype[0] = obj_diamondenemy; global.monstertype[0] = 5Rudinn; global.monstermakex[0] = xx + 480; global.monstermakey[0] = yy + 110; global.monsterinstancetype[1] = obj_heartenemy; global.monstertype[1] = 6Hathy; global.monstermakex[1] = xx + 500; global.monstermakey[1] = yy + 200; global.monstertype[2] = 0(None); global.battlemsg[0] =
* Rudinn and Hathy blocked the way!
scr_84_get_lang_string("scr_encountersetup_slash_scr_encountersetup_gml_116_0")
; break; case 7: global.monsterinstancetype[0] = obj_smallcheckers_enemy; global.monstertype[0] = 9C.Round; global.monstermakex[0] = xx + 440; global.monstermakey[0] = yy + 150; global.monstertype[1] = 0(None); global.monstertype[2] = 0(None); global.battlemsg[0] =
* C. Round attacked violently!
* (You recall Ralsei's advice to include Susie in an ACT.)
scr_84_get_lang_string("scr_encountersetup_slash_scr_encountersetup_gml_128_0")
; ...
(global.encounterno);
33
        global.specialbattle = 0;
34
        global.flag[9 battle_music] = 1;
35
        global.batmusic[0] = snd_init("battle.ogg");
36
        instance_create(0, 0, obj_encounterbasic);
37
        for (i = 0; i < 3; i += 1)
38
        {
39
            h[i] = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(global.monstermakex[i] + 250, global.monstermakey[i], spr_heartenemy_idle);
40
            with (h[i])
41
                hspeed = -10;
42
        }
43
        con = 7;
44
        if (global.plot < 36)
45
            global.plot = 36;
46
        alarm[4] = 25;
47
    }
48
    if (con == 8)
49
    {
50
        for (i = 0; i < 3; i += 1)
51
        {
52
            with (h[i])
53
                instance_destroy();
54
        }
55
        con = 9;
56
        alarm[4] = 15;
57
    }
58
    if (con == 15)
59
    {
60
        depth = 0;
61
        x = __view_get(e__VW.XView, 0) + 640;
62
        hspeed = -20;
63
        con = 16;
64
        alarm[4] = 15;
65
    }
66
    if (con == 17)
67
    {
68
        hspeed = 0;
69
        global.fc = 5;
70
        global.fe = 0;
71
        global.typer = 46;
72
        global.msg[0] = 
* Hey, why aren't you guys thrashed?! You're totally outnumbered!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_79_0")
;
73
        scr_ralface
scr_ralface

function scr_ralface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(1, "B");
74
        global.msg[2] = 
* You made a team purely of SUPPORT ENEMIES.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_81_0")
;
75
        global.msg[3] = 
* Their bullet patterns aren't balanced at all.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_82_0")
;
76
        global.msg[4] = 
\E1* It's like a dinner made out of three glasses of milk.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_83_0")
;
77
        scr_lanface
scr_lanface

function scr_lanface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FL \TL Close Message
scr_84_get_lang_string("scr_lanface_slash_scr_lanface_gml_1_0")
, string(arg1)); }
(5, 0);
78
        global.msg[6] = 
* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_85_0")
;
79
        global.msg[7] = 
\E7* And that's, um...Delay 11
* Unusual, somehow?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_86_0")
;
80
        scr_ralface
scr_ralface

function scr_ralface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(8, 8);
81
        global.msg[9] = 
* Why don't we talk about this AFTER the battle?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_88_0")
;
82
        scr_battletext
scr_battletext

function scr_battletext() { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
83
        con = 18;
84
    }
85
    if (con == 18 && instance_exists(obj_writer) == false)
86
    {
87
        global.fc = 0;
88
        hspeed = 20;
89
        con = 19;
90
        with (obj_battlecontroller)
91
alarm[2]
92
        alarm[4] = 20;
93
    }
94
    if (con == 20)
95
    {
96
        with (obj_battlecontroller)
97
            noreturn = 0;
98
        con = 21;
99
    }
100
    if (con == 30)
101
    {
102
        global.fc = 2;
103
        global.fe = 8;
104
        global.typer = 45;
105
        global.msg[0] = scr_84_get_subst_string
scr_84_get_subst_string

function scr_84_get_subst_string() { var str = argument[0]; var sub_id = 1; length = string_length(str); pos = 0; while (sub_id < argument_count) { var sub = "~" + string(sub_id); str = string_replace_all(str, sub, argument[sub_id]); sub_id = sub_id + 1; } return str; }
(
* Great job, Kris!
* We earned ~1 EXP
and ~2 D$!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_116_0")
, string(global.monsterexp[3]), string(global.monstergold[3]));
106
        scr_battletext
scr_battletext

function scr_battletext() { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
107
        con = 31;
108
    }
109
    if (con == 31 && instance_exists(obj_writer) == false)
110
    {
111
        depth = 0;
112
        x = __view_get(e__VW.XView, 0) + 640;
113
        hspeed = -20;
114
        con = 32;
115
        alarm[4] = 15;
116
    }
117
    if (con == 33)
118
    {
119
        hspeed = 0;
120
        global.fc = 5;
121
        global.fe = 2;
122
        global.typer = 46;
123
        global.msg[0] = 
* Sweet!
* How much do I get?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_136_0")
;
124
        scr_ralface
scr_ralface

function scr_ralface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(1, "B");
125
        global.msg[2] = 
* You...Delay 11 lost,Delay 11 Lancer.Delay 11
* You don't get any.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_138_0")
;
126
        scr_lanface
scr_lanface

function scr_lanface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FL \TL Close Message
scr_84_get_lang_string("scr_lanface_slash_scr_lanface_gml_1_0")
, string(arg1)); }
(3, 4);
127
        global.msg[4] = 
* Oh.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_140_0")
;
128
        global.msg[5] = 
\E3* Can I have some of yours?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_141_0")
;
129
        scr_ralface
scr_ralface

function scr_ralface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(6, "A");
130
        global.msg[7] = 
* No!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_143_0")
;
131
        scr_lanface
scr_lanface

function scr_lanface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FL \TL Close Message
scr_84_get_lang_string("scr_lanface_slash_scr_lanface_gml_1_0")
, string(arg1)); }
(8, 1);
132
        global.msg[9] = 
* Fine!Delay 11
* Later, losers!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_145_0")
;
133
        scr_battletext
scr_battletext

function scr_battletext() { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
134
        con = 34;
135
    }
136
    if (con == 34 && instance_exists(obj_writer) == false)
137
    {
138
        npc = instance_create(1740, 1080, obj_npc_room);
139
        global.fc = 0;
140
        hspeed = 20;
141
        con = 35;
142
        alarm[4] = 20;
143
    }
144
    if (con == 36)
145
    {
146
        with (obj_battlecontroller)
147
            victoried = 1;
148
        con = 37;
149
    }
150
}
151
if (equipcon >= 1)
152
{
153
    if (global.chararmor1[3] == 4 || global.chararmor2[3] == 4)
154
    {
155
        if (global.interact == 0 && scr_havechar
scr_havechar

function scr_havechar(arg0) { _rreturn = 0; if (global.char[0] == arg0) _rreturn = 1; if (global.char[1] == arg0) _rreturn = 1; if (global.char[2] == arg0) _rreturn = 1; return _rreturn; }
(3))
156
        {
157
            global.fc = 2;
158
            global.fe = 1;
159
            global.typer = 31;
160
            global.msg[0] = 
* K... Kris?Delay 11
* You're giving it to me...?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_181_0")
;
161
            global.msg[1] = 
\E2* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_182_0")
;
162
            global.msg[2] = 
\E7* Well?Delay 11
* Does it look pretty...?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_183_0")
;
163
            if (scr_havechar
scr_havechar

function scr_havechar(arg0) { _rreturn = 0; if (global.char[0] == arg0) _rreturn = 1; if (global.char[1] == arg0) _rreturn = 1; if (global.char[2] == arg0) _rreturn = 1; return _rreturn; }
(2))
164
            {
165
                global.msg[2] = 
\E8* ... Do I look pretty,Delay 11 Susie?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_186_0")
;
166
                scr_susface
scr_susface

function scr_susface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FS \TS Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1)); }
(3, 0);
167
                global.msg[4] = 
* Leave me out of this.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_188_0")
;
168
                scr_ralface
scr_ralface

function scr_ralface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(5, 8);
169
                global.msg[6] = 
* You didn't answer the question~Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_190_0")
;
170
                scr_susface
scr_susface

function scr_susface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FS \TS Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1)); }
(7, 7);
171
                global.msg[8] = 
* HOW AM I SUPPOSED TO KNOW!?Delay 11 LEAVE ME ALONE!!!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_hathyfightevent_slash_Step_0_gml_192_0")
;
172
            }
173
            instance_create(0, 0, obj_dialoguer);
174
            equipcon = 2;
175
            global.interact = 1;
176
        }
177
    }
178
    if (equipcon == 2 && d_ex() == 0)
179
    {
180
        global.interact = 0;
181
        equipcon = -1;
182
    }
183
}
184
185
enum e__VW
186
{
187
    XView,
188
    YView,
189
    WView,
190
    HView,
191
    Angle,
192
    HBorder,
193
    VBorder,
194
    HSpeed,
195
    VSpeed,
196
    Object,
197
    Visible,
198
    XPort,
199
    YPort,
200
    WPort,
201
    HPort,
202
    Camera,
203
    SurfaceID
204
}