Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_overworldc_Draw_0

related scripts: Create_0 • Draw_0 • Step_0

(view raw script w/o annotations or w/e)
1
buffer += 1;
2
if (global.interact == 5)
3
{
4
    xx = __view_get(e__VW.XView, view_current);
5
    yy = __view_get(e__VW.YView, view_current) + 10;
6
    moveyy = yy;
7
    var stat_right = langopt(263, 300);
8
    if (obj_mainchara.y > (yy + 120))
9
        moveyy += 135;
10
    if (global.menuno != 4)
11
    {
12
        draw_set_color(c_white);
13
        draw_rectangle(16 + xx, 16 + moveyy, 86 + xx, 70 + moveyy, false);
14
        draw_rectangle(16 + xx, 74 + yy, 86 + xx, 147 + yy, false);
15
        if (global.menuno == 1 || global.menuno == 5 || global.menuno == 6)
16
            draw_rectangle(94 + xx, 16 + yy, 266 + xx, 196 + yy, false);
17
        if (global.menuno == 2)
18
            draw_rectangle(94 + xx, 16 + yy, stat_right + 3 + xx, 224 + yy, false);
19
        if (global.menuno == 3)
20
            draw_rectangle(94 + xx, 16 + yy, 266 + xx, 150 + yy, false);
21
        if (global.menuno == 7)
22
            draw_rectangle(94 + xx, 16 + yy, 266 + xx, 216 + yy, false);
23
        draw_set_color(c_black);
24
        draw_rectangle(19 + xx, 19 + moveyy, 83 + xx, 67 + moveyy, false);
25
        draw_rectangle(19 + xx, 77 + yy, 83 + xx, 144 + yy, false);
26
        if (global.menuno == 1 || global.menuno == 5 || global.menuno == 6)
27
            draw_rectangle(97 + xx, 19 + yy, 263 + xx, 193 + yy, false);
28
        if (global.menuno == 2)
29
            draw_rectangle(97 + xx, 19 + yy, stat_right + xx, 221 + yy, false);
30
        if (global.menuno == 3)
31
            draw_rectangle(97 + xx, 19 + yy, 263 + xx, 147 + yy, false);
32
        if (global.menuno == 7)
33
            draw_rectangle(97 + xx, 19 + yy, 263 + xx, 213 + yy, false);
34
        draw_set_color(c_white);
35
        draw_set_font(fnt_small);
36
        draw_text(23 + xx, 49 + moveyy, string_hash_to_newline(stringsetsubloc(
HP Argument №11Wait for inputArgument №22
"HP ~1/~2", string(global.lhp), string(global.lmaxhp), "obj_overworldc_slash_Draw_0_gml_37_0"
)));
37
        draw_text(23 + xx, 40 + moveyy, string_hash_to_newline(stringsetsubloc(
LV Argument №11
"LV ~1", string(global.llv), "obj_overworldc_slash_Draw_0_gml_38_0"
)));
38
        draw_text(23 + xx, 58 + moveyy, string_hash_to_newline(stringsetsubloc(
$ Argument №11
"$ ~1", string(global.lgold), "obj_overworldc_slash_Draw_0_gml_40_0"
)));
39
        
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("main");
40
        draw_text(23 + xx, 20 + moveyy, string_hash_to_newline(global.lcharname));
41
        var _itemTextColor = hasitems ? c_white : c_gray;
42
        draw_set_color(_itemTextColor);
43
        draw_text(42 + xx, 84 + yy, string_hash_to_newline(stringsetloc(
ITEM
"ITEM", "obj_overworldc_slash_Draw_0_gml_42_0"
)));
44
        draw_set_color(c_white);
45
        draw_text(42 + xx, 102 + yy, string_hash_to_newline(stringsetloc(
STAT
"STAT", "obj_overworldc_slash_Draw_0_gml_43_0"
)));
46
        var _cellTextColor = _weird_mode ? 8421504 : 16777215;
47
        draw_set_color(_cellTextColor);
48
        draw_text(42 + xx, 120 + yy, string_hash_to_newline(stringsetloc(
CELL
"CELL", "obj_overworldc_slash_Draw_0_gml_44_0"
)));
49
        draw_set_color(c_white);
50
        if (global.menuno == 1 || global.menuno == 5)
51
        {
52
            for (i = 0; i < 8; i += 1)
53
                draw_text(116 + xx, 30 + yy + (i * 16), string_hash_to_newline(global.litemname[i]));
54
            draw_text(116 + xx, 170 + yy, string_hash_to_newline(stringsetloc(
USE
"USE", "obj_overworldc_slash_Draw_0_gml_52_0"
)));
55
            draw_text(116 + xx + 48, 170 + yy, string_hash_to_newline(stringsetloc(
INFO
"INFO", "obj_overworldc_slash_Draw_0_gml_53_0"
)));
56
            draw_text(116 + xx + 105, 170 + yy, string_hash_to_newline(stringsetloc(
DROP
"DROP", "obj_overworldc_slash_Draw_0_gml_54_0"
)));
57
        }
58
    }
59
    if (global.menuno == 3)
60
    {
61
        for (i = 0; i < 7; i += 1)
62
            draw_text(116 + xx, 30 + yy + (i * 16), string_hash_to_newline(global.phonename[i]));
63
    }
64
    if (global.menuno == 2)
65
    {
66
        draw_text(108 + xx, 32 + yy, string_hash_to_newline(stringsetsubloc(
"Argument №11"
"\"~1\"", global.lcharname, "obj_overworldc_slash_Draw_0_gml_66_0"
)));
67
        draw_text(108 + xx, 62 + yy, string_hash_to_newline(stringsetsubloc(
LV Argument №11
"LV ~1", string(global.llv), "obj_overworldc_slash_Draw_0_gml_68_0"
)));
68
        draw_text(108 + xx, 78 + yy, string_hash_to_newline(stringsetsubloc(
HP Argument №11 Wait for input Argument №22
"HP ~1 / ~2", string(global.lhp), string(global.lmaxhp), "obj_overworldc_slash_Draw_0_gml_69_0"
)));
69
        draw_text(108 + xx, 110 + yy, string_hash_to_newline(stringsetsubloc(
AT Argument №11 (Argument №22)
"AT ~1 (~2)", string(global.lat), string(global.lwstrength), "obj_overworldc_slash_Draw_0_gml_71_0"
)));
70
        draw_text(108 + xx, 126 + yy, string_hash_to_newline(stringsetsubloc(
DF Argument №11 (Argument №22)
"DF ~1 (~2)", string(global.ldf), string(global.ladef), "obj_overworldc_slash_Draw_0_gml_72_0"
)));
71
        weaponname = stringsetloc(
None
"None", "obj_overworldc_slash_Draw_0_gml_73_0"
);
72
        armorname = stringsetloc(
None
"None", "obj_overworldc_slash_Draw_0_gml_74_0"
);
73
        if (global.lweapon == 2)
74
            weaponname = stringsetloc(
Pencil
"Pencil", "obj_overworldc_slash_Draw_0_gml_75_0"
);
75
        if (global.lweapon == 6)
76
            weaponname = stringsetloc(
Halloween Pencil
"Halloween Pencil", "obj_overworldc_slash_Draw_0_gml_76_0"
);
77
        if (global.lweapon == 7)
78
            weaponname = stringsetloc(
Lucky Pencil
"Lucky Pencil", "obj_overworldc_slash_Draw_0_gml_77_0"
);
79
        if (global.lweapon == 12)
80
            weaponname = stringsetloc(
Eraser
"Eraser", "obj_overworldc_slash_Draw_0_gml_78_0_b"
);
81
        if (global.lweapon == 13)
82
            weaponname = stringsetloc(
Mech. Pencil
"Mech. Pencil", "obj_overworldc_slash_Draw_0_gml_79_0"
);
83
        if (global.lweapon == 15)
84
            weaponname = stringsetloc(
Holiday Pencil
"Holiday Pencil", "obj_overworldc_slash_Draw_0_gml_83_0_b"
);
85
        if (global.lweapon == 16)
86
            weaponname = stringsetloc(
CactusNeedle
"CactusNeedle", "obj_overworldc_slash_Draw_0_gml_84_0"
);
87
        if (global.lweapon == 17)
88
            weaponname = stringsetloc(
BlackShard
"BlackShard", "obj_overworldc_slash_Draw_0_gml_85_0"
);
89
        if (global.lweapon == 18)
90
            weaponname = stringsetloc(
QuillPen
"QuillPen", "scr_litemname_slash_scr_litemname_gml_24_0"
);
91
        if (global.lweapon == 22)
92
            weaponname = stringsetloc(
Pencil2
"Pencil2", "obj_overworldc_slash_Draw_0_gml_91_0"
);
93
        if (global.lweapon == 23)
94
            weaponname = stringsetloc(
Petal
"Petal", "obj_overworldc_slash_Draw_0_gml_92_0_b"
);
95
        if (global.larmor == 3)
96
            armorname = stringsetloc(
Bandage
"Bandage", "obj_overworldc_slash_Draw_0_gml_78_0"
);
97
        if (global.larmor == 14)
98
            armorname = stringsetloc(
Wristwatch
"Wristwatch", "obj_overworldc_slash_Draw_0_gml_81_0_b"
);
99
        draw_text(108 + xx, 156 + yy, string_hash_to_newline(stringsetsubloc(
WEAPON: Argument №11
"WEAPON: ~1", weaponname, "obj_overworldc_slash_Draw_0_gml_81_0"
)));
100
        draw_text(108 + xx, 172 + yy, string_hash_to_newline(stringsetsubloc(
ARMOR: Argument №11
"ARMOR: ~1", armorname, "obj_overworldc_slash_Draw_0_gml_82_0"
)));
101
        draw_text(108 + xx, 192 + yy, string_hash_to_newline(stringsetsubloc(
MONEY: Argument №11
"MONEY: ~1", string(global.lgold), "obj_overworldc_slash_Draw_0_gml_83_0"
)));
102
        if (string_length(global.lcharname) >= 7)
103
        {
104
            draw_text(192 + xx, 32 + yy, string_hash_to_newline(stringsetloc(
???
"???", "obj_overworldc_slash_Draw_0_gml_88_0"
)));
105
        }
106
        else if (global.flag[914 chapter_started] > 0)
107
        {
108
            var krispreservationsociety = stringsetsubloc(
Since#Chapter Argument №11
"Since#Chapter ~1", global.flag[914 chapter_started], "obj_overworldc_slash_Draw_0_gml_95_0"
);
109
            draw_text(192 + xx, 32 + yy, string_hash_to_newline(krispreservationsociety));
110
        }
111
        nextlevel = 0;
112
        draw_text(192 + xx, 110 + yy, string_hash_to_newline(stringsetsubloc(
EXP: Argument №11
"EXP: ~1", string(global.lxp), "obj_overworldc_slash_Draw_0_gml_92_0"
)));
113
        if (global.llv == 1)
114
            nextlevel = 10 - global.lxp;
115
        if (global.llv == 2)
116
            nextlevel = 30 - global.lxp;
117
        if (global.llv == 3)
118
            nextlevel = 70 - global.lxp;
119
        if (global.llv == 4)
120
            nextlevel = 120 - global.lxp;
121
        if (global.llv == 5)
122
            nextlevel = 200 - global.lxp;
123
        if (global.llv == 6)
124
            nextlevel = 300 - global.lxp;
125
        if (global.llv == 7)
126
            nextlevel = 500 - global.lxp;
127
        if (global.llv == 8)
128
            nextlevel = 800 - global.lxp;
129
        if (global.llv == 9)
130
            nextlevel = 1200 - global.lxp;
131
        if (global.llv == 10)
132
            nextlevel = 1700 - global.lxp;
133
        if (global.llv == 11)
134
            nextlevel = 2500 - global.lxp;
135
        if (global.llv == 12)
136
            nextlevel = 3500 - global.lxp;
137
        if (global.llv == 13)
138
            nextlevel = 5000 - global.lxp;
139
        if (global.llv == 14)
140
            nextlevel = 7000 - global.lxp;
141
        if (global.llv == 15)
142
            nextlevel = 10000 - global.lxp;
143
        if (global.llv == 16)
144
            nextlevel = 15000 - global.lxp;
145
        if (global.llv == 17)
146
            nextlevel = 25000 - global.lxp;
147
        if (global.llv == 18)
148
            nextlevel = 50000 - global.lxp;
149
        if (global.llv == 19)
150
            nextlevel = 99999 - global.lxp;
151
        if (global.llv >= 20)
152
            nextlevel = 0;
153
        draw_text(192 + xx, 126 + yy, string_hash_to_newline(stringsetsubloc(
NEXT: Argument №11
"NEXT: ~1", string(nextlevel), "obj_overworldc_slash_Draw_0_gml_113_0"
)));
154
    }
155
    if (global.menuno == 444)
156
    {
157
    }
158
    if (global.menuno == 0)
159
        draw_sprite(spr_heartsmall, 0, 28 + xx, 88 + yy + (18 * global.menucoord[0]));
160
    if (global.menuno == 1)
161
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[1]));
162
    if (global.menuno == 3)
163
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[3]));
164
    if (global.menuno == 6)
165
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[6]));
166
    if (global.menuno == 7)
167
        draw_sprite(spr_heartsmall, 0, 104 + xx, 34 + yy + (16 * global.menucoord[7]));
168
    if (global.menuno == 5)
169
    {
170
        if (global.menucoord[5] == 0)
171
            draw_sprite(spr_heartsmall, 0, 104 + xx + (45 * global.menucoord[5]), 174 + yy);
172
        if (global.menucoord[5] == 1)
173
            draw_sprite(spr_heartsmall, 0, 104 + xx + ((45 * global.menucoord[5]) + 3), 174 + yy);
174
        if (global.menucoord[5] == 2)
175
            draw_sprite(spr_heartsmall, 0, 104 + xx + ((45 * global.menucoord[5]) + 15), 174 + yy);
176
    }
177
}
178
179
enum e__VW
180
{
181
    XView,
182
    YView,
183
    WView,
184
    HView,
185
    Angle,
186
    HBorder,
187
    VBorder,
188
    HSpeed,
189
    VSpeed,
190
    Object,
191
    Visible,
192
    XPort,
193
    YPort,
194
    WPort,
195
    HPort,
196
    Camera,
197
    SurfaceID
198
}