-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmill1.tsct
401 lines (380 loc) · 8.83 KB
/
mill1.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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
/*
* 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_16 -1
VAR_18 { 40, 1, 43, 1, 42, 1, 3, 1, -1 }
VAR_25 { 197, 89, -717 }
VAR_27 { -846, 1425, -7346 }
init_position { -245, 89, -242 }
VAR_43 -1
VAR_61 { 0, 0 }
VAR_63 10
VAR_64 2
._on_load
var VAR_12 = var &VAR_25
var VAR_13 = int 320
execute SCRIPT_15
var VAR_14 = int 39
execute SCRIPT_16
var VAR_16 = int 6554113
execute SCRIPT_16
execute SCRIPT_3
execute SCRIPT_4
execute SCRIPT_5
execute SCRIPT_11
if(gamevar is_room_cleared)
{
execute SCRIPT_10
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_7
break
case 2
execute SCRIPT_9
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_13
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
if(var VAR_26)
{
gamevar room_state = int 3
gamevar is_room_cleared = int 1
}
else
{
gamevar room_state ++
}
break
case 2
if(var VAR_26)
{
gamevar room_state = int 3
gamevar is_room_cleared = int 1
}
break
case 0
break
default
gamevar room_state = int 0
break
}
}
execute SCRIPT_14
._SCRIPT_3
gamevar SMACKER_X = int 100
gamevar SMACKER_Y = int 0
call play_2d_anim("mill1", int 1, int 1, 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_27)
/* play the sound 'bird1' */
call play_loaded_sound(int 1, int -1, int 3, var &VAR_27)
._SCRIPT_5
._SCRIPT_6
if(var VAR_43 != var VAR_41)
{
var VAR_43 = var VAR_41
call log_var(var VAR_41)
}
switch(var VAR_41)
{
}
var VAR_42 ++
._SCRIPT_7
gamevar global_inventory_p = var &VAR_18
call create_char(var &init_position, "btreasure", int 185, int 14)
._SCRIPT_8
switch(var VAR_61)
{
}
._SCRIPT_9
._SCRIPT_10
._SCRIPT_11
var david = call get_david_char()
while(var david)
{
var VAR_30 = call get_char_handle_id(var david)
switch(var VAR_30)
{
case 65536
call log_string("david")
var VAR_19 = var david
break
case 786432
call log_string("sekune")
var VAR_21 = var david
break
case 327680
call log_string("jug")
var VAR_20 = var david
break
case 196608
call log_string("vivienne")
var VAR_22 = var david
break
case 131072
call log_string("chiaro")
var VAR_23 = var david
break
case 262144
call log_string("cagen")
var VAR_24 = var david
break
default
call log_string("WARNING! Unknown hero while checking heroes")
call log_string("Get a goober -- QUICKLY!!")
break
}
var david = call get_next_char_from_list()
}
._SCRIPT_12
switch(var VAR_46)
{
case 0
var BTREASURE = call get_char_handle(int 1507328)
gamevar script_object = var BTREASURE
if(gamevar *object_p+5 == int 15)
{
var VAR_46 = int 2
var VAR_47 = int 0
}
else
{
var VAR_46 ++
var VAR_47 = int 0
}
break
case 1
if(call func_af(int 3))
{
var VAR_46 ++
var VAR_47 = int 0
}
break
case 2
if(call ! func_af(int 3))
{
call set_input_system(int 2)
var VAR_44 += call func_42(var VAR_19, int 0)
var VAR_44 += call func_42(var VAR_19, int 1)
var VAR_44 += call func_42(var VAR_19, int 2)
var VAR_44 += call func_42(var VAR_19, int 3)
var VAR_44 += call func_42(var VAR_19, int 4)
var VAR_44 += call func_42(var VAR_19, int 5)
var VAR_44 += call func_42(var VAR_19, int 6)
var VAR_44 += call func_42(var VAR_19, int 7)
call log_string("orbs")
call log_var(var VAR_44)
if(var VAR_21)
{
var VAR_45 = var VAR_21
}
else
{
if(var VAR_22)
{
var VAR_45 = var VAR_22
}
else
{
if(var VAR_20)
{
var VAR_45 = var VAR_20
}
else
{
if(var VAR_24)
{
var VAR_45 = var VAR_24
}
else
{
if(var VAR_23)
{
var VAR_45 = var VAR_23
}
}
}
}
}
if(var VAR_45)
{
var VAR_46 ++
var VAR_47 = int 0
}
else
{
call set_input_system(int 1)
call log_string("ERROR!!!!!!!!!!!!!!!!!!!")
var VAR_46 = int -1
var VAR_47 = int 0
}
}
break
case 3
if(var VAR_47 > int 50)
{
if(var VAR_44 >= int 8)
{
call start_dialog("L_DVDORB", "FINAL")
call char_turn_to_pos(gamevar control_char_p, call get_char_pos(var VAR_45))
call char_turn_to_pos(var VAR_45, call get_char_pos(gamevar control_char_p))
}
else
{
if(gamevar control_char_p == var VAR_19)
{
if(var VAR_23)
{
call start_dialog("L_DVDORB", "WITH_CHI")
call char_turn_to_pos(gamevar control_char_p, call get_char_pos(var VAR_23))
call char_turn_to_pos(var VAR_23, call get_char_pos(gamevar control_char_p))
}
else
{
call start_dialog("L_CHIDVD", "NULL")
call char_turn_to_pos(gamevar control_char_p, call get_char_pos(var VAR_45))
call char_turn_to_pos(var VAR_45, call get_char_pos(gamevar control_char_p))
}
}
else
{
if(var VAR_23)
{
call start_dialog("L_DVDCHI", "WITH_CHI")
call char_turn_to_pos(gamevar control_char_p, call get_char_pos(var VAR_23))
call char_turn_to_pos(var VAR_23, call get_char_pos(gamevar control_char_p))
}
else
{
call start_dialog("L_DVDORB", "NULL")
call char_turn_to_pos(gamevar control_char_p, call get_char_pos(var VAR_19))
call char_turn_to_pos(var VAR_19, call get_char_pos(gamevar control_char_p))
}
}
}
var VAR_46 ++
var VAR_47 = int 0
}
break
case 4
if(call get_input_sys() != int 4)
{
call set_input_system(int 1)
var VAR_26 = int 1
var VAR_46 ++
var VAR_47 = int 0
}
break
}
var VAR_47 ++
._SCRIPT_13
if(var VAR_62 > var VAR_63)
{
var VAR_65 = var VAR_64
var VAR_64 = int 2 + call randomize_int(int 0, int 5)
if(var VAR_64 == var VAR_65)
{
var VAR_64 ++
if(var VAR_64 > int 6)
{
var VAR_64 = int 2
}
}
call play_loaded_sound(var VAR_64, int 0, int 3, "")
var VAR_63 = call randomize_int(int 0, int 151) + int 250
var VAR_62 = int 0
}
var VAR_62 ++
._SCRIPT_14
var VAR_1 = int 0
var david1 = call get_david_char()
var VAR_1 += call func_42(var david1, int 0)
var VAR_1 += call func_42(var david1, int 1)
var VAR_1 += call func_42(var david1, int 2)
var VAR_1 += call func_42(var david1, int 3)
var VAR_1 += call func_42(var david1, int 4)
var VAR_1 += call func_42(var david1, int 5)
var VAR_1 += call func_42(var david1, int 6)
var VAR_1 += call func_42(var david1, int 7)
if(var VAR_1 == int 8)
{
call func_116("haven", "h_camptp", int 9)
call set_scene_overwrite_act("haven", "h_camptp", int 0)
call func_118("haven", "h_camptp", int 1)
var VAR_0 = int 1
call log_string("all 8 orbs taken!")
}
else
{
call log_string("not got all orbs yet!")
}
._SCRIPT_15
var is_BTREASURE1_exist = call is_char_handle_in_level(int 1507337)
if(var ! is_BTREASURE1_exist)
{
var is_BTREASURE1_exist = call create_char(var VAR_12, "btreasure9", var VAR_13, int 14)
call func_aa(var is_BTREASURE1_exist)
}
else
{
var VAR_15 = int 1
gamevar script_object = var is_BTREASURE1_exist
if(gamevar *object_p+7 == int 4194304)
{
call func_aa(var is_BTREASURE1_exist)
}
}
._SCRIPT_16
if(var VAR_14 != int -1)
{
if(var ! VAR_15)
{
if(var VAR_16 != int -1)
{
call add_item_to_char(var is_BTREASURE1_exist, int 85 /* moneybag */ , var VAR_16, int 0)
}
else
{
call add_item_to_char(var is_BTREASURE1_exist, var VAR_14 /* potwhite */ , int 1, int 0)
}
}
}
var VAR_16 = int -1