Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_treasure_room_Create_0

(view raw script w/o annotations or w/e)
1
myinteract = 0;
2
talked = 0;
3
image_speed = 0;
4
itemflag = 104;
5
itemtype = "armor";
6
itemidchest = 4;
7
close = 0;
8
extratext = 0;
9
extraevent = 0;
10
tempchest = false;
11
needsitem = false;
12
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
13
{
14
    itemidchest = 0;
15
    itemflag = 1999;
16
    itemtype = "item";
17
}
18
noflag = false;
19
if (global.darkzone == 1)
20
{
21
    image_xscale = 2;
22
    image_yscale = 2;
23
}
24
if (room == room_dw_castle_west_cliff)
25
{
26
    itemidchest = 21;
27
    itemflag = 142;
28
    var qualify = 0;
29
    if (global.flag[468 spamton_no_room] > 0)
30
        qualify = 1;
31
    if (global.flag[142 got_spamton_chest] == 1)
32
        qualify = 0;
33
    if (global.flag[571 encount_spamton_neo] == 1 || global.flag[468 spamton_no_room] == 2)
34
        itemtype = "weapon";
35
    else
36
        itemtype = "armor";
37
    if (qualify == 0)
38
    {
39
        instance_destroy();
40
        visible = 0;
41
    }
42
}
43
if (room == room_dw_church_darkmaze || i_ex(obj_dw_church_darkmaze))
44
{
45
    itemflag = 871;
46
    itemtype = "nothing";
47
}
48
if (room == room_dw_church_pianopiece_left || i_ex(obj_dw_church_pianopiece_left))
49
{
50
    itemflag = 894;
51
    itemtype = "item";
52
    itemidchest = 62;
53
}
54
if (room == room_dw_church_worshiproom)
55
{
56
    itemtype = "armor";
57
    itemidchest = 51;
58
    itemflag = 1517;
59
}
60
if (room == room_dw_churchb_worshiproom)
61
{
62
    itemtype = "armor";
63
    itemidchest = 52;
64
    itemflag = 1517;
65
}
66
if (room == room_dw_churchb_library || i_ex(obj_dw_churchb_library))
67
{
68
    itemtype = "item";
69
    itemidchest = 2;
70
    itemflag = 1540;
71
}
72
if (extflag == "ripseqtreasure")
73
{
74
    itemtype = "item";
75
    itemidchest = 62;
76
    itemflag = 1550;
77
}
78
if (i_ex(obj_dw_churchb_prophecymaze))
79
{
80
    itemtype = "item";
81
    itemidchest = 62;
82
    itemflag = 1581;
83
}
84
if (i_ex(obj_dw_church_sideclimb))
85
{
86
    itemtype = "armor";
87
    itemidchest = 52;
88
    itemflag = 863;
89
}
90
if (i_ex(obj_dw_church_bookshelfpuzzle))
91
{
92
    itemtype = "weapon";
93
    itemidchest = 54;
94
    itemflag = 1582;
95
}
96
if (room == room_dw_churchb_libraryconnector || i_ex(obj_dw_churchb_libraryconnector))
97
{
98
    itemtype = "item";
99
    itemidchest = 61;
100
    itemflag = 1539;
101
}
102
if (room == room_dw_churchb_gallery || i_ex(obj_dw_churchb_gallery))
103
{
104
    itemflag = 1545;
105
    itemtype = "money";
106
    itemidchest = 500;
107
}
108
if (room == room_dw_church_rightconnect || i_ex(obj_dw_church_rightconnect))
109
{
110
    itemtype = "weapon";
111
    itemidchest = 53;
112
    itemflag = 1586;
113
}
114
if (room == room_dw_church_minorlegend || i_ex(obj_dw_church_minorlegend))
115
{
116
    itemtype = "item";
117
    itemidchest = 61;
118
    itemflag = 1587;
119
}
120
if (room == room_dw_church_pianopiece_right || i_ex(obj_dw_church_pianopiece_right))
121
{
122
    itemtype = "item";
123
    itemidchest = 2;
124
    itemflag = 1588;
125
}
126
if (room == room_dw_church_trueclimbadventure || i_ex(obj_dw_church_trueclimbadventure))
127
{
128
    itemflag = 1589;
129
    itemtype = "item";
130
    itemidchest = 28;
131
}
132
if (room == room_dw_church_jackenstein || i_ex(obj_dw_church_jackenstein))
133
{
134
    itemflag = 1590;
135
    itemtype = "money";
136
    itemidchest = 500;
137
}
138
if (room == room_dw_churchc_encounter2 || i_ex(obj_dw_churchc_encounter2))
139
{
140
    itemflag = 1614;
141
    itemtype = "money";
142
    itemidchest = 100;
143
    image_blend = c_black;
144
}
145
if (room == room_dw_churchc_treasurechest || i_ex(obj_dw_churchc_treasurechest))
146
{
147
    itemflag = 1616;
148
    itemtype = "armor";
149
    itemidchest = 50;
150
}
151
if (i_ex(obj_dw_churchc_prophecies) || room == room_dw_churchc_prophecies)
152
{
153
    itemflag = 1610;
154
    itemtype = "armor";
155
    itemidchest = 53;
156
}
157
if (room == room_dw_church_dogclimb)
158
{
159
    itemflag = 1638;
160
    itemtype = "item";
161
    itemidchest = 33;
162
}
163
if (room == room_dw_churchb_moneyfountain || instance_exists(obj_dw_churchb_moneyfountain))
164
{
165
    itemflag = 1537;
166
    var val = global.flag[898] + obj_dw_churchb_moneyfountain.bonus;
167
    itemtype = "item";
168
    itemidchest = 1;
169
    if (val >= 100)
170
    {
171
        itemtype = "item";
172
        itemidchest = 62;
173
    }
174
    if (val >= 500)
175
    {
176
        itemtype = "item";
177
        itemidchest = 2;
178
    }
179
    if (val >= 2000)
180
    {
181
        itemtype = "item";
182
        itemidchest = 63;
183
    }
184
    if (val >= 9999)
185
    {
186
        itemtype = "armor";
187
        itemidchest = 54;
188
    }
189
}
190
if (room == room_dw_castle_tv_zone_3)
191
{
192
    itemflag = 1703;
193
    itemtype = "item";
194
    itemidchest = 34;
195
}
196
if (global.flag[itemflag] == 1)
197
    image_index = 1;
198
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
199
init = 0;