-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathadesew02.tsct
401 lines (384 loc) · 10.4 KB
/
adesew02.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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
/*
* 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_3 { 1, 0, 0 }
VAR_4 { 1, 0, 0 }
VAR_6 { 0, 0 }
VAR_7 { 0, 0, 0 }
VAR_11 -1
fx_position { 972, 58, -2241 }
VAR_13 { 0, 100, 0 }
VAR_25 { 2319, 2500, -5156 }
walk_position { -78, -825, -1880, 2300, 0, 1, 2300, 0, 0 }
greater_gimpv1 { 0, 0, 0, 0, 0, 0, 0 }
lesser_gimp { 0, 0 }
init_position { -15, -820, -1773 }
init_position1 { -43, -820, -2051, 2943, -20, -3065, 2962, -220, -1666 }
init_position2 { 3314, -370, -4433 }
init_position3 { 3314, -820, -3476 }
init_position4 { 3182, -370, -4212 }
VAR_35 1
/*
Interpretation of: enemy_gen_script
Total waves: 2; 4 enemies generated in each wave.
Trigger wave when there are less than 4 enemies left.
Delay for first enemy: 50; delay between each enemy: 150
Enemies:
rat_raptor_max3
rat_raptor_max3
spider
spider
*/
enemy_gen_script { 0, 0, 0, 1, 0, -1, 8, 1, 1, 2, 86, 86, 70, 70, -1, 4, 0, 9, 1, 5, 1, 50, 150, 7, 1, 4, -1 }
/*
Interpretation of: enemy_gen_script1
Enter from door: 1
Total waves: 2; 3 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 50; delay between each enemy: 150
Enemies:
greater_gimpv
lesser_gimp
greater_gimpv
Item drops:
cheese
deadmous
*/
enemy_gen_script1 { 0, 0, 0, 1, -1, 8, 1, 1, 2, 46, 45, 46, -1, 4, 0, 9, 1, 5, 1, 50, 150, 7, 1, 2, 10, 43, 45, -1, -1 }
VAR_49 { -4, -1350, -516 }
._on_load
call play_bgm("SEWERPT1")
var valve = call create_item(int 98)
if(var valve != int 0)
{
var VAR_21 = int 1
}
call load_sound_set(int 35)
call load_sound_set(int 30)
call load_sound_set(int 38)
var torches2_sound_ref = call play_loaded_sound(int 1, int -1, int 30, int 0)
gamevar SMACKER_X = int 544
gamevar SMACKER_Y = int 96
var VAR_1 = call play_2d_anim("water01", int 0, int 1, var &VAR_5)
gamevar SMACKER_X = int 544
gamevar SMACKER_Y = int 96
var VAR_2 = call play_2d_anim("watloop", int -1073741, int 1, var &VAR_7)
gamevar SMACKER_X = int 320
gamevar SMACKER_Y = int 408
call play_2d_anim("torch01", int 1, int 1, var &VAR_3)
gamevar SMACKER_X = int 592
gamevar SMACKER_Y = int 456
call play_2d_anim("torch02", int 1, int 1, var &VAR_4)
var no_anim = call load_anim("no")
switch(gamevar room_state)
{
case 1
call load_char("spider")
call load_char("ratrptr")
gamevar use_mouse_override_sprite = int 428
var VAR_0 = int 0
var VAR_17 = int 2
if(var VAR_21)
{
var conjure_anim = call load_anim("conjure")
var VAR_16 = int 300
var VAR_15 = int 1
}
else
{
var VAR_15 = int 0
}
execute SCRIPT_4
break
case 2
gamevar use_mouse_override_sprite = int 428
var VAR_0 = int 0
var VAR_17 = int 2
if(var VAR_21)
{
var conjure_anim = call load_anim("conjure")
var VAR_15 = int 2
}
else
{
var VAR_15 = int 0
}
break
case 4
execute SCRIPT_6
}
._infinite_loop
execute SCRIPT_3
execute SCRIPT_8
execute SCRIPT_9
switch(gamevar room_state)
{
case 1
if(var ! VAR_35)
{
execute SCRIPT_5
}
break
}
._on_exit
switch(gamevar room_state)
{
}
._SCRIPT_3
if(var VAR_17)
{
var VAR_17 --
exit_script
}
switch(var VAR_15)
{
case 0
if(var VAR_16)
{
var VAR_16 --
}
if(gamevar global_zone_type == int 18)
{
gamevar global_zone_type = int 0
if(var ! VAR_0&&var VAR_35)
{
if(var ! VAR_16)
{
/* play the sound 'Hornblow' */
call play_loaded_sound(int 102, int 0, int 0, int 0)
call play_char_anim(call get_selected_hero(), var no_anim, int 0)
var VAR_16 = int 60
}
}
}
break
case 1
if(var VAR_35)
{
var VAR_15 = int 2
}
if(gamevar global_zone_type == int 18)
{
gamevar global_zone_type = int 0
}
break
case 2
if(gamevar global_zone_type == int 18)
{
gamevar global_zone_type = int 0
var selected_hero1 = call get_selected_hero()
call set_input_system(int 2)
call func_55(var selected_hero1, int 98)
call set_char_running(var selected_hero1)
call char_walk_to_pos(var selected_hero1, var &walk_position)
var VAR_15 = int 3
}
break
case 3
if(call is_char_standing(var selected_hero1))
{
call func_36(var selected_hero1, int 3157, int -820, int -2099)
var VAR_16 = int 30
var VAR_15 = int 4
}
break
case 4
if(var VAR_16)
{
var VAR_16 --
}
else
{
call set_input_sys_2_if_pos_occupied(var &VAR_25, int 100000)
var VAR_15 = int 5
var VAR_16 = int 100
}
break
case 5
if(var VAR_16 == int 50)
{
call play_char_anim(var selected_hero1, var conjure_anim, int 0)
call func_c2(var selected_hero1, int 45056)
}
if(var VAR_16)
{
var VAR_16 --
}
else
{
call func_132(var selected_hero1, int 98)
var dwavesLp_sound_ref = call play_loaded_sound(int 1, int -1, int 35, int 0)
var steam_sound_ref = call play_loaded_sound /* 'steam' */ (int 2, int -1, int 35, int 0)
call set_sound_volume(var steam_sound_ref, int 0)
var VAR_11 = int 0
var VAR_5 = int 1
gamevar script_object = var VAR_1
gamevar *smack_object_p+2 &= int -1073741
var VAR_0 = int 1
var VAR_15 = int 6
}
break
case 6
if(var VAR_6 == int 149)
{
call stop_playing_sound(var dwavesLp_sound_ref)
call stop_playing_sound(var torches2_sound_ref)
/* play the sound 'gateopen' */
call play_loaded_sound(int 3, int 0, int 35, int 0)
call play_3d_fx("SJET", var &fx_position, var &VAR_13, int 60)
var VAR_5 = int 0
gamevar script_object = var VAR_1
gamevar *smack_object_p+2 |= int 10737418
var VAR_7 = int 1
gamevar script_object = var VAR_2
gamevar *smack_object_p+2 &= int -1073741
call force_scroll_to_pos(var &walk_position)
var VAR_15 = int 7
call remove_item_from_pie(var valve)
}
break
case 7
if(call is_not_force_scrolling())
{
call func_116("rain", "wizard", int 4)
call func_116("rain", "cld_rd_3", int 6)
call func_118("rain", "wizard", int 1)
call func_118("rain", "cld_rd_3", int 1)
var VAR_15 = int 8
var VAR_50 = int 0
}
break
case 8
if(var VAR_50 > int 250)
{
call func_e6("palace", "s_throne", var &VAR_49, int 2)
var VAR_15 = int 9
}
break
case 9
break
}
var VAR_50 ++
._SCRIPT_4
var VAR_35 = int 0
var greater_gimpv = call create_enemy(int 46, int 0, var &init_position, int 95)
var greater_gimpv1 = call create_enemy(int 46, int 1, var &init_position1, int 30)
gamevar script_object = var greater_gimpv
gamevar *character_stats_p+15 = int 10000
gamevar script_object = var greater_gimpv1
gamevar *character_stats_p+15 = int 10000
call func_106(var greater_gimpv, int 0, int 3, int 360)
call func_106(var greater_gimpv1, int 0, int 3, int 360)
call func_106(var greater_gimpv, int 1, int 0, int 1)
call func_106(var greater_gimpv1, int 1, int 0, int 1)
call set_char_init_state(var greater_gimpv, int 1)
call set_char_init_state(var greater_gimpv1, int 1)
call add_item_to_char(var greater_gimpv, int 43 /* cheese */ , int 1, int 0)
call add_item_to_char(var greater_gimpv1, int 45 /* deadmous */ , int 1, int 0)
var VAR_36 = call run_enemy_generator(var &enemy_gen_script, int 400)
._SCRIPT_5
if(var ! VAR_35&&call get_num_of_enemies() == int 0&&call ! func_122(var VAR_36))
{
var VAR_35 = int 1
}
._SCRIPT_6
call load_char("skaven")
call load_char("skavenb")
var greater_gimpv = call create_enemy(int 46, int 0, var &init_position2, int 45)
var greater_gimpv1 = call create_enemy(int 46, int 1, var &init_position3, int 80)
var lesser_gimp = call create_enemy(int 45, int 0, var &init_position4, int 60)
var confused_anim = call load_anim("confused")
var VAR_18 = int 0
var VAR_19 = int 0
._SCRIPT_7
switch(var VAR_18)
{
case 0
if(var VAR_19)
{
var VAR_19 --
}
else
{
switch(call randomize_int(int 0, int 3))
{
case 0
if(call is_char_handle_in_level(int 10551296))
{
call play_char_anim(var greater_gimpv, var confused_anim, int 0)
break
}
case 1
if(call is_char_handle_in_level(int 10551297))
{
call play_char_anim(var greater_gimpv1, var confused_anim, int 0)
break
}
case 2
if(call is_char_handle_in_level(int 10485760))
{
call play_char_anim(var lesser_gimp, var confused_anim, int 0)
}
break
}
var VAR_19 = call randomize_int(int 250, int 401)
}
if(call ! is_char_handle_in_level(int 10551296)||call ! is_char_handle_in_level(int 10551297)||call ! is_char_handle_in_level(int 10485760))
{
var VAR_18 ++
}
else
{
if(call func_d0()||call func_88(var greater_gimpv)||call func_88(var greater_gimpv1)||call func_88(var lesser_gimp))
{
var VAR_18 ++
}
}
break
case 1
if(call is_char_handle_in_level(int 10551296))
{
call func_17(var greater_gimpv, call get_selected_hero())
}
if(call is_char_handle_in_level(int 10551297))
{
call func_17(var greater_gimpv1, call get_selected_hero())
}
if(call is_char_handle_in_level(int 10485760))
{
call func_17(var lesser_gimp, call get_selected_hero())
}
call run_enemy_generator(var &enemy_gen_script1, int 500)
var VAR_18 ++
break
default
break
}
._SCRIPT_8
if(var VAR_11 == int -1)
{
exit_script
}
if(var steam_sound_ref != int 0&&var VAR_11 < int 100)
{
var VAR_11 ++
call set_sound_volume(var steam_sound_ref, var VAR_11)
}
._SCRIPT_9
if(var VAR_0)
{
exit_script
}
if(gamevar script_time > var VAR_65)
{
var VAR_65 = gamevar script_time + int 50 + call randomize_int(int 0, int 70)
/* play the sound 'echdrip1' */
call play_loaded_sound(int 1, int 0, int 38, int 0)
}