(include "sci.sh")
(use "Main")
(use "Scaler")
(use "RandCycle")
(use "Cycle")
(use "Sounds")
(use "View")
(use "Obj")
(script 133)


(local
    local0
    local1
    local2 = 4
    local3
    local4[30]
    local34[30]

)
(instance public rm133 of Rm
    (properties
        picture 31
        style 32778
        horizon 50
        vanishingX 130
        vanishingY 50
    )

    (method (init)
        (send gSQ5:handsOff())
        (send gSq5Music1:
            number(140)
            setLoop(-1)
            play()
        )
        Palette(6 32 34 1)
        Palette(6 36 38 1)
        Palette(6 44 46 1)
        Palette(6 40 42 1)
        (tech1:
            init()
            setCycle(Fwd)
        )
        (tech2:
            init()
            setCycle(Fwd)
        )
        (tech3:
            init()
            setCycle(Fwd)
            setScript(sDoLights)
        )
        (super:init())
        (send gRoom:setScript(sDoAll))
    )

)
(instance sDoLights of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (= cycles Random(2 8)  )
            )
            (case 1
                (Palette(6 38 40 1) Palette(6 44 46 1) Palette(6 40 42 1) = cycles Random(2 8)  )
            )
            (case 2
                (Palette(6 38 40 1) Palette(6 46 48 1) Palette(6 42 44 1) = cycles Random(2 8)  )
            )
            (case 3
                (Palette(6 34 36 1) Palette(6 36 38 1) = cycles Random(2 8)  )
            )
            (case 4
                (= cycles 1 = state -1 )
            )
        )
    )

)
(instance sDoAll of Script
    (properties)

    (method (changeState newState)
        (var temp0, temp1)
        (switch (= state newState)
            (case 0
                ((extMouse:init()) = ticks 10  )
            )
            (case 1
                ((extMouse:
                    loop(1)
                    cel(0)
                    x(181)
                    y(187)
                )
 = ticks 10  )
            )
            (case 2
                ((extMouse:setCel(1)) = ticks 10  )
            )
            (case 3
                ((extMouse:setCel(0)) = ticks 10  )
            )
            (case 4
                ((extMouse:setCel(1)) = ticks 10  )
            )
            (case 5
                ((extMouse:
                    setLoop(2)
                    setCel(0)
                    x(183)
                    y(185)
                )
 = ticks 10  )
            )
            (case 6
                ((send gSq5Music2:
                    number(141)
                    setLoop(-1)
                    play()
                )
 (extMouse:
                    view(143)
                    setLoop(-1)
                    setLoop(0)
                    cel(0)
                    setStep(5 6)
                    cycleSpeed(2)
                    x(169)
                    y(183)
                    setCycle(Fwd)
                    setMotion(MoveTo 169 134 self)
                )
  )
            )
            (case 7
                ((send gSq5Music2:
                    number(120)
                    setLoop(1)
                    play()
                )
 (extMouse:dispose()) = cycles 2  )
            )
            (case 8
                (= local3 6 (inbottom:
                    init()
                    setScale(Scaler local3 local3 122 99)
                    scaleSignal(1)
                )
 = cycles 1  )
            )
            (case 9
                (= local3 (+ local3 local2) (inbottom:setScale(Scaler local3 local3 122 99)) 
                (if (< local3 100)
                    = state (- state 1)
                )
 = cycles 1  )
            )
            (case 10
                ((inbottom:
                    setScale(0)
                    scaleSignal(0)
                )
 = cycles 1  )
            )
            (case 11
                ((tail:
                    init()
                    setCycle(RandCycle)
                )
 = cycles 10  )
            )
            (case 12
                ((tail:
                    setLoop(2)
                    cel(0)
                )
 = cycles 1  )
            )
            (case 13
                ((tail:setCycle(End self))  )
            )
            (case 14
                ((tail:dispose()) = cycles 1  )
            )
            (case 15
                ((inbottom:
                    setStep(7 7)
                    setScale(0)
                    setMotion(MoveTo 161 254 self)
                )
 (intop:
                    init()
                    setStep(7 7)
                    setMotion(MoveTo 161 146)
                )
  )
            )
            (case 16
                ((inbottom:stopUpd()) (intop:stopUpd()) = cycles 2  )
            )
            (case 17
                (= local0 Graph(7 93 179 99 187 1) GetMessage(0 133 1 0 0 1 @local4) GetMessage(0 133 1 0 0 2 @local34) = temp0 proc0_12(116 116 116 116 116) = temp1 proc0_12(74 74 74 74 74) Display(@local4 100 temp0 temp1 105 1605 102 14) = temp0 proc0_12(163 136 136 136 136) = temp1 proc0_12(76 74 76 74 74) Display(@local34 100 temp0 temp1 105 10 102 5) = ticks 40  )
            )
            (case 18
                (GetMessage(0 133 1 0 0 3 @local4) GetMessage(0 133 1 0 0 11 @local34) = temp0 proc0_12(116 116 116 116 116) = temp1 proc0_12(84 84 84 84 84) Display(@local4 100 temp0 temp1 105 1605 102 14) = temp0 proc0_12(163 186 163 186 186) = temp1 proc0_12(84 84 84 84 84) Display(@local34 100 temp0 temp1 105 1605 102 14) = ticks 40  )
            )
            (case 19
                (GetMessage(0 133 1 0 0 4 @local4) = temp0 proc0_12(116 116 116 116 116) = temp1 proc0_12(94 94 94 94 94) Display(@local4 100 temp0 temp1 105 10 102 5) = local1 Graph(7 90 163 100 211 1) = ticks 40  )
            )
            (case 20
                (GetMessage(0 133 1 0 0 5 @local4) = temp0 proc0_12(163 173 173 173 173) = temp1 proc0_12(94 94 94 94 94) Display(@local4 100 temp0 temp1 105 10 102 19) = ticks 20  )
            )
            (case 21
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(94 94 94 94 94) Display(@local4 100 temp0 temp1 105 10 102 28) = ticks 20  )
            )
            (case 22
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(94 94 94 94 94) Display(@local4 100 temp0 temp1 105 10 102 19) = ticks 20  )
            )
            (case 23
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(94 94 94 94 94) Display(@local4 100 temp0 temp1 105 10 102 28) = ticks 20  )
            )
            (case 24
                (Graph(8 local1) Graph(12 90 163 100 211 1) GetMessage(0 133 1 0 0 6 @local34) = temp0 proc0_12(163 186 163 186 186) = temp1 proc0_12(94 94 94 94 94) Display(@local34 100 temp0 temp1 105 10 102 9) = ticks 40  )
            )
            (case 25
                (GetMessage(0 133 1 0 0 8 @local34) = temp0 proc0_12(116 116 116 116 116) = temp1 proc0_12(104 104 104 104 104) Display(@local34 100 temp0 temp1 105 10 102 5) = local1 Graph(7 100 163 110 211 1) = ticks 40  )
            )
            (case 26
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(104 104 104 104 104) Display(@local4 100 temp0 temp1 105 10 102 19) = ticks 20  )
            )
            (case 27
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(104 104 104 104 104) Display(@local4 100 temp0 temp1 105 10 102 28) = ticks 20  )
            )
            (case 28
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(104 104 104 104 104) Display(@local4 100 temp0 temp1 105 10 102 19) = ticks 20  )
            )
            (case 29
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(104 104 104 104 104) Display(@local4 100 temp0 temp1 105 10 102 28) = ticks 20  )
            )
            (case 30
                (Graph(8 local1) Graph(12 100 163 110 211 1) GetMessage(0 133 1 0 0 6 @local34) = temp0 proc0_12(163 186 163 186 186) = temp1 proc0_12(104 104 104 104 104) Display(@local34 100 temp0 temp1 105 10 102 9) = ticks 40  )
            )
            (case 31
                (GetMessage(0 133 1 0 0 7 @local34) = temp0 proc0_12(116 116 116 116 116) = temp1 proc0_12(114 114 114 114 114) Display(@local34 100 temp0 temp1 105 10 102 5) = ticks 40  )
            )
            (case 32
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(114 114 114 114 114) Display(@local4 100 temp0 temp1 105 10 102 19) = ticks 20  )
            )
            (case 33
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(114 114 114 114 114) Display(@local4 100 temp0 temp1 105 10 102 28) = ticks 20  )
            )
            (case 34
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(114 114 114 114 114) Display(@local4 100 temp0 temp1 105 10 102 19) = ticks 20  )
            )
            (case 35
                (= temp0 proc0_12(163 173 163 173 173) = temp1 proc0_12(114 114 114 114 114) Display(@local4 100 temp0 temp1 105 10 102 28) = ticks 20  )
            )
            (case 36
                ((inbottom:dispose()) (intop:dispose()) = cycles 2  )
            )
            (case 37
                ((send gSq5Music2:stop()) (send gRoom:newRoom(132)) )
            )
        )
    )

)
(instance extMouse of Actor
    (properties
        x 181
        y 189
        view 141
    )

    (method (init param1)
        (super:init(rest param1))
        (self:setScale(Scaler 100 11 189 129))
    )

)
(instance tail of Actor
    (properties
        x 178
        y 127
        view 142
        loop 1
        signal 24576
        cycleSpeed 0
        moveSpeed 0
    )
)
(instance tech1 of Actor
    (properties
        x 113
        y 125
        view 141
        loop 3
        priority 5
        signal 16
        cycleSpeed 100
    )
)
(instance tech2 of Actor
    (properties
        x 219
        y 129
        view 141
        loop 4
        priority 5
        signal 16
        cycleSpeed 100
    )
)
(instance tech3 of Actor
    (properties
        x 309
        y 86
        view 141
        loop 5
        priority 5
        signal 16
        cycleSpeed 100
    )
)
(instance intop of Actor
    (properties
        x 161
        y 53
        view 142
        priority 6
        signal 24592
        moveSpeed 0
    )
)
(instance inbottom of Actor
    (properties
        x 161
        y 146
        view 142
        cel 1
        priority 6
        signal 24592
        moveSpeed 0
    )
)
