| 26 | \\ |
| 27 | \\ |
| 28 | The following came from SCI Companion, with variables renamed for clarity. |
| 29 | \\ |
| 30 | \\ |
| 31 | script 730 - sMessages::changeState() |
| 32 | {{{ |
| 33 | (switch (= state param1) |
| 34 | (0 |
| 35 | (g1_Glory handsOff:) |
| 36 | (= ticks 60) |
| 37 | ) |
| 38 | (1 |
| 39 | (if loc4 |
| 40 | (g91_gloryMessager say: 6 6 9 0 self) |
| 41 | else |
| 42 | (= ticks 1) |
| 43 | ) |
| 44 | ) |
| 45 | (2 |
| 46 | (if (== loc1 0) |
| 47 | (g91_gloryMessager say: 5 6 5 0 self) |
| 48 | else |
| 49 | (g91_gloryMessager say: 5 6 10 0 self) |
| 50 | ) |
| 51 | ) |
| 52 | (3 |
| 53 | (self setScript: sCastASpell) |
| 54 | ) |
| 55 | ) |
| 56 | }}} |
| 57 | \\ |
| 58 | \\ |
| 59 | script 730 - sCastASpell::changeState() |
| 60 | {{{ |
| 61 | (switch (= state param1) |
| 62 | (0 |
| 63 | (g1_Glory handsOff:) |
| 64 | (avis |
| 65 | view: 677 |
| 66 | setLoop: 0 1 |
| 67 | setCel: 0 |
| 68 | setCycle: CT 5 1 self |
| 69 | ) |
| 70 | ) |
| 71 | (1 |
| 72 | ((= loc0 (fireBall new:)) |
| 73 | view: 747 |
| 74 | x: 91 |
| 75 | y: 101 |
| 76 | setLoop: 1 1 |
| 77 | moveSpeed: 0 |
| 78 | init: |
| 79 | setMotion: MoveTo 176 60 self |
| 80 | ) |
| 81 | (avis setCycle: End) |
| 82 | ) |
| 83 | (2 (loc0 setCycle: End self)) |
| 84 | (3 |
| 85 | (loc0 dispose:) |
| 86 | (cond |
| 87 | ( |
| 88 | (and |
| 89 | (> (g0_hero view?) 17) |
| 90 | (< (g0_hero view?) 21) |
| 91 | (< (g0_hero view?) 21) |
| 92 | ) |
| 93 | (g0_hero takeDamage: 23) |
| 94 | ) |
| 95 | ((> g454 0) |
| 96 | # [g247 26] refers to g273_myFlameDartSkill. |
| 97 | |
| 98 | (g0_hero |
| 99 | takeDamage: (- 50 (/ (* [g247 26] 15) 100)) |
| 100 | ) |
| 101 | ) |
| 102 | (else (g0_hero takeDamage: 50)) |
| 103 | ) |
| 104 | # [g247 17] refers to g264_myHealth. |
| 105 | |
| 106 | (if (== [g247 17] 0) |
| 107 | (self setScript: sEgoDies) |
| 108 | else |
| 109 | (self cue:) |
| 110 | ) |
| 111 | ) |
| 112 | (4 |
| 113 | (proc0_17 5 6 13 sCastASpell 730) |
| 114 | ) |
| 115 | (5 |
| 116 | (g1_Glory handsOn:) |
| 117 | (g69_mainIconBar disable: 0) |
| 118 | (self dispose:) |
| 119 | ) |
| 120 | ) |
| 121 | }}} |