-
Notifications
You must be signed in to change notification settings - Fork 3
/
libarea5.tsct
993 lines (965 loc) · 24.8 KB
/
libarea5.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
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
/*
* 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_15 0
VAR_16 0
VAR_17 0
VAR_18 0
VAR_19 0
VAR_20 0
VAR_21 0
VAR_22 0
VAR_23 0
VAR_24 0
shaman_imp { 0, 0 }
VAR_26 0
VAR_27 0
VAR_28 0
VAR_29 { 132, -997, -3627, 465, -997, -4742, -284, -997, -4055, -294, -997, -4784, -795, -997, -3611, -872, -997, -4317, -914, -997, -4797, -1287, -997, -3732, -1650, -997, -4100, -1869, -997, -3627 }
ai_script { 15, 16, 25, 1, 16, 38, 1, VAR_15, 10, 40, VAR_27, 16, 39, 1, VAR_29, 203, 7, VAR_28, 16, 38, VAR_31, 17, 10, 40, VAR_27, 16, 39, 1, VAR_29, 205, 7, VAR_28, 16, 38, VAR_32, 17, 10, 40, VAR_27, 16, 39, 1, VAR_29, 207, 7, VAR_28, 16, 38, VAR_33, 17, 10, 40, VAR_27, 16, 39, 1, VAR_29, 209, 7, VAR_28, 16, 26, VAR_34, 16, 28, 20, VAR_16, 30, 20, VAR_18, 32, 20, VAR_20, 27, 0, VAR_22, 29, 0, VAR_17, 31, 0, VAR_19, 33, 0, VAR_21, 34, 1, VAR_23, 38, 1, VAR_24, -269, 3, VAR_27, 16, 39, 1, 1, 35, 3, VAR_28, 0, 16, shaman_imp, 1, VAR_35, 38, 1, VAR_26, -284, -997, VAR_27, 16, 39, 1, 16, 38, 1, VAR_28, 10, 40, VAR_27, 16, 39, 1, VAR_29, 213, 10, VAR_28, 6, 36, VAR_36, 8 }
VAR_31 "pfew"
VAR_32 "pfew"
VAR_33 "pfew"
VAR_34 "pfew"
VAR_35 "startle"
VAR_36 "pfew"
init_position { 976, -997, -3636 }
walk_position { 465, -997, -4742 }
init_position2 { -1301, -997, -3803 }
init_position3 { -1559, -997, -3761 }
init_position4 { -1625, -997, -4041 }
init_position5 { -1415, -997, -4290 }
init_position6 { -729, -796, -3302 }
init_position7 { -473, -796, -3333 }
init_position8 { -260, -796, -3325 }
init_position1 { 1800, 441, -2200 }
VAR_61 { 973, -998, -3650, 133, -998, -3628, 709, -998, -4204, 465, -998, -4816, -300, -998, -4704, -1059, -998, -4675, -1748, -998, -3967, -1712, -998, -3673, -1078, -998, -3533, -685, -998, -3735, -1240, -998, -4194, -368, -998, -4404, -265, -796, -3313, -671, -796, -3254, 795, -396, -3299, -194, 4, -2826, -524, 4, -2783, -352, 4, -2074, 968, 4, -2037, 877, 4, -2362 }
VAR_62 { 0, 1, 20, 267, 8, 2, 4, 0, VAR_61, 0, 1, 16, 107, 114, -1, 2, 2, 3, 2, 5, 0, 100, 7, 1, 6, 6, 1, -1 }
VAR_64 1
VAR_71 { 0, 0 }
init_position10 { -1514, -997, -3199 }
VAR_96 1
init_position9 { -603, -997, -4344 }
VAR_105 { 0, 0, 0, 0, 0, 0 }
VAR_106 -1
walk_position2 { 127, 4, -2200 }
VAR_112 { 966, 4, -2176 }
VAR_113 { -596, 4, -2760 }
arr { 452, 455 }
walk_position3 { -135, 3, -2365 }
index VAR_112
VAR_117 VAR_113
walk_position1 { -262, -796, -3233 }
VAR_120 -1
._on_load
call load_sound_set(int 63)
/* play the sound 'gnoamb1' */
call play_loaded_sound(int 1, int -1, int 63, int 0)
if(gamevar is_room_cleared)
{
execute SCRIPT_3
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
call log_string("init_act2")
execute SCRIPT_18
break
case 3
execute SCRIPT_23
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_15
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_19
break
case 3
execute SCRIPT_24
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
call log_string("libarea5: act3")
gamevar room_state = int 3
break
case 2
gamevar room_state ++
break
case 3
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
._SCRIPT_4
var nyelimp = call create_char(var &init_position, "nyelimp*", int 0, int 13)
gamevar script_object = var nyelimp
gamevar *object_p+6 |= int 2048
gamevar script_object = var nyelimp
gamevar *character_movement_p+60 = int 1
gamevar *character_movement_p+53 = int 0
gamevar *character_stats_p+14 = int 81920
var VAR_7 = call func_41(var nyelimp, int 0)
call set_char_running(var nyelimp)
call char_walk_to_pos(var nyelimp, var &walk_position)
var DAVID = call get_char_handle(int 65536)
var GRANDAD = call get_char_handle(int 393216)
var pfew_anim = call load_anim("pfew")
var startle_anim = call load_anim("startle")
var come_anim = call load_anim("come")
var jestimp_anim = call load_anim("jestimp")
execute SCRIPT_9
call load_char("samnimp")
call load_item(int 88 /* moonstik */ )
call func_108("ARSE")
execute SCRIPT_16
._SCRIPT_5
switch(var VAR_66)
{
case 0
var VAR_66 ++
break
case 1
if(var VAR_26)
{
var VAR_66 ++
}
break
}
if(var VAR_24)
{
execute SCRIPT_8
}
if(call is_char_handle_in_level(int 1769472 /* YELIMP */ ))
{
execute SCRIPT_6
if(var VAR_64)
{
var VAR_63 = call get_char_movement_ptr(var nyelimp)
call func_100(var VAR_63)
}
execute SCRIPT_10
gamevar script_object = var nyelimp
if(gamevar *object_p+5 == int 6)
{
if(var VAR_65 > int 60)
{
call func_f5(var nyelimp)
call func_108("ARSE")
}
var VAR_65 ++
}
}
else
{
if(var ! VAR_13)
{
call log_string("secret not revealed - imp dead")
var VAR_12 = int 1
}
else
{
var VAR_12 = int 0
}
if(var VAR_7)
{
call func_12f(var VAR_7)
var VAR_7 = int 0
}
}
._SCRIPT_6
switch(var VAR_69)
{
case 0
if(call is_char_standing(var nyelimp))
{
call func_12f(var VAR_7)
var VAR_71 = call get_char_pos(var DAVID)
call func_21(var nyelimp, var VAR_71)
call func_95(var nyelimp, int 3, int 0)
call start_dialog("IYNhelp", "NULL")
var VAR_70 = int 0
var VAR_69 ++
}
break
case 1
if(call get_input_sys() != int 4)
{
call func_10c(var nyelimp, "marc")
var VAR_64 = int 0
call func_50(var nyelimp, int 8192)
call play_char_ai_script(var nyelimp, var &ai_script)
if(call is_char_handle_in_level(int 917505 /* IMP */ ))
{
call set_char_template(var neutral_imp, int 102)
call char_attack(var neutral_imp, var nyelimp)
}
if(call is_char_handle_in_level(int 917506 /* IMP */ ))
{
call set_char_template(var neutral_imp1, int 102)
call char_attack(var neutral_imp1, var nyelimp)
}
if(call is_char_handle_in_level(int 917507 /* IMP */ ))
{
call set_char_template(var neutral_imp2, int 102)
call char_attack(var neutral_imp2, var nyelimp)
}
if(call is_char_handle_in_level(int 917508 /* IMP */ ))
{
call set_char_template(var neutral_imp3, int 102)
call char_attack(var neutral_imp3, var nyelimp)
}
if(call is_char_handle_in_level(int 917509 /* IMP */ ))
{
call set_char_template(var bezerk_imp, int 103)
}
if(call is_char_handle_in_level(int 4194310 /* IMPBOSS */ ))
{
call set_char_template(var imp_boss, int 129)
}
if(call is_char_handle_in_level(int 917511 /* IMP */ ))
{
call set_char_template(var bezerk_imp1, int 103)
}
var VAR_69 = int 2
var VAR_70 = int 0
}
break
case 2
var enemies_num = call get_num_of_enemies()
if(var enemies_num == int 0)
{
call func_47(var nyelimp, int 8192)
var VAR_26 = int 1
var VAR_70 = int 0
var VAR_69 = int 14
}
break
case 14
call log_string("all chars killed")
call func_10c(var nyelimp, int 0)
call set_input_system(int 2)
var VAR_70 = int 0
var VAR_69 ++
break
case 15
if(var VAR_70 > int 100)
{
call char_walk_to_pos(var nyelimp, call get_char_pos(var DAVID))
var VAR_70 = int 0
var VAR_69 ++
}
break
case 16
if(call is_char_standing(var nyelimp))
{
call start_dialog("DVDIYN", "NULL")
call char_turn_to_pos(var DAVID, call get_char_pos(var nyelimp))
call char_turn_to_pos(var nyelimp, call get_char_pos(var DAVID))
var VAR_70 = int 0
var VAR_69 ++
}
break
case 17
if(call func_6d() == int 1)
{
call resume_conversation()
var VAR_70 = int 0
var VAR_69 ++
}
break
case 18
if(call get_input_sys() != int 4)
{
call func_108("NULL")
call char_walk_to(var nyelimp, int -1107, int -997, int -3742)
call set_input_system(int 1)
var VAR_70 = int 0
var VAR_69 ++
}
break
case 19
if(call is_char_standing(var nyelimp))
{
call play_char_anim(var nyelimp, var come_anim, int 0)
var VAR_70 = int 0
var VAR_69 ++
}
break
case 20
if(call func_5c(var nyelimp))
{
call func_2b(var nyelimp, int 2)
var VAR_70 = int 0
var VAR_69 ++
}
break
case 21
if(call is_char_standing(var nyelimp))
{
gamevar *scene_info_p+5 -= int 4
var VAR_13 = int 1
if(var VAR_7)
{
var VAR_28 = int 1
}
call remove_char(var nyelimp)
var VAR_70 = int 0
var VAR_69 ++
}
break
}
if(var VAR_27)
{
var VAR_7 = call func_41(var nyelimp, int 0)
var VAR_27 = int 0
}
if(var VAR_28)
{
call func_12f(var VAR_7)
var VAR_28 = int 0
var VAR_7 = int 0
}
var VAR_70 ++
._SCRIPT_7
var shaman_imp = call create_enemy(int 106, int 0, var &init_position1, int 0)
gamevar script_object = var shaman_imp
gamevar *character_movement_p+60 = int 1
._SCRIPT_8
switch(var VAR_80)
{
case 0
gamevar compile_init_character = int 0
execute SCRIPT_7
gamevar compile_init_character = int 1
var VAR_80 ++
var VAR_81 = int 0
break
case 1
call set_char_running(var shaman_imp)
call char_walk_to(var shaman_imp, int 160, int 30, int -2300)
var VAR_82 = call func_41(var shaman_imp, int 0)
var VAR_80 ++
var VAR_81 = int 0
break
case 2
if(call is_char_standing(var shaman_imp))
{
call func_12f(var VAR_82)
call func_95(var shaman_imp, int 6, int 0)
var VAR_83 = call get_char_movement_ptr(var shaman_imp)
call func_100(var VAR_83)
var VAR_80 ++
var VAR_81 = int 0
}
break
case 3
if(call is_not_force_scrolling() == int 1)
{
call play_char_anim(var shaman_imp, var jestimp_anim, int 0)
gamevar script_object = var shaman_imp
gamevar *character_movement_p+60 = int 0
var VAR_80 ++
var VAR_81 = int 0
}
break
case 4
if(var VAR_81 > int 120)
{
call char_stop(var shaman_imp)
call func_106(var shaman_imp, int 3, int 1, var &VAR_62)
call set_char_running(var shaman_imp)
gamevar script_object = var shaman_imp
gamevar *character_movement_p+57 = int 60
gamevar *character_movement_p+58 = int 90
gamevar *character_movement_p+59 = int 30
var VAR_80 ++
var VAR_81 = int 0
}
break
}
var VAR_81 ++
._SCRIPT_9
var neutral_imp = call create_enemy(int 102, int 1, var &init_position2, int 100)
call set_char_running(var neutral_imp)
gamevar script_object = var neutral_imp
gamevar *character_movement_p+53 = int 0
var neutral_imp1 = call create_enemy(int 102, int 2, var &init_position3, int 100)
call set_char_running(var neutral_imp1)
gamevar script_object = var neutral_imp1
gamevar *character_movement_p+53 = int 0
var neutral_imp2 = call create_enemy(int 102, int 3, var &init_position4, int 100)
call set_char_running(var neutral_imp2)
gamevar script_object = var neutral_imp2
gamevar *character_movement_p+53 = int 0
var neutral_imp3 = call create_enemy(int 102, int 4, var &init_position5, int 100)
call set_char_running(var neutral_imp3)
gamevar script_object = var neutral_imp3
gamevar *character_movement_p+53 = int 0
call freeze_enemy(var neutral_imp)
call freeze_enemy(var neutral_imp1)
call freeze_enemy(var neutral_imp2)
call freeze_enemy(var neutral_imp3)
var bezerk_imp = call create_enemy(int 103, int 5, var &init_position6, int 120)
var imp_boss = call create_enemy(int 129, int 6, var &init_position7, int 115)
var bezerk_imp1 = call create_enemy(int 103, int 7, var &init_position8, int 135)
call freeze_enemy(var bezerk_imp)
call freeze_enemy(var imp_boss)
call freeze_enemy(var bezerk_imp1)
gamevar script_object = var imp_boss
gamevar *character_stats_p+15 = int 30000
gamevar script_object = var imp_boss
gamevar *character_stats_p+16 = int 30000
._SCRIPT_10
if(var VAR_15 == int 1)
{
if(call is_char_handle_in_level(int 917505 /* IMP */ ))
{
execute SCRIPT_11
}
if(call is_char_handle_in_level(int 917506 /* IMP */ ))
{
execute SCRIPT_12
}
if(call is_char_handle_in_level(int 917507 /* IMP */ ))
{
execute SCRIPT_13
}
if(call is_char_handle_in_level(int 917508 /* IMP */ ))
{
execute SCRIPT_14
}
}
._SCRIPT_11
if(var VAR_16 == int 20)
{
if(call get_char_y(var nyelimp) > int -970)
{
call func_47(var neutral_imp, int -1)
call char_walk_to(var neutral_imp, int -721, int -997, int -3784)
var VAR_16 ++
var VAR_17 = int 0
}
}
if(var VAR_16 == int 21)
{
if(call is_char_standing(var neutral_imp))
{
call func_36(var neutral_imp, int 160, int 30, int -2300)
var VAR_16 ++
var VAR_17 = int 0
}
}
if(var VAR_16 == int 22)
{
if(var VAR_80 == int 3)
{
call play_char_anim(var neutral_imp, var startle_anim, int 0)
var VAR_16 ++
var VAR_17 = int 0
}
}
if(var VAR_16 == int 23)
{
if(call func_5c(var neutral_imp))
{
call log_string("start AI!!!")
call set_char_template(var neutral_imp, int 103)
var VAR_16 ++
var VAR_17 = int 0
}
}
var VAR_17 ++
._SCRIPT_12
if(var VAR_18 == int 20)
{
if(call get_char_y(var nyelimp) > int -970)
{
call func_47(var neutral_imp1, int -1)
call char_walk_to(var neutral_imp1, int -724, int -997, int -4043)
var VAR_18 ++
var VAR_19 = int 0
}
}
if(var VAR_18 == int 21)
{
if(call is_char_standing(var neutral_imp1))
{
call func_36(var neutral_imp1, int 160, int 30, int -2300)
var VAR_18 ++
var VAR_19 = int 0
}
}
if(var VAR_18 == int 22)
{
if(var VAR_80 == int 3)
{
call play_char_anim(var neutral_imp1, var startle_anim, int 0)
var VAR_18 ++
var VAR_19 = int 0
}
}
if(var VAR_18 == int 23)
{
if(call func_5c(var neutral_imp1))
{
call log_string("start AI!!!")
call set_char_template(var neutral_imp1, int 103)
var VAR_18 ++
var VAR_19 = int 0
}
}
var VAR_19 ++
._SCRIPT_13
if(var VAR_20 == int 20)
{
if(call get_char_y(var nyelimp) > int -970)
{
call func_47(var neutral_imp2, int -1)
call char_walk_to(var neutral_imp2, int -445, int -997, int -4150)
var VAR_20 ++
var VAR_21 = int 0
}
}
if(var VAR_20 == int 21)
{
if(call is_char_standing(var neutral_imp2))
{
call func_36(var neutral_imp2, int 160, int 30, int -2300)
var VAR_20 ++
var VAR_21 = int 0
}
}
if(var VAR_20 == int 22)
{
if(var VAR_80 == int 3)
{
call play_char_anim(var neutral_imp2, var startle_anim, int 0)
var VAR_20 ++
var VAR_21 = int 0
}
}
if(var VAR_20 == int 23)
{
if(call func_5c(var neutral_imp2))
{
call log_string("start AI!!!")
call set_char_template(var neutral_imp2, int 103)
var VAR_20 ++
var VAR_21 = int 0
}
}
var VAR_21 ++
._SCRIPT_14
if(var VAR_22 == int 20)
{
if(call get_char_y(var nyelimp) > int -970)
{
call func_47(var neutral_imp3, int -1)
call char_walk_to(var neutral_imp3, int -891, int -997, int -4032)
var VAR_22 ++
var VAR_23 = int 0
}
}
if(var VAR_22 == int 21)
{
if(call is_char_standing(var neutral_imp3))
{
call func_36(var neutral_imp3, int 160, int 30, int -2300)
var VAR_22 ++
var VAR_23 = int 0
}
}
if(var VAR_22 == int 22)
{
if(var VAR_80 == int 3)
{
call play_char_anim(var neutral_imp3, var startle_anim, int 0)
var VAR_22 ++
var VAR_23 = int 0
}
}
if(var VAR_22 == int 23)
{
if(call func_5c(var neutral_imp3))
{
call log_string("start AI!!!")
call set_char_template(var neutral_imp3, int 103)
var VAR_22 ++
var VAR_23 = int 0
}
}
var VAR_23 ++
._SCRIPT_15
if(gamevar script_time > var VAR_125)
{
var VAR_125 = gamevar script_time + int 600 + call randomize_int(int 0, int 400)
var VAR_123 = int 5 + call randomize_int(int 0, int 4)
call play_loaded_sound(var VAR_123, int 0, int 63, int 0)
}
if(gamevar script_time > var VAR_126)
{
var VAR_126 = gamevar script_time + int 250 + call randomize_int(int 0, int 150)
var VAR_123 = int 9 + call randomize_int(int 0, int 4)
call play_loaded_sound(var VAR_123, int 0, int 63, int 0)
}
if(gamevar script_time > var VAR_124)
{
var VAR_124 = gamevar script_time + int 300 + call randomize_int(int 0, int 200)
var VAR_123 = int 2 + call randomize_int(int 0, int 3)
call play_loaded_sound(var VAR_123, int 0, int 63, int 0)
}
._SCRIPT_16
call func_116("gno", "eastower", int 3)
call set_scene_overwrite_act("gno", "eastower", int 2)
call func_116("gno", "gnolib1", int 2)
call set_scene_overwrite_act("gno", "gnolib1", int 2)
call func_116("gno", "gnosnake", int 2)
call set_scene_overwrite_act("gno", "gnosnake", int 2)
call func_116("gno", "libarea3", int 2)
call set_scene_overwrite_act("gno", "libarea3", int 2)
call func_116("gno", "libarea4", int 2)
call set_scene_overwrite_act("gno", "libarea4", int 2)
call func_116("gno", "liblink", int 2)
call set_scene_overwrite_act("gno", "liblink", int 2)
call func_116("gno", "middle", int 2)
call set_scene_overwrite_act("gno", "middle", int 2)
._SCRIPT_17
var grow_big_yellow_imp = call create_enemy(int 119, int 0, var &init_position9, int 0)
call func_103(var grow_big_yellow_imp)
._SCRIPT_18
var pfew_anim = call load_anim("pfew")
var yibscale_anim = call load_anim("yibscale")
var nyelimp = call create_char(var &init_position10, "nyelimp", int 70, int 13)
gamevar script_object = var nyelimp
gamevar *object_p+6 |= int 2048
gamevar script_object = var nyelimp
gamevar *object_p+6 |= int 67108864
gamevar script_object = var nyelimp
gamevar *object_p+6 |= int 1048576
gamevar script_object = var nyelimp
gamevar *character_movement_p+60 = int 1
gamevar *character_movement_p+53 = int 0
var potblue = call add_item_to_char(var nyelimp, int 33, int 0, int 0)
call set_char_running(var nyelimp)
call char_walk_to(var nyelimp, int -603, int -997, int -4344)
var DAVID = call get_char_handle(int 65536)
var GRANDAD = call get_char_handle(int 393216)
call func_108("act2")
call set_input_system(int 2)
call load_char("yimpboss")
call load_char("imp")
call load_item(int 86 /* yibclub */ )
._SCRIPT_19
switch(var VAR_99)
{
case 0
if(call is_char_handle_in_level(int 1769472 /* YELIMP */ ))
{
execute SCRIPT_20
}
else
{
var VAR_99 ++
var VAR_100 = int 0
}
break
case 1
if(var VAR_100 > int 10)
{
var VAR_99 ++
var VAR_100 = int 0
}
break
case 2
if(var ! VAR_97)
{
if(var VAR_95)
{
if(call is_char_handle_in_level(int 1703936 /* YIMPBOSS */ ))
{
var VAR_96 = int 1
}
else
{
var VAR_96 = int 0
}
}
if(var VAR_96)
{
execute SCRIPT_21
}
else
{
gamevar scroll_x_shake = int 0
gamevar scroll_y_shake = int 0
var VAR_95 = int 0
var VAR_97 = int 1
call func_53(var GRANDAD, int 4)
call char_follow_char(var GRANDAD, var DAVID)
var VAR_99 ++
var VAR_100 = int 0
}
}
break
case 3
if(var VAR_100 == int 100)
{
call play_bgm("STING2")
gamevar scroll_x_shake = int 0
gamevar scroll_y_shake = int 0
var VAR_99 ++
var VAR_100 = int 0
}
break
case 4
if(call func_4c())
{
call play_bgm("GNO")
var VAR_99 ++
}
break
}
if(var VAR_99 > int 0)
{
execute SCRIPT_22
}
var VAR_100 ++
._SCRIPT_20
if(var VAR_106 != var VAR_104)
{
var VAR_106 = var VAR_104
call log_var(var VAR_104)
}
switch(var VAR_104)
{
case 0
if(call is_char_standing(var nyelimp))
{
call func_36(var nyelimp, int -1190, int -997, int -3202)
var VAR_104 ++
var VAR_105 = int 0
}
break
case 1
if(var VAR_105 > int 30)
{
call toggle_or_use_char_item(var nyelimp, var potblue)
var VAR_104 ++
var VAR_105 = int 0
}
break
case 2
gamevar script_object = var nyelimp
if(gamevar *object_p+5 == int 13)
{
call play_char_anim(var nyelimp, var pfew_anim, int 0)
var VAR_104 ++
var VAR_105 = int 0
}
break
case 3
if(var VAR_105 == int 100)
{
call play_3d_fx("WOLFSMOKE", call get_char_movement_ptr(var nyelimp), int 0, int 0)
}
if(var VAR_105 > int 120)
{
var VAR_104 ++
var VAR_105 = int 0
call kill_char(var nyelimp)
}
break
}
var VAR_105 ++
._SCRIPT_21
if(var VAR_120 != var VAR_117)
{
var VAR_120 = var VAR_117
call log_var(var VAR_117)
}
switch(var VAR_117)
{
case 0
if(var VAR_118 == int 20)
{
call stop_bgm(int 1)
}
if(var VAR_118 > int 30)
{
gamevar compile_init_character = int 0
execute SCRIPT_17
var VAR_95 = int 1
gamevar compile_init_character = int 1
gamevar script_object = var GRANDAD
gamevar *object_p+6 |= int 53687091
call char_unfollow_char(var GRANDAD)
call set_char_lvl(var GRANDAD, int 5)
call char_walk_to_pos(var GRANDAD, var &walk_position1)
var VAR_98 = int 1
call play_bgm("GUDEVLP1")
var VAR_117 ++
var VAR_118 = int 0
}
break
case 1
if(var VAR_118 > int 50)
{
call set_input_system(int 1)
var VAR_117 ++
var VAR_118 = int 0
}
break
}
var VAR_118 ++
._SCRIPT_22
if(var ! VAR_98)
{
exit_script
}
switch(var VAR_108)
{
case 0
if(var VAR_109 > int 10)
{
var bezerk_imp2 = call create_enemy_through_door(int 103, int 0, int 1, int 0)
call set_char_running(var bezerk_imp2)
call freeze_enemy(var bezerk_imp2)
gamevar script_object = var bezerk_imp2
gamevar *object_p+6 |= int 2048
call char_walk_to_pos(var bezerk_imp2, var &walk_position2)
var VAR_108 ++
var VAR_109 = int 0
}
break
case 1
if(call is_char_handle_in_level(int 917504 /* IMP */ ))
{
if(call is_char_standing(var bezerk_imp2))
{
call char_walk_to_pos(var GRANDAD, var &walk_position3)
var VAR_108 ++
var VAR_109 = int 0
}
}
else
{
call char_walk_to_pos(var GRANDAD, var &walk_position3)
var VAR_108 ++
var VAR_109 = int 0
}
break
case 2
if(call is_char_standing(var GRANDAD))
{
if(call is_char_handle_in_level(int 917504 /* IMP */ ))
{
call func_c(var GRANDAD, int 28, call get_char_movement_ptr(var bezerk_imp2), var bezerk_imp2)
}
var VAR_108 ++
var VAR_109 = int 0
}
break
case 3
if(var VAR_109 > int 100)
{
if(call is_char_handle_in_level(int 917504 /* IMP */ ))
{
call func_c(var GRANDAD, int 28, call get_char_movement_ptr(var bezerk_imp2), var bezerk_imp2)
}
else
{
var index = call randomize_int(int 0, int 2)
call char_walk_to_pos(var GRANDAD, @arr[var VAR_116])
var VAR_108 ++
}
var VAR_109 = int 0
}
break
case 4
if(call is_char_standing(var GRANDAD))
{
call char_turn_to_pos(var GRANDAD, var &walk_position3)
var VAR_108 ++
var VAR_109 = int 0
}
break
case 5
if(var VAR_109 > int 30)
{
var VAR_108 ++
var VAR_109 = int 0
}
break
case 6
if(call ! is_char_handle_in_level(int 1703936 /* YIMPBOSS */ ))
{
call char_follow_char(var GRANDAD, var DAVID)
var VAR_98 = int 0
}
else
{
gamevar script_object = var DAVID
if(gamevar HP == int 1)
{
var VAR_108 = int 20
}
else
{
var VAR_108 = int 0
var VAR_109 = int 0
}
}
break
case 20
gamevar script_object = var GRANDAD
gamevar *object_p+6 &= int -5368709
call set_char_lvl(var GRANDAD, int 1)
call char_walk_to_pos(var GRANDAD, var &init_position9)
call char_follow_char(var GRANDAD, var DAVID)
gamevar script_object = var GRANDAD
gamevar HP = int 10
var VAR_108 ++
var VAR_109 = int 0
break
}
var VAR_109 ++
._SCRIPT_23
call func_108("ARSE")
._SCRIPT_24