-
Notifications
You must be signed in to change notification settings - Fork 3
/
aftastep.tsct
471 lines (455 loc) · 11.7 KB
/
aftastep.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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
/*
* 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_17 { 0, 0 }
fx_position { -1880, 1514, 7240 }
VAR_21 { 257, 1514, 725 }
init_position { 363, 0, -1250 }
init_position1 { 786, 0, -1171 }
init_position2 { 519, 0, -915 }
init_position6 { 857, 0, -4629 }
init_position7 { 188, 0, -4615 }
init_position3 { 577, 0, -1257 }
init_position4 { -230, 0, -913 }
init_position5 { 1196, 0, -994 }
init_position8 { 529, 0, -4547, 0, 0, 0, 0, 0 }
ai_script { 5, 200, 28, VAR_44, 1, 0, 5, 5, 28, VAR_45, 1, 0, 7, 8 }
VAR_44 "confused"
VAR_45 "gstqustn"
ai_script1 { 28, VAR_47, 1, 0, 5, 5, 28, VAR_48, 1, 0, 5, 5, 28, VAR_49, 1, 0, 5, 200, 28, VAR_50, 1, 0, 7, 8 }
VAR_47 "talkfstb"
VAR_48 "gstqustn"
VAR_49 "talkfstb"
VAR_50 "no"
VAR_53 { -263, 0, -1988, 1267, 0, -2299 }
wandering_gen_script1 { 0, 0, 1, -1, 8, 0, 12, 28, 30, 31, 30, 31, -1, 13, 1, 14, 0, 2, 3, 5, 0, 80, 18, 25, -1 }
wandering_gen_script { 0, 0, 1, -1, 8, 0, 12, 11, 12, 13, 11, 12, -1, 13, 1, 14, 0, 2, 3, 5, 0, 80, 18, 25, -1 }
._on_load
execute SCRIPT_3
call play_bgm("RAINPT1")
if(gamevar is_room_cleared)
{
execute SCRIPT_8
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_7
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_10
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
gamevar room_state ++
break
case 2
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
call log_string("it's_raining")
call play_3d_fx("RAIN", var &fx_position, var &VAR_21, int 5)
execute SCRIPT_9
._SCRIPT_4
switch(var VAR_51)
{
case 0
if(var VAR_52 > int 40)
{
if(call is_char_handle_in_level(int 7143428))
{
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
call char_attack(var lieutenant4, var nrebel)
}
}
if(call is_char_handle_in_level(int 7143427))
{
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
call char_attack(var lieutenant3, var nrebel)
call char_attack(var nrebel, var lieutenant3)
}
}
else
{
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
if(call is_char_handle_in_level(int 7143428))
{
call char_attack(var nrebel, var lieutenant4)
}
}
}
var VAR_51 ++
}
break
case 1
if(call func_d1(var &VAR_53))
{
var VAR_51 ++
}
else
{
if(call func_8a(var &VAR_53))
{
var VAR_51 ++
}
}
break
case 2
call func_2b(var nflatnose, int 0)
if(call is_char_handle_in_level(int 7143424))
{
call func_50(var lieutenant, int 131)
call func_106(var lieutenant, int 1, int 0, int 1)
}
if(call is_char_handle_in_level(int 7143425))
{
call func_50(var lieutenant1, int 131)
call func_106(var lieutenant1, int 1, int 0, int 1)
}
if(call is_char_handle_in_level(int 7143426))
{
call func_50(var lieutenant2, int 131)
call func_106(var lieutenant2, int 1, int 0, int 1)
}
if(call is_char_handle_in_level(int 6750208))
{
call func_50(var archer, int 513)
}
if(call is_char_handle_in_level(int 6750209))
{
call func_50(var archer1, int 513)
}
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
if(call is_char_handle_in_level(int 7143424))
{
call char_attack(var nrebel, var lieutenant)
}
else
{
if(call is_char_handle_in_level(int 7143425))
{
call char_attack(var nrebel, var lieutenant1)
}
else
{
if(call is_char_handle_in_level(int 7143426))
{
call char_attack(var nrebel, var lieutenant2)
}
}
}
}
var VAR_51 ++
break
case 3
if(call is_char_standing(var nflatnose))
{
call remove_char(var nflatnose)
var VAR_51 ++
}
break
case 4
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
if(call ! is_char_handle_in_level(int 7143424))
{
if(call ! is_char_handle_in_level(int 7143425))
{
if(call ! is_char_handle_in_level(int 7143426))
{
call func_2b(var nrebel, int 0)
var VAR_51 ++
}
}
}
}
break
case 5
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
if(call is_char_standing(var nrebel))
{
call remove_char(var nrebel)
var VAR_51 ++
}
}
break
}
if(call is_char_handle_in_level(int 1114112 /* REBEL */ ))
{
gamevar script_object = var nrebel
if(gamevar *object_p+5 == int 6)
{
if(call is_char_handle_in_level(int 7143427))
{
gamevar script_object = var lieutenant3
gamevar *character_stats_p+15 = int 3000
call func_106(var lieutenant3, int 1, int 0, int 1)
call func_50(var lieutenant3, int 131)
}
if(call is_char_handle_in_level(int 7143428))
{
gamevar script_object = var lieutenant4
gamevar *character_stats_p+15 = int 3000
call func_106(var lieutenant4, int 1, int 0, int 1)
call func_50(var lieutenant4, int 131)
}
call kill_char(var nrebel)
}
}
var VAR_52 ++
._SCRIPT_5
var lieutenant = call create_enemy(int 11, int 0, var &init_position, int 83)
call freeze_enemy(var lieutenant)
var lieutenant1 = call create_enemy(int 11, int 1, var &init_position1, int 248)
call freeze_enemy(var lieutenant1)
call add_item_to_char(var lieutenant1, int 41 /* veggies */ , int 1, int 0)
var lieutenant2 = call create_enemy(int 11, int 2, var &init_position2, int 158)
call freeze_enemy(var lieutenant2)
var nflatnose = call create_char(var &init_position3, "nflatnose", int 276, int 13)
call set_char_running(var nflatnose)
gamevar script_object = var nflatnose
gamevar *character_movement_p+60 = int 1
var archer = call create_enemy(int 17, int 0, var &init_position4, int 113)
call freeze_enemy(var archer)
var archer1 = call create_enemy(int 17, int 1, var &init_position5, int 218)
call freeze_enemy(var archer1)
var lieutenant3 = call create_enemy(int 11, int 3, var &init_position6, int 283)
call func_106(var lieutenant3, int 1, int 0, int 1)
call freeze_enemy(var lieutenant3)
call add_item_to_char(var lieutenant3, int 43 /* cheese */ , int 1, int 0)
var lieutenant4 = call create_enemy(int 11, int 4, var &init_position7, int 91)
call func_106(var lieutenant4, int 1, int 0, int 1)
call freeze_enemy(var lieutenant4)
call add_item_to_char(var lieutenant4, int 42 /* bread */ , int 1, int 0)
var nrebel = call create_char(var &init_position8, "nrebel", int 283, int 13)
call add_item_to_char(var nrebel, int 17 /* daveswrd */ , int 0, int 1)
gamevar script_object = var nrebel
gamevar HP = int 8
gamevar ARMOUR_CLASS = int 1
gamevar STRENGTH = int 1
gamevar DEXTERITY = int 1
call play_char_ai_script(var nflatnose, var &ai_script)
call func_50(var nflatnose, int 8192)
call play_char_ai_script(var lieutenant, var &ai_script1)
call func_50(var lieutenant, int 8192)
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8
switch(gamevar is_room_cleared)
{
case 1
call load_char("rlieuten")
call run_wandering_generator(var &wandering_gen_script, int 100)
break
case 2
call load_char("muscles")
call load_char("dick")
call load_char("finnegan")
call load_char("longjohn")
call load_item(int 91 /* rapier */ )
call load_item(int 93 /* cutlass */ )
call run_wandering_generator(var &wandering_gen_script1, int 100)
break
}
._SCRIPT_9
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_1 = int 70
call set_sound_volume(var thunrumb_sound_ref, var VAR_1)
var VAR_0 = int 1
._SCRIPT_10
if(var ! VAR_0)
{
call log_string("random_rain_fx: Rain SFX not initialised! See Marc")
exit_script
}
switch(var VAR_4)
{
case 0
if(var VAR_3)
{
var VAR_6 = int 1
var VAR_4 ++
var VAR_5 = int 0
}
break
case 1
if(var VAR_1 < int 200)
{
var VAR_7 = var VAR_5 % int 2
if(var VAR_7 == int 0)
{
var VAR_1 += var VAR_6
call set_sound_volume(var thunrumb_sound_ref, var VAR_1)
}
}
else
{
var VAR_4 ++
var VAR_5 = int 0
}
break
case 2
if(var VAR_5 > int 150)
{
var VAR_4 ++
var VAR_5 = int 0
}
break
case 3
if(var VAR_1 > int 70)
{
var VAR_7 = var VAR_5 % int 2
if(var VAR_7)
{
var VAR_1 -= var VAR_6
call set_sound_volume(var thunrumb_sound_ref, var VAR_1)
}
}
else
{
var VAR_3 = int 0
var VAR_4 = int 0
var VAR_5 = int 0
}
break
}
execute SCRIPT_11
execute SCRIPT_12
var VAR_5 ++
._SCRIPT_11
switch(var VAR_9)
{
case 0
var VAR_10 = int 0
var VAR_11 = call randomize_int(int 1200, int 1801)
var VAR_9 ++
break
case 1
if(var VAR_10 > var VAR_11)
{
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_3)
{
var VAR_3 = int 1
}
var VAR_9 ++
var VAR_10 = int 0
}
break
case 2
if(var VAR_10 > int 200)
{
var VAR_9 = int 0
var VAR_10 = int 0
}
break
}
var VAR_10 ++
._SCRIPT_12
switch(var VAR_13)
{
case 0
if(gamevar scene_counter > int 600)
{
var VAR_13 ++
}
break
case 1
var VAR_14 = int 0
call reset_local_timer()
var VAR_16 = call randomize_int(int 400, int 601)
var VAR_13 ++
break
case 2
if(call is_local_timer_greater_than(var VAR_16))
{
call apply_effect_on_char(gamevar misc_fx_scripts, int 6, int 0, int 0)
call reset_local_timer()
var VAR_17 = int 255
var VAR_16 = call randomize_int(int 1, int 31)
var VAR_14 = int 0
var VAR_13 ++
}
break
case 3
if(call is_local_timer_greater_than(var VAR_16))
{
var VAR_17 -= int 4 * var VAR_16
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_17)
var VAR_16 = int 255 - var VAR_17
var VAR_14 = int 0
var VAR_13 ++
}
break
case 4
if(var VAR_14 > var VAR_16)
{
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_17)
if(var ! VAR_3)
{
var VAR_3 = int 1
}
var VAR_13 ++
var VAR_14 = int 0
}
break
case 5
if(var VAR_14 > int 100)
{
var VAR_13 = int 1
var VAR_14 = int 0
}
break
}
var VAR_14 ++