(include "sci.sh")
(use "Main")
(use "Cycle")
(use "Game")
(use "User")
(use "PV")
(use "Obj")
(script 693)


(local
    newProp
    newView

)
(instance public Room693 of Rm
    (properties
        picture 201
        style 8
    )

    (method (init)
        (super:init())
        (send (= newView (View:new())):
            view(767)
            loop(0)
            cel(3)
            posn(270 138)
            setPri(15)
            init()
        )
        (send ((View:new())):
            view(768)
            loop(0)
            cel(0)
            posn(158 65)
            init()
            addToPic()
        )
        (send ((View:new())):
            view(769)
            loop(3)
            cel(0)
            posn(48 140)
            init()
            addToPic()
        )
        (send gEgo:setScript(egoActions))
    )

)
(instance egoActions of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((Timer:setReal(self 2)) (User:
                    canControl(0)
                    canInput(0)
                )
  )
            )
            (case 1
                (= newProp (Prop:new()) (send newProp:
                    view(687)
                    loop(0)
                    cel(0)
                    posn(225 150)
                    setPri(15)
                    ignoreActors()
                    setCycle(CT 3 1 self)
                    init()
                )
  )
            )
            (case 2
                ((send gEgo:
                    view(759)
                    setLoop(-1)
                    loop(1)
                    cel(2)
                    posn(225 150)
                    init()
                )
 (send newProp:setCycle(End self))  )
            )
            (case 3
                (= seconds 2  )
            )
            (case 4
                (
                (if ((send gEgo:has(25)))
                    (self:changeState(10))
                )(else
                    (self:changeState(5))
                )
 )
            )
            (case 5
                ((send gEgo:setMotion(MoveTo 245 220 self))  )
            )
            (case 6
                ((send global2:newRoom(694))  )
            )
            (case 10
                ((send gEgo:
                    setCycle(Walk)
                    setMotion(MoveTo 253 135 self)
                )
  )
            )
            (case 11
                ((send gEgo:
                    loop(4)
                    cel(0)
                    setCycle(CT 2 1 self)
                )
  )
            )
            (case 12
                ((send newView:dispose()) (send gEgo:setCycle(End self))  )
            )
            (case 13
                ((send gEgo:
                    view(759)
                    loop(1)
                    setCycle(Walk)
                    setMotion(MoveTo 245 220 self)
                )
  )
            )
            (case 14
                ((send global2:newRoom(694)) )
            )
        )
    )

)
