(version 2)
(include "sci.sh")
(exports
    0 rm096
)
(use "Main")
(use "Class_255_0")
(use "Cycle")
(use "Game")
(use "Feature")
(use "Obj")
(script 96)


(local
    local0

)
(procedure (localproc_04c0)
    (var temp0)
    = temp0 Random(1 2)
    (elmo:setCel(temp0))
    (mouth:
        setLoop(temp0)
        setCycle(Fwd)
    )
    (tail:init())
)


(procedure (localproc_04ef)
    (if (local0)
        (tail:dispose())
        proc0_10()
        proc0_12()
        = local0 0
    )
    (elmo:setCel(0))
    (mouth:
        setCel(0)
        setLoop(3)
        stopUpd()
    )
)


(instance public rm096 of Rm
    (properties
        picture 96
    )

    (method (init)
        (var temp0[50])
        Load(128 130)
        (super:init())
        (elmo:init())
        (mouth:init())
        = global193 1
        Display(96 0 100 116 136 105 600 106 180 102 10)
        Display(96 1 100 112 144 105 600 106 180 102 14)
        Display(96 2 100 112 151 105 600 106 180 102 14)
        Display(96 3 100 105 158 105 600 106 180 102 14)
        Display(96 4 100 106 165 105 600 106 180 102 14)
        Display(96 5 100 106 173 105 600 106 180 102 10)
        proc0_2()
        = global159 1
        (self:setScript(ElmoTalk))
    )


    (method (doit)
        (var temp0[50])
        (super:doit())
    )


    (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if ((send pEvent:claimed))
            return 
        )
        (if ((send pEvent:type))
            (if (local0)
                (tail:dispose())
                proc0_10()
                proc0_12()
            )
            = global193 0
            (send global2:newRoom(120))
        )
    )

)
(instance ElmoTalk of Script
    (properties)

    (method (changeState newState)
        (var temp0[50])
        (switch (= state newState)
            (case 0
                = seconds 2
            )
            (case 1
                localproc_04c0()
                = local0 proc255_0(96 6 67 -1 45 70 200 33 600 91)
                = seconds 10
            )
            (case 2
                localproc_04ef()
                = seconds 4
            )
            (case 3
                localproc_04c0()
                = local0 proc255_0(96 7 67 -1 45 70 200 33 600 91)
                = seconds 15
            )
            (case 4
                localproc_04ef()
                = seconds 4
            )
            (case 5
                localproc_04c0()
                = local0 proc255_0(96 8 67 -1 45 70 200 33 600 91)
                = seconds 10
            )
            (case 6
                localproc_04ef()
                = seconds 4
            )
            (case 7
                localproc_04c0()
                = local0 proc255_0(96 9 67 -1 45 70 200 33 600 91)
                = seconds 10
            )
            (case 8
                localproc_04ef()
                = seconds 4
            )
            (case 9
                localproc_04c0()
                = local0 proc255_0(96 10 67 -1 45 70 200 33 600 91)
                = seconds 10
            )
            (case 10
                localproc_04ef()
            )
            (case 11
                (send global2:setScript(0))
            )
        )
    )

)
(instance elmo of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(130)
            setLoop(0)
            setCel(0)
            posn(163 37)
            setPri(5)
            ignoreActors(1)
        )
    )

)
(instance mouth of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(130)
            setLoop(3)
            setCel(0)
            posn(163 33)
            setPri(6)
            ignoreActors(1)
        )
    )

)
(instance tail of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(130)
            setLoop(4)
            setCel(0)
            posn(200 44)
            setPri(15)
            ignoreActors(1)
        )
    )

)
