Deltarune (Chapter 2) 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
if (global.darkzone == 1)
11
{
12
    image_xscale = 2;
13
    image_yscale = 2;
14
}
15
if (room == room_dw_cyber_battle_maze_1)
16
{
17
    itemidchest = 10;
18
    itemtype = "armor";
19
    itemflag = 118;
20
}
21
if (room == room_dw_cyber_keyboard_puzzle_1)
22
{
23
    itemidchest = 18;
24
    itemtype = "weapon";
25
    itemflag = 119;
26
}
27
if (room == room_dw_cyber_maze_tasque)
28
{
29
    itemidchest = 10;
30
    itemtype = "armor";
31
    itemflag = 120;
32
    extraevent = 1;
33
}
34
if (room == room_dw_cyber_maze_queenscreen)
35
{
36
    itemidchest = 27;
37
    itemtype = "item";
38
    itemflag = 122;
39
}
40
if (room == room_dw_cyber_viro_ring)
41
{
42
    itemidchest = 2;
43
    itemtype = "item";
44
    itemflag = 123;
45
}
46
if (room == room_dw_mansion_bridges)
47
{
48
    itemidchest = 30;
49
    itemtype = "item";
50
    itemflag = 125;
51
}
52
if (room == room_dw_cyber_teacup_final)
53
{
54
    itemidchest = 19;
55
    itemtype = "weapon";
56
    itemflag = 129;
57
}
58
if (room == room_dw_city_big_3)
59
{
60
    itemidchest = 14;
61
    itemtype = "weapon";
62
    itemflag = 130;
63
}
64
if (room == room_dw_mansion_b_west_1f_b)
65
{
66
    itemtype = "money";
67
    itemflag = 133;
68
    itemidchest = 1;
69
}
70
if (room == room_dw_city_treasure)
71
{
72
    itemflag = 134;
73
    itemtype = "armor";
74
    itemidchest = 3;
75
}
76
if (room == room_dw_city_cheesemaze)
77
{
78
    itemidchest = 16;
79
    itemtype = "item";
80
    itemflag = 135;
81
}
82
if (room == room_dw_mansion_east_1f_secret)
83
{
84
    itemidchest = 1;
85
    itemtype = "item";
86
    itemflag = 136;
87
}
88
if (room == room_dw_mansion_bridges)
89
{
90
    itemflag = 137;
91
    itemidchest = 30;
92
    itemtype = "item";
93
}
94
if (room == room_dw_mansion_east_2f_c_a)
95
{
96
    itemidchest = 3;
97
    itemtype = "item";
98
    itemflag = 139;
99
}
100
if (room == room_dw_mansion_east_1f_e)
101
{
102
    itemidchest = 11;
103
    itemtype = "armor";
104
    itemflag = 141;
105
}
106
if (room == room_dw_castle_west_cliff || room == room_dw_mansion_b_east_transformed)
107
{
108
    itemidchest = 21;
109
    itemflag = 142;
110
    var qualify = 0;
111
    if (global.flag[468 spamton_no_room] > 0)
112
        qualify = 1;
113
    if (global.flag[142 got_spamton_chest] == 1)
114
        qualify = 0;
115
    if (global.flag[571 encount_spamton_neo] == 1 || global.flag[468 spamton_no_room] == 2)
116
        itemtype = "weapon";
117
    else
118
        itemtype = "armor";
119
    if (qualify == 0)
120
    {
121
        instance_destroy();
122
        visible = 0;
123
    }
124
}
125
if (global.flag[itemflag] == 1)
126
    image_index = 1;
127
scr_depth
scr_depth

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();