CD edition, script 13 - castOpenScript::changeState() (method (changeState param1) (switch (= state param1) (0 (= local3 (IntArray with: 0 0 0 1 0 0 2 3)) (= local4 (IntArray with: 2 3 6 7)) (= local5 (IntArray with: 2 3 0 3 0 1 2 3)) (g1_Glory handsOff:) (g0_hero setHeading: (GetAngle (g0_hero x?) (- (g0_hero y?) (/ (g0_hero scaleY?) 3)) g441_myX g442_myY) self) ) (1 (= local1 (go_hero loop?)) (if (and (> (go_hero view?) 17) (< (go_hero view?) 21)) # hero's holding the staff. (= local2 (go_hero cel?)) (g0_hero view: 19 loop: (local3 at: local1) setCel: 0 setCycle: End self ) else (g0_hero view: 14 loop: (local5 at: local1) setCel: 0 setCycle End self ) ) ) (2 (openEffect view: 21 x: g441_myX y: g442_myY setLoop: 0 setCel: 0 signal: $6001 setScaler: g0_hero cycleSpeed: 0 setPri: 180 init: setCycle: Fwd ) (if register (if (register onMe: g441_myX g442_myY) (= local0 register) ) (= register 0) ) (if (not (and (> (go_hero view?) 17) (< (go_hero view?) 21))) # hero's NOT holding the staff. (g0_hero setCycle: Beg) # Unlike castTriggerScript, there's self arg to cue. ) (soundFX number: 934 play:) # Use seconds to cue, with or without the staff. (= seconds 3) ) (3 (openEffect dispose:) (= cycles 2) ) (4 (if (and (> (go_hero view?) 17) (< (go_hero view?) 21)) # hero's holding the staff. (g0_hero view: 20 loop: (local4 at: (g0_hero loop?)) cel: (if (< (g0_hero loop?) 6) 4 else 5) ) else (g0_hero normalize:) ) (cond ( (not (proc64999_5 global11 250 260 270 340 440 500 510 593 641 643 660 610 662 670 600 661 662 780 460 470 790 620 621 622 623 624 625 626 627 629 630 631 632 640 642 644 633 634 645 663 680 300 ) ) # "You can't open that." (g91_gloryMessager say: 0 0 1 0 self 13) ) (local0 (local0 doVerb: -80) # 0xb0 # There's no cue here. doVerb() is expected to replace the room script. (local3 dispose:) (local4 dispose:) (local5 dispose:) ) (else # "You can't open that." (g91_gloryMessager say: 0 0 1 0 self 13) ) ) ) (5 (local3 dispose:) (local4 dispose:) (local5 dispose:) (g1_Glory handsOn:) (self dispose:) ) ) )