-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscene29.tsct
354 lines (337 loc) · 7.72 KB
/
scene29.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
/*
* 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
finnegan 0
dick 0
init_position { 2737, 123, 4056 }
init_position2 { 2787, 123, 3780 }
init_position1 { 2580, 123, 3821 }
ai_script { 9, 2, finnegan, 3, dick, 3, dick, 3, dick, 8 }
ai_script2 { 7, 8 }
ai_script1 { 7, 8 }
VAR_26 { 0, 0 }
fx_position { -3830, 2300, -2210 }
VAR_29 { -2165, 2300, -3895 }
VAR_34 -1
._on_load
execute SCRIPT_9
call load_item(int 93 /* cutlass */ )
call load_item(int 91 /* rapier */ )
switch(gamevar room_state)
{
case 1
execute SCRIPT_3
break
case 2
execute SCRIPT_6
break
default
break
}
._infinite_loop
execute SCRIPT_11
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_7
break
default
break
}
._on_exit
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
gamevar room_state = int 2
break
case 2
execute SCRIPT_8
gamevar room_state = int 0
break
default
break
}
._SCRIPT_3
var muscles = call create_enemy(int 30, int 0, var &init_position, int 175)
var dick = call create_enemy(int 31, int 0, var &init_position1, int 15)
var finnegan = call create_enemy(int 32, int 0, var &init_position2, int 300)
call add_item_to_char(var finnegan, int 42 /* bread */ , int 1, int 0)
call play_char_ai_script(var muscles, var &ai_script)
call play_char_ai_script(var dick, var &ai_script1)
call play_char_ai_script(var finnegan, var &ai_script2)
call func_50(var muscles, int 8192)
call func_50(var dick, int 8192)
call func_50(var finnegan, int 8192)
call func_104(var dick, int 7, int 3)
._SCRIPT_4
if(var VAR_34 != var VAR_31)
{
var VAR_34 = var VAR_31
call log_var(var VAR_31)
}
switch(var VAR_31)
{
case 0
var VAR_33 = int 0
if(call is_char_handle_in_level(int 2490368 /* MUSCLES */ ))
{
if(call func_88(var muscles))
{
var VAR_32 = int 1
}
}
else
{
var VAR_33 ++
}
if(call is_char_handle_in_level(int 6422528))
{
if(call func_88(var dick))
{
var VAR_32 = int 1
}
}
else
{
var VAR_33 ++
}
if(call is_char_handle_in_level(int 5767168))
{
if(call func_88(var finnegan))
{
var VAR_32 = int 1
}
}
else
{
var VAR_33 ++
}
if(var VAR_32)
{
if(call is_char_handle_in_level(int 2490368 /* MUSCLES */ ))
{
call func_46(var muscles, int 13)
}
if(call is_char_handle_in_level(int 6422528))
{
call func_46(var dick, int 13)
}
if(call is_char_handle_in_level(int 5767168))
{
call func_46(var finnegan, int 13)
}
var VAR_31 ++
}
else
{
if(var VAR_33)
{
var VAR_31 ++
}
}
break
case 1
if(call get_num_of_enemies() <= int 1)
{
if(call ! is_char_handle_in_level(int 2490368 /* MUSCLES */ ))
{
var muscles = call create_enemy_through_door(int 30, int 0, int 1, int 0)
call set_char_running(var muscles)
call func_19(var muscles, call get_selected_hero())
}
if(call ! is_char_handle_in_level(int 6422528))
{
var dick = call create_enemy_through_door(int 31, int 0, int 1, int 0)
call set_char_running(var dick)
call func_19(var dick, call get_selected_hero())
call add_item_to_char(var dick, int 40 /* apple */ , int 1, int 0)
}
if(call ! is_char_handle_in_level(int 5767168))
{
var finnegan = call create_enemy_through_door(int 32, int 0, int 1, int 0)
call set_char_running(var finnegan)
call func_19(var finnegan, call get_selected_hero())
}
var VAR_31 ++
}
break
case 2
break
}
._SCRIPT_5
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8
._SCRIPT_9
call log_string("it's_raining")
call play_3d_fx("RAIN", var &fx_position, var &VAR_29, int 0)
execute SCRIPT_10
._SCRIPT_10
call load_sound_set(int 25)
/* play the sound 'blank' */
call play_loaded_sound(int 1, int -1, int 25, int 0)
var thunrumb_sound_ref = call play_loaded_sound(int 3, int -1, int 25, int 0)
var VAR_10 = int 70
call set_sound_volume(var thunrumb_sound_ref, var VAR_10)
var VAR_9 = int 1
._SCRIPT_11
if(var ! VAR_9)
{
call log_string("random_rain_fx: Rain SFX not initialised! See Marc")
exit_script
}
switch(var VAR_13)
{
case 0
if(var VAR_12)
{
var VAR_15 = int 1
var VAR_13 ++
var VAR_14 = int 0
}
break
case 1
if(var VAR_10 < int 200)
{
var VAR_16 = var VAR_14 % int 2
if(var VAR_16 == int 0)
{
var VAR_10 += var VAR_15
call set_sound_volume(var thunrumb_sound_ref, var VAR_10)
}
}
else
{
var VAR_13 ++
var VAR_14 = int 0
}
break
case 2
if(var VAR_14 > int 150)
{
var VAR_13 ++
var VAR_14 = int 0
}
break
case 3
if(var VAR_10 > int 70)
{
var VAR_16 = var VAR_14 % int 2
if(var VAR_16)
{
var VAR_10 -= var VAR_15
call set_sound_volume(var thunrumb_sound_ref, var VAR_10)
}
}
else
{
var VAR_12 = int 0
var VAR_13 = int 0
var VAR_14 = int 0
}
break
}
execute SCRIPT_12
execute SCRIPT_13
var VAR_14 ++
._SCRIPT_12
switch(var VAR_18)
{
case 0
var VAR_19 = int 0
var VAR_20 = call randomize_int(int 1200, int 1801)
var VAR_18 ++
break
case 1
if(var VAR_19 > var VAR_20)
{
var thunstrk_sound_ref = call play_loaded_sound(int 4, int 0, int 25, int 0)
call set_sound_volume(var thunstrk_sound_ref, call randomize_int(int 100, int 201))
call func_11a(var thunstrk_sound_ref, call randomize_int(int 0, int 128))
if(var ! VAR_12)
{
var VAR_12 = int 1
}
var VAR_18 ++
var VAR_19 = int 0
}
break
case 2
if(var VAR_19 > int 200)
{
var VAR_18 = int 0
var VAR_19 = int 0
}
break
}
var VAR_19 ++
._SCRIPT_13
switch(var VAR_22)
{
case 0
if(gamevar scene_counter > int 600)
{
var VAR_22 ++
}
break
case 1
var VAR_23 = int 0
call reset_local_timer()
var VAR_25 = call randomize_int(int 400, int 601)
var VAR_22 ++
break
case 2
if(call is_local_timer_greater_than(var VAR_25))
{
call apply_effect_on_char(gamevar misc_fx_scripts, int 6, int 0, int 0)
call reset_local_timer()
var VAR_26 = int 255
var VAR_25 = call randomize_int(int 1, int 31)
var VAR_23 = int 0
var VAR_22 ++
}
break
case 3
if(call is_local_timer_greater_than(var VAR_25))
{
var VAR_26 -= int 4 * var VAR_25
var verwind_sound_ref = call play_loaded_sound(int 5, int 0, int 25, int 0)
call set_sound_volume(var verwind_sound_ref, var VAR_26)
var VAR_25 = int 255 - var VAR_26
var VAR_23 = int 0
var VAR_22 ++
}
break
case 4
if(var VAR_23 > var VAR_25)
{
var verwind_sound_ref = call play_loaded_sound /* 'thunstrk' */ (int 4, int 0, int 25, int 0)
call set_sound_volume(var verwind_sound_ref, var VAR_26)
if(var ! VAR_12)
{
var VAR_12 = int 1
}
var VAR_22 ++
var VAR_23 = int 0
}
break
case 5
if(var VAR_23 > int 100)
{
var VAR_22 = int 1
var VAR_23 = int 0
}
break
}
var VAR_23 ++