1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
var dimensional_box_number_row = global.dimensional_box_number_row; |
4 |
var dimensional_box_number_column = global.dimensional_box_number_column; |
5 |
if (keyboard_multicheck_pressed(0)) |
6 |
{ |
7 |
audio_play_sound(snd_confirm, 0, 0); |
8 |
if (dimensional_box_number_column == 1) |
9 |
{ |
10 |
if (global.item_slot[dimensional_box_number_row] != "Nothing") |
11 |
{ |
12 |
ds_list_insert(global.box_slot_list, 0, global.item_slot[dimensional_box_number_row]); |
13 |
scr_item_removescr_item_removefunction scr_item_remove(arg0)
{
for (i = 1; i <= 8; i += 1)
{
if (global.item_slot[i] == arg0)
{
while (i < 8)
{
global.item_slot[i] = global.item_slot[i + 1];
i += 1;
}
global.item_slot[8] = "Nothing";
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} (global.item_slot[dimensional_box_number_row]); |
14 |
} |
15 |
else |
16 |
{ |
17 |
audio_stop_sound(snd_confirm); |
18 |
audio_play_sound(snd_fail, 1, 0); |
19 |
} |
20 |
} |
21 |
else if (dimensional_box_number_column == 2) |
22 |
{ |
23 |
var retrieved_item = ds_list_find_value(global.box_slot_list, (dimensional_box_number_row - 1) + global.dimensional_box_offset); |
24 |
if (retrieved_item != undefined && scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} (retrieved_item)) |
25 |
{ |
26 |
ds_list_delete(global.box_slot_list, (dimensional_box_number_row - 1) + global.dimensional_box_offset); |
27 |
} |
28 |
else |
29 |
{ |
30 |
audio_stop_sound(snd_confirm); |
31 |
audio_play_sound(snd_fail, 1, 0); |
32 |
} |
33 |
} |
34 |
} |
35 |
else if (keyboard_multicheck_pressed(1)) |
36 |
{ |
37 |
audio_play_sound(snd_fail, 1, 0); |
38 |
with (obj_dimensional_box_screen_overworld) |
39 |
instance_destroy(); |
40 |
scr_cutscene_end(); |
41 |
instance_destroy(); |
42 |
exit; |
43 |
} |
44 |
if (!keyboard_multicheck_pressed(0)) |
45 |
{ |
46 |
if (global.right_keyp && global.left_keyp == 0) |
47 |
{ |
48 |
if (dimensional_box_number_column < 2) |
49 |
global.dimensional_box_number_column += 1; |
50 |
audio_play_sound(snd_mainmenu_select, 1, 0); |
51 |
} |
52 |
if (global.left_keyp && global.right_keyp == 0) |
53 |
{ |
54 |
if (dimensional_box_number_column > 1) |
55 |
{ |
56 |
if (dimensional_box_number_row > 8) |
57 |
global.dimensional_box_number_row = 8; |
58 |
global.dimensional_box_number_column -= 1; |
59 |
} |
60 |
audio_play_sound(snd_mainmenu_select, 1, 0); |
61 |
} |
62 |
} |
63 |
var max_row_number; |
64 |
if (dimensional_box_number_column == 1) |
65 |
max_row_number = 8; |
66 |
else if (dimensional_box_number_column == 2) |
67 |
max_row_number = 10; |
68 |
if (!keyboard_multicheck_pressed(0)) |
69 |
{ |
70 |
if (global.down_keyp && global.up_keyp == 0) |
71 |
{ |
72 |
if (dimensional_box_number_row == max_row_number && dimensional_box_number_column == 2) |
73 |
{ |
74 |
if ((dimensional_box_number_row + global.dimensional_box_offset) <= ds_list_size(global.box_slot_list)) |
75 |
global.dimensional_box_offset += 1; |
76 |
} |
77 |
else if (dimensional_box_number_row < max_row_number) |
78 |
{ |
79 |
global.dimensional_box_number_row += 1; |
80 |
} |
81 |
audio_play_sound(snd_mainmenu_select, 1, 0); |
82 |
} |
83 |
if (global.up_keyp && global.down_keyp == 0) |
84 |
{ |
85 |
if (dimensional_box_number_row == 1 && dimensional_box_number_column == 2) |
86 |
{ |
87 |
if (global.dimensional_box_offset > 0) |
88 |
global.dimensional_box_offset -= 1; |
89 |
} |
90 |
if (dimensional_box_number_row > 1) |
91 |
global.dimensional_box_number_row -= 1; |
92 |
audio_play_sound(snd_mainmenu_select, 1, 0); |
93 |
} |
94 |
} |
95 |
dimensional_box_number_row = global.dimensional_box_number_row; |
96 |
dimensional_box_number_column = global.dimensional_box_number_column; |
97 |
var x_offset = 8; |
98 |
var y_offset = 8; |
99 |
if (dimensional_box_number_column == 1) |
100 |
{ |
101 |
if (dimensional_box_number_row == 1) |
102 |
{ |
103 |
xx = x_offset + 20; |
104 |
yy = y_offset + 37; |
105 |
} |
106 |
else if (dimensional_box_number_row == 2) |
107 |
{ |
108 |
xx = x_offset + 20; |
109 |
yy = y_offset + 53; |
110 |
} |
111 |
else if (dimensional_box_number_row == 3) |
112 |
{ |
113 |
xx = x_offset + 20; |
114 |
yy = y_offset + 69; |
115 |
} |
116 |
else if (dimensional_box_number_row == 4) |
117 |
{ |
118 |
xx = x_offset + 20; |
119 |
yy = y_offset + 85; |
120 |
} |
121 |
else if (dimensional_box_number_row == 5) |
122 |
{ |
123 |
xx = x_offset + 20; |
124 |
yy = y_offset + 101; |
125 |
} |
126 |
else if (dimensional_box_number_row == 6) |
127 |
{ |
128 |
xx = x_offset + 20; |
129 |
yy = y_offset + 117; |
130 |
} |
131 |
else if (dimensional_box_number_row == 7) |
132 |
{ |
133 |
xx = x_offset + 20; |
134 |
yy = y_offset + 133; |
135 |
} |
136 |
else if (dimensional_box_number_row == 8) |
137 |
{ |
138 |
xx = x_offset + 20; |
139 |
yy = y_offset + 149; |
140 |
} |
141 |
} |
142 |
else if (dimensional_box_number_column == 2) |
143 |
{ |
144 |
if (dimensional_box_number_row == 1) |
145 |
{ |
146 |
xx = x_offset + 168; |
147 |
yy = y_offset + 37; |
148 |
} |
149 |
else if (dimensional_box_number_row == 2) |
150 |
{ |
151 |
xx = x_offset + 168; |
152 |
yy = y_offset + 53; |
153 |
} |
154 |
else if (dimensional_box_number_row == 3) |
155 |
{ |
156 |
xx = x_offset + 168; |
157 |
yy = y_offset + 69; |
158 |
} |
159 |
else if (dimensional_box_number_row == 4) |
160 |
{ |
161 |
xx = x_offset + 168; |
162 |
yy = y_offset + 85; |
163 |
} |
164 |
else if (dimensional_box_number_row == 5) |
165 |
{ |
166 |
xx = x_offset + 168; |
167 |
yy = y_offset + 101; |
168 |
} |
169 |
else if (dimensional_box_number_row == 6) |
170 |
{ |
171 |
xx = x_offset + 168; |
172 |
yy = y_offset + 117; |
173 |
} |
174 |
else if (dimensional_box_number_row == 7) |
175 |
{ |
176 |
xx = x_offset + 168; |
177 |
yy = y_offset + 133; |
178 |
} |
179 |
else if (dimensional_box_number_row == 8) |
180 |
{ |
181 |
xx = x_offset + 168; |
182 |
yy = y_offset + 149; |
183 |
} |
184 |
else if (dimensional_box_number_row == 9) |
185 |
{ |
186 |
xx = x_offset + 168; |
187 |
yy = y_offset + 165; |
188 |
} |
189 |
else if (dimensional_box_number_row == 10) |
190 |
{ |
191 |
xx = x_offset + 168; |
192 |
yy = y_offset + 181; |
193 |
} |
194 |
} |