(version 2)
(include "sci.sh")
(exports
    0 staffScript
)
(use "Main")
(use "Sound")
(use "Cycle")
(use "Obj")
(script 46)


(local
    local0[8] = (0 1 0 4 0 1 4 5 )

)
(instance public staffScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (if (IsObject((send gOwner:looper)))
                    (send ((send gOwner:looper)):dispose())
                    (send gOwner:looper(0))
                )
                (send gOwner:
                    setMotion(0)
                    view(20)
                    loop(local0[(send gOwner:loop)])
                    cel(0)
                    setCycle(End self)
                )
                (sFx:
                    number(900)
                    play()
                )
            )
            (case 1
                (send gOwner:
                    loop(+ (send gOwner:loop) 2)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 2
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance sFx of Sound
    (properties)
)
