Deltarune (Chapter 1) 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
t_itemid = 4;
7
close = 0;
8
extratext = 0;
9
if (room == room_field_maze)
10
    extratext = 1;
11
if (room == room_field_secret1)
12
{
13
    itemflag = 117;
14
    itemtype = "key";
15
    t_itemid = 7;
16
    extratext = 0;
17
}
18
if (room == room_forest_dancers1)
19
{
20
    itemflag = 107;
21
    itemtype = "item";
22
    t_itemid = 2;
23
    extratext = 1;
24
    if (x >= (room_width / 2))
25
    {
26
        itemflag = 116;
27
        itemtype = "key";
28
        t_itemid = 6;
29
        extratext = 0;
30
    }
31
}
32
if (room == room_forest_area2A)
33
{
34
    itemflag = 108;
35
    itemtype = "weapon";
36
    t_itemid = 9;
37
    extratext = 1;
38
}
39
if (room == room_forest_area3A)
40
{
41
    itemflag = 109;
42
    itemtype = "armor";
43
    t_itemid = 2;
44
    extratext = 1;
45
}
46
if (room == room_forest_area4)
47
{
48
    if (y <= (room_height / 2))
49
    {
50
        itemflag = 110;
51
        itemtype = "gold";
52
        t_itemid = 40;
53
        extratext = 1;
54
    }
55
    else
56
    {
57
        itemflag = 111;
58
        itemtype = "item";
59
        t_itemid = 2;
60
        extratext = 1;
61
    }
62
}
63
if (room == room_cc_prison_prejoker)
64
{
65
    if (global.flag[112 got_JEVIL_chest] == 1)
66
        instance_destroy();
67
    if (global.flag[242 JEVIL_chest] == 0)
68
    {
69
        instance_destroy();
70
    }
71
    else
72
    {
73
        if (global.flag[242 JEVIL_chest] == 1)
74
        {
75
            itemflag = 112;
76
            itemtype = "weapon";
77
            t_itemid = 7;
78
        }
79
        if (global.flag[242 JEVIL_chest] == 2)
80
        {
81
            itemflag = 112;
82
            itemtype = "armor";
83
            t_itemid = 7;
84
        }
85
    }
86
}
87
if (room == room_cc_2f)
88
{
89
    itemflag = 113;
90
    itemtype = "item";
91
    t_itemid = 11;
92
}
93
if (room == room_cc_4f)
94
{
95
    itemflag = 114;
96
    itemtype = "item";
97
    t_itemid = 2;
98
    extratext = 1;
99
}
100
if (room == room_forest_secret1)
101
{
102
    itemflag = 116;
103
    itemtype = "key";
104
    t_itemid = 6;
105
    extratext = 0;
106
}
107
if (global.darkzone == 1)
108
{
109
    image_xscale = 2;
110
    image_yscale = 2;
111
}
112
if (global.flag[itemflag] == 1)
113
    image_index = 1;
114
scr_depth
scr_depth

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