(version 2)
(include "sci.sh")
(exports
    0 rm45
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "Cycle")
(use "Game")
(use "PicView")
(script 45)



(instance public rm45 of Rm
    (properties
        picture 45
        horizon 83
        north 4
        east 46
        south 36
        west 44
    )

    (method (init)
        Load(rsVIEW 245)
        (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_18(236 (send gEgo:x) 203) (+ horizon 2)))
            )
            (case south
                (send gEgo:y(188))
            )
            (case west
                (send gEgo:posn(3 proc0_17(188 proc0_18(160 (send gEgo:y) 100) (+ horizon 2))))
            )
            (default 
                (send gEgo:posn(317 proc0_17(188 (send gEgo:y) (+ horizon 2))))
            )
        )
        (send gEgo:init())
        proc0_1()
        (if (proc0_12(2))
            (self:setRegions(600))
        )
        (smoke:
            init()
            setPri(11)
            setCycle(Fwd)
        )
        (stump:init())
        (chimney1:init())
        (chimney2:init())
        (house1:init())
        (house2:init())
        (house3:init())
        (log1:init())
        (log2:init())
        (log3:init())
        (log4:init())
        (pinetree1:init())
        (pinetree2:init())
        (tree1:init())
        (tree2:init())
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('talk,speak/man,fairy'))
                    (if ((send gEgo:inRect(32 152 92 167)))
                        proc255_0(45 0)
                    )(else
                        proc255_0(45 1)
                    )
                )(else
                    (if (Said('bend/window'))
                        (if ((send gEgo:inRect(32 152 92 167)))
                            proc255_0(45 2)
                        )(else
                            proc255_0(45 3)
                        )
                    )(else
                        (if (Said('climb,climb/window'))
                            (if ((send gEgo:inRect(32 152 92 167)))
                                proc255_0(45 4)
                            )(else
                                proc255_0(45 3)
                            )
                        )(else
                            (if (Said('look,look>'))
                                (if (Said('[<at,around][/room,clearing]'))
                                    proc255_0(45 5)
                                )(else
                                    (if (Said('/board,board'))
                                        proc255_0(45 6)
                                    )(else
                                        (if (Said('/man,fairy'))
                                            (if ((send gEgo:inRect(32 152 92 167)))
                                                proc255_0(45 7)
                                            )(else
                                                proc255_0(45 8)
                                            )
                                        )(else
                                            (if (Said('<in[/window,building,building]') or Said('<through/window'))
                                                (if ((send gEgo:inRect(32 152 92 167)) and not proc0_12(113))
                                                    proc255_0(45 9)
                                                )(else
                                                    (if ((send gEgo:inRect(32 152 92 167)) and proc0_12(113))
                                                        proc255_0(45 10)
                                                    )(else
                                                        proc255_0(45 8)
                                                    )
                                                )
                                            )(else
                                                (if (Said('/window') or proc0_14(pEvent 46 109 63 127))
                                                    proc255_0(45 11)
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance smoke of Prop
    (properties)

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/smoke') or proc255_5(self pEvent 3))
                proc255_0(45 12)
                (send pEvent:claimed(1))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )

)
(instance stump of NewFeature
    (properties
        x 190
        y 150
        noun 2004
        nsTop 143
        nsLeft 181
        nsBottom 157
        nsRight 199
        description 2059
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2065
    )
)
(instance chimney1 of NewFeature
    (properties
        x 84
        y 73
        noun 2008
        nsTop 63
        nsLeft 76
        nsBottom 83
        nsRight 92
        description 2108
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2116
    )
)
(instance chimney2 of NewFeature
    (properties
        x 93
        y 131
        noun 2008
        nsTop 108
        nsLeft 86
        nsBottom 155
        nsRight 100
        description 2108
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2116
    )
)
(instance house1 of NewFeature
    (properties
        x 37
        y 106
        noun 2012
        nsTop 59
        nsBottom 153
        nsRight 74
        description 2216
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2222
    )
)
(instance house2 of NewFeature
    (properties
        x 79
        y 117
        noun 2012
        nsTop 83
        nsLeft 73
        nsBottom 151
        nsRight 85
        description 2216
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2222
    )
)
(instance house3 of NewFeature
    (properties
        x 92
        y 100
        noun 2012
        nsTop 93
        nsLeft 84
        nsBottom 108
        nsRight 101
        description 2216
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2222
    )
)
(instance log1 of NewFeature
    (properties
        x 157
        y 90
        noun 2027
        nsTop 83
        nsLeft 148
        nsBottom 97
        nsRight 166
        description 2300
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2304
    )
)
(instance log2 of NewFeature
    (properties
        x 176
        y 96
        noun 2027
        nsTop 89
        nsLeft 165
        nsBottom 104
        nsRight 187
        description 2300
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2304
    )
)
(instance log3 of NewFeature
    (properties
        x 201
        y 103
        noun 2027
        nsTop 95
        nsLeft 187
        nsBottom 111
        nsRight 216
        description 2300
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2304
    )
)
(instance log4 of NewFeature
    (properties
        x 229
        y 109
        noun 2027
        nsTop 102
        nsLeft 216
        nsBottom 117
        nsRight 243
        description 2300
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2304
    )
)
(instance pinetree1 of NewFeature
    (properties
        x 223
        y 83
        noun 2031
        nsTop 64
        nsLeft 192
        nsBottom 103
        nsRight 255
        description 2381
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2391
    )
)
(instance pinetree2 of NewFeature
    (properties
        x 221
        y 49
        noun 2031
        nsTop 35
        nsLeft 205
        nsBottom 64
        nsRight 237
        description 2381
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2391
    )
)
(instance tree1 of NewFeature
    (properties
        x 43
        y 28
        noun 2040
        nsTop -2
        nsBottom 59
        nsRight 87
        description 2471
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2476
    )
)
(instance tree2 of NewFeature
    (properties
        x 116
        y 20
        noun 2040
        nsLeft 88
        nsBottom 41
        nsRight 144
        description 2471
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 2476
    )
)
