-
Notifications
You must be signed in to change notification settings - Fork 3
/
met_maz2.tsct
357 lines (334 loc) · 11 KB
/
met_maz2.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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
/*
* 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 { -1506, 229, -592 }
VAR_1 { -1557, 329, -824 }
VAR_2 { -1532, 329, -1127 }
VAR_3 { -1501, 329, -1542 }
VAR_4 { -1529, 329, -2039 }
VAR_5 { -1620, 329, -2297 }
VAR_6 { -2094, 129, -2503 }
VAR_7 { -2597, 129, -2561 }
VAR_8 { -3102, 129, -2636 }
VAR_9 { -3472, 129, -2979 }
VAR_10 { -2812, 129, -3171 }
VAR_11 { -1773, 129, -3069 }
VAR_12 { -1265, 129, -3213 }
VAR_13 { -1315, 179, -2488 }
VAR_14 { -1822, 129, -2794 }
arr_1 { VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14 }
arr { 163, 164, 165 }
VAR_35 { 0, 0 }
init_position { -2436, 589, -1860, -1521, 589, -3174, -1488, 689, -2083 }
VAR_46 { -1720, 1635, -852, -1714, 1735, -976, -1689, 1835, -1296, -1558, 1935, -1413, -1290, 2135, -1213, -1260, 2235, -1469, -1303, 2135, -1725, -1642, 2035, -1753, -1734, 1735, -2124, -1696, 1629, -2670, -1761, 1529, -3187, -2031, 1429, -3370, -2612, 1729, -3314, -2732, 1831, -3685, -3007, 1629, -3145, -3586, 1529, -2810, -3259, 1412, -2376, -2715, 1329, -2464, -2885, 1229, -2967, -2106, 1129, -2527 }
ai_script { 13, 20, VAR_46, 0, 7, 8 }
ai_script1 { 13, 20, VAR_46, 0, 7, 8 }
ai_script2 { 13, 20, VAR_46, 0, 7, 8, -3266, 129, -2964, -2773, 129, -2400, -2806, 129, -4109 }
VAR_50 { -2174, 129, -2398, -1809, 129, -3511 }
init_position1 { -1487, 328, -978 }
init_position2 { -1490, 328, -1473 }
init_position3 { -1499, 328, -2094 }
VAR_61 { -3197, 129, -2543, -2452, 129, -3008, -1553, 129, -3017 }
/*
Interpretation of: enemy_gen_script
Generate at 3 positions from: VAR_61
Order of positions: Random
Total waves: 2; 3 enemies generated in each wave.
Trigger wave when there are less than 4 enemies left.
Delay for first enemy: 15; delay between each enemy: 60
Enemies:
grow_sguard
grow_sguard
grow_sguard
Item drops:
potred
potbrown
*/
enemy_gen_script { 0, 1, 3, VAR_61, 8, 2, 4, 0, 9, 1, 1, 2, 33, 33, 33, -1, 5, 1, 15, 60, 6, 1, 7, 1, 4, 10, 34, 38, -1, -1 }
VAR_63 { -1450, 335, -924, -1467, 335, -1515, -1451, 335, -2100 }
/*
Interpretation of: enemy_gen_script1
Generate at 3 positions from: VAR_63
Order of positions: Sequential
Total waves: 2; 3 enemies generated in each wave.
Trigger wave when there are less than 1 enemies left.
Delay for first enemy: 15; delay between each enemy: 60
Enemies:
grow_sarcher
grow_sarcher
grow_sguard
Item drops:
potred
potbrown
*/
enemy_gen_script1 { 0, 1, 3, VAR_63, 8, 1, 4, 0, 9, 1, 1, 2, 35, 35, 33, -1, 5, 1, 15, 60, 6, 1, 7, 1, 1, -1 }
VAR_66 { -3025, 129, -2915 }
VAR_67 { -2235, 129, -3098 }
VAR_68 { -2397, 129, -2763 }
._on_load
call play_bgm("METALON")
call load_sound_set(int 72)
/* play the sound 'BLANK' */
call play_loaded_sound(int 4, int -1, int 72, int 0)
call load_sound_set(int 64)
/* play the sound 'cavelp' */
call play_loaded_sound(int 1, int -1, int 64, int 0)
call load_sound_set(int 65)
/* play the sound 'in2wind1' */
call play_loaded_sound(int 5, int -1, int 65, int 0)
gamevar SMACKER_X = int 236
gamevar SMACKER_Y = int 356
call play_2d_anim("water", int 1, int 1, int 0)
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_7
break
case 5
execute SCRIPT_9
break
case 0
break
}
._infinite_loop
execute SCRIPT_3
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 5
execute SCRIPT_8
break
case 0
break
}
._on_exit
switch(gamevar room_state)
{
case 1
gamevar room_state ++
break
case 2
gamevar room_state ++
break
case 0
break
default
gamevar room_state = int 0
break
}
._SCRIPT_3
if(gamevar script_time > var VAR_69)
{
var VAR_69 = gamevar script_time + int 70 + call randomize_int(int 0, int 110)
/* play the sound 'renddizz' */
call play_loaded_sound(int 8, int 0, int 72, int 0)
}
if(gamevar script_time > var VAR_70)
{
var VAR_70 = gamevar script_time + int 70 + call randomize_int(int 0, int 110)
/* play the sound 'metamb1' */
call play_loaded_sound(int 7, int 0, int 72, int 0)
}
if(gamevar script_time > var VAR_71)
{
var VAR_71 = gamevar script_time + int 100 + call randomize_int(int 0, int 50)
/* play the sound 'wwindlp' */
call play_loaded_sound(int 6, int 0, int 65, int 0)
}
._SCRIPT_4
if(var VAR_40 == int 0)
{
call func_106(var fsarcher1, int 1, int 0, int 1)
call func_50(var fsarcher1, int 659)
call func_106(var fsarcher2, int 1, int 0, int 1)
call func_50(var fsarcher2, int 659)
call func_106(var fsarcher3, int 1, int 0, int 1)
call func_50(var fsarcher3, int 659)
var VAR_40 ++
var VAR_41 = int 0
}
if(var VAR_40 == int 1)
{
if(call func_8a(var &VAR_50))
{
var VAR_60 = call run_enemy_generator(var &enemy_gen_script, int 100)
var VAR_40 ++
var VAR_41 = int 0
}
else
{
if(call get_num_of_enemies() == int 0)
{
var VAR_60 = call run_enemy_generator(var &enemy_gen_script, int 10)
var VAR_40 ++
}
}
}
if(var VAR_40 == int 2)
{
if(call func_122(var VAR_60) == int 0)
{
var VAR_60 = call run_enemy_generator(var &enemy_gen_script1, int 10)
call log_string("wave3")
var VAR_40 ++
var VAR_41 = int 0
}
}
._SCRIPT_5
call load_char("sarcher")
call load_char("sguard")
var bat = call create_enemy(int 47, int 0, var &init_position, int 33)
gamevar script_object = var bat
gamevar *character_stats_p+14 = int 91750
var bat1 = call create_enemy(int 47, int 1, var &init_position, int 33)
gamevar script_object = var bat1
gamevar *character_stats_p+14 = int 91750
var bat2 = call create_enemy(int 47, int 2, var &init_position, int 33)
gamevar script_object = var bat2
gamevar *character_stats_p+14 = int 140750
call func_50(var bat, int 8192)
call play_char_ai_script(var bat, var &ai_script)
call func_50(var bat1, int 8192)
call play_char_ai_script(var bat1, var &ai_script1)
call func_50(var bat2, int 8192)
call play_char_ai_script(var bat2, var &ai_script2)
var fsarcher1 = call create_char(var &init_position1, "fsarcher1", int 220, int 13)
var fsarcher2 = call create_char(var &init_position2, "fsarcher2", int 220, int 13)
var fsarcher3 = call create_char(var &init_position3, "fsarcher3", int 220, int 13)
call add_item_to_char(var fsarcher1, int 47 /* drumstik */ , int 1, int 0)
call add_item_to_char(var fsarcher2, int 46 /* pie */ , int 1, int 0)
call add_item_to_char(var fsarcher3, int 45 /* deadmous */ , int 1, int 0)
call func_50(var fsarcher1, int 1)
call func_50(var fsarcher2, int 1)
call func_50(var fsarcher3, int 1)
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8
var VAR_24 = int 15
execute SCRIPT_11
._SCRIPT_9
var VAR_20 = var &VAR_66
var VAR_21 = var &VAR_67
var VAR_22 = var &VAR_68
var VAR_23 = int 0
execute SCRIPT_10
._SCRIPT_10
var ndavid = call create_char(var VAR_20, "ndavid", call randomize_int(int 0, int 360), int 13)
gamevar script_object = var ndavid
gamevar *object_p+8 |= int 33554432
call add_item_to_char(var ndavid, int 22 /* bastswrd */ , int 0, int 1)
call func_50(var ndavid, int 129)
call func_106(var ndavid, int 7, int 7, int 3)
call set_char_lvl(var ndavid, int 15)
gamevar script_object = var ndavid
gamevar *character_stats_p+15 = int 30000
gamevar script_object = var ndavid
gamevar *character_stats_p+16 = int 30000
var njug = call create_char(var VAR_21, "njug", call randomize_int(int 0, int 360), int 13)
gamevar script_object = var njug
gamevar *object_p+8 |= int 33554432
call add_item_to_char(var njug, int 22 /* bastswrd */ , int 0, int 1)
call func_50(var njug, int 129)
call func_106(var njug, int 7, int 7, int 3)
call set_char_lvl(var njug, int 15)
gamevar script_object = var njug
gamevar *character_stats_p+15 = int 30000
gamevar script_object = var njug
gamevar *character_stats_p+16 = int 30000
var nvivienne = call create_char(var VAR_22, "nvivienne", call randomize_int(int 0, int 360), int 13)
gamevar script_object = var nvivienne
gamevar *object_p+8 |= int 33554432
call add_item_to_char(var nvivienne, int 22 /* bastswrd */ , int 0, int 1)
call func_50(var nvivienne, int 129)
call func_106(var nvivienne, int 7, int 7, int 3)
call set_char_lvl(var nvivienne, int 15)
gamevar script_object = var nvivienne
gamevar *character_stats_p+15 = int 30000
gamevar script_object = var nvivienne
gamevar *character_stats_p+16 = int 30000
var VAR_16 = call randomize_int(int 0, int 6)
call load_char("iwarrior")
switch(var VAR_23)
{
case 0
call func_106(var ndavid, int 7, int 5, int 255)
call func_106(var ndavid, int 7, int 17, int 300)
call func_106(var ndavid, int 7, int 8, int 1)
call func_104(var ndavid, int 7, int 1)
call func_106(var njug, int 7, int 5, int 255)
call func_106(var njug, int 7, int 17, int 300)
call func_106(var njug, int 7, int 8, int 1)
call func_104(var njug, int 7, int 1)
call func_106(var nvivienne, int 7, int 5, int 255)
call func_106(var nvivienne, int 7, int 17, int 300)
call func_106(var nvivienne, int 7, int 8, int 1)
call func_104(var nvivienne, int 7, int 1)
break
case 1
call set_char_init_state(var ndavid, int 6)
call func_106(var ndavid, int 6, int 0, int 18)
call func_106(var ndavid, int 6, int 1, int 3)
call func_106(var ndavid, int 6, int 6, int 600)
call func_106(var ndavid, int 6, int 7, int 75)
call set_char_init_state(var njug, int 6)
call func_106(var njug, int 6, int 0, int 22)
call func_106(var njug, int 6, int 1, int 3)
call func_106(var njug, int 6, int 6, int 700)
call func_106(var njug, int 6, int 7, int 75)
call set_char_init_state(var nvivienne, int 6)
call func_106(var nvivienne, int 6, int 0, int 16)
call func_106(var nvivienne, int 6, int 1, int 3)
call func_106(var nvivienne, int 6, int 6, int 800)
call func_106(var nvivienne, int 6, int 7, int 75)
break
}
._SCRIPT_11
execute SCRIPT_12
switch(var VAR_29)
{
}
var VAR_30 ++
._SCRIPT_12
switch(var VAR_35)
{
case 0
call reset_local_timer()
var VAR_35 ++
break
case 1
if(call is_local_timer_greater_than(int 10))
{
if(call is_char_handle_in_level(int 65536 /* DAVID */ ))
{
gamevar script_object = var ndavid
gamevar HP = int 10000
}
if(call is_char_handle_in_level(int 327680 /* JUG */ ))
{
gamevar script_object = var njug
gamevar HP = int 10000
}
if(call is_char_handle_in_level(int 196608 /* VIVIENNE */ ))
{
gamevar script_object = var nvivienne
gamevar HP = int 10000
}
var VAR_35 = int 0
}
break
}