-
Notifications
You must be signed in to change notification settings - Fork 3
/
cave.tsct
197 lines (183 loc) · 5.68 KB
/
cave.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
/*
* 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
torches2_sound_ref { 0, 9 }
VAR_7 { -4600, -500, 2700, -3200, -500, 2500, -4800, -520, 2800, -794, -520, 3286 }
/*
Interpretation of: enemy_gen_script1
Generate at 4 positions from: VAR_7
Order of positions: Random
Total waves: 1; 5 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 15; delay between each enemy: 50
Enemies:
bat
bat
bat
bat
bat
*/
enemy_gen_script1 { 0, 1, 4, VAR_7, 8, 2, 4, 0, 9, 1, 1, 1, 47, 47, 47, 47, 47, -1, 5, 1, 15, 50, 6, 1, 7, 1, 2, -1 }
enemy_gen_script { 0, 0, 2, 1, -1, 8, 1, 1, 2, 58, 60, -1, 4, 0, 9, 1, 5, 1, 15, 200, 6, 2, 7, 1, 2, 10, 83, 40, -1, -1 }
init_position { -4000, -1775, 2684 }
ai_script { 0, -4120, -1775, 1987, 3, VAR_15, 0, 0, -3784, -1775, 3164, 3, VAR_16, 0, 7, 8 }
VAR_15 "lookout"
VAR_16 "lookout"
VAR_19 { 0, 0 }
VAR_20 { -3773, -500, 3845, -3393, -500, 3332, -3153, -500, 2765, -3385, -500, 2470, -4046, -500, 2035, -3999, -500, 2337, -4299, -500, 2535, -4405, -500, 2880, -4031, -500, 3197, -4119, -500, 3456, -4580, -500, 3179, -4461, -500, 2787, -3924, -500, 2771, -3925, -500, 3249, -3558, -500, 2682, -3243, -500, 3155 }
/*
Interpretation of: enemy_gen_script2
Generate at 16 positions from: VAR_20
Order of positions: Random
Total waves: 3; 1 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 15; delay between each enemy: 30
Enemies:
drop_wraith
*/
enemy_gen_script2 { 0, 1, 16, VAR_20, 8, 2, 4, 0, 9, 0, 1, 3, 90, -1, 5, 1, 15, 30, 6, 1, 7, 1, 2, -1 }
VAR_22 { -3773, -1550, 3845, -3393, -1550, 3332, -3153, -1550, 2765, -3385, -1775, 2470, -4046, -1775, 2035, -3999, -1775, 2337, -4299, -1775, 2535, -4405, -1775, 2880, -4031, -1775, 3197, -4119, -1775, 3456, -4580, -1775, 3179, -4461, -1775, 2787, -3924, -1775, 2771, -3925, -1775, 3249, -3558, -1775, 2682, -3243, -1550, 3155 }
/*
Interpretation of: enemy_gen_script3
Generate at 16 positions from: VAR_22
Order of positions: Random
Total waves: 1; 3 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 15; delay between each enemy: 30
Enemies:
grow_boney
grow_skel
grow_skel
*/
enemy_gen_script3 { 0, 1, 16, VAR_22, 8, 2, 4, 0, 9, 0, 1, 1, 69, 68, 68, -1, 5, 1, 15, 30, 6, 1, 7, 1, 2, -1 }
VAR_24 { -3773, -1550, 3845, -3385, -500, 2470, -3558, -1775, 2682, -3243, -500, 3155 }
/*
Interpretation of: enemy_gen_script4
Generate at 4 positions from: VAR_24
Order of positions: Sequential
Total waves: 1; 4 enemies generated in each wave.
Trigger wave when there are less than 2 enemies left.
Delay for first enemy: 15; delay between each enemy: 30
Enemies:
grow_skel
drop_wraith
grow_skel
drop_wraith
*/
enemy_gen_script4 { 0, 1, 4, VAR_24, 8, 1, 4, 0, 9, 0, 1, 1, 68, 90, 68, 90, -1, 5, 1, 15, 30, 6, 1, 7, 1, 2, -1 }
._on_load
call load_item(int 93 /* cutlass */ )
var VAR_1 = call func_6f()
call play_bgm("DeadIn1")
if(gamevar is_room_cleared)
{
execute SCRIPT_7
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 0
break
}
}
gamevar SMACKER_X = int 144
gamevar SMACKER_Y = int 24
call play_2d_anim("torch1", int 1, int 1, int 0)
gamevar SMACKER_X = int 488
gamevar SMACKER_Y = int 8
call play_2d_anim("torch2", int 1, int 1, int 0)
call load_sound_set(int 30)
var torches2_sound_ref = call play_loaded_sound(int 1, int -1, int 30, int 0)
call set_sound_volume(var torches2_sound_ref, int 60)
._infinite_loop
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_3
break
case 2
execute SCRIPT_5
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
switch(var VAR_19)
{
}
._SCRIPT_4
var VAR_6 = call run_enemy_generator(var &enemy_gen_script1, int 10)
var boneyfx = call create_enemy(int 61, int 0, var &init_position, int 190)
var moneybag = call add_item_to_char(var boneyfx, int 85, int 6554113, int 0)
call load_char("skel")
call load_char("wraith")
var lookout_anim = call load_anim("lookout")
gamevar script_object = var boneyfx
gamevar *character_stats_p+15 = int 1600
call set_char_init_state(var boneyfx, int 13)
call play_char_ai_script(var boneyfx, var &ai_script)
._SCRIPT_5
._SCRIPT_6
._SCRIPT_7
call load_char("boney")
call load_char("wraith")
call load_char("skel")
var VAR_29 = call randomize_int(int 0, int 3)
if(var ! VAR_29)
{
var VAR_30 = call randomize_int(int 0, int 3)
call log_string("LET'S GENERATE SOME BADDIES")
switch(var VAR_30)
{
case 0
call run_enemy_generator(var &enemy_gen_script2, int 50)
break
case 1
call run_enemy_generator(var &enemy_gen_script3, int 50)
break
case 2
call run_enemy_generator(var &enemy_gen_script4, int 50)
break
}
}
else
{
call log_string("NO GENERATORS THIS TIME")
}