-
Notifications
You must be signed in to change notification settings - Fork 3
/
palace27.tsct
267 lines (248 loc) · 5.39 KB
/
palace27.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
/*
* 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_2 { -360, 3425, 288, -423, 3455, 1388 }
VAR_3 { -423, 3455, 1388, -360, 3425, 288, 0, 0 }
VAR_6 { 0, 0 }
/*
Interpretation of: enemy_gen_script
Enter from door: 2
Total waves: 1; 3 enemies generated in each wave.
Trigger wave when there are less than 8 enemies left.
Delay for first enemy: 0; delay between each enemy: 0
Enemies:
viking
viking
vikingb
Item drops:
bread
drumstik
*/
enemy_gen_script { 0, 0, 2, -1, 8, 0, 4, 0, 9, 1, 6, 1, 1, 1, 26, 26, 65, -1, 7, 1, 8, 10, 42, 47, -1, -1 }
/*
Interpretation of: enemy_gen_script1
Enter from door: 1
Total waves: 1; 3 enemies generated in each wave.
Trigger wave when there are less than 8 enemies left.
Delay for first enemy: 0; delay between each enemy: 0
Enemies:
viking
viking
vikingb
Item drops:
pie
thaxe
stik
*/
enemy_gen_script1 { 0, 0, 1, -1, 8, 0, 4, 0, 9, 1, 6, 1, 1, 1, 26, 26, 65, -1, 7, 1, 8, 10, 46, 12, -1, -1 }
/*
Interpretation of: enemy_gen_script2
Enter from door: 1
Total waves: 1; 2 enemies generated in each wave.
Trigger wave when there are less than 8 enemies left.
Delay for first enemy: 0; delay between each enemy: 0
Enemies:
vikingb
vikingb
vikingb
Item drops:
pie
deadmous
k
*/
enemy_gen_script2 { 0, 0, 1, -1, 8, 0, 4, 0, 9, 1, 6, 1, 1, 1, 65, 65, -1, 7, 1, 8, 10, 46, 45, -1, -1 }
._on_load
call load_sound_set(int 66)
/* play the sound 'dog1' */
call play_loaded_sound(int 7, int -1, int 66, int 0)
/* play the sound 'cwind1' */
call play_loaded_sound(int 1, int -1, int 66, int 0)
var david = call get_david_char()
var VAR_5 = call get_next_char_from_list()
var VAR_6 = call get_next_char_from_list()
call play_bgm("WPALPT1")
if(gamevar room_state == int 1)
{
execute SCRIPT_5
}
if(gamevar room_state == int 2)
{
execute SCRIPT_7
}
if(gamevar room_state == int 3)
{
execute SCRIPT_9
}
._infinite_loop
execute SCRIPT_3
if(gamevar room_state == int 1)
{
execute SCRIPT_4
}
if(gamevar room_state == int 2)
{
execute SCRIPT_6
}
if(gamevar room_state == int 3)
{
execute SCRIPT_8
}
._on_exit
if(gamevar room_state == int 1)
{
gamevar room_state ++
}
._SCRIPT_3
if(gamevar script_time > var VAR_17)
{
var VAR_17 = gamevar script_time + int 100 + call randomize_int(int 0, int 50)
/* play the sound 'wwindlp' */
call play_loaded_sound(int 6, int 0, int 66, int 0)
}
if(gamevar script_time > var VAR_16)
{
var VAR_16 = gamevar script_time + int 80 + call randomize_int(int 0, int 40)
/* play the sound 'inwindlp' */
call play_loaded_sound(int 2, int 0, int 66, int 0)
}
._SCRIPT_4
if(var VAR_1)
{
if(call ! is_local_timer_greater_than(var VAR_1))
{
exit_script
}
var VAR_1 = int 0
}
if(var VAR_0 == int 1)
{
if(call func_6f() == int 0)
{
var VAR_0 = int 3
}
else
{
var VAR_0 = int 2
}
exit_script
}
if(var VAR_0 == int 2)
{
if(call func_8a(var &VAR_2))
{
var VAR_0 = int 4
}
exit_script
}
if(var VAR_0 == int 3)
{
if(call func_8a(var &VAR_3))
{
var VAR_0 = int 4
}
exit_script
}
if(var VAR_0 == int 4)
{
call run_enemy_generator(var &enemy_gen_script, int 10)
var VAR_0 = int 5
var VAR_1 = int 30
call reset_local_timer()
exit_script
}
if(var VAR_0 == int 5)
{
if(call get_num_of_enemies() > int 1)
{
exit_script
}
call run_enemy_generator(var &enemy_gen_script1, int 10)
var VAR_0 = int 6
var VAR_1 = int 30
call reset_local_timer()
exit_script
}
if(var VAR_0 == int 6)
{
if(call get_num_of_enemies())
{
exit_script
}
var vikingb = call create_enemy_through_door(int 65, int 0, int 1, int 0)
call char_walk_to(var vikingb, int 837, int 3425, int 691)
var VAR_0 = int 7
call reset_local_timer()
var VAR_1 = int 30
exit_script
}
if(var VAR_0 == int 7)
{
if(call is_char_handle_in_level(int 8454144))
{
if(call ! is_char_standing(var vikingb))
{
exit_script
}
}
call reset_local_timer()
var VAR_1 = int 30
var VAR_0 = int 8
exit_script
}
if(var VAR_0 == int 8)
{
if(call is_char_handle_in_level(int 8454144))
{
call play_char_anim(var vikingb, var come_anim, int 0)
}
call reset_local_timer()
var VAR_1 = int 30
var VAR_0 = int 9
exit_script
}
if(var VAR_0 == int 9)
{
call run_enemy_generator(var &enemy_gen_script2, int 10)
call reset_local_timer()
var VAR_1 = int 30
var VAR_0 = int 10
exit_script
}
._SCRIPT_5
call load_char("viking")
call load_char("vikingb")
var come_anim = call load_anim("come")
call reset_local_timer()
var VAR_1 = int 30
var VAR_0 = int 1
._SCRIPT_6
if(var VAR_1)
{
if(call ! is_local_timer_greater_than(var VAR_1))
{
exit_script
}
var VAR_1 = int 0
}
._SCRIPT_7
var VAR_1 = int 0
var VAR_0 = int 1
._SCRIPT_8
if(var VAR_1)
{
if(call ! is_local_timer_greater_than(var VAR_1))
{
exit_script
}
var VAR_1 = int 0
}
._SCRIPT_9
var VAR_1 = int 0
var VAR_0 = int 1