(version 2)
(include "sci.sh")
(exports
    0 rm65
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "Blk")
(use "Feature")
(use "n958")
(use "Chase")
(use "Avoid")
(use "Sound")
(use "Cycle")
(use "Game")
(use "PicView")
(use "Obj")
(script 65)


(local
    local0
    local1

)
(procedure (localproc_1e80)
    proc255_0(65 58 67 -1 130 70 280 30 1)
)


(procedure (localproc_1e9a)
    proc255_0(65 59 67 -1 130 70 280 30 1)
)


(procedure (localproc_1eb4)
    proc255_0(65 60 67 -1 130 70 280 30 1)
)


(procedure (localproc_1ece)
    return & (send gEgo:onControl(1)) $2000
)


(procedure (localproc_1edd)
    (send gEgo:inRect(100 61 124 82))
)


(instance stoolBlock of Blk
    (properties
        top 88
        left 88
        bottom 100
        right 112
    )
)
(instance public rm65 of Rm
    (properties
        picture 65
        north 80
        west 28
    )

    (method (init)
        proc958_0(128 119 65 52 115 118 265)
        proc958_0(132 88 86 87 85 84 40)
        (self:style(3))
        (super:init())
        SetCursor(global21 0 298 1)
        (send gEgo:
            posn(36 126)
            loop(0)
            init()
        )
        proc0_1()
        (send (ScriptID(0 23)):
            number(88)
            loop(-1)
            play()
        )
        (stool:
            init()
            stopUpd()
        )
        (pot:init())
        (if (not proc0_12(77))
            (note:
                setPri(7)
                init()
                stopUpd()
            )
        )
        (bed:init())
        (bed2:init())
        (bedroomTable:init())
        (table:init())
        (bars:init())
        (spiderWeb:init())
        (door:
            init()
            cel(
                (if (proc0_12(15))
                    3
                )(else
                    0
                )
)
            setPri(2)
            stopUpd()
        )
        (if (not proc0_12(76))
            (rmCheese:
                setPri(1)
                init()
                stopUpd()
            )
        )
        (fire:
            init()
            stopUpd()
        )
        (bubble:
            init()
            stopUpd()
        )
        (smoke:
            setPri(4)
            init()
            stopUpd()
        )
        (if (>= global101 1)
            (fire:setCycle(Fwd))
            (bubble:setCycle(Fwd))
            (smoke:setScript(smokeFace))
        )
        (if (proc0_12(74))
            (goop:init())
        )
        (if (proc0_12(2))
            proc255_0(65 0)
            proc0_11(2)
        )
        (if (proc0_12(16))
            (witch:
                init()
                setCycle(Walk)
            )
            (witch:setScript(witchHome))
        )(else
            (if (proc0_12(74))
                0
            )(else
                (if (not script and not global124)
                    = local0 300
                )
            )
        )
    )


    (method (doit)
        (var temp0)
        (if (proc0_12(1))
            proc0_11(1)
            proc0_1()
            proc255_0(65 1)
        )(else
            (if (proc0_12(43))
                proc0_11(43)
                (send gEgo:ignoreBlocks(stoolBlock))
            )(else
                (if (& (send gEgo:onControl(1)) $0004)
                    SetCursor(global21 0 153 150)
                    (self:newRoom(28))
                )(else
                    (if (script)
                        (send script:doit())
                    )(else
                        (if (== local0 100)
                            (send (ScriptID(0 21)):
                                number(84)
                                init()
                                loop(1)
                                play()
                            )
                            proc255_0(65 2)
                            --local0
                        )(else
                            (if (> local0 1)
                                --local0
                            )(else
                                (if ((== local0 1) and not (& (send gEgo:onControl(1)) $4000))
                                    = local0 0
                                    (witch:setScript(witchEnter))
                                )
                            )
                        )
                    )
                )
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('play/fiddle'))
                (if (not (send gCast:contains(witch)))
                    (send pEvent:claimed(0))
                )(else
                    (if (not (send gEgo:has(17)))
                        proc0_6()
                    )(else
                        proc255_0(65 3)
                    )
                )
            )(else
                (if (Said('eat,consume/building'))
                    proc255_0(65 4)
                )(else
                    (if (Said('/witch>'))
                        (if (proc0_12(74))
                            proc255_0(65 5)
                            (send pEvent:claimed(1))
                        )(else
                            (if (not (send gCast:contains(witch)))
                                proc255_0(65 6 67 -1 130 70 280 30 1)
                                (send pEvent:claimed(1))
                            )(else
                                (if (Said('move'))
                                    proc255_0(65 7)
                                )(else
                                    (if (Said('kill'))
                                        proc255_0(65 8)
                                    )(else
                                        (send pEvent:claimed(0))
                                    )
                                )
                            )
                        )
                    )(else
                        (if (Said('fill/bucket'))
                            (if ((send gEgo:has(8)))
                                proc255_0(65 9)
                            )(else
                                proc255_0(65 10)
                            )
                        )(else
                            (if (Said('look,look>'))
                                (if (Said('[/room,building]'))
                                    proc255_0(65 11 67 -1 130 70 280 30 1)
                                )(else
                                    (if (Said('/bedroom'))
                                        (if (localproc_1ece())
                                            proc255_0(65 12 67 -1 130 70 280 30 1)
                                        )(else
                                            proc255_0(65 13 67 -1 130 70 280 30 1)
                                        )
                                    )(else
                                        (if (Said('<in/cage'))
                                            proc255_0(65 14 67 -1 130 70 280 30 1)
                                        )(else
                                            (if (Said('/table'))
                                                (if (localproc_1ece())
                                                    (bedroomTable:doLook(1))
                                                )(else
                                                    (table:doLook(1))
                                                )
                                            )
                                        )
                                    )
                                )
                            )(else
                                (if (Said('eat,consume,drink/liquid,brew'))
                                    proc255_0(65 15 67 -1 130 70 280 30 1)
                                )(else
                                    (if (Said('smell,smell'))
                                        proc255_0(65 16 67 -1 130 70 280 30 1)
                                    )(else
                                        (if (Said('open,open/cage'))
                                            proc255_0(65 17)
                                        )(else
                                            (if (Said('bend/bar'))
                                                proc255_0(65 18 67 -1 130 70 280 30 1)
                                            )(else
                                                (if (Said('open,open/cabinet,door'))
                                                    (if (proc0_12(1))
                                                        localproc_1e80()
                                                    )(else
                                                        (if (proc0_12(15))
                                                            proc255_0(65 19)
                                                        )(else
                                                            (if (script)
                                                                proc0_22()
                                                            )(else
                                                                (if (localproc_1edd())
                                                                    (self:setScript(openCabinet))
                                                                )(else
                                                                    proc0_4()
                                                                )
                                                            )
                                                        )
                                                    )
                                                )(else
                                                    (if (Said('close,close/cabinet,door'))
                                                        (if (not localproc_1edd())
                                                            proc0_4()
                                                        )(else
                                                            (if (script)
                                                                proc0_22()
                                                            )(else
                                                                (if (proc0_12(15))
                                                                    (self:setScript(closeCabinet))
                                                                )(else
                                                                    proc255_0(65 20)
                                                                )
                                                            )
                                                        )
                                                    )(else
                                                        (if (Said('get,get/cheese'))
                                                            (if (proc0_12(76))
                                                                proc255_0(65 21)
                                                            )(else
                                                                (if (not proc0_12(15))
                                                                    proc255_0(65 22)
                                                                )(else
                                                                    (if (proc0_12(1))
                                                                        localproc_1e80()
                                                                    )(else
                                                                        (if (script)
                                                                            proc0_22()
                                                                        )(else
                                                                            (if (localproc_1edd())
                                                                                (self:setScript(getCheese))
                                                                            )(else
                                                                                proc0_4()
                                                                            )
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )(else
                                                            (if (Said('feel/caldron'))
                                                                (if (localproc_1ece())
                                                                    localproc_1eb4()
                                                                )(else
                                                                    (if ((send gEgo:inRect(15 70 110 110)))
                                                                        proc255_0(65 23 67 -1 130 70 280 30 1)
                                                                    )(else
                                                                        proc0_4()
                                                                    )
                                                                )
                                                            )(else
                                                                (if (Said('climb,climb,dive,jump<in,in/caldron'))
                                                                    (if (localproc_1ece())
                                                                        localproc_1eb4()
                                                                    )(else
                                                                        (if ((send gEgo:inRect(15 70 110 110)))
                                                                            proc255_0(65 24 67 -1 130 70 280 30 1)
                                                                        )(else
                                                                            proc0_4()
                                                                        )
                                                                    )
                                                                )(else
                                                                    (if ((Said('nap') or Said('go/nap')) or Said('get/nap'))
                                                                        (if (localproc_1ece())
                                                                            proc255_0(65 25 67 -1 130 70 280 30 1)
                                                                        )(else
                                                                            proc255_0(65 26 67 -1 130 70 280 30 1)
                                                                        )
                                                                    )(else
                                                                        (if (Said('rub/ring'))
                                                                            proc255_0(65 27 67 -1 130 70 280 30 1)
                                                                        )(else
                                                                            (super:handleEvent(pEvent))
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance witch of Actor
    (properties
        x 94
        y 85
        view 115
        loop 1
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('talk,speak,say/witch'))
                proc255_0(65 28 67 -1 130 70 280 30 1)
            )(else
                (if (Said('look,look/witch'))
                    (self:doVerb(1 pEvent))
                )(else
                    (super:handleEvent(pEvent))
                )
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (localproc_1ece() and (>= paramTotal 2))
                    proc255_0(65 29)
                )(else
                    proc255_0(65 30)
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance fire of Prop
    (properties
        x 43
        y 82
        view 265
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/fire'))
                (self:doVerb(1 pEvent))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                (if ((>= paramTotal 2) and localproc_1ece())
                    localproc_1eb4()
                )(else
                    proc255_0(65 31 67 -1 130 70 280 30 1)
                )
            )
        )
    )

)
(instance bubble of Prop
    (properties
        x 62
        y 67
        view 265
        loop 1
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/liquid,brew') or proc255_5(self pEvent 3))
                (self:doVerb(1 pEvent))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (localproc_1ece() and (== (send param2:type) 128))
                    localproc_1eb4()
                )(else
                    (if (not (send gEgo:inRect(15 70 110 110)) and (== (send param2:type) 128))
                        localproc_1e9a()
                    )(else
                        proc255_0(65 32 67 -1 120 70 280 30 1)
                    )
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance smoke of Prop
    (properties
        x 62
        y 62
        noun 9944
        view 265
        loop 2
        cycleSpeed 1
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/smoke'))
                (self:doVerb(1 pEvent))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (localproc_1ece())
                    proc255_0(65 33 67 -1 130 70 280 30 1)
                )(else
                    (if ((send global2:script))
                        proc0_22()
                    )(else
                        (smoke:setScript(seeSpectre))
                    )
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance door of Prop
    (properties
        x 119
        y 33
        view 265
        loop 3
        cycleSpeed 2
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/cabinet,shelf') or proc255_5(self pEvent 3))
                (self:doVerb(1 pEvent))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (not localproc_1edd() and (== (send param2:type) 128))
                    localproc_1e9a()
                )(else
                    (if (not proc0_12(15))
                        proc255_0(65 34 67 -1 130 70 280 30 1)
                    )(else
                        (if (proc0_12(76))
                            proc255_0(65 35 67 -1 130 70 280 30 1)
                        )(else
                            proc255_0(65 36 67 -1 130 70 280 30 1)
                        )
                    )
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance poof of Prop
    (properties
        z 26
        view 265
        loop 6
    )
)
(instance stool of View
    (properties
        x 92
        y 94
        view 265
        loop 5
        cel 2
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/stool'))
                (self:doVerb(1 pEvent))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (localproc_1ece() and (>= paramTotal 2))
                    localproc_1eb4()
                )(else
                    (if ((> (send gEgo:distanceTo(stool)) 26) and (>= paramTotal 2))
                        localproc_1e9a()
                    )(else
                        proc255_0(65 37)
                    )
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance rmCheese of View
    (properties
        x 112
        y 44
        description 10226
        view 265
        loop 5
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/cheese'))
                (self:doVerb(1 pEvent))
            )(else
                (super:handleEvent(pEvent))
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (proc0_12(76))
                    (send ((send gInv:at(13))):showSelf(gEgo))
                )(else
                    (if (not localproc_1edd())
                        localproc_1e9a()
                    )(else
                        (if (not proc0_12(15))
                            proc255_0(65 22)
                        )(else
                            (if (not proc0_12(76))
                                proc255_0(65 36 67 -1 130 70 280 30 1)
                            )
                        )
                    )
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance note of View
    (properties
        x 240
        y 108
        z 10
        view 265
        loop 5
        cel 1
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if (Said('look,look/note,note'))
                (self:doVerb(1 pEvent))
            )(else
                (if (Said('get,get/note,note'))
                    (if (proc0_12(77))
                        proc255_0(65 21)
                    )(else
                        (if (proc0_12(1))
                            localproc_1e80()
                        )(else
                            (if ((send global2:script))
                                proc0_22()
                            )(else
                                (if (not (send gEgo:inRect(220 98 244 123)))
                                    proc0_4()
                                )(else
                                    (send global2:setScript(getNote))
                                )
                            )
                        )
                    )
                    (send pEvent:claimed(1))
                )(else
                    (super:handleEvent(pEvent))
                )
            )
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if (not localproc_1ece() and (>= paramTotal 2))
                    proc255_0(65 38)
                )(else
                    (if ((>= paramTotal 2) and (>= (send gEgo:distanceTo(self)) 30))
                        proc255_0(65 39 67 -1 130 70 280 30 1)
                    )(else
                        (if (>= paramTotal 2)
                            proc255_0(65 40 67 -1 130 70 280 30 1)
                        )(else
                            proc255_0(65 41 67 -1 130 70 280 30 1)
                        )
                    )
                )
                (if (>= paramTotal 2)
                    (send param2:claimed(1))
                )
            )
        )
    )

)
(instance witchHome of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (witch:
                    illegalBits(0)
                    startUpd()
                    setMotion(MoveTo 93 105 self)
                )
            )
            (case 1
                (if (proc0_12(1) or global124)
                    (self:changeState(3))
                )(else
                    (witch:setMotion(Chase gEgo 30 self))
                )
            )
            (case 2
                proc0_2()
                (witchEnter:start(1))
                (witch:setMotion(0))
                (self:dispose())
                (witch:setScript(witchEnter))
            )
            (case 3
                (witch:
                    setMotion(0)
                    stopUpd()
                )
                (poof:
                    init()
                    cycleSpeed(1)
                    posn((witch:x) (witch:y))
                    setCycle(End self)
                )
            )
            (case 4
                (witch:hide())
                (poof:
                    cycleSpeed(2)
                    setCycle(Beg self)
                )
            )
            (case 5
                (poof:dispose())
                (if (proc0_12(1))
                    proc255_0(65 42)
                )(else
                    proc255_0(65 43)
                )
                (witch:dispose())
            )
        )
    )

)
(instance getCheese of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:loop(1))
                = cycles 4
            )
            (case 1
                (rmCheese:dispose())
                (GettingSound:
                    init()
                    play()
                )
                proc255_0(65 44 67 -1 130 70 280 30 1)
                (send gEgo:get(13))
                proc0_19(76 2)
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance getNote of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                proc0_15(gEgo 239 107)
                = cycles 4
            )
            (case 1
                (note:dispose())
                (GettingSound:
                    init()
                    play()
                )
                proc255_0(65 45 67 -1 130 70 280 30 1)
                (send gEgo:get(4))
                proc0_19(77 1)
                = cycles 1
            )
            (case 2
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance openCabinet of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:loop(1))
                = cycles 4
            )
            (case 1
                (door:setCycle(End self))
            )
            (case 2
                (door:stopUpd())
                proc0_3()
                proc0_10(15)
                proc0_19(75 2)
                (self:dispose())
            )
        )
    )

)
(instance closeCabinet of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:loop(1))
                = cycles 4
            )
            (case 1
                (door:setCycle(Beg self))
            )
            (case 2
                (door:stopUpd())
                proc0_3()
                proc0_11(15)
                (self:dispose())
            )
        )
    )

)
(instance witchEnter of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_10(16)
                (send (ScriptID(0 21)):
                    number(85)
                    loop(-1)
                    play()
                )
                (witch:
                    view(115)
                    init()
                    illegalBits(-32768)
                    setPri(-1)
                    setCycle(Walk)
                    posn(36 126)
                    loop(0)
                    setMotion(MoveTo 68 122 self)
                )
            )
            (case 1
                (if (& (send gEgo:onControl(1)) $2000)
                    (witch:setScript(witchToPot))
                )(else
                    proc0_15(witch gEgo)
                    (witch:
                        view(118)
                        cel(0)
                        setCycle(End self)
                    )
                    (send (ScriptID(0 21)):
                        number(86)
                        loop(1)
                        play()
                    )
                )
            )
            (case 2
                proc0_2()
                proc255_0(65 46 67 -1 130 70 280 30 1)
                (witch:
                    view(115)
                    setCycle(Walk)
                    setAvoider(Avoid)
                    setMotion(Chase gEgo 24)
                )
                = seconds 4
            )
            (case 3
                proc0_15(witch gEgo)
                proc255_0(65 47 67 -1 130 70 280 30 1)
                (witch:
                    view(118)
                    cel(0)
                    setCycle(End)
                )
                (send (ScriptID(0 21)):
                    number(86)
                    loop(1)
                    play()
                )
                (poof:
                    init()
                    posn((send gEgo:x) (send gEgo:y))
                    setCycle(End self)
                )
            )
            (case 4
                (send gEgo:hide())
                (poof:setCycle(Beg self))
            )
            (case 5
                = local1 1
                (send (ScriptID(0 21)):
                    number(87)
                    loop(1)
                    play()
                )
                (poof:
                    posn(160 57)
                    setCycle(End self)
                )
            )
            (case 6
                proc0_1()
                (send gEgo:
                    posn(160 57)
                    show()
                )
                (poof:setCycle(Beg self))
            )
            (case 7
                proc0_3()
                (send global2:newRoom(95))
            )
        )
    )

)
(instance witchToPot of Script
    (properties)

    (method (doit)
        (super:doit())
        (if ((not (& (send gEgo:onControl(1)) $2000) and not (& (send gEgo:onControl(1)) $0800)) and (< state 6))
            = seconds 0
            (self:changeState(6))
        )
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (witch:
                    illegalBits(0)
                    ignoreActors(1)
                    setMotion(MoveTo 106 96 self)
                )
            )
            (case 1
                (witch:setMotion(MoveTo 99 91 self))
                (send gEgo:observeBlocks(stoolBlock))
            )
            (case 2
                proc0_3()
                proc255_0(65 52 67 -1 130 70 280 30 1)
                (witch:
                    view(119)
                    loop(1)
                    cel(0)
                    illegalBits(0)
                    posn(94 92)
                    cycleSpeed(1)
                    setCycle(End self)
                )
            )
            (case 3
                proc255_0(65 53 67 -1 130 70 280 30 1)
                (if (proc0_24(0))
                    = seconds 9
                )(else
                    = seconds 6
                )
            )
            (case 4
                proc255_0(65 54 67 -1 130 70 280 30 1)
                (if (proc0_24(0))
                    = seconds 10
                )(else
                    = seconds 7
                )
            )
            (case 5
                proc255_0(65 55 67 -1 130 70 280 30 1)
                (if (== (send global2:script) shoveWitch)
                    (witch:setScript(0))
                )(else
                    (witch:setScript(witchPace))
                )
            )
            (case 6
                proc255_0(65 56)
                proc0_2()
                (if (< (send gEgo:x) 130)
                    (send gEgo:
                        view(52)
                        setLoop(1)
                        setMotion(MoveTo 164 96)
                    )
                    = cycles 8
                )(else
                    (self:cue())
                )
            )
            (case 7
                (witch:
                    view(118)
                    loop(4)
                    cel(0)
                    setCycle(CT 4 1 self)
                )
            )
            (case 8
                (send gEgo:setMotion(0))
                (send (ScriptID(0 21)):
                    number(86)
                    loop(1)
                    play()
                )
                (witch:setCycle(End self))
            )
            (case 9
                (witch:
                    view(115)
                    setCycle(Walk)
                    cycleSpeed(0)
                    posn(101 97)
                )
                (witchEnter:start(2))
                (witch:setScript(witchEnter))
            )
        )
    )


    (method (handleEvent pEvent)
        (asm
            pushi   #claimed
            pushi   0
            lap     pEvent
            send    4
            bnt     code_1826
            ret     
            jmp     code_1913
code_1826:  pushi   1
            lofsa   'move,kill/witch[/caldron,brew,liquid]'
            push    
            callk   Said, 2
            bnt     code_18ce
            pushi   #inRect
            pushi   4
            pushi   110
            pushi   80
            pushi   124
            pushi   99
            lag     gEgo
            send    12
            not     
            bnt     code_1852
            pushi   2
            pushi   65
            pushi   48
            calle   proc255_0, 4
            jmp     code_1913
code_1852:  pushi   #script
            pushi   0
            lag     global2
            send    4
            bnt     code_1883
            pushi   #view
            pushi   0
            lag     gEgo
            send    4
            push    
            pushi   1
            pushi   0
            callb   proc0_12, 2
            bnt     code_1871
            ldi     23
            jmp     code_1873
code_1871:  ldi     16
code_1873:  eq?     
            bnt     code_1883
            pushi   2
            pushi   65
            pushi   49
            calle   proc255_0, 4
            jmp     code_1913
code_1883:  pushi   #claimed
            pushi   1
            pushi   1
            lap     pEvent
            send    6
            pushi   #number
            pushi   1
            pushi   40
            pushi   42
            pushi   0
            pushi   2
            pushi   0
            pushi   21
            callk   ScriptID, 4
            send    10
            pushi   #script
            pushi   0
            lofsa   witch
            send    4
            push    
            lofsa   witchPace
            eq?     
            bnt     code_18b7
            pushi   #setScript
            pushi   1
            pushi   0
            lag     global2
            send    6
            jmp     code_1913
code_18b7:  pushi   #setScript
            pushi   1
            pushi   0
            lofsa   witch
            send    6
            pushi   #setScript
            pushi   1
            lofsa   shoveWitch
            push    
            lag     global2
            send    6
            jmp     code_1913
code_18ce:  pushi   1
            lofsa   'move,kill/witch'
            push    
            callk   Said, 2
            bnt     code_18e5
            pushi   2
            pushi   65
            pushi   50
            calle   proc255_0, 4
            jmp     code_1913
code_18e5:  pushi   1
            lofsa   'shoot/witch[<shot]'
            push    
            callk   Said, 2
            bt      code_18fb
            pushi   1
            lofsa   'use/shot,(shot<shot)'
            push    
            callk   Said, 2
            bnt     code_1907
code_18fb:  pushi   2
            pushi   65
            pushi   51
            calle   proc255_0, 4
            jmp     code_1913
code_1907:  pushi   #handleEvent
            pushi   1
            lsp     pEvent
            super   Script, 6
            bnt     code_1913
            ret     
code_1913:  ret     
        )
    )

)
(instance witchPace of Script
    (properties)

    (method (doit)
        (super:doit())
        (if (((<> (send gEgo:onControl(1)) 8192) and (< 1 state)) and (< state 7))
            = seconds 0
            (self:changeState(7))
        )
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gEgo:ignoreBlocks(stoolBlock))
                (witch:setCycle(Beg self))
            )
            (case 1
                (witch:
                    view(115)
                    loop(2)
                    setCycle(Walk)
                    cycleSpeed(0)
                    posn(99 91)
                    setMotion(MoveTo 104 96 self)
                )
            )
            (case 2
                (witch:setMotion(MoveTo 50 124 self))
            )
            (case 3
                = seconds 2
            )
            (case 4
                (witch:setMotion(MoveTo 106 100 self))
            )
            (case 5
                = seconds 2
            )
            (case 6
                (self:changeState(2))
            )
            (case 7
                proc0_2()
                proc255_0(65 56)
                (send gEgo:setMotion(0))
                (witchEnter:start(1))
                (witch:setScript(witchEnter))
            )
        )
    )

)
(instance smokeFace of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (smoke:
                    loop(2)
                    setCycle(Fwd)
                )
                = cycles Random(50 100)
            )
            (case 1
                (smoke:
                    loop(4)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 2
                (self:changeState(0))
            )
        )
    )

)
(instance seeSpectre of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                proc0_15(gEgo fire)
                = cycles 4
            )
            (case 1
                (send gEgo:stopUpd())
                (smoke:
                    loop(4)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 2
                (smoke:
                    loop(2)
                    setCycle(Fwd)
                )
                = seconds 2
            )
            (case 3
                (if (not >= global101 1)
                    (smoke:stopUpd())
                )
                proc255_0(65 57 67 -1 130 70 280 30 1)
                proc0_3()
                (send gEgo:startUpd())
                (if (>= global101 1)
                    (smoke:setScript(smokeFace))
                )
                (self:dispose())
            )
        )
    )

)
(instance shoveWitch of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                proc0_10(43)
                (send gEgo:
                    ignoreActors()
                    illegalBits(0)
                    view(65)
                    setMotion(0)
                    loop(0)
                    cel(0)
                    cycleSpeed(1)
                    setCycle(End)
                )
                (send (ScriptID(0 21)):
                    number(40)
                    loop(1)
                    play()
                )
                (witch:
                    view(119)
                    ignoreActors()
                    ignoreControl()
                    loop(0)
                    cel(0)
                    cycleSpeed(1)
                    setCycle(End self)
                )
            )
            (case 1
                (witch:dispose())
                (goop:init())
                (send gEgo:setCycle(Beg))
                = cycles 12
            )
            (case 2
                proc255_0(65 61)
                proc0_19(74 7)
                proc0_3()
                proc0_1()
                (send gEgo:loop(1))
                (self:dispose())
            )
        )
    )

)
(instance goop of View
    (properties
        x 94
        y 92
        view 119
        cel 10
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                (if (paramTotal and localproc_1ece())
                    localproc_1eb4()
                )(else
                    proc255_0(65 62)
                )
            )
        )
    )

)
(instance bars of NewFeature
    (properties
        x 169
        y 44
        nsTop 11
        nsLeft 141
        nsBottom 78
        nsRight 197
        description 10369
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look[<at]/bar,cage'))
                    (self:doLook(1))
                )
            )
        )
    )


    (method (doLook)
        (if (paramTotal and localproc_1ece())
            localproc_1eb4()
        )(else
            proc255_0(65 63)
        )
    )

)
(instance bed of NewFeature
    (properties
        x 281
        y 99
        noun 10082
        nsTop 77
        nsLeft 265
        nsBottom 122
        nsRight 298
        description 10374
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
    )

    (method (handleEvent pEvent)
        (if ((((((== (send pEvent:type) 1) and (<= nsLeft (send pEvent:x))) and (<= (send pEvent:x) nsRight)) and (<= nsTop (send pEvent:y))) and (<= (send pEvent:y) nsBottom)) and (& (send pEvent:modifiers) $0003))
            proc255_0(65 64)
            (send pEvent:claimed(1))
        )(else
            (super:handleEvent(pEvent))
        )
    )


    (method (doLook)
        (if (not localproc_1ece())
            localproc_1eb4()
        )(else
            proc255_0(65 64)
        )
    )

)
(instance bed2 of NewFeature
    (properties
        x 236
        y 130
        noun 10082
        nsTop 115
        nsLeft 211
        nsBottom 145
        nsRight 262
        description 10374
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
    )

    (method (handleEvent pEvent)
        (if ((((((== (send pEvent:type) 1) and (<= nsLeft (send pEvent:x))) and (<= (send pEvent:x) nsRight)) and (<= nsTop (send pEvent:y))) and (<= (send pEvent:y) nsBottom)) and (& (send pEvent:modifiers) $0003))
            proc255_0(65 64)
            (send pEvent:claimed(1))
        )(else
            (super:handleEvent(pEvent))
        )
    )


    (method (doLook)
        (if (not localproc_1ece())
            localproc_1eb4()
        )(else
            proc255_0(65 64)
        )
    )

)
(instance bedroomTable of NewFeature
    (properties
        x 246
        y 97
        nsTop 93
        nsLeft 230
        nsBottom 102
        nsRight 262
        description 10383
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look/endtable,endtable'))
                    (self:doLook(1))
                )
            )
        )
    )


    (method (doLook)
        (if (paramTotal and not localproc_1ece())
            localproc_1eb4()
        )(else
            proc255_0(65 65 67 -1 130 70 280 30 1)
            (if (not proc0_12(77))
                proc255_0(65 66 67 -1 130 70 280 30 1)
            )
        )
    )

)
(instance table of NewFeature
    (properties
        x 117
        y 114
        noun 10098
        nsTop 102
        nsLeft 107
        nsBottom 127
        nsRight 128
        description 10396
        sightAngle 360
        getableDist 320
        seeableDist 520
        shiftClick 369
        contClick 371
        lookStr 10402
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look/table<kitchen'))
                    (self:doLook(1))
                )
            )
        )
    )


    (method (doLook)
        (if (paramTotal and localproc_1ece())
            localproc_1eb4()
        )(else
            proc255_0(65 67)
        )
    )

)
(instance spiderWeb of Feature
    (properties
        x 226
        y 31
        nsTop 18
        nsLeft 212
        nsBottom 44
        nsRight 240
        description 10485
        sightAngle 360
        closeRangeDist 320
        longRangeDist 320
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look/cobweb,spiderweb,(spider<cobweb)'))
                    (self:doVerb(1 1))
                )
            )
        )
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                (if (not localproc_1ece() and (>= paramTotal 2))
                    proc255_0(65 68)
                )(else
                    proc255_0(65 69)
                )
            )
        )
    )

)
(instance pot of NewFeature
    (properties
        x 63
        y 75
        noun 10137
        nsTop 67
        nsLeft 43
        nsBottom 84
        nsRight 84
        description 10506
        sightAngle 360
        seeableDist 520
        shiftClick 369
        lookStr 10510
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (proc255_5(self pEvent 3))
                    proc255_0(lookStr 67 -1 130 70 280 30 1)
                    (send pEvent:claimed(1))
                )(else
                    (if (Said('open,open/caldron'))
                        (if (localproc_1ece())
                            localproc_1eb4()
                        )(else
                            (if ((send gEgo:inRect(15 70 110 110)))
                                proc255_0(65 70)
                            )(else
                                proc0_4()
                            )
                        )
                    )(else
                        (if (Said('look,look,feel/caldron'))
                            (if (localproc_1ece())
                                localproc_1eb4()
                            )(else
                                (if ((send gEgo:inRect(15 70 110 110)))
                                    proc255_0(65 23 67 -1 130 70 280 30 1)
                                )(else
                                    proc0_4()
                                )
                            )
                            (send pEvent:claimed(1))
                        )
                    )
                )
            )
        )
    )

)
(instance GettingSound of Sound
    (properties
        number 105
        priority 10
    )
)
