(version 2)
(include "sci.sh")
(exports
    0 rm71
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "Cycle")
(use "Game")
(use "User")
(use "Obj")
(script 71)



(instance public rm71 of Rm
    (properties
        picture 71
        horizon 4
        north 72
        south 70
    )

    (method (init)
        Load(rsVIEW 8)
        Load(rsSOUND 7)
        (self:style(
            (switch (gGNumber)
                (case north
                    42
                )
                (case south
                    43
                )
            )
))
        (super:init())
        (send (ScriptID(0 23)):
            number(7)
            loop(-1)
            play()
        )
        (switch (gGNumber)
            (case south
                (send gEgo:y(193))
            )
            (default 
                (send gEgo:posn(159 8))
            )
        )
        (self:setRegions(609))
        (send gEgo:init())
        proc0_1()
        (send gEgo:
            looper(0)
            setCycle(Walk)
            view(8)
            setStep(2 2)
            setPri(11)
        )
        (if (== gGNumber south)
            (self:setScript(climbIntoView))
        )
        (stalk1:init())
        (stalk2:init())
        (stalk3:init())
        (cloud1:init())
        (cloud2:init())
        (cloud3:init())
        (cloud4:init())
    )


    (method (doit)
        (var temp0)
        (if (== script ScriptID(609 1))
            (send script:doit())
        )
        (if (script and (<> script ScriptID(609 1)))
            (send script:doit())
        )(else
            = temp0 
                (switch ((send ((User:alterEgo)):edgeHit))
                    (case 1
                        north
                    )
                    (case 2
                        east
                    )
                    (case 3
                        south
                    )
                    (case 4
                        west
                    )
                )
            (if (temp0)
                (if (== (= temp0 
                    (switch ((send ((User:alterEgo)):edgeHit))
                        (case 1
                            north
                        )
                        (case 2
                            east
                        )
                        (case 3
                            south
                        )
                        (case 4
                            west
                        )
                    )
) north)
                    proc0_19(110 2)
                )
                (self:newRoom(temp0))
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look[<at,around][/room,beanstalk]'))
                    proc255_0(71 0)
                )(else
                    (if (Said('look,look[<down][/grass,goat]'))
                        proc255_0(71 1)
                    )
                )
            )
        )
    )

)
(instance climbIntoView of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:setMotion(MoveTo 137 178 self))
            )
            (case 1
                proc0_3()
                (send global2:setScript(ScriptID(609 1)))
                (self:dispose())
            )
        )
    )

)
(instance stalk1 of NewFeature
    (properties
        x 135
        y 94
        noun 1093
        nsLeft 112
        nsBottom 189
        nsRight 158
        description 1125
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1131
    )
)
(instance stalk2 of NewFeature
    (properties
        x 94
        y 68
        noun 1093
        nsTop 23
        nsLeft 77
        nsBottom 114
        nsRight 111
        description 1125
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1131
    )
)
(instance stalk3 of NewFeature
    (properties
        x 167
        y 22
        noun 1093
        nsLeft 160
        nsBottom 45
        nsRight 175
        description 1125
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1131
    )
)
(instance cloud1 of NewFeature
    (properties
        x 160
        y 127
        noun 1097
        nsTop 91
        nsBottom 164
        nsRight 320
        description 1336
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1342
    )
)
(instance cloud2 of NewFeature
    (properties
        x 244
        y 46
        noun 1097
        nsTop 33
        nsLeft 169
        nsBottom 60
        nsRight 320
        description 1336
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1342
    )
)
(instance cloud3 of NewFeature
    (properties
        x 35
        y 24
        noun 1097
        nsTop 17
        nsBottom 32
        nsRight 70
        description 1336
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1342
    )
)
(instance cloud4 of NewFeature
    (properties
        x 160
        y 6
        noun 1097
        nsBottom 13
        nsRight 320
        description 1336
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 1342
    )
)
