-
Notifications
You must be signed in to change notification settings - Fork 3
/
pass2.tsct
293 lines (275 loc) · 8.19 KB
/
pass2.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
/*
* 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
fx_position { -3034, 14, 4392 }
VAR_1 { 6752, 14, -3656 }
init_position4 { 5, -1825, -1231 }
init_position { -1645, -1825, -2128 }
init_position1 { -1820, -1825, -1701 }
init_position2 { -2197, -1825, -1572 }
init_position3 { -1967, -1825, -2011 }
VAR_16 -1
VAR_28 { 0, 0, 0, 0, 0 }
VAR_29 { 0, 0, 0 }
VAR_35 { 536, -1825, -1463, 427, -1825, -761, -51, -1825, -125, 25, -1825, -831, -119, -1825, -1620, 338, -1825, -1138, 871, -1825, -877, -171, -1825, 140, -372, -1825, 773, -703, -1825, 901, -724, -1825, 292, -933, -1825, -405, -1041, -1825, -1158, -1135, -1825, 790, -1211, -1825, -585, -1242, -1825, -1991, -1726, -1825, -955, -1795, -1825, 12, -2007, -1825, -1846, -1398, -1825, -2319 }
VAR_36 { 536, -1825, -1463, 427, -1825, -761, -51, -1825, -125, 25, -1825, -831, -119, -1825, -1620, 338, -1825, -1138, 871, -1825, -877, -171, -1825, 140, -372, -1825, 773, -703, -1825, 901, -724, -1825, 292, -933, -1825, -405, -1041, -1825, -1158, -1135, -1825, 790, -1211, -1825, -585, -1242, -1825, -1991, -1726, -1825, -955, -1795, -1825, 12, -2007, -1825, -1846, -1398, -1825, -2319 }
/*
Interpretation of: enemy_gen_script1
Generate at 20 positions from: VAR_35
Order of positions: Random
Total waves: 2; 1 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 50; delay between each enemy: 120
Enemies:
grow_wamper
Item drops:
deadmous
*/
enemy_gen_script1 { 0, 1, 20, VAR_35, 8, 2, 4, 0, 9, 1, 1, 2, 5, -1, 5, 1, 50, 120, 6, 2, 7, 1, 2, 10, 45, -1, -1 }
/*
Interpretation of: enemy_gen_script
Generate at 20 positions from: VAR_36
Order of positions: Random
Total waves: 2; 1 enemies generated in each wave.
Trigger wave when there are less than 1 enemies left.
Delay for first enemy: 50; delay between each enemy: 120
Enemies:
grow_snow_sprite
*/
enemy_gen_script { 0, 1, 20, VAR_36, 8, 2, 4, 0, 9, 1, 1, 2, 24, -1, 5, 1, 50, 120, 6, 2, 7, 1, 1, -1, 0 }
._on_load
call load_sound_set(int 65)
/* play the sound 'dog1' */
call play_loaded_sound(int 7, int -1, int 65, int 0)
execute SCRIPT_3
if(gamevar is_room_cleared)
{
execute SCRIPT_10
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_6
break
case 2
execute SCRIPT_9
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_4
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_8
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 2
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
call play_3d_fx("SNOW", var &fx_position, var &VAR_1, int 0)
._SCRIPT_4
if(gamevar script_time > var VAR_40)
{
var VAR_40 = gamevar script_time + int 300 + call randomize_int(int 0, int 300)
/* play the sound 'hwave1' */
call play_loaded_sound(int 8, int 0, int 65, int 0)
}
if(gamevar script_time > var VAR_39)
{
var VAR_39 = gamevar script_time + int 60 + call randomize_int(int 0, int 60)
/* play the sound 'inwindlp' */
call play_loaded_sound(int 2, int 0, int 65, int 0)
}
._SCRIPT_5
if(var VAR_16 != var VAR_5)
{
var VAR_16 = var VAR_5
call log_var(var VAR_5)
}
if(var VAR_5 == int 0)
{
var VAR_6 ++
if(var VAR_6 > int 100)
{
call set_input_system(int 2)
execute SCRIPT_7
call set_char_type(var grow_wamper, int 131072)
var VAR_6 = int 0
var VAR_5 ++
}
}
if(var VAR_5 == int 1)
{
var VAR_6 ++
if(var VAR_6 > int 100)
{
call log_string("fight time")
call char_attack(var leopard, var grow_wamper)
call char_attack(var leopard1, var grow_wamper)
call char_attack(var leopard2, var grow_wamper)
call char_attack(var grow_wamper, var leopard)
var VAR_5 ++
}
}
if(var VAR_5 == int 2)
{
if(call is_char_handle_in_level(int 11403264))
{
if(var VAR_17 == int 0)
{
if(call func_87(var leopard))
{
call log_string("fight1: finished")
call func_36(var leopard, int -1233, int -1825, int 347)
gamevar script_object = var leopard
gamevar *character_stats_p+15 = int 3000
call func_d6(var leopard)
call func_106(var leopard, int 1, int 0, int 1)
call func_50(var leopard, int 3)
call func_53(var leopard, int 5)
var VAR_17 = int 1
}
}
}
if(call is_char_handle_in_level(int 11403265))
{
if(var VAR_18 == int 0)
{
if(call func_87(var leopard1))
{
call log_string("fight1: finished")
call func_36(var leopard1, int -1233, int -1825, int 347)
gamevar script_object = var leopard1
gamevar *character_stats_p+15 = int 3000
call func_d6(var leopard1)
call func_106(var leopard1, int 1, int 0, int 1)
call func_50(var leopard1, int 3)
call func_53(var leopard1, int 5)
var VAR_18 = int 1
}
}
}
if(call is_char_handle_in_level(int 11403266))
{
if(var VAR_19 == int 0)
{
if(call func_87(var leopard2))
{
call log_string("fight1: finished")
call func_36(var leopard2, int -1233, int -1825, int 347)
gamevar script_object = var leopard2
gamevar *character_stats_p+15 = int 3000
call func_106(var leopard2, int 1, int 0, int 1)
call func_50(var leopard2, int 3)
call func_53(var leopard2, int 5)
var VAR_19 = int 1
}
}
}
if(var VAR_17 == int 1&&var VAR_18 == int 1&&var VAR_19 == int 1)
{
call set_input_system(int 1)
var VAR_5 ++
}
}
if(var VAR_5 == int 3)
{
if(call ! is_char_handle_in_level(int 11403264)||call ! is_char_handle_in_level(int 11403265)||call ! is_char_handle_in_level(int 11403266))
{
if(call is_char_handle_in_level(int 2752512))
{
call log_string("you killed my leopards")
gamevar script_object = var sentryg
gamevar *character_stats_p+15 = int 3000
call func_106(var sentryg, int 1, int 0, int 1)
call func_50(var sentryg, int 138)
var VAR_5 ++
}
}
}
if(call is_char_handle_in_level(int 10420224))
{
call log_string("dead but not dead")
gamevar script_object = var grow_wamper
if(gamevar *object_p+5 == int 6)
{
call kill_char(var grow_wamper)
}
}
._SCRIPT_6
var leopard = call create_enemy(int 72, int 0, var &init_position, int 75)
var leopard1 = call create_enemy(int 72, int 1, var &init_position1, int 75)
var leopard2 = call create_enemy(int 72, int 2, var &init_position2, int 50)
var sentryg = call create_enemy(int 56, int 0, var &init_position3, int 25)
call freeze_enemy(var leopard)
call freeze_enemy(var leopard1)
call freeze_enemy(var leopard2)
call freeze_enemy(var sentryg)
call func_50(var sentryg, int 1)
call load_char("wamper")
._SCRIPT_7
var grow_wamper = call create_enemy(int 5, int 0, var &init_position4, int 260)
call freeze_enemy(var grow_wamper)
gamevar script_object = var grow_wamper
gamevar HP = int 4
._SCRIPT_8
._SCRIPT_9
._SCRIPT_10
var VAR_26 = call func_6f()
var VAR_27 = call randomize_int(int 0, int 5)
var VAR_28 = call randomize_int(int 0, int 2)
var VAR_29 = call randomize_int(int 1, int 4)
call load_char("wamper")
call load_char("snowsprt")
call load_char("bstump")
call load_char("sentry")
call load_char("leopard")
if(var VAR_27 == int 1)
{
if(var VAR_28 == int 1)
{
call run_enemy_generator(var &enemy_gen_script, int 200)
}
else
{
call run_enemy_generator(var &enemy_gen_script1, int 200)
}
}