-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathatro4.tsct
432 lines (412 loc) · 10.4 KB
/
atro4.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
/*
* 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_1 { 0, 0 }
VAR_2 { -22, 2861, -1195 }
VAR_3 { 528, 3693, -1880 }
VAR_4 { VAR_2, 200, VAR_3 }
VAR_5 { -2127, 2860, -2406 }
VAR_6 { -2353, 2860, -2078 }
VAR_7 { -2313, 2860, -2845 }
arr_3 { VAR_5, VAR_6, VAR_7 }
scroll_position { -2816, 2860, -2652 }
VAR_14 { -2765, 2859, -2503 }
VAR_15 { -2937, 2859, -2495 }
VAR_16 { -2767, 2859, -2772 }
arr { VAR_14, VAR_15, VAR_16, VAR_16 }
arr_1 { 35, 44, 39, 0 }
init_position { 46, 2859, 496 }
init_position2 { -2829, 2860, -2667 }
init_position1 { -15, 2861, -1165 }
VAR_28 { 46, 2859, 496, -17, 2861, -1155, -2798, 2860, -2637 }
VAR_29 { 46, 2859, 496, -220, 3693, -1940, -17, 2861, -1155, -2798, 2860, -2637 }
VAR_33 { 0, 0 }
arr_4 { 0, 0, 0 }
VAR_38 -1
VAR_54 "Y2E!"
VAR_55 { -997105664, 1160929280, -991141888 }
VAR_56 "D2E"
arr_2 { VAR_54, VAR_55, VAR_56 }
._on_load
call load_sound_set(int 76)
call load_sound_set(int 0)
/* play the sound 'atrolp2' */
call play_loaded_sound(int 1, int -1, int 76, int 0)
/* play the sound 'atroamb1' */
call play_loaded_sound(int 2, int -1, int 76, int 0)
execute SCRIPT_11
if(gamevar is_room_cleared)
{
execute SCRIPT_10
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 3
execute SCRIPT_8
break
case 0
break
}
}
execute SCRIPT_9
._infinite_loop
execute SCRIPT_12
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
call func_73()
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
gamevar room_state ++
break
case 2
break
case 3
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
switch(var VAR_21)
{
case 0
if(var VAR_22 > int 1)
{
call set_input_system(int 2)
var VAR_22 = int 0
var david = call get_david_char()
while(var david)
{
call char_stop(var david)
call apply_effect_on_char(gamevar char_gen_fx_scripts, int 18, int 0, var david)
var david = call get_next_char_from_list()
}
call func_113(int 940, int 150)
var VAR_21 ++
}
break
case 1
if(var VAR_22 > int 1)
{
var david = call get_david_char()
while(var david)
{
call char_teleport_to_pos(var david, @arr[var VAR_11], @arr_1[var index])
var david = call get_next_char_from_list()
var index ++
}
var VAR_22 = int 0
var VAR_21 ++
call reset_local_timer()
call set_input_system(int 1)
}
break
case 2
if(call is_local_timer_greater_than(int 80))
{
call remove_effect(var VAR_9)
var VAR_22 = int 0
var VAR_21 ++
}
break
case 3
if(call func_8a("£öÿÿ+"))
{
var beholder_red1 = call create_enemy(int 154, int 1, var &init_position, int 235)
call func_106(var beholder_red1, int 9, int 5, var &VAR_28)
call func_106(var beholder_red1, int 9, int 6, int 3)
gamevar script_object = var beholder_red1
gamevar *character_stats_p+15 = int 4000
gamevar script_object = var beholder_red1
gamevar *character_stats_p+16 = int 4000
call add_item_to_char(var beholder_red1, int 76 /* goldring */ , int 0, int 0)
call func_3a(var beholder_red1)
var beholder_red1 = call create_enemy(int 154, int 1, var &init_position1, int 298)
call func_106(var beholder_red1, int 9, int 5, var &VAR_28)
call func_106(var beholder_red1, int 9, int 6, int 3)
gamevar script_object = var beholder_red1
gamevar *character_stats_p+15 = int 4000
gamevar script_object = var beholder_red1
gamevar *character_stats_p+16 = int 4000
call add_item_to_char(var beholder_red1, int 76 /* goldring */ , int 0, int 0)
call func_3a(var beholder_red1)
var VAR_21 ++
var VAR_22 = int 0
}
break
case 4
if(call get_num_of_enemies() == int 0)
{
var beholder_red1 = call create_enemy(int 155, int 2, var &init_position2, int 45)
call func_106(var beholder_red1, int 9, int 5, var &VAR_28)
call func_106(var beholder_red1, int 9, int 6, int 3)
call func_106(var beholder_red1, int 2, int 1, var &VAR_29)
call func_106(var beholder_red1, int 2, int 3, int 4)
gamevar script_object = var beholder_red1
gamevar *character_stats_p+15 = int 4000
gamevar script_object = var beholder_red1
gamevar *character_stats_p+16 = int 4000
call add_item_to_char(var beholder_red1, int 76 /* goldring */ , int 0, int 0)
call func_3a(var beholder_red1)
var VAR_21 ++
var VAR_22 = int 0
}
break
case 5
if(call get_num_of_enemies() == int 0)
{
if(call ! func_ab(int 500, var &scroll_position))
{
var VAR_21 ++
var VAR_22 = int 0
}
}
break
case 6
if(var VAR_22 > int 20)
{
var VAR_9 = call play_tele_effect_at_pos(var &scroll_position, int 0)
gamevar room_state = int 2
var VAR_30 = int 10
var VAR_21 ++
var VAR_22 = int 0
}
break
}
var VAR_22 ++
._SCRIPT_4
var DAVID = call get_char_handle(int 65536)
call load_char("behold")
call load_char("beholdp")
var VAR_9 = call play_tele_effect_at_pos(var &scroll_position, int 0)
._SCRIPT_5
switch(var VAR_30)
{
case 0
if(var VAR_31 == int 1)
{
var VAR_30 ++
}
else
{
var VAR_9 = call play_tele_effect_at_pos(var &scroll_position, int 0)
var VAR_30 = int 10
}
break
case 1
execute SCRIPT_13
break
case 10
call log_string("start teleport to DEADGATE")
var VAR_30 ++
var VAR_39 = int 0
break
case 11
var VAR_40 = int 0
var VAR_40 = call func_ab(int 200, var &scroll_position)
if(var VAR_40)
{
call force_scroll_to_pos(var &scroll_position)
call set_input_system(int 2)
call func_fa(var VAR_40)
var VAR_30 ++
var VAR_39 = int 0
}
if(var VAR_40)
{
var david = call get_david_char()
while(var david)
{
if(var david != var VAR_40)
{
call set_char_walking(var VAR_40)
call char_walk_to_pos(var david, var &scroll_position)
}
var david = call get_next_char_from_list()
}
}
break
case 12
if(var VAR_39 > int 60)
{
var VAR_41 = call func_82("deadgate", "boneyard")
call func_e6("deadgate", "boneyard", "XýÿÿGúÿÿB", var VAR_41)
var VAR_30 ++
var VAR_39 = int 0
}
break
}
var VAR_39 ++
._SCRIPT_6
var VAR_31 = call func_6f()
._SCRIPT_7
._SCRIPT_8
._SCRIPT_9
gamevar SMACKER_X = int 848
gamevar SMACKER_Y = int 352
call play_2d_anim("right", int 1, int 0, var &VAR_0)
var VAR_0 = int 1
gamevar SMACKER_X = int 128
gamevar SMACKER_Y = int 244
call play_2d_anim("top", int 1, int 1, int 0)
gamevar SMACKER_X = int 240
gamevar SMACKER_Y = int 480
call play_2d_anim("bottom", int 1, int 1, int 0)
._SCRIPT_10
._SCRIPT_11
call func_99(int 1, var &VAR_4)
._SCRIPT_12
if(gamevar script_time > var VAR_51)
{
var VAR_51 = gamevar script_time + int 100 + call randomize_int(int 0, int 150)
var index_1 = call randomize_int(int 0, int 3)
/* play the sound 'atroamb4' */
call play_loaded_sound(int 3, int 0, int 76, @arr_2[var VAR_53])
}
if(gamevar script_time > var VAR_52)
{
var VAR_52 = gamevar script_time + int 200 + call randomize_int(int 0, int 150)
var index_1 = call randomize_int(int 0, int 3)
/* play the sound 'bees' */
call play_loaded_sound(int 4, int 0, int 76, @arr_2[var index_1])
}
var VAR_58 = var VAR_59
var VAR_59 = var VAR_1
if(var VAR_58 != var VAR_59)
{
switch(var VAR_59)
{
}
}
._SCRIPT_13
if(var VAR_38 != var VAR_32)
{
var VAR_38 = var VAR_32
call log_var(var VAR_32)
}
switch(var VAR_32)
{
case 0
if(var VAR_33 > int 1)
{
call set_input_system(int 2)
var VAR_9 = call play_tele_effect_at_pos(var &scroll_position, int 0)
var VAR_32 ++
var VAR_33 = int 0
}
break
case 1
if(var VAR_33 > int 1)
{
var david = call get_david_char()
while(var david)
{
call char_stop(var david)
call apply_effect_on_char(gamevar char_gen_fx_scripts, int 18, int 0, var david)
var david = call get_next_char_from_list()
}
call func_113(int 940, int 150)
var VAR_32 ++
var VAR_33 = int 0
}
break
case 2
if(var VAR_33 > int 1)
{
var david = call get_david_char()
var index = int 0
while(var david)
{
call char_teleport_to_pos(var david, @arr[var index], @arr_1[var index])
var david = call get_next_char_from_list()
var index ++
}
var VAR_33 = int 0
var VAR_32 ++
call reset_local_timer()
}
break
case 3
if(call is_local_timer_greater_than(int 10))
{
var david = call get_david_char()
var index = int 0
while(var david)
{
@arr_4[var index]= var david
call set_char_running(var david)
call char_walk_to_pos(var david, @arr_3[var index])
var david = call get_next_char_from_list()
var index ++
}
var VAR_33 = int 0
var VAR_32 ++
}
break
case 4
var index = int 0
while(var index < int 3)
{
if(@arr_4[var index])
{
if(!arr_5[var index])
{
if(call is_char_standing(@arr_4[var index]))
{
@arr_5[var index]= int 1
}
}
}
else
{
@arr_5[var index]= int 1
}
var index ++
}
if(var arr_5&&var VAR_35&&var VAR_36)
{
call set_input_system(int 1)
var VAR_30 = int 10
var VAR_33 = int 0
var VAR_32 ++
}
break
}
var VAR_33 ++