-
Notifications
You must be signed in to change notification settings - Fork 3
/
boar.tsct
220 lines (199 loc) · 5.86 KB
/
boar.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
/*
* 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 { 0, 0, 0 }
init_position { -555, -118, -55 }
VAR_8 { 689, -118, -184, 403, -118, 996 }
VAR_9 { 53, -118, -196, -206, -118, 990 }
VAR_10 { -568, -118, -202, -587, -118, 989, -1004, -118, -185, -1098, -118, 999, -1482, -118, -217, -1484, -118, 939, -1958, -118, -193, -1891, -118, 747 }
VAR_12 { -224, -118, 828, -86, -118, 190 }
VAR_13 { -1585, -118, 80, -1337, -118, 721 }
/*
Interpretation of: enemy_gen_script
Enter from door: 1
Total waves: 2; 2 enemies generated in each wave.
Trigger wave when there are less than 4 enemies left.
Delay for first enemy: 15; delay between each enemy: 60
Enemies:
sguard
sarcher
*/
enemy_gen_script { 0, 0, 0, 1, -1, 8, 2, 4, 0, 9, 1, 1, 2, 34, 36, -1, 5, 1, 15, 60, 6, 1, 7, 1, 4, -1 }
/*
Interpretation of: enemy_gen_script2
Generate at 2 positions from: VAR_12
Order of positions: Random
Total waves: 2; 2 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 15; delay between each enemy: 60
Enemies:
grow_sguard
grow_sguard
*/
enemy_gen_script2 { 0, 1, 2, VAR_12, 8, 2, 4, 0, 9, 1, 1, 2, 33, 33, -1, 5, 1, 15, 60, 6, 1, 7, 1, 2, -1 }
/*
Interpretation of: enemy_gen_script3
Generate at 2 positions from: VAR_13
Order of positions: Random
Total waves: 2; 2 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 15; delay between each enemy: 60
Enemies:
grow_sguard
grow_sguard
*/
enemy_gen_script3 { 0, 1, 2, VAR_13, 8, 2, 4, 0, 9, 1, 1, 2, 33, 33, -1, 5, 1, 15, 60, 6, 1, 7, 1, 2, -1 }
/*
Interpretation of: enemy_gen_script1
Enter from door: 1
Total waves: 2; 2 enemies generated in each wave.
Trigger wave when there are less than 4 enemies left.
Delay for first enemy: 40; delay between each enemy: 100
Enemies:
sguard
sarcher
*/
enemy_gen_script1 { 0, 0, 1, -1, 8, 0, 4, 0, 9, 1, 1, 2, 34, 36, -1, 5, 1, 40, 100, 6, 1, 7, 1, 4, -1 }
._on_load
call play_bgm("METALON")
execute SCRIPT_8
call load_sound_set(int 72)
/* play the sound 'BLANK' */
call play_loaded_sound(int 4, int -1, int 72, int 0)
call load_sound_set(int 64)
/* play the sound 'cavelp' */
call play_loaded_sound(int 1, int -1, int 64, int 0)
call load_sound_set(int 65)
/* play the sound 'in2wind1' */
call play_loaded_sound(int 5, int -1, int 65, int 0)
if(gamevar room_state == int 0)
{
exit_script
}
if(gamevar room_state == int 1)
{
execute SCRIPT_5
}
if(gamevar room_state == int 2)
{
execute SCRIPT_7
}
._infinite_loop
execute SCRIPT_3
if(gamevar room_state == int 0)
{
exit_script
}
if(gamevar room_state == int 1)
{
execute SCRIPT_4
}
if(gamevar room_state == int 2)
{
execute SCRIPT_6
}
._on_exit
if(gamevar room_state == int 0)
{
exit_script
}
gamevar room_state ++
if(gamevar room_state > int 2)
{
gamevar room_state = int 0
}
._SCRIPT_3
if(gamevar script_time > var VAR_21)
{
var VAR_21 = gamevar script_time + int 70 + call randomize_int(int 0, int 110)
/* play the sound 'renddizz' */
call play_loaded_sound(int 8, int 0, int 72, int 0)
}
if(gamevar script_time > var VAR_22)
{
var VAR_22 = gamevar script_time + int 70 + call randomize_int(int 0, int 110)
/* play the sound 'metamb1' */
call play_loaded_sound(int 7, int 0, int 72, int 0)
}
if(gamevar script_time > var VAR_23)
{
var VAR_23 = 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 65, int 0)
}
._SCRIPT_4
if(var VAR_2 == int 0)
{
if(call func_8a(var &VAR_8))
{
var VAR_11 = call run_enemy_generator(var &enemy_gen_script, int 10)
call log_string("trigger_tripwire 1 ")
var VAR_2 ++
}
else
{
if(call get_num_of_enemies() == int 0)
{
var VAR_11 = call run_enemy_generator(var &enemy_gen_script1, int 30)
var VAR_2 ++
}
}
}
if(var VAR_2 == int 1)
{
if(call func_8a(var &VAR_9))
{
var VAR_11 = call run_enemy_generator(var &enemy_gen_script2, int 220)
call log_string("trigger_tripwire 2 ")
var VAR_2 ++
}
else
{
if(call get_num_of_enemies() == int 0)
{
var VAR_11 = call run_enemy_generator(var &enemy_gen_script2, int 10)
var VAR_2 ++
}
}
}
if(var VAR_2 == int 2)
{
if(call func_8a(var &VAR_10))
{
var VAR_11 = call run_enemy_generator(var &enemy_gen_script3, int 10)
call log_string("trigger_tripwire 3 ")
var VAR_2 ++
}
else
{
if(call get_num_of_enemies() == int 0)
{
var VAR_11 = call run_enemy_generator(var &enemy_gen_script3, int 10)
var VAR_2 ++
}
}
}
._SCRIPT_5
call load_char("sguard")
call load_char("sarcher")
var btreasure = call create_char(var &init_position, "btreasure", int 360, int 14)
call add_item_to_char(var btreasure, int 83 /* borb */ , int 1, int 0)
call add_item_to_char(var btreasure, int 83 /* borb */ , int 1, int 0)
call add_item_to_char(var btreasure, int 46 /* pie */ , int 1, int 0)
call add_item_to_char(var btreasure, int 45 /* deadmous */ , int 1, int 0)
call add_item_to_char(var btreasure, int 45 /* deadmous */ , int 1, int 0)
call add_item_to_char(var btreasure, int 40 /* apple */ , int 1, int 0)
call add_item_to_char(var btreasure, int 40 /* apple */ , int 1, int 0)
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8
gamevar SMACKER_X = int 144
gamevar SMACKER_Y = int 356
call play_2d_anim("boar", int 1, int 1, int 0)