-
Notifications
You must be signed in to change notification settings - Fork 3
/
wozroom.tsct
485 lines (462 loc) · 10.7 KB
/
wozroom.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
472
473
474
475
476
477
478
479
480
481
482
483
484
485
/*
* 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
scroll_position { 136, 2145, 293 }
VAR_17 { 0, 0 }
VAR_18 { 0, 0, 0 }
init_position { 759, -225, 2010 }
VAR_26 0
VAR_27 0
ai_script1 { 15, 4, VAR_26, 37, VAR_27, 0, 697, -225, 2247, 16, VAR_26, 0, 35, 8 }
VAR_34 { 77, 2264, 189 }
scroll_position1 { 179, 5, -67 }
VAR_36 { -2, 0, -2 }
ai_script { 3, VAR_38, 0, 8 }
VAR_38 "rchop"
VAR_55 { -655, 5, 979 }
VAR_56 { 506, 0, 1414, 751, 5, 965, 17, 5, 1064, 816, 5, 172, 284, 5, 444, -268, 5, 835, -684, 5, 975, -1074, 5, 397, -1009, 5, -247, -300, 5, -562, -85, 5, -726, 403, 5, -514, -201, 5, 305 }
/*
Interpretation of: enemy_gen_script
Generate at 13 positions from: VAR_56
Order of positions: Random
Total waves: 5; 2 enemies generated in each wave.
Trigger wave when there are less than 5 enemies left.
Delay for first enemy: 30; delay between each enemy: 50
Enemies:
grow_devious_little_lizman
grow_devious_little_lizman
Item drops:
apple
apple
apple
*/
enemy_gen_script { 0, 1, 13, VAR_56, 8, 2, 4, 0, 9, 0, 1, 5, 194, 194, -1, 2, 2, 3, 2, 5, 1, 30, 50, 7, 1, 5, 6, 1, 10, 40, 40, 40, -1, -1 }
VAR_62 { 123, 1430, -455, 474, 1505, 182, 462, 1505, 958, -362, 855, 1856, 278, 1255, 1566 }
VAR_64 -1
._on_load
call play_bgm("CHAINS")
execute SCRIPT_10
execute SCRIPT_12
execute SCRIPT_14
if(gamevar is_room_cleared)
{
call func_4e(int 0)
call func_108("DOGSEYES")
execute SCRIPT_9
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_16
execute SCRIPT_4
break
case 2
execute SCRIPT_16
execute SCRIPT_6
break
case 3
call func_4e(int 0)
execute SCRIPT_8
break
case 0
call func_4e(int 0)
break
}
}
._infinite_loop
execute SCRIPT_11
execute SCRIPT_13
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_3
break
case 2
execute SCRIPT_5
break
case 3
execute SCRIPT_7
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
if(var VAR_2)
{
gamevar room_state = int 3
gamevar is_room_cleared = int 1
}
else
{
gamevar room_state ++
}
if(var VAR_3)
{
if(gamevar *scene_info_p+5 & int 4)
{
call log_string("Bridge triggered")
gamevar *scene_info_p+5 &= int -5
gamevar *scene_info_p+6 &= int -5
}
}
break
case 2
if(var VAR_2)
{
gamevar room_state ++
gamevar is_room_cleared = int 1
}
if(var VAR_3)
{
if(gamevar *scene_info_p+5 & int 4)
{
call log_string("Bridge triggered")
gamevar *scene_info_p+5 &= int -5
gamevar *scene_info_p+6 &= int -5
}
}
break
case 3
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
switch(var VAR_30)
{
case 0
if(call is_char_standing(gamevar control_char_p))
{
var VAR_30 ++
var VAR_31 = int 0
}
break
case 1
if(var VAR_31 > int 130)
{
call force_scroll_to_pos(var &scroll_position)
var VAR_30 ++
var VAR_31 = int 0
}
break
case 2
if(call is_not_force_scrolling())
{
var VAR_32 = gamevar control_char_p
var VAR_33 = call get_char_handle_id(var VAR_32)
switch(var VAR_33)
{
case 65536
call start_dialog("DVDGUN", "NULL")
break
case 786432
call start_dialog("SEKGUN", "NULL")
break
case 327680
call start_dialog("JUGGUN", "NULL")
break
case 196608
call start_dialog("VIVGUN", "NULL")
break
case 131072
call start_dialog("CHIGUN", "NULL")
break
case 262144
call start_dialog("CAGGUN", "NULL")
break
}
call char_turn_to_pos(var VAR_32, call get_char_pos(var njeremiah))
call char_turn_to_pos(var njeremiah, call get_char_pos(var VAR_32))
var VAR_30 ++
var VAR_31 = int 0
}
break
case 3
if(call get_input_sys() != int 4)
{
call func_50(var njeremiah, int 8192)
call play_char_ai_script(var njeremiah, var &ai_script)
call func_108("DOGSEYES")
var VAR_30 ++
var VAR_31 = int 0
}
break
case 4
if(call func_5c(var njeremiah))
{
var VAR_27 = call put_item_in_position(var &VAR_34, int 56, int 0, int 0)
call func_9c(var VAR_27, var &VAR_36)
call force_scroll_to_pos(var &scroll_position1)
var VAR_30 ++
var VAR_31 = int 0
}
break
case 5
if(call is_not_force_scrolling())
{
var VAR_26 = int 1
var VAR_30 ++
var VAR_31 = int 0
}
break
case 6
if(var ! VAR_26)
{
call force_scroll_to_pos(var &scroll_position)
var VAR_30 ++
var VAR_31 = int 0
}
break
case 7
if(call is_not_force_scrolling())
{
call set_input_system(int 1)
var VAR_12 = int 0
var VAR_30 ++
var VAR_31 = int 0
}
break
case 8
execute SCRIPT_15
break
}
var VAR_31 ++
._SCRIPT_4
var nlizbosss = call create_char(var &init_position, "nlizbosss", int 170, int 13)
call func_50(var nlizbosss, int 8192)
call play_char_ai_script(var nlizbosss, var &ai_script1)
call set_input_system(int 2)
var VAR_12 = int 1
._SCRIPT_5
switch(var VAR_67)
{
case 0
if(var VAR_68 == int 10)
{
call func_108("DOGSEYES")
var VAR_67 ++
var VAR_68 = int 0
}
break
case 1
execute SCRIPT_15
break
}
var VAR_68 ++
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8
call func_4e(int 0)
._SCRIPT_9
._SCRIPT_10
call load_sound_set(int 29)
call load_sound_set(int 51)
._SCRIPT_11
switch(var VAR_6)
{
case 0
var VAR_8 = call randomize_int(int 700, int 901)
var VAR_6 ++
var VAR_7 = int 0
break
case 1
if(var VAR_7 > var VAR_8)
{
/* play the sound 'torches2' */
call play_loaded_sound(int 2, int 0, int 29, int 0)
var VAR_6 = int 0
var VAR_7 = int 0
}
break
}
var VAR_7 ++
._SCRIPT_12
var njeremiah = call create_char(var &scroll_position, "njeremiah", int 245, int 13)
gamevar script_object = var njeremiah
gamevar *object_p+6 |= int 8388608
._SCRIPT_13
if(var VAR_12)
{
exit_script
}
switch(var VAR_13)
{
case 0
var VAR_15 = call randomize_int(int 200, int 301)
var VAR_13 ++
var VAR_14 = int 0
break
case 1
if(var VAR_14 > var VAR_15)
{
if(gamevar control_char_p)
{
call char_turn_to_pos(var njeremiah, call get_char_pos(gamevar control_char_p))
}
var VAR_13 = int 0
var VAR_14 = int 0
}
break
}
var VAR_14 ++
._SCRIPT_14
if(gamevar *scene_info_p+5 & int 4)
{
gamevar SMACKER_X = int 256
gamevar SMACKER_Y = int 304
call play_2d_anim("wozroom", int 0, int 1, var &VAR_16)
gamevar SMACKER_X = int 8
gamevar SMACKER_Y = int 552
call play_2d_anim("lever", int 0, int 1, var &VAR_18)
}
else
{
call func_4e(int 0)
}
._SCRIPT_15
if(var VAR_64 != var VAR_52)
{
var VAR_64 = var VAR_52
call log_var(var VAR_52)
}
switch(var VAR_52)
{
case 0
if(gamevar *scene_info_p+5 & int 4)
{
if(gamevar global_collision_type == int 18)
{
gamevar global_collision_type = int 0
var VAR_18 = int 1
/* play the sound 'DrawBr2' */
call play_loaded_sound(int 1, int 0, int 51, "")
var VAR_3 = int 1
var VAR_53 = int 0
var VAR_52 ++
}
}
else
{
var VAR_53 = int 0
var VAR_52 = int 3
}
break
case 1
if(var VAR_18 == int -1)
{
var VAR_16 = int 1
var DoorCls3_sound_ref = call play_loaded_sound(int 2, int -1, int 51, int 0)
var VAR_53 = int 0
var VAR_52 ++
call func_4e(int 0)
}
break
case 2
if(var VAR_17 == int 40)
{
/* play the sound 'bigfire' */
call play_loaded_sound(int 3, int 0, int 51, int 0)
}
if(var VAR_16 == int -1)
{
call stop_playing_sound(var DoorCls3_sound_ref)
gamevar *scene_info_p+5 &= int -5
gamevar *scene_info_p+6 &= int -5
var VAR_53 = int 0
var VAR_52 ++
}
break
case 3
if(call func_ab(int 400, var &VAR_55))
{
var VAR_59 = call run_enemy_generator(var &enemy_gen_script, int 20)
var groad = call create_enemy_through_door(int 39, int 0, int 0, int 0)
call func_106(var groad, int 9, int 5, var &VAR_62)
call func_106(var groad, int 9, int 6, int 5)
gamevar script_object = var groad
gamevar *character_stats_p+15 = int 8000
gamevar *character_stats_p+16 = int 8000
var VAR_53 = int 0
var VAR_52 ++
}
break
case 4
if(call func_9(var VAR_59))
{
var lizard_boss = call create_enemy_through_door(int 120, int 0, int 1, int 180)
call add_item_to_char(var lizard_boss, int 56 /* key */ , int 1, int 0)
var VAR_2 = int 1
var VAR_53 = int 0
var VAR_52 ++
}
break
case 5
if(call get_num_of_enemies() == int 0&&call ! is_char_handle_in_level(int 458752))
{
call set_input_system(int 2)
var VAR_53 = int 0
var VAR_52 ++
}
break
case 6
if(var VAR_53 > int 100)
{
call force_scroll_to_pos(var &scroll_position)
var VAR_53 = int 0
var VAR_52 ++
}
break
case 7
if(call is_not_force_scrolling())
{
var david = call get_david_char()
while(var david)
{
call char_turn_to_pos(var david, call get_char_pos(var njeremiah))
var david = call get_next_char_from_list()
}
call char_turn_to_pos(var njeremiah, call get_char_pos(gamevar control_char_p))
call start_dialog("S_DVDGUN", "NULL")
var VAR_53 = int 0
var VAR_52 ++
}
break
case 8
if(call get_input_sys() != int 4)
{
call set_input_system(int 1)
var VAR_53 = int 0
var VAR_52 ++
}
break
}
var VAR_53 ++
._SCRIPT_16
call load_char("litl_liz")
call load_char("lizbosss")
call load_char("groad")
call load_item(int 112 /* nemsword */ )
call load_item(int 56 /* key */ )