(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "Cycle")
(use "Game")
(use "InvI")
(use "PV")
(use "Obj")
(script 54)


(local
    newProp
    newProp_2
    local2
    newView[8]
    local11
    newAct
    local13
    newView_3
    newView_4
    newView_5
    newView_6
    newView_7
    newView_8
    newView_9
    newView_10
    newView_11
    newView_12
    newView_2
    local25

)
(instance public Room54 of Rm
    (properties
        picture 54
        style 16
    )

    (method (init)
        Load(rsVIEW 677)
        Load(rsVIEW 678)
        Load(rsVIEW 630)
        Load(rsVIEW 290)
        Load(rsVIEW 500)
        Load(rsVIEW 533)
        (self:setRegions(601))
        (if (== gPicture 654)
            (send global2:style(6))
        )
        (super:init())
        (send ((View:new())):
            view(533)
            loop(1)
            cel(0)
            posn(295 107)
            setPri(9)
            addToPic()
        )
        (send (= newAct (Act:new())):
            view(290)
            loop(3)
            illegalBits(0)
            ignoreActors(0)
            setCycle(Walk)
            setScript(bounceBitchScript)
            init()
            hide()
        )
        = global101 1
        proc0_9()
        (send gEgo:
            view(4)
            observeControl(4)
            setStep(4 1)
        )
        (if (== gPicture 53)
            (if (== global122 1)
                (send newAct:
                    posn(253 87)
                    setMotion(Follow gEgo)
                    show()
                )
                (send gEgo:
                    posn(205 105)
                    loop(1)
                    init()
                )
                (bounceBitchScript:changeState(6))
            )(else
                (send newAct:
                    posn(147 1195)
                    show()
                )
                (send gEgo:
                    posn(222 88)
                    init()
                )
                (if (global115)
                    Load(rsVIEW 61)
                    Load(rsVIEW 62)
                    (send gEgo:setScript(cleanKitchen))
                )
            )
        )(else
            (if (== gPicture 654)
                (send gEgo:
                    posn(270 136)
                    loop(2)
                    init()
                )
            )(else
                (send newAct:
                    posn(147 1195)
                    show()
                )
                (send gEgo:
                    posn(147 158)
                    loop(3)
                    init()
                )
                = global115 0
            )
        )
        (if (not global177)
            = local11 7
            (while (>= local11 0)
                (send (= newView[local11] (View:new())):
                    view(500)
                    loop(1)
                    cel(2)
                    ignoreActors(1)
                    setPri(12)
                    posn(
                        (switch (local11)
                            (case 0
                                190
                            )
                            (case 1
                                194
                            )
                            (case 2
                                218
                            )
                            (case 3
                                228
                            )
                            (case 4
                                240
                            )
                            (case 5
                                262
                            )
                            (case 6
                                270
                            )
                            (case 7
                                295
                            )
                        )
 
                        (switch (local11)
                            (case 0
                                136
                            )
                            (case 1
                                133
                            )
                            (case 2
                                133
                            )
                            (case 3
                                136
                            )
                            (case 4
                                133
                            )
                            (case 5
                                136
                            )
                            (case 6
                                133
                            )
                            (case 7
                                136
                            )
                        )
)
                    init()
                    stopUpd()
                )
                --local11
            )
        )(else
            (send (= newView[0] (View:new())):
                view(677)
                posn(78 103)
                loop(3)
                cel(0)
                init()
                stopUpd()
            )
        )
        (if (== (send ((send gInv:at(1))):owner()) 54)
            (send (= newView_2 (View:new())):
                view(500)
                ignoreActors(1)
                loop(0)
                cel(0)
                setPri(12)
                posn(236 135)
                init()
                stopUpd()
            )
        )
        (if (not global102)
            (send (= newView_3 (View:new())):
                view(677)
                loop(0)
                cel(0)
                posn(100 99)
                init()
                stopUpd()
            )
            (send (= newView_4 (View:new())):
                view(677)
                loop(0)
                cel(1)
                posn(110 99)
                init()
                stopUpd()
            )
            (send (= newView_5 (View:new())):
                view(677)
                loop(0)
                cel(2)
                posn(120 99)
                init()
                stopUpd()
            )
            (send (= newView_6 (View:new())):
                view(677)
                loop(1)
                cel(0)
                posn(130 99)
                init()
                stopUpd()
            )
            (send (= newView_7 (View:new())):
                view(677)
                loop(1)
                cel(1)
                posn(140 99)
                init()
                stopUpd()
            )
            (send (= newView_8 (View:new())):
                view(677)
                loop(1)
                cel(2)
                posn(150 99)
                init()
                stopUpd()
            )
            (send (= newView_9 (View:new())):
                view(678)
                loop(0)
                cel(0)
                posn(160 99)
                init()
                stopUpd()
            )
            (send (= newView_10 (View:new())):
                view(678)
                loop(0)
                cel(1)
                posn(170 99)
                init()
                stopUpd()
            )
            (send (= newView_11 (View:new())):
                view(678)
                loop(0)
                cel(2)
                posn(180 99)
                init()
                stopUpd()
            )
            (send (= newView_12 (View:new())):
                view(677)
                loop(0)
                cel(3)
                posn(107 97)
                init()
                stopUpd()
            )
        )
        = global176 0
        (send (= newProp (Prop:new())):
            view(630)
            posn(83 125)
            cycleSpeed(0)
            setCycle(Fwd)
            init()
        )
        (send (= newProp_2 (Prop:new())):
            view(677)
            setLoop(2)
            cel(3)
            setPri(9)
            posn(56 138)
            ignoreActors(1)
            init()
            stopUpd()
        )
    )


    (method (doit)
        (super:doit())
        (if ((== local25 0) and (== (send gEgo:script()) 0))
            (if (& (send gEgo:onControl()) $0020)
                (send global2:newRoom(53))
            )(else
                (if (& (send gEgo:onControl()) $0200)
                    (send gEgo:setScript(useSteps))
                    (useSteps:changeState(1))
                )(else
                    (if (& (send gEgo:onControl()) $1000)
                        (send gEgo:setScript(useSteps))
                        (useSteps:changeState(4))
                    )(else
                        (if (& (send gEgo:onControl()) $0040)
                            (send gEgo:
                                illegalBits(32768)
                                ignoreActors(0)
                                loop(2)
                            )
                            (send global2:newRoom(22))
                        )
                    )
                )
            )
        )
    )


    (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if ((<> (send pEvent:type()) 128) or (send pEvent:claimed()))
            return 
        )
        (if (Said('is<how<time') or Said('[!*]/time'))
            Print(54 0)
        )(else
            (if (Said('open,(look<in)/cabinet'))
                Print(54 1)
            )(else
                (if (Said('close/cabinet'))
                    (if (not global102)
                        Print(54 2)
                    )(else
                        Print(54 3)
                    )
                )(else
                    (if (Said('open/door,closet,pantry'))
                        (if (== (send newProp_2:cel()) 0)
                            Print(54 4)
                        )(else
                            (if ((send gEgo:inRect(40 137 70 150)))
                                (send newProp_2:setScript(doorOpen))
                            )(else
                                Print(800 1)
                            )
                        )
                    )(else
                        (if (Said('close/door,closet,pantry'))
                            (if (> (send newProp_2:cel()) 0)
                                Print(54 3)
                            )(else
                                (if ((send gEgo:inRect(0 137 70 145)))
                                    (send newProp_2:setScript(doorClose))
                                )(else
                                    Print(800 1)
                                )
                            )
                        )(else
                            (if (Said('sit'))
                                Print(54 5)
                            )(else
                                (if (Said('clean[/cottage]'))
                                    (if (& (send gEgo:onControl()) $0004)
                                        Print(54 6)
                                    )(else
                                        (if (== global102 0)
                                            (send gEgo:setScript(startClean))
                                        )(else
                                            (if (not global177)
                                                (send gEgo:setScript(cleanTable))
                                            )(else
                                                Print(54 7)
                                            )
                                        )
                                    )
                                )(else
                                    (if (Said('clean/table,dish'))
                                        (if (global102 and not global177)
                                            (send gEgo:setScript(cleanTable))
                                        )(else
                                            (if (global102 and global177)
                                                Print(54 8)
                                            )(else
                                                Print(54 2)
                                            )
                                        )
                                    )(else
                                        (if (Said('clean,do,scrub,sweep,dust[/dish,dirt,furniture]'))
                                            (if (global102)
                                                Print(54 9)
                                            )(else
                                                Print(54 2)
                                            )
                                        )(else
                                            (if (Said('chew,drink,chew/soup'))
                                                (if (not global176)
                                                    Print(54 5)
                                                )(else
                                                    Print(54 10)
                                                )
                                            )(else
                                                (if (Said('get>'))
                                                    (if (Said('/dish[<dirty]'))
                                                        (if (not global102 or not global177)
                                                            Print(54 11)
                                                        )(else
                                                            Print(54 12)
                                                        )
                                                    )(else
                                                        (if (Said('/broom'))
                                                            (if (& (send gEgo:onControl(1)) $0004)
                                                                Print(54 13)
                                                            )(else
                                                                Print(54 14)
                                                            )
                                                        )(else
                                                            (if (Said('/caldron'))
                                                                Print(54 15)
                                                            )(else
                                                                (if (Said('/bowl'))
                                                                    Print(54 16)
                                                                )(else
                                                                    (if (Said('/soup'))
                                                                        (if (global176)
                                                                            Print(54 17)
                                                                        )(else
                                                                            Print(54 18)
                                                                        )
                                                                    )(else
                                                                        (if (Said('/pouch,diamond'))
                                                                            (if ((send gEgo:has(1)))
                                                                                (send pEvent:claimed(0))
                                                                            )(else
                                                                                (if (== (send ((send gInv:at(1))):owner()) gGNewPropX)
                                                                                    (if ((send gEgo:inRect(200 140 276 164)))
                                                                                        (send gEgo:get(1))
                                                                                        = global182 1
                                                                                        (send gGame:changeScore(2))
                                                                                        (send newView_2:dispose())
                                                                                    )(else
                                                                                        Print(800 1)
                                                                                    )
                                                                                )(else
                                                                                    Print(54 19)
                                                                                )
                                                                            )
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )(else
                                                    (if (Said('look>'))
                                                        (if ((== global176 1) and Said('/soup'))
                                                            Print(54 20)
                                                        )(else
                                                            (if ((send ((Inv:at(1))):ownedBy(54)) and Said('/pouch,diamond'))
                                                                Print(54 21)
                                                            )(else
                                                                (if (Said('/window'))
                                                                    (if ((send gEgo:inRect(124 117 197 130)))
                                                                        Print(54 22)
                                                                    )(else
                                                                        Print(800 1)
                                                                    )
                                                                )(else
                                                                    (if (Said('/mantel,mantel'))
                                                                        (if ((send gCast:contains(newView[0])) and (== (send newView[0]:view()) 677))
                                                                            Print(54 23)
                                                                        )(else
                                                                            Print(54 24)
                                                                        )
                                                                    )(else
                                                                        (if (Said('<under/table'))
                                                                            Print(54 25)
                                                                        )(else
                                                                            (if (Said('/table'))
                                                                                (if (global177)
                                                                                    Print(54 26)
                                                                                    (if (== (send ((send gInv:at(1))):owner()) 54)
                                                                                        Print(54 27)
                                                                                    )
                                                                                )(else
                                                                                    Print(54 28)
                                                                                    (if (== (send ((send gInv:at(1))):owner()) gGNewPropX)
                                                                                        Print(54 27)
                                                                                    )
                                                                                )
                                                                            )(else
                                                                                (if (Said('/stair'))
                                                                                    Print(54 29)
                                                                                )(else
                                                                                    (if (Said('/cabinet'))
                                                                                        Print(54 30)
                                                                                    )(else
                                                                                        (if (Said('<in/cabinet'))
                                                                                            Print(54 1)
                                                                                        )(else
                                                                                            (if (Said('/wall'))
                                                                                                Print(54 31)
                                                                                            )(else
                                                                                                (if (Said('/dirt') or Said('<down'))
                                                                                                    Print(54 32)
                                                                                                )(else
                                                                                                    (if (Said('/bowl'))
                                                                                                        (if (global177)
                                                                                                            Print(54 33)
                                                                                                        )(else
                                                                                                            Print(54 34)
                                                                                                        )
                                                                                                    )(else
                                                                                                        (if (Said('/caldron,soup'))
                                                                                                            Print(54 35)
                                                                                                        )(else
                                                                                                            (if (Said('/fire,fireplace'))
                                                                                                                Print(54 36)
                                                                                                            )(else
                                                                                                                (if (Said('/carpet'))
                                                                                                                    Print(54 37)
                                                                                                                )(else
                                                                                                                    (if (Said('/sink'))
                                                                                                                        (if (global102)
                                                                                                                            Print(54 38)
                                                                                                                        )(else
                                                                                                                            Print(54 39)
                                                                                                                        )
                                                                                                                    )(else
                                                                                                                        (if (Said('/dish[<dirty]'))
                                                                                                                            (if (not global102 or not global177)
                                                                                                                                Print(54 40)
                                                                                                                            )(else
                                                                                                                                Print(54 41)
                                                                                                                            )
                                                                                                                        )(else
                                                                                                                            (if (Said('/clock[<cuckoo]'))
                                                                                                                                Print(54 42)
                                                                                                                            )(else
                                                                                                                                (if (Said('/time'))
                                                                                                                                    Print(54 43)
                                                                                                                                )(else
                                                                                                                                    (if (Said('<in/closet'))
                                                                                                                                        (if (& (send gEgo:onControl(1)) $0004)
                                                                                                                                            Print(54 44)
                                                                                                                                        )(else
                                                                                                                                            (if (> (send newProp_2:cel()) 0)
                                                                                                                                                Print(54 45)
                                                                                                                                            )(else
                                                                                                                                                Print(800 1)
                                                                                                                                            )
                                                                                                                                        )
                                                                                                                                    )(else
                                                                                                                                        (if (Said('/closet'))
                                                                                                                                            (if (& (send gEgo:onControl(1)) $0004)
                                                                                                                                                Print(54 46)
                                                                                                                                            )(else
                                                                                                                                                Print(54 47)
                                                                                                                                            )
                                                                                                                                        )(else
                                                                                                                                            (if (Said('/broom'))
                                                                                                                                                (if (& (send gEgo:onControl(1)) $0004)
                                                                                                                                                    Print(54 48)
                                                                                                                                                )(else
                                                                                                                                                    Print(54 49)
                                                                                                                                                )
                                                                                                                                            )(else
                                                                                                                                                (if (Said('[<around][/cottage,kitchen]'))
                                                                                                                                                    Print(54 50)
                                                                                                                                                    (if (== global102 0)
                                                                                                                                                        Print(54 51)
                                                                                                                                                    )
                                                                                                                                                )
                                                                                                                                            )
                                                                                                                                        )
                                                                                                                                    )
                                                                                                                                )
                                                                                                                            )
                                                                                                                        )
                                                                                                                    )
                                                                                                                )
                                                                                                            )
                                                                                                        )
                                                                                                    )
                                                                                                )
                                                                                            )
                                                                                        )
                                                                                    )
                                                                                )
                                                                            )
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )


    (method (newRoom param1)
        (if (== param1 22)
            (send (ScriptID(601)):keep(0))
        )
        = global189 0
        (super:newRoom(param1))
    )

)
(instance startClean of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (proc0_10() = local25 1 = global204 0 = global205 1 = global115 1 (send gEgo:
                    illegalBits(0)
                    setAvoider(Avoid)
                )
 proc0_12(601 1) (send gEgo:setMotion(MoveTo 135 (send gEgo:y()) self))  )
            )
            (case 1
                ((send gEgo:setMotion(MoveTo 135 130 self))  )
            )
            (case 2
                ((send gEgo:setMotion(MoveTo 192 123 self))  )
            )
            (case 3
                ((send gEgo:
                    setLoop(0)
                    setMotion(MoveTo 232 88 self)
                )
  )
            )
            (case 4
                ((send gEgo:setMotion(MoveTo 243 90 self))  )
            )
            (case 5
                ((send global2:newRoom(53)) )
            )
        )
    )

)
(instance cleanKitchen of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (proc0_10() = local25 1 (send gEgo:
                    illegalBits(0)
                    setAvoider(Avoid)
                    loop(1)
                    setMotion(MoveTo 194 123 self)
                )
  )
            )
            (case 1
                ((cleanTable:cue())  )
            )
            (case 2
                ((send gEgo:
                    setLoop(-1)
                    setMotion(MoveTo 103 120 self)
                )
  )
            )
            (case 3
                ((send newView_3:dispose()) (send gEgo:setMotion(MoveTo 110 (send gEgo:y()) self))  )
            )
            (case 4
                ((send newView_4:dispose()) (send newView_12:dispose()) (send gEgo:setMotion(MoveTo 120 (send gEgo:y()) self))  )
            )
            (case 5
                ((send newView_5:dispose()) (send gEgo:setMotion(MoveTo 130 (send gEgo:y()) self))  )
            )
            (case 6
                ((send newView_6:dispose()) (send gEgo:setMotion(MoveTo 140 (send gEgo:y()) self))  )
            )
            (case 7
                ((send newView_7:dispose()) (send gEgo:setMotion(MoveTo 150 (send gEgo:y()) self))  )
            )
            (case 8
                ((send newView_8:dispose()) (send gEgo:setMotion(MoveTo 160 (send gEgo:y()) self))  )
            )
            (case 9
                ((send newView_9:dispose()) (send gEgo:setMotion(MoveTo 170 (send gEgo:y()) self))  )
            )
            (case 10
                ((send newView_10:dispose()) (send newView_11:dispose()) (send gEgo:setMotion(MoveTo 180 (send gEgo:y()) self))  )
            )
            (case 11
                ((send gEgo:setMotion(MoveTo 160 (send gEgo:y()) self))  )
            )
            (case 12
                ((dishDust:init()) (send gEgo:
                    view(62)
                    loop(3)
                    setCycle(Fwd)
                )
 = seconds 5  )
            )
            (case 13
                ((dishDust:dispose()) (send gEgo:
                    view(4)
                    setLoop(-1)
                    setMotion(MoveTo 83 134 self)
                )
  )
            )
            (case 14
                ((send (= newView[0] (View:new())):
                    view(677)
                    posn(78 103)
                    loop(3)
                    cel(0)
                    init()
                )
 (send newProp_2:
                    setPri(6)
                    ignoreActors(1)
                    setCycle(Beg)
                )
 (send gEgo:setMotion(MoveTo 65 140 self))  )
            )
            (case 15
                ((send gEgo:setMotion(MoveTo 45 140 self))  )
            )
            (case 16
                ((send gEgo:
                    view(61)
                    setMotion(MoveTo 150 145 self)
                )
  )
            )
            (case 17
                ((sweepDust:init()) (send gEgo:
                    setLoop(2)
                    setMotion(MoveTo 170 122 self)
                )
  )
            )
            (case 18
                ((send gEgo:setMotion(MoveTo 120 155 self))  )
            )
            (case 19
                ((send gEgo:setMotion(MoveTo 45 140 self))  )
            )
            (case 20
                ((sweepDust:dispose()) (send newProp_2:
                    setCycle(End)
                    setPri(6)
                )
 (send gEgo:
                    view(4)
                    setLoop(-1)
                    illegalBits(32768)
                    setMotion(MoveTo 140 155 self)
                )
  )
            )
            (case 21
                ((send gEgo:setMotion(MoveTo 150 125 self))  )
            )
            (case 22
                (= global204 0 = local25 0 = global115 0 proc0_12(601 0) = global205 1 = global102 1 (send gEgo:
                    loop(2)
                    forceUpd()
                )
 (send newProp_2:dispose()) (send gGame:changeScore(5)) (send global2:newRoom(654)) )
            )
        )
    )

)
(instance dishDust of Prop
    (properties
        view 678
    )

    (method (init)
        (super:init())
        (self:
            loop(1)
            setCycle(Fwd)
            ignoreActors()
            posn((send gEgo:x()) - (send gEgo:y()) 20)
            setPri(- (send gEgo:priority()) 1)
        )
    )


    (method (doit)
        (super:doit())
        (self:
            posn((send gEgo:x()) - (send gEgo:y()) 20)
            setPri(- (send gEgo:priority()) 1)
        )
    )

)
(instance sweepDust of Prop
    (properties
        view 678
    )

    (method (init)
        (super:init())
        (self:
            loop(2)
            setCycle(Fwd)
            ignoreActors(1)
            posn((send gEgo:x()) (send gEgo:y()))
            setPri((send gEgo:priority()))
        )
    )


    (method (doit)
        (super:doit())
        (self:
            posn((send gEgo:x()) (send gEgo:y()))
            setPri((send gEgo:priority()))
        )
    )

)
(instance cleanTable of Script
    (properties)

    (method (init param1)
        Load(rsVIEW 63)
        (super:init(param1))
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (proc0_10() = local25 1 
                (if (not global115)
                    = global115 1
                    proc0_12(601 1)
                )
 (send gEgo:
                    illegalBits(0)
                    setAvoider(Avoid)
                    setCycle(Walk)
                )
 
                (if (> (send gEgo:y()) 145)
                    (send gEgo:setMotion(MoveTo 135 159 self))
                )(else
                    (send gEgo:setMotion(MoveTo 135 150 self))
                )
 )
            )
            (case 1
                (= local11 7 (send gEgo:setMotion(MoveTo 290 (send gEgo:y()) self))  )
            )
            (case 2
                ((send newView[local11]:dispose()) (send gEgo:
                    view(63)
                    setLoop(
                        (if (> (send gEgo:y()) 151)
                            3
                        )(else
                            2
                        )
)
                    setMotion(MoveTo + (* local11 10) 190 (send gEgo:y()) self)
                )
  )
            )
            (case 3
                (
                (if (> local11 0)
                    --local11
                    = state 1
                    (self:cue())
                )(else
                    (send gEgo:
                        view(4)
                        setLoop(-1)
                        setMotion(MoveTo 135 (send gEgo:y()) self)
                    )
                )
 )
            )
            (case 4
                (
                (if (not global102)
                    (cleanKitchen:cue())
                )(else
                    (send gEgo:setMotion(MoveTo 150 120 self))
                )
 )
            )
            (case 5
                ((dishDust:init()) (send gEgo:
                    view(62)
                    loop(3)
                    setCycle(Fwd)
                )
 = seconds 5  )
            )
            (case 6
                ((dishDust:dispose()) (send gEgo:
                    view(4)
                    setLoop(-1)
                    setMotion(MoveTo 83 134 self)
                )
  )
            )
            (case 7
                ((send (= newView[0] (View:new())):
                    view(677)
                    posn(78 103)
                    loop(3)
                    cel(0)
                    init()
                )
 (send gEgo:
                    setAvoider(0)
                    setCycle(Walk)
                    setMotion(MoveTo 123 134 self)
                )
  )
            )
            (case 8
                (= global177 1 = local25 0 = global115 0 proc0_12(601 0) proc0_9() (send gEgo:observeControl(4)) proc0_11() = global189 1 (send client:setScript(0)) Print(54 52) )
            )
        )
    )

)
(instance doorOpen of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (proc0_10() (send gEgo:setMotion(MoveTo 64 146 self))  )
            )
            (case 1
                ((send gEgo:loop(1)) (send newProp_2:setCycle(Beg self))  )
            )
            (case 2
                ((send gEgo:ignoreControl(4)) proc0_11() )
            )
        )
    )

)
(instance doorClose of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (proc0_10() (send gEgo:setMotion(MoveTo 64 144 self))  )
            )
            (case 1
                ((send gEgo:loop(1)) (send newProp_2:setCycle(End self))  )
            )
            (case 2
                (proc0_11() (send gEgo:observeControl(4)) )
            )
        )
    )

)
(instance useSteps of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 1
                (proc0_10() = local25 1 (send gEgo:
                    ignoreControl(32768)
                    setMotion(MoveTo 232 88 self)
                )
  )
            )
            (case 2
                ((send gEgo:setMotion(MoveTo 243 90 self))  )
            )
            (case 3
                (proc0_11() = global189 1 (send gEgo:
                    observeControl(32768)
                    setScript(0)
                )
 (send global2:newRoom(53))  )
            )
            (case 4
                (proc0_10() = local25 1 (send gEgo:
                    ignoreControl(32768)
                    setMotion(MoveTo 192 123 self)
                )
  )
            )
            (case 5
                (proc0_11() = local25 0 = global189 1 (send gEgo:
                    observeControl(32768)
                    setScript(0)
                )
 )
            )
        )
    )

)
(instance bounceBitchScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (= seconds 60  )
            )
            (case 1
                (
                (if (((((global115 or global122) or global204) or global102) or (> (send gEgo:y()) 155)) or (< (send gEgo:y()) 119))
                    --state
                    = seconds 5
                )(else
                    Print(54 53)
                    = global122 1
                    proc0_10()
                    (send newAct:
                        posn(140 222)
                        setMotion(MoveTo 140 160 self)
                        setAvoider(Avoid)
                    )
                )
 )
            )
            (case 2
                ((send newAct:setMotion(MoveTo 110 160 self))  )
            )
            (case 3
                ((send newAct:
                    loop(0)
                    stopUpd()
                )
 = local25 1 (send gEgo:
                    illegalBits(0)
                    setMotion(MoveTo 140 (send gEgo:y()) self)
                )
  )
            )
            (case 4
                ((send gEgo:setMotion(MoveTo 140 162 self))  )
            )
            (case 5
                (= global102 2 = global122 0 proc0_9() (send gEgo:observeControl(4)) proc0_11() (send global2:newRoom(22))  )
            )
            (case 6
                (= seconds 0 proc0_10() = local25 1 (send gEgo:setMotion(MoveTo 192 123 self))  )
            )
            (case 7
                ((send gEgo:setMotion(MoveTo 140 131 self)) = state 3 )
            )
        )
    )

)
