-
Notifications
You must be signed in to change notification settings - Fork 3
/
middle.tsct
215 lines (202 loc) · 6.05 KB
/
middle.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
/*
* 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, 1 }
init_position5 { -2814, 1020, -3220 }
init_position { -1047, -994, -3356 }
init_position1 { 449, -994, -4864 }
init_position2 { -107, -994, -4789 }
init_position3 { -788, -994, -4148 }
init_position10 { -123, -994, -4606 }
init_position4 { 918, 6, -2072 }
VAR_16 { 29, 1, 79, 1, -1 }
/*
Interpretation of: enemy_gen_script
Total waves: 16; 1 enemies generated in each wave.
Trigger wave when there are less than 8 enemies left.
Delay for first enemy: 50; delay between each enemy: 0
Enemies:
neutral_imp
devious_imp
cowardly_imp
devious_imp
*/
enemy_gen_script { 0, 0, 1, 3, -1, 8, 1, 4, 0, 9, 0, 1, 16, 102, 100, 101, 100, -1, 2, 1, 3, 2, 5, 0, 50, 6, 1, 7, 1, 8, -1 }
init_position6 { -1478, -994, -3830 }
init_position7 { -1396, -994, -4245 }
init_position8 { -2022, -994, -4128 }
init_position9 { -1723, -994, -4683 }
._on_load
call play_bgm("GNO")
call load_sound_set(int 63)
/* play the sound 'gnoamb1' */
call play_loaded_sound(int 1, int -1, int 63, int 0)
if(gamevar *scene_info_p+1 == int 1)
{
if(gamevar *scene_info_p+3 & int 1)
{
gamevar *scene_info_p+3 &= int -2
}
}
if(gamevar is_room_cleared)
{
execute SCRIPT_4
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_7
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_3
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_6
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
if(gamevar script_time > var VAR_33)
{
var VAR_33 = gamevar script_time + int 300 + call randomize_int(int 0, int 200)
var VAR_32 = int 2 + call randomize_int(int 0, int 3)
call play_loaded_sound(var VAR_32, int 0, int 63, int 0)
}
._SCRIPT_4
if(gamevar is_room_cleared == int 2)
{
call func_108("bug1205")
}
._SCRIPT_5
var devious_imp = call create_enemy(int 100, int 1, var &init_position, int 90)
gamevar script_object = var devious_imp
gamevar *character_stats_p+15 = int 4000
var devious_imp1 = call create_enemy(int 100, int 2, var &init_position1, int 0)
gamevar script_object = var devious_imp1
gamevar *character_stats_p+15 = int 4000
var neutral_imp = call create_enemy(int 102, int 3, var &init_position2, int 55)
gamevar script_object = var neutral_imp
gamevar *character_stats_p+15 = int 4000
var neutral_imp1 = call create_enemy(int 102, int 4, var &init_position3, int 55)
gamevar script_object = var neutral_imp1
gamevar *character_stats_p+15 = int 4000
gamevar global_inventory_p = var &VAR_16
call create_char(var &init_position4, "btreasure", int -135, int 14)
call create_char(var &init_position5, "ipotblue", int 0, int 0)
var devious_imp2 = call create_enemy(int 100, int 5, var &init_position6, int 95)
var devious_imp3 = call create_enemy(int 100, int 6, var &init_position7, int 70)
var devious_imp4 = call create_enemy(int 100, int 7, var &init_position8, int 100)
var devious_imp5 = call create_enemy(int 100, int 8, var &init_position9, int 70)
gamevar script_object = var devious_imp2
gamevar *character_stats_p+15 = int 4000
gamevar script_object = var devious_imp3
gamevar *character_stats_p+15 = int 4000
gamevar script_object = var devious_imp4
gamevar *character_stats_p+15 = int 4000
gamevar script_object = var devious_imp5
gamevar *character_stats_p+15 = int 4000
var nyelimp = call create_char(var &init_position10, "nyelimp", int -130, int 13)
gamevar script_object = var nyelimp
gamevar *character_movement_p+60 = int 1
var pfew_anim = call load_anim("pfew")
call set_input_system(int 2)
call freeze_enemy(var devious_imp)
call freeze_enemy(var devious_imp1)
call freeze_enemy(var neutral_imp)
call freeze_enemy(var neutral_imp1)
call freeze_enemy(var devious_imp2)
call freeze_enemy(var devious_imp3)
call freeze_enemy(var devious_imp4)
call freeze_enemy(var devious_imp5)
._SCRIPT_6
switch(var VAR_2)
{
case 0
if(gamevar scene_counter > int 2)
{
call play_char_anim(var nyelimp, var pfew_anim, int 0)
call set_char_template(var devious_imp, int 100)
call set_char_template(var devious_imp1, int 100)
call set_char_template(var neutral_imp, int 102)
call set_char_template(var neutral_imp1, int 102)
call set_char_template(var devious_imp2, int 100)
call set_char_template(var devious_imp3, int 100)
call set_char_template(var devious_imp4, int 100)
call set_char_template(var devious_imp5, int 100)
var VAR_30 = call run_enemy_generator(var &enemy_gen_script, int 10)
gamevar scene_counter = int 0
var VAR_2 ++
}
break
case 1
if(gamevar scene_counter > int 150)
{
gamevar script_object = var nyelimp
gamevar *character_stats_p+14 = int 106000
call set_char_running(var nyelimp)
call func_2b(var nyelimp, int 3)
var VAR_4 = call func_41(var nyelimp, int 0)
call set_input_system(int 1)
gamevar scene_counter = int 0
var VAR_2 ++
}
break
case 2
if(gamevar scene_counter > int 10)
{
if(call is_char_standing(var nyelimp))
{
call func_12f(var VAR_4)
call remove_char(var nyelimp)
gamevar scene_counter = int 0
var VAR_2 ++
}
}
break
}
._SCRIPT_7
._SCRIPT_8