(version 2)
(include "sci.sh")
(exports
    0 rm42
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "n958")
(use "Cycle")
(use "Game")
(use "User")
(use "PicView")
(script 42)


(local
    local0
    local1[3]
    local4[3] = (241 241 226 )
    local7[3] = (249 63 51 )
    local10[3] = (134 142 180 )
    local13[3] = (3 3 2 )

)
(instance public rm42 of Rm
    (properties
        picture 42
        horizon 44
        north 7
        east 43
        south 39
        west 41
    )

    (method (init)
        proc958_0(128 14 241 226)
        (self:style(
            (switch (gGNumber)
                (case north
                    5
                )
                (case west
                    3
                )
                (case east
                    2
                )
                (case south
                    4
                )
            )
))
        (super:init())
        (switch (gGNumber)
            (case north
                (send gEgo:posn(proc0_17(264 (send gEgo:x) 0) (+ horizon 2)))
            )
            (case south
                (if (< (send gEgo:x) 60)
                    (send gEgo:posn(10 176))
                )(else
                    (send gEgo:y(188))
                )
            )
            (case west
                (if (< (send gEgo:y) 148)
                    (send gEgo:posn(3 proc0_17(103 (send gEgo:y) (+ horizon 2))))
                )(else
                    (send gEgo:posn(10 170))
                )
            )
            (case east
                (if (global130 and (<= (send gEgo:y) 119))
                    (send gEgo:posn(317 proc0_17(119 (send gEgo:y) (+ horizon 2))))
                )(else
                    (send gEgo:x(315))
                )
            )
            (default 
                (send gEgo:posn(142 76))
            )
        )
        (send gEgo:init())
        (if (not global130)
            proc0_1()
        )
        = local0 0
        (while (< local0 3)
            (send (= local1[local0] Clone(Ripple)):
                view(local4[local0])
                x(local7[local0])
                y(local10[local0])
                setLoop(local13[local0])
                ignoreActors(1)
                description("ripple")
                setPri(1)
                init()
                stopUpd()
            )
            (if (>= global101 1)
                (send local1[local0]:setCycle(Fwd))
            )
            ++local0
        )
        (self:setRegions(608))
        (self:setRegions(612))
        (bridge1:init())
        (bridge2:init())
        (bridge3:init())
        (bridge4:init())
        (bush1:init())
        (bush2:init())
        (river1:init())
        (river2:init())
        (river3:init())
        (river4:init())
        (river5:init())
        (lake1:init())
        (bank1:init())
        (pinetree1:init())
        (pinetree2:init())
        (pinetree3:init())
        (oaktree1:init())
        (oaktree2:init())
        (oaktree3:init())
        (oaktree4:init())
    )


    (method (doit)
        (var temp0)
        (if (script and (not global130 or (== global130 6)))
            (send script:doit())
        )(else
            = temp0 
                (switch ((send ((User:alterEgo)):edgeHit))
                    (case 1
                        north
                    )
                    (case 2
                        east
                    )
                    (case 3
                        south
                    )
                    (case 4
                        west
                    )
                )
            (if (temp0)
                (self:newRoom((= temp0 
                        (switch ((send ((User:alterEgo)):edgeHit))
                            (case 1
                                north
                            )
                            (case 2
                                east
                            )
                            (case 3
                                south
                            )
                            (case 4
                                west
                            )
                        )
)))
            )(else
                (if (script and global130)
                    (send script:doit())
                )
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('climb,climb'))
                    (if (global130)
                        proc255_0(42 0)
                    )(else
                        (send pEvent:claimed(0))
                    )
                )(else
                    (if (Said('swim'))
                        (if (& (send gEgo:onControl(1)) $0200)
                            proc255_0(42 1)
                        )(else
                            (send pEvent:claimed(0))
                        )
                    )(else
                        (if (Said('look,look>'))
                            (if (Said('[<at,around][/room]'))
                                proc255_0(42 2)
                            )(else
                                (if (Said('/clearing'))
                                    proc255_0(42 3)
                                )(else
                                    (if (Said('/water'))
                                        (if ((send gEgo:inRect(165 44 312 116)))
                                            proc255_0(42 4)
                                        )(else
                                            proc255_0(42 5)
                                        )
                                    )(else
                                        (if (Said('<below,below/bridge'))
                                            proc255_0(42 6)
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance river1 of NewFeature
    (properties
        x 167
        y 138
        noun 2442
        nsTop 121
        nsLeft 18
        nsBottom 156
        nsRight 317
        description 2526
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2532
    )
)
(instance river2 of NewFeature
    (properties
        x 93
        y 161
        noun 2442
        nsTop 156
        nsLeft 68
        nsBottom 166
        nsRight 119
        description 2526
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2532
    )
)
(instance river3 of NewFeature
    (properties
        x 80
        y 173
        noun 2442
        nsTop 167
        nsLeft 61
        nsBottom 179
        nsRight 99
        description 2526
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2532
    )
)
(instance river4 of NewFeature
    (properties
        x 62
        y 180
        noun 2442
        nsTop 177
        nsLeft 43
        nsBottom 184
        nsRight 81
        description 2526
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2532
    )
)
(instance river5 of NewFeature
    (properties
        x 45
        y 186
        noun 2442
        nsTop 184
        nsLeft 24
        nsBottom 189
        nsRight 66
        description 2526
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2532
    )
)
(instance bush1 of NewFeature
    (properties
        x 5
        y 112
        noun 2449
        nsTop 104
        nsBottom 121
        nsRight 11
        description 2621
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2626
    )
)
(instance bush2 of NewFeature
    (properties
        x 12
        y 142
        noun 2449
        nsTop 122
        nsBottom 162
        nsRight 25
        description 2621
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2626
    )
)
(instance lake1 of NewFeature
    (properties
        x 307
        y 88
        noun 2453
        nsTop 65
        nsLeft 295
        nsBottom 111
        nsRight 319
        description 2705
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2710
    )
)
(instance bridge1 of NewFeature
    (properties
        x 157
        y 108
        noun 2460
        nsTop 95
        nsLeft 112
        nsBottom 121
        nsRight 203
        description 2770
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2777
    )
)
(instance bridge2 of NewFeature
    (properties
        x 180
        y 139
        noun 2460
        nsTop 121
        nsLeft 133
        nsBottom 157
        nsRight 228
        description 2770
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2777
    )
)
(instance bank1 of NewFeature
    (properties
        x 153
        y 112
        noun 2467
        nsTop 107
        nsLeft 12
        nsBottom 118
        nsRight 294
        description 2868
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2873
    )
)
(instance bridge3 of NewFeature
    (properties
        x 115
        y 88
        noun 2460
        nsTop 82
        nsLeft 107
        nsBottom 95
        nsRight 123
        description 2770
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2777
    )
)
(instance bridge4 of NewFeature
    (properties
        x 175
        y 89
        noun 2460
        nsTop 83
        nsLeft 162
        nsBottom 95
        nsRight 189
        description 2770
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2777
    )
)
(instance oaktree1 of NewFeature
    (properties
        x 73
        y 7
        noun 2476
        nsLeft 3
        nsBottom 14
        nsRight 143
        description 2971
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2980
    )
)
(instance oaktree2 of NewFeature
    (properties
        x 70
        y 43
        noun 2476
        nsTop 14
        nsLeft 60
        nsBottom 72
        nsRight 81
        description 2971
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2980
    )
)
(instance pinetree1 of NewFeature
    (properties
        x 238
        y 71
        noun 2485
        nsTop 45
        nsLeft 212
        nsBottom 98
        nsRight 265
        description 3048
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3058
    )
)
(instance pinetree2 of NewFeature
    (properties
        x 239
        y 35
        noun 2485
        nsTop 27
        nsLeft 226
        nsBottom 44
        nsRight 253
        description 3048
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3058
    )
)
(instance pinetree3 of NewFeature
    (properties
        x 239
        y 21
        noun 2485
        nsTop 16
        nsLeft 232
        nsBottom 27
        nsRight 246
        description 3048
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 3058
    )
)
(instance Ripple of Prop
    (properties)

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/brook,boulder,water'))
                proc255_0(42 7)
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                proc255_0(42 7)
            )
        )
    )

)
(instance oaktree3 of NewFeature
    (properties
        x 136
        y 31
        noun 2476
        nsLeft 121
        nsBottom 62
        nsRight 151
        description 3039
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2980
    )
)
(instance oaktree4 of NewFeature
    (properties
        x 188
        y 35
        noun 2476
        nsLeft 177
        nsBottom 70
        nsRight 199
        description 3150
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2980
    )
)
