-
Notifications
You must be signed in to change notification settings - Fork 3
/
gotolift2.tsct
264 lines (250 loc) · 6.9 KB
/
gotolift2.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
/*
* 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
init_position { -2813, -996, 5953 }
init_position1 { -2575, -996, 5960 }
init_position2 { -2680, -996, 5806 }
imp_boss { 0, -7204, -996, 5228 }
imp_boss1 { 0, -7333, -996, 5199 }
init_position3 { -2384, 2, 3983 }
VAR_12 { -1914, 3, 4430, -2435, 3, 4006, -1893, 3, 3557 }
VAR_13 { -4766, 1750, 4586, -3379, 1750, 4624, -3387, 1750, 5763, -4524, 1750, 5805, -3954, 1750, 5201 }
VAR_14 { -4766, -997, 4586, -3379, -997, 4624, -3387, -997, 5763, -4524, -997, 5805, -3954, -597, 5201 }
VAR_15 { 0, 0, 0, -1, 8, 1, 4, 0, 9, 0, 1, 4, 100, 103, 102, 101, -1, 2, 1, 3, 1, 5, 0, 50, 6, 1, 7, 1, 5, -1 }
VAR_16 { 0, 1, 5, VAR_13, 8, 1, 4, 2, 5, VAR_14, 9, 0, 1, 3, 105, -1, 5, 0, 50, 6, 1, 7, 1, 3, -1 }
VAR_22 0
ai_script { 15, 0, -5950, -997, 5244, 33, 8, 0, 62, 0, 3, VAR_25, 0, 0, -7204, -996, 5228, 16, VAR_22, 1, 8 }
VAR_25 "temper"
ai_script1 { 15, 0, -5950, -997, 5244, 8 }
ai_script2 { 15, 0, -5950, -997, 5244, 8 }
VAR_28 -1
._on_load
call play_bgm("GNO")
call load_sound_set(int 62)
call load_sound_set(int 63)
/* play the sound 'gnoamb1' */
call play_loaded_sound(int 1, int -1, int 63, int 0)
/* play the sound 'fbird1' */
call play_loaded_sound(int 1, int -1, int 62, int 0)
/* play the sound 'imptalk1' */
call play_loaded_sound(int 7, int -1, int 62, int 0)
if(gamevar is_room_cleared)
{
execute SCRIPT_8
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_3
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_7
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_34)
{
var VAR_34 = 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)
}
if(gamevar script_time > var VAR_33)
{
var VAR_33 = gamevar script_time + int 60 + call randomize_int(int 0, int 40)
var VAR_32 = int 2 + call randomize_int(int 0, int 5)
call play_loaded_sound(var VAR_32, int 0, int 62, int 0)
}
._SCRIPT_4
call load_item(int 110 /* impclub */ )
var devious_imp = call create_enemy(int 100, int 1, var &init_position, int 101)
var devious_imp1 = call create_enemy(int 100, int 2, var &init_position1, int 205)
var devious_imp2 = call create_enemy(int 100, int 3, var &init_position2, int 345)
var catapult_imp = call create_enemy(int 104, int 4, var &init_position3, int 265)
call func_106(var devious_imp, int 1, int 0, int 1)
call func_106(var devious_imp1, int 1, int 0, int 1)
call func_106(var devious_imp2, int 1, int 0, int 1)
call func_50(var devious_imp, int 2)
call func_50(var devious_imp1, int 2)
call func_50(var devious_imp2, int 2)
call freeze_enemy(var catapult_imp)
call load_char("impboss")
call load_char("wingimp")
call set_input_system(int 2)
var DAVID = call get_char_handle(int 65536)
._SCRIPT_5
if(var VAR_28 != var VAR_20)
{
var VAR_28 = var VAR_20
call log_var(var VAR_20)
}
switch(var VAR_20)
{
case 0
call force_scroll_to_pos(var &init_position)
var VAR_20 ++
var VAR_19 = int 0
break
case 1
if(call is_not_force_scrolling())
{
var VAR_20 ++
var VAR_19 = int 0
}
break
case 2
if(var VAR_19 > int 100)
{
call force_scroll_to_pos(call get_char_pos(var DAVID))
var VAR_20 ++
var VAR_19 = int 0
}
break
case 3
if(call is_not_force_scrolling())
{
call start_dialog("TERDVD", "NULL")
var VAR_20 ++
var VAR_19 = int 0
}
break
case 4
if(call get_input_sys() != int 4)
{
call set_input_system(int 1)
call func_106(var catapult_imp, int 9, int 5, var &VAR_12)
call func_106(var catapult_imp, int 9, int 6, int 3)
call set_char_template(var catapult_imp, int 104)
var VAR_20 ++
var VAR_19 = int 0
}
break
case 5
if(call get_num_of_enemies() < int 2)
{
var VAR_21 = int 0
if(call is_char_handle_in_level(int 917505 /* IMP */ ))
{
var VAR_21 = var devious_imp
}
if(call is_char_handle_in_level(int 917506 /* IMP */ ))
{
var VAR_21 = var devious_imp1
}
if(call is_char_handle_in_level(int 917507 /* IMP */ ))
{
var VAR_21 = var devious_imp2
}
if(var ! VAR_21)
{
var VAR_20 = int 6
var VAR_19 = int 0
}
else
{
var VAR_23 = call get_char_handle_id(var VAR_21)
call freeze_enemy(var VAR_21)
call func_50(var VAR_21, int 8192)
call play_char_ai_script(var VAR_21, var &ai_script)
gamevar script_object = var VAR_21
gamevar *character_movement_p+60 = int 1
gamevar *character_stats_p+14 = int 106000
var VAR_20 ++
var VAR_19 = int 0
}
}
break
case 6
if(var VAR_22||call get_num_of_enemies() == int 0)
{
var imp_boss = call create_enemy_through_door(int 129, int 1, int 1, int 285)
var imp_boss1 = call create_enemy_through_door(int 129, int 2, int 1, int 325)
call func_106(var imp_boss, int 3, int 1, var &VAR_15)
call func_106(var imp_boss1, int 3, int 1, var &VAR_16)
call set_char_running(var imp_boss)
call set_char_running(var imp_boss1)
call func_50(var imp_boss, int 8192)
call play_char_ai_script(var imp_boss, var &ai_script1)
call func_50(var imp_boss1, int 8192)
call play_char_ai_script(var imp_boss1, var &ai_script2)
var VAR_20 ++
var VAR_19 = int 0
}
break
case 7
if(var VAR_21)
{
if(call is_char_handle_in_level(var VAR_23))
{
if(call func_a6(var VAR_21))
{
call log_string("imp_killed")
call remove_char(var VAR_21)
var VAR_20 ++
var VAR_19 = int 0
}
}
else
{
var VAR_20 ++
var VAR_19 = int 0
}
}
else
{
var VAR_20 ++
var VAR_19 = int 0
}
break
}
var VAR_19 ++
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8