(include "sci.sh")
(use "Main")
(use "Cycle")
(use "Game")
(use "Obj")
(script 501)


(local
    local0
    local1

)
(instance public waterReg of Rgn
    (properties)

    (method (init)
        (super:init())
        Load(rsVIEW 5)
        Load(rsVIEW 6)
        Load(rsVIEW 7)
        Load(rsVIEW 8)
        (send gEgo:viewer(water))
    )

)
(instance water of Script
    (properties)

    (method (doit)
        (if (<> (= local0 (send gEgo:onControl(1))) local1)
            = local1 local0
            (if (<> global105 14)
                (send gEgo:setCycle(Walk))
                (switch (local0)
                    (case 1
                        = global105 0
                        (send gEgo:view(2))
                    )
                    (case 2048
                        = global105 1
                        (send gEgo:view(5))
                    )
                    (case 512
                        = global105 2
                        (send gEgo:view(6))
                    )
                    (case 8
                        (send gEgo:view(7))
                        = global105 3
                    )
                    (case 2
                        (send gEgo:view(8))
                        = global105 4
                        (send gEgo:setCycle(Fwd))
                    )
                )
            )
        )
    )

)
