(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "Game")
(script 8)



(instance public Room8 of Rm
    (properties
        picture 8
    )

    (method (init)
        = north 2
        = south 14
        = east 9
        = west 7
        = horizon 68
        = global101 0
        (if (global100)
            = picture 108
        )
        (super:init())
        (send gEgo:
            view(2)
            init()
        )
        (self:setRegions(506 514))
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed()))
            return 1
        )
        return 
            (if (== (send pEvent:type()) 128)
                (if (Said('/door'))
                    Print(8 0)
                )(else
                    (if (Said('/window>'))
                        (if (Said('open'))
                            Print(8 1)
                        )(else
                            (if (Said('break'))
                                Print(8 2)
                            )(else
                                (if (Said('look'))
                                    (if ((send gEgo:inRect(10 134 57 140)))
                                        Print(8 3)
                                    )(else
                                        Print(800 1)
                                    )
                                )
                            )
                        )
                    )
                )
                (if (Said('look>'))
                    (if (Said('/cottage'))
                        Print(8 4)
                    )(else
                        (if (Said('[<around][/room]'))
                            Print(8 5)
                        )
                    )
                )
            )(else
                0
            )
    )


    (method (newRoom param1)
        (if ((send gCast:contains(gNewAct)))
            = global211 global160
            = global212 global159
        )
        (super:newRoom(param1))
    )

)
