-
Notifications
You must be signed in to change notification settings - Fork 0
/
war02a.go
2293 lines (2289 loc) · 43.9 KB
/
war02a.go
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
994
995
996
997
998
999
1000
package war02a
import (
"strconv"
"github.com/noxworld-dev/noxscript/ns/v3"
)
var (
ivar4 int
flag5 bool
flag6 bool
obj7 ns.ObjectID
obj8 ns.ObjectID
gvar9 ns.ObjectGroupID
wp10 ns.WaypointID
flag11 bool
flag12 bool
gvar13 ns.ObjectGroupID
gvar14 ns.ObjectGroupID
gvar15 ns.ObjectGroupID
obj16 ns.ObjectID
obj17 ns.ObjectID
obj18 ns.ObjectID
obj19 ns.ObjectID
obj20 ns.ObjectID
obj21 ns.ObjectID
obj22 ns.ObjectID
obj23 ns.ObjectID
obj24 ns.ObjectID
obj25 ns.ObjectID
obj26 ns.ObjectID
obj27 ns.ObjectID
obj28 ns.ObjectID
obj29 ns.ObjectID
obj30 ns.ObjectID
obj31 ns.ObjectID
obj32 ns.ObjectID
obj33 ns.ObjectID
obj34 ns.ObjectID
obj35 ns.ObjectID
obj36 ns.ObjectID
obj37 ns.ObjectID
obj38 ns.ObjectID
obj39 ns.ObjectID
obj40 ns.ObjectID
obj41 ns.ObjectID
obj42 ns.ObjectID
obj43 ns.ObjectID
obj44 ns.ObjectID
obj45 ns.ObjectID
obj46 ns.ObjectID
obj47 ns.ObjectID
obj48 ns.ObjectID
obj49 ns.ObjectID
obj50 ns.ObjectID
obj51 ns.ObjectID
obj52 ns.ObjectID
obj53 ns.ObjectID
obj54 [40]ns.ObjectID
wp55 ns.WaypointID
wp56 ns.WaypointID
wp57 ns.WaypointID
wp58 ns.WaypointID
wp59 ns.WaypointID
wp60 ns.WaypointID
wp61 ns.WaypointID
wp62 ns.WaypointID
wp63 ns.WaypointID
wp64 ns.WaypointID
wp65 ns.WaypointID
wp66 ns.WaypointID
wp67 ns.WaypointID
wp68 ns.WaypointID
wp69 ns.WaypointID
wp70 ns.WaypointID
wp71 ns.WaypointID
wp72 ns.WaypointID
wp73 ns.WaypointID
wp74 ns.WaypointID
wp75 ns.WaypointID
wp76 ns.WaypointID
wp77 ns.WaypointID
wp78 ns.WaypointID
wp79 ns.WaypointID
wp80 ns.WaypointID
wp81 ns.WaypointID
wp82 ns.WaypointID
wp83 ns.WaypointID
wp84 ns.WaypointID
wp85 ns.WaypointID
wp86 ns.WaypointID
wp87 ns.WaypointID
wp88 ns.WaypointID
wp89 ns.WaypointID
ivar90 int
obj91 ns.ObjectID
obj92 ns.ObjectID
obj93 ns.ObjectID
obj94 ns.ObjectID
obj95 ns.ObjectID
obj96 ns.ObjectID
obj97 ns.ObjectID
gvar98 ns.WallGroupID
gvar99 int
gvar100 int
gvar101 int
gvar102 int
gvar103 int
gvar104 int
gvar105 int
gvar106 int
gvar107 int
gvar108 int
gvar109 int
gvar110 int
gvar111 int
gvar112 int
gvar113 int
gvar114 int
gvar115 int
gvar116 int
gvar117 int
gvar118 int
gvar119 int
gvar120 int
gvar121 int
gvar122 int
gvar123 int
gvar124 int
gvar125 int
gvar126 int
gvar127 int
gvar128 int
gvar129 int
gvar130 int
gvar131 int
gvar132 int
gvar133 int
gvar134 int
gvar135 int
gvar136 int
gvar137 int
gvar138 int
flag139 bool
flag140 bool
flag141 bool
flag142 bool
flag143 bool
flag144 bool
flag145 bool
flag146 bool
flag147 bool
flag148 bool
flag149 bool
ivar150 int
ivar151 int
ivar152 int
ivar153 int
ivar154 int
ivar155 int
ivar156 int
ivar157 int
ivar158 int
ivar159 int
ivar160 int
ivar161 int
ivar162 int
ivar163 int
ivar164 int
ivar165 int
gvar166 int
gvar167 int
gvar168 int
gvar169 int
gvar170 int
gvar171 int
gvar172 int
gvar173 int
gvar174 int
gvar175 int
gvar176 int
gvar177 int
gvar178 int
gvar179 int
gvar180 int
gvar181 int
gvar182 int
gvar183 int
gvar184 int
gvar185 int
obj186 [8]ns.ObjectID
obj187 [8]ns.ObjectID
obj188 [8]ns.ObjectID
obj189 [8]ns.ObjectID
obj190 [8]ns.ObjectID
obj191 [8]ns.ObjectID
obj192 [8]ns.ObjectID
obj193 [8]ns.ObjectID
obj194 [8]ns.ObjectID
obj195 [8]ns.ObjectID
wp196 [8]ns.WaypointID
wp197 [8]ns.WaypointID
wp198 [8]ns.WaypointID
wp199 [8]ns.WaypointID
wp200 [8]ns.WaypointID
wp201 [8]ns.WaypointID
wp202 [8]ns.WaypointID
wp203 [8]ns.WaypointID
wp204 [8]ns.WaypointID
wp205 [8]ns.WaypointID
ivar206 int
obj207 ns.ObjectID
obj208 ns.ObjectID
obj209 ns.ObjectID
obj210 ns.ObjectID
obj211 ns.ObjectID
obj212 ns.ObjectID
obj213 ns.ObjectID
gvar214 ns.WallGroupID
flag215 bool
flag216 bool
gvar217 int
gvar218 int
ivar219 int
obj220 ns.ObjectID
obj221 ns.ObjectID
obj222 ns.ObjectID
obj223 ns.ObjectID
obj224 ns.ObjectID
obj225 ns.ObjectID
obj226 ns.ObjectID
obj227 ns.ObjectID
gvar228 ns.WallGroupID
ivar229 int
obj230 ns.ObjectID
obj231 ns.ObjectID
obj232 ns.ObjectID
gvar233 ns.ObjectGroupID
gvar234 ns.ObjectGroupID
gvar235 ns.WallGroupID
wp236 ns.WaypointID
flag237 bool
flag238 bool
gvar239 ns.ObjectGroupID
obj240 ns.ObjectID
obj241 ns.ObjectID
obj242 ns.ObjectID
obj243 ns.ObjectID
obj244 ns.ObjectID
obj245 ns.ObjectID
obj246 ns.ObjectID
obj247 ns.ObjectID
obj248 ns.ObjectID
obj249 ns.ObjectID
obj250 ns.ObjectID
obj251 ns.ObjectID
obj252 ns.ObjectID
obj253 ns.ObjectID
obj254 ns.ObjectID
obj255 ns.ObjectID
obj256 ns.ObjectID
obj257 ns.ObjectID
obj258 ns.ObjectID
obj259 ns.ObjectID
obj260 ns.ObjectID
obj261 ns.ObjectID
wp262 ns.WaypointID
wp263 ns.WaypointID
wp264 ns.WaypointID
wp265 ns.WaypointID
wp266 ns.WaypointID
wp267 ns.WaypointID
wp268 ns.WaypointID
wp269 ns.WaypointID
wp270 ns.WaypointID
wp271 ns.WaypointID
wp272 ns.WaypointID
wp273 ns.WaypointID
wp274 ns.WaypointID
wp275 ns.WaypointID
wp276 ns.WaypointID
wp277 ns.WaypointID
wp278 ns.WaypointID
wp279 ns.WaypointID
wp280 ns.WaypointID
wp281 ns.WaypointID
flag282 bool
obj283 ns.ObjectID
obj284 ns.ObjectID
gvar285 ns.ObjectGroupID
)
func init() {
flag5 = true
flag6 = false
flag11 = true
flag12 = true
ivar90 = 0
gvar99 = 0
gvar100 = 1
gvar101 = 2
gvar102 = 3
gvar103 = 0
gvar104 = 1
gvar105 = 2
gvar106 = 3
gvar107 = 0
gvar108 = 1
gvar109 = 2
gvar110 = 3
gvar111 = 0
gvar112 = 1
gvar113 = 2
gvar114 = 3
gvar115 = 0
gvar116 = 1
gvar117 = 2
gvar118 = 3
gvar119 = 0
gvar120 = 1
gvar121 = 2
gvar122 = 3
gvar123 = 0
gvar124 = 1
gvar125 = 2
gvar126 = 3
gvar127 = 0
gvar128 = 1
gvar129 = 2
gvar130 = 3
gvar131 = 0
gvar132 = 1
gvar133 = 2
gvar134 = 3
gvar135 = 0
gvar136 = 1
gvar137 = 2
gvar138 = 3
flag139 = true
flag140 = true
flag141 = true
flag142 = true
flag143 = true
flag144 = true
flag145 = true
flag146 = true
flag147 = true
flag148 = true
flag149 = true
gvar166 = gvar100
gvar167 = gvar104
gvar168 = gvar108
gvar169 = gvar112
gvar170 = gvar116
gvar171 = gvar120
gvar172 = gvar124
gvar173 = gvar128
gvar174 = gvar132
gvar175 = gvar136
gvar176 = gvar99
gvar177 = gvar103
gvar178 = gvar107
gvar179 = gvar111
gvar180 = gvar115
gvar181 = gvar119
gvar182 = gvar123
gvar183 = gvar127
gvar184 = gvar131
gvar185 = gvar135
ivar206 = 0
flag215 = true
flag216 = true
ivar219 = 0
ivar229 = 0
flag237 = true
flag238 = false
flag282 = false
}
func secretTrigger() {
ns.MoveWaypoint(wp55, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()))
ns.AudioEvent(ns.SecretFound, wp55)
ns.PrintToAll("GeneralPrint:SecretFound")
ns.GiveXp(ns.GetHost(), 150)
}
func PlayGauntletMusic() {
ns.Music(29, 100)
}
func initGauntletDoor() {
gvar14 = ns.ObjectGroup("GauntletGears")
ns.ObjectGroupOff(gvar14)
gvar13 = ns.ObjectGroup("GauntletDoorMovers")
obj16 = ns.Object("B1mover")
obj17 = ns.Object("B2mover")
obj18 = ns.Object("B3mover")
obj19 = ns.Object("B4mover")
obj20 = ns.Object("B5mover")
obj21 = ns.Object("B6mover")
obj22 = ns.Object("B7mover")
obj23 = ns.Object("B8mover")
obj24 = ns.Object("B9mover")
obj25 = ns.Object("B10mover")
obj26 = ns.Object("F1mover")
obj27 = ns.Object("F2mover")
obj28 = ns.Object("F3mover")
obj29 = ns.Object("F4mover")
obj30 = ns.Object("F5mover")
obj31 = ns.Object("F6mover")
obj32 = ns.Object("F7mover")
obj33 = ns.Object("F8mover")
obj34 = ns.Object("F9mover")
obj35 = ns.Object("F10mover")
wp56 = ns.Waypoint("B1way")
wp57 = ns.Waypoint("B2way")
wp58 = ns.Waypoint("B3way")
wp59 = ns.Waypoint("B4way")
wp60 = ns.Waypoint("B5way")
wp61 = ns.Waypoint("B6way")
wp62 = ns.Waypoint("B7way")
wp63 = ns.Waypoint("B8way")
wp64 = ns.Waypoint("B9way")
wp65 = ns.Waypoint("B10way")
wp66 = ns.Waypoint("B11way")
wp67 = ns.Waypoint("B12way")
wp68 = ns.Waypoint("B13way")
wp69 = ns.Waypoint("F1way")
wp70 = ns.Waypoint("F2way")
wp71 = ns.Waypoint("F3way")
wp72 = ns.Waypoint("F4way")
wp73 = ns.Waypoint("F5way")
wp74 = ns.Waypoint("F6way")
wp75 = ns.Waypoint("F7way")
wp76 = ns.Waypoint("F8way")
wp77 = ns.Waypoint("F9way")
wp78 = ns.Waypoint("F10way")
wp79 = ns.Waypoint("F11way")
wp80 = ns.Waypoint("F12way")
wp81 = ns.Waypoint("F13way")
ns.ObjectGroupOff(gvar233)
ns.LockDoor(obj283)
ns.LockDoor(obj284)
}
func gauntletGearsStop() {
ns.ObjectGroupOff(gvar14)
}
func openGauntlet() {
if flag6 {
goto LABEL1
}
flag6 = true
ns.ObjectGroupOn(gvar14)
ns.FrameTimer(75, gauntletGearsStop)
ns.ObjectGroupOn(gvar13)
ns.Move(obj16, wp56)
ns.Move(obj17, wp57)
ns.Move(obj18, wp58)
ns.Move(obj19, wp59)
ns.Move(obj20, wp60)
ns.Move(obj21, wp61)
ns.Move(obj22, wp63)
ns.Move(obj23, wp64)
ns.Move(obj24, wp65)
ns.Move(obj25, wp66)
ns.Move(obj26, wp71)
ns.Move(obj27, wp72)
ns.Move(obj28, wp73)
ns.Move(obj29, wp74)
ns.Move(obj30, wp76)
ns.Move(obj31, wp77)
ns.Move(obj32, wp78)
ns.Move(obj33, wp79)
ns.Move(obj34, wp80)
ns.Move(obj35, wp81)
ns.FrameTimer(3, stoneGrinder)
LABEL1:
return
}
func closeGauntlet() {
if !flag6 {
goto LABEL1
}
flag6 = false
ns.ObjectGroupOn(gvar14)
ns.FrameTimer(75, gauntletGearsStop)
ns.Move(obj16, wp58)
ns.Move(obj17, wp59)
ns.Move(obj18, wp60)
ns.Move(obj19, wp61)
ns.Move(obj20, wp62)
ns.Move(obj21, wp63)
ns.Move(obj22, wp65)
ns.Move(obj23, wp66)
ns.Move(obj24, wp67)
ns.Move(obj25, wp68)
ns.Move(obj26, wp69)
ns.Move(obj27, wp70)
ns.Move(obj28, wp71)
ns.Move(obj29, wp72)
ns.Move(obj30, wp74)
ns.Move(obj31, wp75)
ns.Move(obj32, wp76)
ns.Move(obj33, wp77)
ns.Move(obj34, wp78)
ns.Move(obj35, wp79)
ns.FrameTimer(10, stoneGrinder)
LABEL1:
return
}
func stoneGrinder() {
ns.MoveWaypoint(wp55, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()))
ns.AudioEvent(ns.BoulderMove, wp55)
ns.AudioEvent(ns.SecretWallStoneOpen, wp69)
ns.AudioEvent(ns.BoulderMove, wp70)
ns.AudioEvent(ns.SecretWallStoneOpen, wp71)
ns.AudioEvent(ns.BoulderMove, wp72)
ns.AudioEvent(ns.SecretWallStoneOpen, wp73)
ns.AudioEvent(ns.BoulderMove, wp74)
ns.AudioEvent(ns.SecretWallStoneOpen, wp75)
ns.AudioEvent(ns.BoulderMove, wp76)
ns.AudioEvent(ns.SecretWallStoneOpen, wp77)
ns.AudioEvent(ns.BoulderMove, wp78)
ns.AudioEvent(ns.SecretWallStoneOpen, wp79)
}
func openingGauntletPiece() {
PlayGauntletMusic()
ns.WideScreen(true)
ns.Frozen(ns.GetHost(), true)
ns.LookAtObject(ns.GetHost(), obj42)
ns.CreatureGuard(obj42, 4982, 5036, ns.GetObjectX(obj44), ns.GetObjectY(obj44), 0)
ns.SetDialog(obj42, ns.NEXT, guardTalk2Start, guardTalk2End)
ns.StartDialog(obj42, ns.GetHost())
}
func realHorrendousTalk1Start() {
ns.CreatureGuard(obj44, 4991, 4991, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 0)
ns.TellStory(ns.DemonRecognize, "War02A.scr:RealTalk1Start")
ns.JournalEntry(ns.GetHost(), "War2Gauntlet", 2)
}
func realHorrendousTalk1End() {
ns.SetDialog(obj44, "FALSE", realHorrendousTalk2Start, realHorrendousTalk2End)
ns.CreatureGuard(obj44, 5071, 4979, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 0)
ns.CreatureGuard(obj42, 4980, 5059, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 0)
ns.CreatureGuard(obj7, 4922, 5014, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 0)
ns.CreatureGuard(obj8, 5014, 4922, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 0)
ns.WideScreen(false)
ns.Frozen(ns.GetHost(), false)
}
func realHorrendousTalk2Start() {
ns.TellStory(ns.DemonRecognize, "War02A.scr:RealTalk2Start")
}
func realHorrendousTalk2End() {
ns.SetDialog(obj44, "FALSE", realHorrendousTalk3Start, realHorrendousTalk3End)
}
func realHorrendousTalk3Start() {
ns.TellStory(ns.DemonRecognize, "War02A.scr:RealTalk3Start")
}
func realHorrendousTalk3End() {
ns.CancelDialog(obj44)
}
func guardTalk2Start() {
ns.TellStory(ns.SwordsmanRecognize, "War02A.scr:GuardSay1Start")
}
func guardTalk2End() {
ns.CancelDialog(obj42)
ns.SetDialog(obj44, "FALSE", realHorrendousTalk1Start, realHorrendousTalk1End)
ns.StartDialog(obj44, ns.GetHost())
}
func horrendousTalk1Start() {
ns.TellStory(ns.DemonRecognize, "War02A.scr:HorrendousTalk1Start")
}
func horrendousTalk1End() {
ns.CancelDialog(obj43)
ns.LookAtObject(obj43, obj45)
ns.Frozen(ns.GetHost(), false)
ns.WideScreen(false)
ns.FrameTimer(5, chickenShirtTalk1Start)
}
func chickenShirtTalk1Start() {
ns.Chat(obj47, "War02A.scr:ChickenTalk1Start")
ns.FrameTimer(120, redShirtRunGauntlet)
}
func horrendousSay1() {
if !ns.IsCaller(ns.GetHost()) {
goto LABEL1
}
if !flag11 {
goto LABEL1
}
ns.Music(0, 100)
ns.ObjectGroupOn(gvar15)
flag11 = false
ns.Frozen(ns.GetHost(), true)
ns.WideScreen(true)
ns.LockDoor(obj50)
ns.LockDoor(obj51)
ns.SetDialog(obj43, "FALSE", horrendousTalk1Start, horrendousTalk1End)
ns.StartDialog(obj43, ns.GetHost())
LABEL1:
return
}
func redShirtRunGauntlet() {
ns.AudioEvent(ns.SwordsmanHurt, wp89)
ns.Chat(obj45, "War02A.scr:RedShirtRunGauntlet")
ns.FrameTimer(70, redShirtDies)
}
func redShirtDies() {
ns.AudioEvent(ns.BerserkerChargeInvoke, wp88)
ns.Wander(obj45)
}
func bonesFly() {
ns.AudioEvent(ns.HammerMissing, wp89)
ns.AudioEvent(ns.GolemHitting, wp89)
ns.Effect(ns.JIGGLE, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 10, 0)
ns.AudioEvent(ns.EmberDemonDie, wp88)
ns.AudioEvent(ns.SkeletonDie, wp89)
ivar4 = 0
for {
if !(ivar4 < 40) {
goto LABEL1
}
obj54[ivar4] = ns.CreateObject("ArmBone", wp88)
ns.PushObject(obj54[ivar4], -150, 1880, 3553)
ivar4 += 1
}
LABEL1:
ivar4 = 0
for {
if !(ivar4 < 40) {
goto LABEL3
}
obj54[ivar4] = ns.CreateObject("LegBone", wp88)
ns.PushObject(obj54[ivar4], -150, 1880, 3553)
ivar4 += 1
}
LABEL3:
ns.FrameTimer(30, chickenShirtRuns)
ns.FrameTimer(10, deadHead)
}
func deadHead() {
ns.Delete(obj45)
ns.AudioEvent("MechGolemHit", wp86)
ns.AudioEvent("SpikesDown", wp87)
ns.AudioEvent(ns.SkeletonDie, wp89)
ns.MoveObject(obj46, 1692, 3627)
ns.PushObject(obj46, -150, 1880, 3553)
ns.SetDialog(obj46, ns.NORMAL, deadTalk1Start, deadTalk1End)
ns.FrameTimer(40, chickenShirtRuns)
}
func deadTalk1Start() {
ns.TellStory("EmberDemonDies", "War02a:RedShirtDead")
}
func deadTalk1End() {
ns.CancelDialog(obj46)
}
func chickenShirtRuns() {
ns.Chat(obj47, "War02A.scr:ChickenShirtRuns")
chickenShirtCries1()
ns.CreatureGuard(obj47, 2033, 3833, 2035, 3905, 0)
ns.CancelDialog(obj47)
ns.SetDialog(obj47, ns.NORMAL, chickenTalk1Start, chickenTalk1End)
ns.FrameTimer(45, horrendousSay2)
}
func chickenShirtCries1() {
ns.AudioEvent(ns.UrchinRecognize, wp85)
}
func chickenTalk1Start() {
ns.TellStory(ns.UrchinRecognize, "War02A.scr:ChickenShirtRuns")
}
func chickenTalk1End() {
ns.SetDialog(obj47, ns.NORMAL, chickenTalk1Start, chickenTalk1End)
}
func horrendousSay2() {
ns.Music(29, 100)
ns.ObjectGroupOff(gvar15)
ns.Chat(obj43, "War02A.scr:HorrendousSay2")
ns.UnlockDoor(obj52)
}
func blockBash() {
ns.MoveWaypoint(wp55, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()))
ns.AudioEvent(ns.HammerMissing, wp55)
ns.Effect(ns.JIGGLE, ns.GetObjectX(ns.GetHost()), ns.GetObjectY(ns.GetHost()), 10, 0)
}
func blockSmash1() {
ns.ObjectOn(obj36)
ns.ObjectOn(obj37)
}
func blockSmash2() {
ns.ObjectOn(obj38)
ns.ObjectOn(obj39)
}
func blockSmash3() {
ns.ObjectOn(obj40)
ns.ObjectOn(obj41)
}
func releaseUrchins1() {
ns.WallGroupOpen(gvar98)
ns.LockDoor(obj93)
ns.LockDoor(obj94)
ns.ObjectOn(obj91)
ns.ObjectOn(obj92)
ns.ObjectOff(obj97)
}
func twoDeadUrchins() {
if !(ivar90 > 1) {
goto LABEL1
}
ns.UnlockDoor(obj95)
ns.UnlockDoor(obj96)
LABEL1:
return
}
func flamesOn() {
if !flag139 {
goto LABEL1
}
ivar4 = 0
for {
if !(ivar4 < 8) {
goto LABEL2
}
obj186[ivar4] = 0
obj187[ivar4] = 0
obj188[ivar4] = 0
obj189[ivar4] = 0
obj190[ivar4] = 0
obj191[ivar4] = 0
obj192[ivar4] = 0
obj193[ivar4] = 0
obj194[ivar4] = 0
obj195[ivar4] = 0
ivar4 += 1
}
LABEL2:
flag139 = false
flag140 = true
flag141 = true
flag142 = true
flag143 = true
flag144 = true
flag145 = true
flag146 = true
flag147 = true
flag148 = true
flag149 = true
flameWalk()
ns.FrameTimer(4, flameWalk2)
ns.FrameTimer(8, flameWalk3)
ns.FrameTimer(12, flameWalk4)
ns.FrameTimer(16, flameWalk5)
ns.FrameTimer(20, flameWalk6)
ns.FrameTimer(24, flameWalk7)
ns.FrameTimer(28, flameWalk8)
ns.FrameTimer(32, flameWalk9)
ns.FrameTimer(36, flameWalk10)
ns.LockDoor(obj52)
ns.LockDoor(obj48)
ns.LockDoor(obj49)
LABEL1:
return
}
func flamesOff() {
flag140 = false
flag141 = false
flag142 = false
flag143 = false
flag144 = false
flag145 = false
flag146 = false
flag147 = false
flag148 = false
flag149 = false
}
func flameWalk() {
var v0 int
switch v0 = gvar166; v0 {
case gvar99:
goto LABEL1
case gvar100:
goto LABEL2
case gvar101:
goto LABEL3
case gvar102:
goto LABEL4
default:
goto LABEL5
}
LABEL1:
ivar4 = 0
for {
if !(ivar4 < 8) {
goto LABEL6
}
ns.Delete(obj186[ivar4])
obj186[ivar4] = 0
ivar4 += 1
}
LABEL6:
gvar166 = gvar100
gvar176 = gvar99
ivar156 = 60
goto LABEL5
LABEL2:
ivar4 = 0
for {
if !(ivar4 < 8) {
goto LABEL8
}
ns.Delete(obj186[ivar4])
obj186[ivar4] = ns.CreateObject("SmallFlame", wp196[ivar4])
ivar4 += 1
}
LABEL8:
if gvar176 != gvar99 {
goto LABEL10
}
gvar166 = gvar101
ns.AudioEvent(ns.FireballCast, wp196[4])
goto LABEL11
LABEL10:
gvar166 = gvar99
LABEL11:
gvar176 = gvar100
ivar156 = 2
goto LABEL5
LABEL3:
ivar4 = 0
for {
if !(ivar4 < 8) {
goto LABEL12
}
ns.Delete(obj186[ivar4])
obj186[ivar4] = ns.CreateObject("MediumFlame", wp196[ivar4])
ivar4 += 1
}
LABEL12:
if gvar176 != gvar100 {
goto LABEL14
}
gvar166 = gvar102
ns.AudioEvent(ns.DemonBreath, wp196[5])
goto LABEL15
LABEL14:
gvar166 = gvar100
ns.AudioEvent(ns.FireExtinguish, wp196[4])
LABEL15:
gvar176 = gvar101
ivar156 = 2
goto LABEL5
LABEL4:
ivar4 = 0
for {
if !(ivar4 < 8) {
goto LABEL16
}
ns.Delete(obj186[ivar4])
obj186[ivar4] = ns.CreateObject("Flame", wp196[ivar4])
ivar4 += 1
}
LABEL16:
gvar166 = gvar101
gvar176 = gvar102
ivar156 = 12
goto LABEL5
LABEL5:
if !flag140 {
goto LABEL18
}
ns.FrameTimer(ivar156, flameWalk)
goto LABEL19
LABEL18:
ivar154 = 0
for {
if !(ivar154 < 8) {
goto LABEL19
}
ns.Delete(obj186[ivar154])
obj186[ivar154] = 0
ivar154 += 1
}
LABEL19:
return
}
func flameWalk2() {
var v0 int
switch v0 = gvar167; v0 {
case gvar103:
goto LABEL1
case gvar104:
goto LABEL2
case gvar105:
goto LABEL3
case gvar106:
goto LABEL4
default:
goto LABEL5
}
LABEL1:
ivar150 = 0
for {
if !(ivar150 < 8) {
goto LABEL6
}
ns.Delete(obj187[ivar150])
obj187[ivar150] = 0
ivar150 += 1
}
LABEL6:
gvar167 = gvar104
gvar177 = gvar103
ivar157 = 60
goto LABEL5
LABEL2:
ivar150 = 0
for {
if !(ivar150 < 8) {
goto LABEL8
}
ns.Delete(obj187[ivar150])
obj187[ivar150] = ns.CreateObject("SmallFlame", wp197[ivar150])
ivar150 += 1
}
LABEL8:
if gvar177 != gvar103 {
goto LABEL10
}
gvar167 = gvar105
ns.AudioEvent(ns.FireballCast, wp197[4])
goto LABEL11
LABEL10:
gvar167 = gvar103
LABEL11:
gvar177 = gvar104
ivar157 = 2
goto LABEL5
LABEL3:
ivar150 = 0
for {
if !(ivar150 < 8) {
goto LABEL12
}
ns.Delete(obj187[ivar150])
obj187[ivar150] = ns.CreateObject("MediumFlame", wp197[ivar150])
ivar150 += 1
}
LABEL12:
if gvar177 != gvar104 {
goto LABEL14
}
gvar167 = gvar106
ns.AudioEvent(ns.DemonBreath, wp197[5])
goto LABEL15
LABEL14:
gvar167 = gvar104
ns.AudioEvent(ns.FireExtinguish, wp197[4])
LABEL15:
gvar177 = gvar105
ivar157 = 2
goto LABEL5
LABEL4:
ivar150 = 0
for {
if !(ivar150 < 8) {
goto LABEL16
}
ns.Delete(obj187[ivar150])
obj187[ivar150] = ns.CreateObject("Flame", wp197[ivar150])
ivar150 += 1
}
LABEL16:
gvar167 = gvar105
gvar177 = gvar106
ivar157 = 12
goto LABEL5
LABEL5:
if !flag141 {
goto LABEL18
}
ns.FrameTimer(ivar157, flameWalk2)
goto LABEL19
LABEL18:
ivar154 = 0
for {
if !(ivar154 < 8) {
goto LABEL19
}
ns.Delete(obj187[ivar154])
obj187[ivar154] = 0
ivar154 += 1
}
LABEL19:
return
}
func flameWalk3() {
var v0 int
switch v0 = gvar168; v0 {
case gvar107:
goto LABEL1
case gvar108:
goto LABEL2
case gvar109:
goto LABEL3