-
Notifications
You must be signed in to change notification settings - Fork 3
/
s_room_3.tsct
317 lines (295 loc) · 10.2 KB
/
s_room_3.tsct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
/*
* This file was auto-generated using 'silver-reversing-sct' tool
* to better understand the scripts presented, one is encouraged to
* view the catalogs at:
* https://github.com/nadavshemesh/silver-reversing-sct/blob/master/docs/index.md
*
* Any further information and support of this project please visit:
* https://github.com/nadavshemesh/silver-reversing-sct
*/
._DATA
VAR_0 { 1271, 251, -4753 }
treasure1 { 0, 1, 100, 0, 0 }
init_position7 { 258, -25, -6351 }
init_position8 { -1774, -25, -6316 }
VAR_10 { -1493, -25, -6210, 857, 575, -6543, -2320, 575, -6476 }
VAR_11 { -750, -125, -4437 }
VAR_12 { VAR_11, 145, 3, VAR_10 }
init_position { -752, 450, -6727 }
init_position1 { 389, -25, -6063 }
init_position2 { -1906, -25, -6063 }
init_position3 { -752, -550, -6078 }
VAR_22 { 1028, 575, -6319, -2381, 575, -6382, -740, -550, -6100, -2437, 250, -4129, 1002, 250, -4219, -712, -300, -3656 }
VAR_23 { 1028, 575, -6319, -2381, 575, -6382, -740, -550, -6100, -2437, 250, -4129, 1002, 250, -4219, -712, -300, -3656 }
VAR_24 { 1028, 575, -6319, -2381, 575, -6382, -740, -550, -6100, -2437, 250, -4129, 1002, 250, -4219, -712, -300, -3656 }
VAR_25 { 1028, 575, -6319, -2381, 575, -6382, -740, -550, -6100, -2437, 250, -4129, 1002, 250, -4219, -712, -300, -3656 }
VAR_26 { -179, 2400, -4429, -1271, 2400, -4431, -737, 2400, -4405 }
VAR_27 { -179, 2400, -4429, -1271, -125, -4431, -737, -125, -4405 }
VAR_28 { -179, 2400, -4429, -1271, -125, -4431, -737, -125, -4405 }
VAR_29 { -179, 2400, -4429, -1271, -125, -4431, -737, -125, -4405 }
/*
Interpretation of: enemy_gen_script
Generate at 3 positions from: VAR_26
Order of positions: Sequential
Total waves: 1; 2 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 30; delay between each enemy: 0
Enemies:
drop_iwarrior_low
drop_iwarrior_low
*/
enemy_gen_script { 0, 1, 3, VAR_26, 8, 1, 4, 0, 9, 2, 1, 1, 166, 166, -1, 5, 0, 30, 7, 1, 2, 6, 1, -1 }
/*
Interpretation of: enemy_gen_script1
Generate at 3 positions from: VAR_27
Order of positions: Sequential
Total waves: 1; 3 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 30; delay between each enemy: 0
Enemies:
iwarrior_med
iwarrior_med
iwarrior_med
*/
enemy_gen_script1 { 0, 1, 3, VAR_27, 8, 1, 4, 0, 9, 2, 1, 1, 164, 164, 164, -1, 5, 0, 30, 7, 1, 2, 6, 1, -1 }
/*
Interpretation of: enemy_gen_script2
Generate at 3 positions from: VAR_28
Order of positions: Sequential
Total waves: 1; 2 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 30; delay between each enemy: 0
Enemies:
iwarrior_highs
iwarrior_highs
warrior_med
*/
enemy_gen_script2 { 0, 1, 3, VAR_28, 8, 1, 4, 0, 9, 2, 1, 1, 165, 165, -1, 5, 0, 30, 7, 1, 2, 6, 1, -1 }
/*
Interpretation of: enemy_gen_script3
Generate at 3 positions from: VAR_29
Order of positions: Sequential
Total waves: 1; 2 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 30; delay between each enemy: 0
Enemies:
iwarrior_highs
iwarrior_highs
warrior_med
*/
enemy_gen_script3 { 0, 1, 3, VAR_29, 8, 1, 4, 0, 9, 2, 1, 1, 165, 165, -1, 5, 0, 30, 7, 1, 2, 6, 1, -1 }
init_position4 { -179, -125, -4429 }
init_position5 { -1271, -125, -4431 }
init_position6 { -747, -550, -6416 }
VAR_40 { 0, 0 }
VAR_41 -1
VAR_51 "QDD"
VAR_52 { -988540928, 1141882880, -976451584 }
VAR_53 { -1002160128, -1013579776, -987123712 }
arr { VAR_51, VAR_52, VAR_53 }
._on_load
execute SCRIPT_9
call remove_face(var &VAR_0)
call load_sound_set(int 47)
/* play the sound 'chain1' */
call play_loaded_sound(int 1, int -1, int 47, int 0)
/* play the sound 'fountain' */
call play_loaded_sound(int 4, int -1, int 47, var &VAR_0)
call load_sound_set(int 46)
/* play the sound 'palamb1' */
call play_loaded_sound(int 4, int -1, int 46, int 0)
if(gamevar is_room_cleared)
{
execute SCRIPT_10
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_8
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_3
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_7
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
call func_73()
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 2
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
if(gamevar script_time > var VAR_48)
{
var VAR_48 = gamevar script_time + int 70 + call randomize_int(int 0, int 110)
var index = call randomize_int(int 0, int 3)
/* play the sound 'flayamb1' */
call play_loaded_sound(int 5, int 0, int 46, @arr[var VAR_50])
}
if(gamevar script_time > var VAR_49)
{
var VAR_49 = gamevar script_time + int 100 + call randomize_int(int 0, int 200)
var index = call randomize_int(int 0, int 3)
/* play the sound 'torches2' */
call play_loaded_sound(int 6, int 0, int 46, @arr[var index])
}
._SCRIPT_4
if(var VAR_41 != var VAR_40)
{
var VAR_41 = var VAR_40
call log_var(var VAR_40)
}
switch(var VAR_40)
{
case 0
if(call get_num_of_enemies() < int 1)
{
var earth_flayer = call create_enemy(int 170, int 0, var &init_position, int 268)
call func_106(var earth_flayer, int 2, int 1, var &VAR_22)
call func_106(var earth_flayer, int 2, int 3, int 6)
call add_item_to_char(var earth_flayer, int 83 /* borb */ , int 1, int 1)
call add_item_to_char(var earth_flayer, int 83 /* borb */ , int 1, int 1)
var VAR_13 = call run_enemy_generator(var &enemy_gen_script, int 230)
var VAR_40 ++
}
break
case 1
if(call get_num_of_enemies() < int 1)
{
if(call ! func_ab(int 600, var &init_position7))
{
execute SCRIPT_6
var VAR_40 ++
}
}
break
case 2
if(call func_122(var VAR_13) == int 0)
{
if(call get_num_of_enemies() < int 3)
{
var acid_flayer = call create_enemy(int 171, int 2, var &init_position1, int 268)
call func_106(var acid_flayer, int 2, int 1, var &VAR_23)
call func_106(var acid_flayer, int 2, int 3, int 6)
call add_item_to_char(var acid_flayer, int 83 /* borb */ , int 1, int 1)
call add_item_to_char(var acid_flayer, int 83 /* borb */ , int 1, int 1)
var VAR_13 = call run_enemy_generator(var &enemy_gen_script1, int 230)
var VAR_40 ++
}
}
break
case 3
if(call func_122(var VAR_13) == int 0)
{
if(call get_num_of_enemies() < int 3)
{
var lightning_flayer = call create_enemy(int 172, int 3, var &init_position2, int 268)
call func_106(var lightning_flayer, int 2, int 1, var &VAR_24)
call func_106(var lightning_flayer, int 2, int 3, int 6)
call add_item_to_char(var lightning_flayer, int 83 /* borb */ , int 1, int 1)
call add_item_to_char(var lightning_flayer, int 83 /* borb */ , int 1, int 1)
var VAR_13 = call run_enemy_generator(var &enemy_gen_script2, int 230)
var VAR_40 ++
}
}
break
case 4
if(call func_122(var VAR_13) == int 0)
{
if(call get_num_of_enemies() < int 3)
{
var flayer = call create_enemy(int 162, int 4, var &init_position3, int 268)
call func_106(var flayer, int 2, int 1, var &VAR_25)
call func_106(var flayer, int 2, int 3, int 6)
call add_item_to_char(var flayer, int 83 /* borb */ , int 1, int 1)
call add_item_to_char(var flayer, int 83 /* borb */ , int 1, int 1)
call add_item_to_char(var flayer, int 83 /* borb */ , int 1, int 1)
var VAR_13 = call run_enemy_generator(var &enemy_gen_script3, int 230)
var VAR_40 ++
}
}
break
}
._SCRIPT_5
call load_char("flayer")
call load_char("eflayer")
call load_char("aflayer")
call load_char("iflayer")
call load_char("iwarrior")
call func_99(int 0, var &VAR_12)
var iwarrior_low = call create_enemy(int 163, int 0, var &init_position4, int 0)
var iwarrior_low1 = call create_enemy(int 163, int 1, var &init_position5, int 310)
var iwarrior_low2 = call create_enemy(int 163, int 2, var &init_position6, int 330)
call add_item_to_char(var iwarrior_low, int 83 /* borb */ , int 1, int 0)
call add_item_to_char(var iwarrior_low1, int 83 /* borb */ , int 1, int 0)
call add_item_to_char(var iwarrior_low2, int 83 /* borb */ , int 1, int 0)
call func_106(var iwarrior_low, int 1, int 0, int 1)
call set_char_init_state(var iwarrior_low, int 1)
call func_106(var iwarrior_low1, int 1, int 0, int 1)
call set_char_init_state(var iwarrior_low1, int 1)
call func_106(var iwarrior_low2, int 1, int 0, int 1)
call set_char_init_state(var iwarrior_low2, int 1)
._SCRIPT_6
var treasure = call create_enemy(int 136, int 1, var &init_position7, int 6)
call add_item_to_char(var treasure, int 38 /* potbrown */ , int 1, int 0)
call add_item_to_char(var treasure, int 32 /* potwhite */ , int 1, int 0)
var treasure1 = call create_enemy(int 136, int 2, var &init_position8, int 6)
call add_item_to_char(var treasure1, int 39 /* potblack */ , int 1, int 0)
call add_item_to_char(var treasure1, int 33 /* potblue */ , int 1, int 0)
._SCRIPT_7
._SCRIPT_8
._SCRIPT_9
gamevar SMACKER_X = int 256
gamevar SMACKER_Y = int 108
call play_2d_anim("mechanic", int 1, int 0, int 0)
gamevar SMACKER_X = int 408
gamevar SMACKER_Y = int 624
call play_2d_anim("glow", int 1, int 1, int 0)
gamevar SMACKER_X = int 492
gamevar SMACKER_Y = int 152
call play_2d_anim("blood1", int 1, int 1, int 0)
gamevar SMACKER_X = int 1144
gamevar SMACKER_Y = int 228
call play_2d_anim("blood2", int 1, int 1, int 0)
gamevar SMACKER_X = int 1012
gamevar SMACKER_Y = int 0
call play_2d_anim("chainy", int 1, int 1, int 0)
gamevar SMACKER_X = int 1192
gamevar SMACKER_Y = int 292
call play_2d_anim("hidmech", int 1, int 1, int 0)
._SCRIPT_10