-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathundermil.tsct
331 lines (314 loc) · 7.48 KB
/
undermil.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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
/*
* 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_1 0
VAR_7 { 0, 0 }
VAR_10 { -671, -1316, -1316 }
VAR_11 { 489, -1117, 622 }
init_position { 443, -1361, -267 }
ai_script { 14, 5, 20, 0, 578, -1362, 516, 5, 30, 0, 878, -1362, 260, 1, VAR_1, 15, 0, 427, -1362, -277, 5, 30, 12, 28, 5, 20, 1, VAR_1, 8 }
david1 { 0, 0 }
VAR_27 -1
VAR_67 10
VAR_68 2
._on_load
var VAR_7 = int 0
execute SCRIPT_4
execute SCRIPT_3
execute SCRIPT_10
call func_10e()
if(gamevar is_room_cleared)
{
execute SCRIPT_9
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_7
break
case 0
break
}
}
._infinite_loop
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_6
break
case 2
execute SCRIPT_8
break
case 0
break
}
}
execute SCRIPT_11
._on_exit
if(var VAR_7 == int 1)
{
call func_3d()
}
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
gamevar room_state ++
break
case 2
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
gamevar SMACKER_X = int 0
gamevar SMACKER_Y = int 48
call play_2d_anim("milwheel", int 1, int 0, int 0)
gamevar SMACKER_X = int 240
gamevar SMACKER_Y = int 0
call play_2d_anim("undermil", int 1, int 0, int 0)
._SCRIPT_4
call load_sound_set(int 18)
/* play the sound 'wheel' */
call play_loaded_sound(int 1, int -1, int 18, int 0)
call load_sound_set(int 3)
call remove_face(var &VAR_10)
/* play the sound 'bird1' */
call play_loaded_sound(int 1, int -1, int 3, int 0)
/* play the sound 'hgull1' */
call play_loaded_sound(int 7, int -1, int 3, var &VAR_10)
call func_ec(int 23, int -1, int 0, var &VAR_11)
._SCRIPT_5
var nchiaro = call create_char(var &init_position, "nchiaro", int 75, int 13)
var DAVID = call get_char_handle(int 65536)
gamevar script_object = var DAVID
var VAR_15 = gamevar LEVEL
call set_char_lvl(var nchiaro, var VAR_15)
call func_50(var nchiaro, int 8192)
call play_char_ai_script(var nchiaro, var &ai_script)
call set_input_system(int 2)
._SCRIPT_6
if(var VAR_27 != var VAR_17)
{
var VAR_27 = var VAR_17
call log_var(var VAR_17)
}
switch(var VAR_17)
{
case 0
if(call func_a6(var nchiaro))
{
var david = call get_david_char()
while(var david)
{
var VAR_20 = call get_char_handle_id(var david)
if(var VAR_20 == int 131072)
{
var david = call get_next_char_from_list()
}
else
{
call char_turn_to_pos(var david, call get_char_pos(var nchiaro))
var david = call get_next_char_from_list()
}
}
var david1 = call get_david_char()
while(var david1)
{
var VAR_20 = call get_char_handle_id(var david1)
if(var VAR_20 == int 65536||var VAR_20 == int 131072)
{
var david1 = call get_next_char_from_list()
}
else
{
switch(var VAR_20)
{
case 786432
call log_string("sekune")
call start_dialog("C_CHISEK", "NULL")
break
case 196608
call log_string("vivienne")
call start_dialog("C_CHIVIV", "NULL")
break
case 262144
call log_string("cagen")
call start_dialog("C_CHICAG", "NULL")
break
case 327680
call log_string("jug")
call start_dialog("C_CHIJUG", "NULL")
break
default
call log_string("unknown hero in list")
break
}
var david1 = int 0
}
}
var VAR_17 ++
var VAR_18 = int 0
}
break
case 1
if(call get_input_sys() != int 4)
{
var VAR_22 = call func_ac(int 262144)
var VAR_23 = call func_ac(int 786432)
var VAR_24 = call func_ac(int 196608)
var VAR_25 = call func_ac(int 327680)
var VAR_26 = call func_ac(int 131072)
var VAR_21 = var VAR_22 + var VAR_23 + var VAR_24 + var VAR_25 + var VAR_26
if(var VAR_21 >= int 2&&var ! VAR_26)
{
call start_dialog("C_LEAHER", "NULL")
}
else
{
if(var VAR_26)
{
call start_dialog("C_CHINO", "NULL")
}
else
{
if(var VAR_23&&var ! VAR_26)
{
call start_dialog("C_SEKCHI", "NULL")
}
else
{
if(var VAR_24&&var ! VAR_26)
{
call start_dialog("C_VIVCHI", "NULL")
}
else
{
if(var VAR_25&&var ! VAR_26)
{
call start_dialog("C_JUGCHI", "NULL")
}
else
{
if(var VAR_22&&var ! VAR_26)
{
call start_dialog("C_CAGCHI", "NULL")
}
else
{
call log_string("NO DIALOG TRIGGERED")
}
}
}
}
}
}
var VAR_17 ++
var VAR_18 = int 0
}
break
case 2
if(call get_input_sys() != int 4)
{
call func_102(int 1)
call set_input_system(int 1)
var VAR_17 ++
var VAR_18 = int 0
}
break
case 3
var VAR_17 ++
var VAR_18 = int 0
break
}
var VAR_18 ++
if(gamevar global_exit_door != var VAR_7)
{
var VAR_7 = gamevar global_exit_door
call log_string("Clicked global_exit_door")
call log_var(gamevar global_exit_door)
}
._SCRIPT_7
._SCRIPT_8
if(gamevar global_exit_door != var VAR_7)
{
var VAR_7 = gamevar global_exit_door
call log_string("Clicked global_exit_door")
call log_var(gamevar global_exit_door)
}
._SCRIPT_9
._SCRIPT_10
var david2 = call get_david_char()
while(var david2)
{
var VAR_57 = call get_char_handle_id(var david2)
switch(var VAR_57)
{
case 65536
call log_string("david")
var VAR_1 = var david2
break
case 786432
call log_string("sekune")
var VAR_3 = var david2
break
case 327680
call log_string("jug")
var VAR_2 = var david2
break
case 196608
call log_string("vivienne")
var VAR_4 = var david2
break
case 131072
call log_string("chiaro")
var nchiaro = var david2
break
case 262144
call log_string("cagen")
var VAR_6 = var david2
break
default
call log_string("WARNING! Unknown hero while checking heroes")
call log_string("Get a goober -- QUICKLY!!")
break
}
var david2 = call get_next_char_from_list()
}
._SCRIPT_11
if(var VAR_66 > var VAR_67)
{
var VAR_69 = var VAR_68
var VAR_68 = int 2 + call randomize_int(int 0, int 5)
if(var VAR_68 == var VAR_69)
{
var VAR_68 ++
if(var VAR_68 > int 6)
{
var VAR_68 = int 2
}
}
call play_loaded_sound(var VAR_68, int 0, int 3, int 0)
var VAR_67 = call randomize_int(int 0, int 151) + int 250
var VAR_66 = int 0
}
var VAR_66 ++