-
Notifications
You must be signed in to change notification settings - Fork 3
/
inwiztow.tsct
448 lines (433 loc) · 10.2 KB
/
inwiztow.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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
/*
* 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
walk_position1 { -198, -767, -24 }
init_position { 194, -767, 8 }
VAR_21 { 25, 1, 17, 1, 35, 1, 58, 1, -1 }
ai_script { 0, -564, -767, 46, 2, -752, -542, 57, 28, VAR_26, 2, 0, 0, -514, -767, 815, 2, -821, -515, 663, 28, VAR_27, 2, 0, 0, -186, -767, -2, 2, -474, -544, -268, 28, VAR_28, 2, 0, 7, 8 }
VAR_26 "impread"
VAR_27 "impread"
VAR_28 "impread"
VAR_34 { 0, 354, -967, 926 }
walk_position { -187, -767, 930 }
VAR_39 { 314, -892, 1059 }
VAR_40 { 424, -992, 991 }
arr { VAR_39, VAR_40 }
BTREASURE { 0, 0 }
._on_load
call stop_bgm(int 1)
execute SCRIPT_10
if(gamevar is_room_cleared)
{
execute SCRIPT_9
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 3
execute SCRIPT_8
break
case 0
break
}
}
._infinite_loop
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_3
break
case 2
execute SCRIPT_5
break
case 3
execute SCRIPT_7
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
if(var VAR_11)
{
gamevar room_state = int 3
}
else
{
gamevar room_state ++
}
break
case 2
if(var VAR_11)
{
gamevar room_state ++
}
break
case 3
break
case 0
break
default
gamevar room_state = int 0
break
}
}
execute SCRIPT_12
._SCRIPT_3
switch(var VAR_33)
{
case 0
if(var VAR_34 == int 20)
{
var index = int 0
var david = call get_david_char()
while(var david)
{
if(var david != var DAVID)
{
call char_walk_to_pos(var david, @arr[var VAR_38])
var index ++
}
var david = call get_next_char_from_list()
}
}
if(var VAR_34 > int 280)
{
var VAR_33 ++
var VAR_34 = int 0
}
break
case 1
if(call is_char_standing(var DAVID))
{
var index = int 0
var david = call get_david_char()
while(var david)
{
if(var david != var DAVID)
{
call char_turn_to_pos(var david, call get_char_pos(var DAVID))
var index ++
}
var david = call get_next_char_from_list()
}
call char_turn_to_pos(var DAVID, call get_char_pos(var nothias))
var VAR_33 ++
var VAR_34 = int 0
}
break
case 2
if(var VAR_34 > int 30)
{
call start_dialog("O_DVDOTH", "NULL")
var VAR_33 ++
var VAR_34 = int 0
}
break
case 3
if(call func_6d() == int 16)
{
call char_turn_to_pos(var nothias, call get_char_pos(var DAVID))
var fire = call add_item_to_char(var nothias, int 0, int 0, int 1)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 4
if(var VAR_34 > int 60)
{
call func_e7(var nothias, call get_char_pos(var DAVID))
var VAR_33 ++
var VAR_34 = int 0
}
break
case 5
if(var VAR_34 > int 50)
{
call play_char_anim(var DAVID, var dodgeb_anim, int 0)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 6
if(call func_5c(var DAVID))
{
call set_char_walking(var DAVID)
call char_walk_to_pos(var DAVID, var &walk_position)
call char_remove_magic_and_weapons(var nothias)
call resume_conversation()
var VAR_33 ++
var VAR_34 = int 0
}
break
case 7
if(call func_6d() == int 1)
{
call func_55(var nothias, int 0)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 8
if(call func_5c(var nothias))
{
call func_e7(var nothias, call get_char_pos(var DAVID))
var VAR_33 ++
var VAR_34 = int 0
}
break
case 9
if(var VAR_34 > int 50)
{
call play_char_anim(var DAVID, var dodgeb_anim, int 0)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 10
if(call func_5c(var DAVID))
{
call resume_conversation()
var VAR_33 ++
var VAR_34 = int 0
}
break
case 11
if(call get_input_sys() != int 4)
{
call char_remove_magic_and_weapons(var nothias)
call func_19(var nothias, var DAVID)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 12
if(call is_char_standing(var nothias))
{
call play_char_anim(var nothias, var cstabov_anim, int 0)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 13
if(call func_5c(var nothias))
{
call func_14(var nothias, int 0)
call char_walk_to_pos(var nothias, var &walk_position1)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 14
if(call is_char_standing(var nothias))
{
call set_input_system(int 1)
call func_50(var nothias, int 8192)
call play_char_ai_script(var nothias, var &ai_script)
var VAR_33 ++
var VAR_34 = int 0
}
break
case 15
execute SCRIPT_11
break
}
var VAR_34 ++
._SCRIPT_4
var nothias = call create_char(var &walk_position1, "nothias", int 180, int 13)
gamevar script_object = var nothias
gamevar *object_p+6 |= int 8388608
gamevar global_inventory_p = var &VAR_21
var btreasure = call create_char(var &init_position, "btreasure", int 330, int 14)
var DAVID = call get_char_handle(int 65536)
var dodgeb_anim = call load_anim("dodgeb")
var cstabov_anim = call load_anim("cstabov")
call set_input_system(int 2)
._SCRIPT_5
switch(var VAR_52)
{
case 0
if(var VAR_53 == int 20)
{
var index = int 0
var david = call get_david_char()
while(var david)
{
if(var david != var DAVID)
{
call char_walk_to_pos(var david, @arr[var index])
var index ++
}
var david = call get_next_char_from_list()
}
}
if(var VAR_53 > int 280)
{
var VAR_52 ++
var VAR_53 = int 0
}
break
case 1
if(call is_char_standing(var DAVID))
{
call char_turn_to_pos(var nothias, call get_char_pos(var DAVID))
call char_turn_to_pos(var DAVID, call get_char_pos(var nothias))
call start_dialog("S_OTHRET", "ACT_2")
var VAR_52 ++
var VAR_53 = int 0
}
break
case 2
if(call get_input_sys() != int 4)
{
call func_50(var nothias, int 8192)
call play_char_ai_script(var nothias, var &ai_script)
call set_input_system(int 1)
var VAR_52 ++
var VAR_53 = int 0
}
break
case 3
execute SCRIPT_11
break
}
var VAR_53 ++
._SCRIPT_6
var nothias = call create_char(var &walk_position1, "nothias", int 180, int 13)
gamevar script_object = var nothias
gamevar *object_p+6 |= int 8388608
var DAVID = call get_char_handle(int 65536)
call set_input_system(int 2)
._SCRIPT_7
._SCRIPT_8
var nothias = call create_char(var &walk_position1, "nothias", int 180, int 13)
gamevar script_object = var nothias
gamevar *object_p+6 |= int 8388608
call func_50(var nothias, int 8192)
call play_char_ai_script(var nothias, var &ai_script)
call func_108("DOGWANK")
._SCRIPT_9
._SCRIPT_10
gamevar SMACKER_X = int 336
gamevar SMACKER_Y = int 96
call play_2d_anim("candle01", int 1, int 0, int 0)
gamevar SMACKER_X = int 0
gamevar SMACKER_Y = int 104
call play_2d_anim("candle02", int 1, int 1, int 0)
gamevar SMACKER_X = int 144
gamevar SMACKER_Y = int 136
call play_2d_anim("candle03", int 1, int 1, int 0)
gamevar SMACKER_X = int 488
gamevar SMACKER_Y = int 64
call play_2d_anim("bubble01", int 1, int 1, int 0)
gamevar SMACKER_X = int 312
gamevar SMACKER_Y = int 224
call play_2d_anim("bubble02", int 1, int 1, int 0)
call load_sound_set(int 47)
call func_ec(int 1, int -1, int 47, int 0)
._SCRIPT_11
switch(var VAR_44)
{
case 0
if(call ! func_af(int 0))
{
call set_input_system(int 2)
call func_1(var nothias, int -1)
var BTREASURE = call get_char_handle(int 1507328)
gamevar script_object = var BTREASURE
if(gamevar *object_p+5 != int 15)
{
call char_turn_to_pos(var nothias, call get_char_pos(gamevar control_char_p))
call start_dialog("S_DVDOTH", "NULL")
var VAR_44 ++
}
else
{
var VAR_44 = int 2
}
var VAR_45 = int 0
}
break
case 1
if(call get_input_sys() != int 4)
{
var VAR_44 ++
var VAR_45 = int 0
}
break
case 2
call func_2(var nothias)
var VAR_11 = int 1
call set_input_system(int 1)
var VAR_44 ++
var VAR_45 = int 0
break
case 10
if(var VAR_45 > int 30)
{
call start_dialog("S_OTHORB", "NULL")
var VAR_44 ++
var VAR_45 = int 0
}
break
case 11
if(call get_input_sys() != int 4)
{
call func_2(var nothias)
var david = call get_david_char()
while(var david)
{
call char_exit_door(var david, int 0)
var david = call get_next_char_from_list()
}
call set_input_system(int 1)
var VAR_44 ++
var VAR_45 = int 0
}
break
}
var VAR_45 ++
._SCRIPT_12
var VAR_1 = int 0
var david4 = call get_david_char()
var VAR_1 += call func_42(var david4, int 0)
var VAR_1 += call func_42(var david4, int 1)
var VAR_1 += call func_42(var david4, int 2)
var VAR_1 += call func_42(var david4, int 3)
var VAR_1 += call func_42(var david4, int 4)
var VAR_1 += call func_42(var david4, int 5)
var VAR_1 += call func_42(var david4, int 6)
var VAR_1 += call func_42(var david4, 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!")
}