(version 2)
(include "sci.sh")
(exports
    0 rm6
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "Game")
(script 6)



(instance public rm6 of Rm
    (properties
        picture 6
        horizon 68
        north 11
        east 5
        south 43
        west 7
    )

    (method (init)
        (self:style(
            (switch (gGNumber)
                (case north
                    5
                )
                (case west
                    3
                )
                (case east
                    2
                )
                (case south
                    4
                )
            )
))
        (super:init())
        (switch (gGNumber)
            (case north
                (send gEgo:
                    x(
                        (if (> (send gEgo:x) 181)
                            proc0_17(300 (send gEgo:x) 247)
                        )(else
                            proc0_17(122 (send gEgo:x) 10)
                        )
)
                    y(+ horizon 2)
                )
            )
            (case south
                (if (> (send gEgo:x) 189)
                    (send gEgo:posn(proc0_17(318 (+ 264 (- (send gEgo:x) 190)) 264) 188))
                )(else
                    (send gEgo:posn(proc0_17(263 (/ (* (send gEgo:x) 25) 18) 5) 188))
                )
            )
            (case west
                (send gEgo:posn(5 proc0_17(147 proc0_18(102 (send gEgo:y) 91) 70)))
            )
            (case east
                (send gEgo:posn(317 proc0_17(187 proc0_18(109 (send gEgo:y) 100) 70)))
            )
            (default 
                (send gEgo:posn(315 142))
            )
        )
        (send gEgo:init())
        (if (not global130)
            proc0_1()
        )
        (large_tree:init())
        (large_tree1:init())
        (large_tree2:init())
        (large_tree3:init())
        (large_tree4:init())
        (large_tree5:init())
        (tree:init())
        (tree1:init())
        (tree2:init())
        (farBush1:init())
        (farBush:init())
        (lake:init())
        (rock:init())
        (self:setRegions(603))
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('find/bag'))
                    (if ((send gEgo:has(11)))
                        proc255_0(6 0)
                    )(else
                        (if (proc0_12(60))
                            proc255_0(6 1)
                        )(else
                            (if (not proc0_12(61))
                                proc255_0(6 2)
                            )
                        )
                    )
                )(else
                    (if (Said('look,look<in/stump'))
                        (if ((send gEgo:inRect(30 143 100 175)))
                            (if (not proc0_12(61))
                                proc255_0(6 3)
                                proc0_19(60 1)
                            )(else
                                proc255_0(6 4)
                            )
                        )(else
                            proc255_0(6 5)
                        )
                    )(else
                        (if (Said('look,look<in/branch,hole') or Said('look,look/hole'))
                            (if ((send gEgo:inRect(154 110 172 125)))
                                proc255_0(6 6)
                            )(else
                                proc255_0(6 7)
                            )
                        )(else
                            (if ((Said('look,look/stump') or proc0_14(pEvent 38 124 89 139)) or proc0_14(pEvent 7 139 92 160))
                                (if ((send gEgo:inRect(20 129 125 189)))
                                    proc255_0(6 8)
                                )(else
                                    proc255_0(6 9)
                                )
                            )(else
                                (if (((Said('look,look/branch') or proc0_14(pEvent 182 94 193 101)) or proc0_14(pEvent 89 89 107 101)) or proc0_14(pEvent 76 102 198 119))
                                    (if ((send gEgo:inRect(70 105 215 125)))
                                        proc255_0(6 10)
                                    )(else
                                        proc255_0(6 11)
                                    )
                                )(else
                                    (if (Said('look,look>'))
                                        (if (Said('[<at,around][/room,ceder]'))
                                            proc255_0(6 12)
                                        )(else
                                            (if (Said('/ant'))
                                                proc255_0(6 13)
                                            )
                                        )
                                    )(else
                                        (if (Said('eat,consume/ant'))
                                            proc255_0(6 14)
                                        )(else
                                            (if (Said('get,get,get/ant'))
                                                proc255_0(6 15)
                                            )(else
                                                (if (Said('get,get/branch'))
                                                    proc255_0(6 16)
                                                )(else
                                                    (if (Said('get,get/(bag[<leather]),diamond'))
                                                        (if ((send gEgo:has(11)) and proc0_12(62))
                                                            proc255_0(6 17)
                                                        )(else
                                                            (if ((send gEgo:has(11)))
                                                                proc255_0(6 18)
                                                            )(else
                                                                (if (proc0_12(61))
                                                                    proc255_0(6 19)
                                                                )(else
                                                                    (if (not proc0_12(60))
                                                                        proc255_0(6 20)
                                                                    )(else
                                                                        (if ((send gEgo:inRect(20 129 125 189)))
                                                                            (send (ScriptID(0 21)):
                                                                                number(105)
                                                                                loop(1)
                                                                                init()
                                                                                play()
                                                                            )
                                                                            proc255_0(6 21)
                                                                            (send gEgo:get(11))
                                                                            proc0_19(61 3)
                                                                        )(else
                                                                            proc255_0(6 22)
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance tree of NewFeature
    (properties
        x 24
        y 66
        noun 2363
        nsTop 36
        nsLeft 12
        nsBottom 96
        nsRight 37
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2407
    )
)
(instance tree1 of NewFeature
    (properties
        x 64
        y 60
        noun 2363
        nsTop 36
        nsLeft 49
        nsBottom 84
        nsRight 80
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2407
    )
)
(instance tree2 of NewFeature
    (properties
        x 72
        y 18
        noun 2363
        nsTop -1
        nsBottom 37
        nsRight 144
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2407
    )
)
(instance farBush of NewFeature
    (properties
        x 157
        y 55
        noun 2367
        nsTop 44
        nsLeft 130
        nsBottom 66
        nsRight 185
        description 2474
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2479
    )
)
(instance farBush1 of NewFeature
    (properties
        x 202
        y 56
        noun 2367
        nsTop 49
        nsLeft 185
        nsBottom 64
        nsRight 220
        description 2545
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2479
    )
)
(instance large_tree of NewFeature
    (properties
        x 257
        y 22
        nsLeft 195
        nsBottom 45
        nsRight 319
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2554
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look/ceder'))
                    (if (< GetDistance((send gEgo:x) (send gEgo:y) 51 89) GetDistance((send gEgo:x) (send gEgo:y) 248 165))
                        proc255_0((tree:lookStr))
                    )(else
                        proc255_0(lookStr)
                    )
                )
            )
        )
    )

)
(instance large_tree1 of NewFeature
    (properties
        x 268
        y 94
        noun 2363
        nsTop 46
        nsLeft 252
        nsBottom 143
        nsRight 285
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2554
    )
)
(instance large_tree2 of NewFeature
    (properties
        x 238
        y 51
        noun 2363
        nsTop 45
        nsLeft 225
        nsBottom 58
        nsRight 251
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2554
    )
)
(instance large_tree3 of NewFeature
    (properties
        x 247
        y 158
        noun 2363
        nsTop 142
        nsLeft 215
        nsBottom 175
        nsRight 280
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2554
    )
)
(instance large_tree4 of NewFeature
    (properties
        x 184
        y 18
        noun 2363
        nsLeft 174
        nsBottom 36
        nsRight 194
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2554
    )
)
(instance large_tree5 of NewFeature
    (properties
        x 303
        y 57
        noun 2363
        nsTop 46
        nsLeft 286
        nsBottom 68
        nsRight 320
        description 2402
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2554
    )
)
(instance lake of NewFeature
    (properties
        x 139
        y 173
        noun 2380
        nsTop 158
        nsLeft 16
        nsBottom 189
        nsRight 263
        description 2686
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2691
    )
)
(instance rock of NewFeature
    (properties
        x 311
        y 88
        noun 2390
        nsTop 72
        nsLeft 303
        nsBottom 104
        nsRight 320
        description 2744
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 2749
    )
)
