(include "sci.sh")
(use "Main")
(use "GravMover")
(use "starCon")
(use "CrestPiece")
(use "Print")
(use "PAvoider")
(use "Blink")
(use "PolyPath")
(use "Polygon")
(use "CueObj")
(use "ForwardCounter")
(use "n958")
(use "Cycle")
(use "Sounds")
(use "View")
(use "Obj")
(script 119)


(local
    local0[16] = (160 46 160 65 138 65 138 46 178 74 200 74 200 93 178 93 )
    theCone1[10]
    local26
    local27
    local28
    gEgoX_2
    gEgoY_2
    newPolygon_2
    local32
    local33 = 5
    local34
    local35 = 5
    theTheCone1_2
    local37
    local38
    local39
    theCone1_2
    local41
    theSeconds_2 = 30
    local43[104] = (65514 175 330 175 65514 1 330 1 29 143 0 65514 320 65514 175 330 175 65514 1 330 1 29 143 0 65514 320 29 65526 29 200 287 65526 287 200 81 231 0 65526 200 29 200 29 65526 287 200 287 65526 81 231 0 200 65526 0 100 79 189 228 0 319 62 27 130 100 65526 190 51 1 0 64 319 59 234 189 170 270 65366 65526 220 170 189 319 50 0 66 74 65535 0 120 140 200 65526 102 189 0 107 319 66 237 65526 200 300 65316 200 65526 )

)
(procedure (localproc_020a param1)
    proc0_6(129 rest)
    (send gEgo:
        baseSetter(myBaseSetter)
        setPri(14)
        setStep(6 5)
        setScale(0)
        noun(19)
        setAvoider(PAvoider)
    )
)


(procedure (localproc_023f param1 param2 param3 param4 param5 param6 param7)
    (send param1:
        view(param2)
        loop(param3)
        cel(param4)
        x(param5)
        y(param6)
        setPri(param7)
        ignoreActors(1)
    )
)


(procedure (localproc_0264)
    (var temp0, temp1, temp2, temp3[10])
    = temp0 19
    (while (< temp0 155)
        = temp1 72
        (while (< temp1 252)
            (if ((& (= temp2 OnControl(4 temp1 temp0)) $001e) and (< (= temp2 OnControl(2 temp1 temp0)) 4))
                return 0
            )
            = temp1 (+ temp1 10)
        )
        = temp0 (+ temp0 10)
    )
    return 1
)


(procedure (localproc_02bb)
    (var temp0, temp1, temp2, temp3, temp4)
    (p1:case(9))
    (p2:case(9))
    (p3:case(9))
    (p4:case(9))
    = temp2 (- (send gEgo:x) 4)
    = temp1 (- (send gEgo:y) 10)
    = temp4 (+ (send gEgo:x) 2)
    Graph(11 temp1 temp2 = temp3 (+ (send gEgo:y) 9) temp4 2 -1 2 -1)
    Graph(11 + temp1 1 - temp2 2 - temp3 1 + temp4 2 2 -1 2 -1)
    Graph(11 + temp1 2 - temp2 3 - temp3 2 + temp4 3 2 -1 2 -1)
    Graph(11 + temp1 3 - temp2 4 - temp3 3 + temp4 4 2 -1 2 -1)
    Graph(11 + temp1 4 - temp2 5 - temp3 4 + temp4 5 2 -1 2 -1)
    Graph(11 + temp1 6 - temp2 6 - temp3 6 + temp4 6 2 -1 2 -1)
)


(procedure (localproc_03e7 param1)
    (var temp0, temp1[30])
    (switch (param1)
        (case 0
            (
            (if (< (= temp0 (- (send gEgo:heading) 90)) 0)
                = temp0 (+ temp0 360)
            )
 
            (if (> (= temp0 (- 450 temp0)) 359)
                = temp0 (- temp0 360)
            )
 )
        )
        (case 1
            (
            (if (not % (= temp0 (- 360 (send gEgo:heading))) 180)
                = temp0 (- temp0 180)
            )
 )
        )
        (case 2
            (
            (if (< (= temp0 (- (send gEgo:heading) 180)) 0)
                = temp0 (+ temp0 360)
            )
 )
        )
    )
    (send gEgo:setMotion(GravMover temp0))
)


(procedure (localproc_047b)
    (var temp0, temp1, temp2, temp3, temp4, temp5)
    (if (local27 and proc999_4((- (cone1:nsLeft) 10) (- (cone1:nsTop) 10) (+ (cone1:nsRight) 10) (+ (cone1:nsBottom) 10) disk))
        = theCone1_2 cone1
    )(else
        (if (local27 and proc999_4((- (cone2:nsLeft) 10) (- (cone2:nsTop) 10) (+ (cone2:nsRight) 10) (+ (cone2:nsBottom) 10) disk))
            = theCone1_2 cone2
        )(else
            (if (local27 and proc999_4((- (cone3:nsLeft) 10) (- (cone3:nsTop) 10) (+ (cone3:nsRight) 10) (+ (cone3:nsBottom) 10) disk))
                = theCone1_2 cone3
            )(else
                (if ((send gCast:contains(ap)) and proc999_4((- (ap:nsLeft) 15) (- (ap:nsTop) 15) (+ (ap:nsRight) 15) (+ (ap:nsBottom) 15) disk))
                    = theCone1_2 ap
                    (if (not theTheCone1_2 and (== local26 2))
                        (send gTestMessager:say(10 2 0 (+ (= local34 (% ++local34 8)) 1)))
                    )
                )(else
                    (if (not 
                    (if (< 5 (send gEgo:x))
                        < (send gEgo:x) 315
                    )
)
                        = theCone1_2 2
                        return 65534
                    )(else
                        (if (not 
                        (if (< 5 (send gEgo:y))
                            < (send gEgo:y) 185
                        )
)
                            = theCone1_2 3
                            return 65533
                        )(else
                            return -1
                        )
                    )
                )
            )
        )
    )
    (if (proc999_5(theCone1_2 cone1 cone2 cone3))
        (send theCone1_2:
            setLoop(0)
            setCycle(ForwardCounter 3 theCone1_2)
        )
    )
    = temp2 SinMult((= temp1 GetAngle((send theCone1_2:x) (send theCone1_2:y) (send gEgo:x) (send gEgo:y))) 500)
    = temp3 neg CosMult(temp1 500)
    = temp4 SinMult((send gEgo:heading) 500)
    = temp5 neg CosMult((send gEgo:heading) 500)
    = temp2 (+ temp2 temp4)
    = temp3 (+ temp3 temp5)
    return = temp1 GetAngle((send gEgo:x) (send gEgo:y) temp2 temp3)
)


(instance public rm119 of Rm
    (properties
        noun 2
        picture 25
        style 32778
    )

    (method (init)
        (self:
            setRegions(109)
            addObstacle((send ((Polygon:new())):
                    type(2)
                    init(18 15 18 25 9 25 9 15)
                    yourself()
                )
)
        )
        proc958_0(128 129 136 130 139 138 146)
        proc958_0(132 9 11 133 10 136 137 18)
        proc0_6(129)
        (send gEgo:init())
        localproc_020a()
        (switch (gGModNum)
            (case 117
                ((send gEgo:posn(65526 10))  )
            )
            (default 
                ((send gEgo:posn(330 170)) )
            )
        )
        (super:init())
        (if (== (send ((send gSq5Inv:at(2))):owner) gModNum)
            (cone1:init())
            (cone2:init())
            (cone3:init())
            = local27 1
        )
        (if (proc0_1(122))
            = local26 0
            (disk:init())
            (if (proc0_1(123))
                = local26 1
                (disk:setCel((disk:lastCel())))
            )
            (send gRoom:addObstacle((send ((= newPolygon_2 (Polygon:new()))):
                    type(2)
                    init(88 84 108 84 113 97 113 107 107 112 95 112 86 104 86 96)
                    yourself()
                )
))
        )
        (if (not proc0_1(6))
            (p1:init())
        )
        (send gWalkHandler:addToFront(self))
        (self:setScript(enterRoom))
    )


    (method (doit param1)
        (var temp0, temp1)
        (super:doit(rest param1))
        (if (script)
            0
        )(else
            (if ((not proc999_4(65516 65516 350 210 disk) and (<> (send ((send gEgo:mover)):x) 160)) and (<> (send ((send gEgo:mover)):y) 90))
                (send gEgo:setMotion(GravMover 160 90))
            )(else
                (if ((<> (= temp0 localproc_047b()) -1) and (== local26 2))
                    (if (<> theTheCone1_2 theCone1_2)
                        = theTheCone1_2 theCone1_2
                        (if (< temp0 -1)
                            (switch (theCone1_2)
                                (case 2
                                    localproc_03e7(1 0)
                                )
                                (case 3
                                    localproc_03e7(0 0)
                                )
                            )
                        )(else
                            (send gEgo:setMotion(GravMover temp0))
                        )
                    )
                )(else
                    (if ((== temp0 -1) and (== local26 2))
                        = theTheCone1_2 0
                        = theCone1_2 0
                    )(else
                        (if (not proc999_4(30 5 300 185 gEgo) and (<> local26 2))
                            (if ((((== (send ((send gSq5Inv:at(1))):owner) gEgo) or (== (send ((send gSq5Inv:at(1))):owner) gModNum)) and ((== (send ((send gSq5Inv:at(2))):owner) gEgo) or (== (send ((send gSq5Inv:at(2))):owner) gModNum))) and not proc0_1(6))
                                (self:setScript(bounceBack))
                            )(else
                                (if (not proc0_1(6))
                                    (starCon:setScript(ScriptID(109 2)))
                                )
                                (self:setScript(exitRoom))
                            )
                        )
                    )
                )
            )
        )
    )


    (method (dispose param1)
        (send gWalkHandler:delete(self))
        (if ((send gEgo:looper))
            (send ((send gEgo:looper)):dispose())
        )
        (ap:setMotion(0))
        (send gEgo:looper(0))
        (send gEgo:setMotion(0))
        (send gEgo:setCycle(0))
        (if (IsObject(newPolygon_2))
            (send ((send gRoom:obstacles)):delete(newPolygon_2))
            (send newPolygon_2:dispose())
        )
        (super:dispose(rest param1))
    )


    (method (doVerb param1 param2)
        return 
            (switch (param1)
                (case 20
                    (
                    (if (== local26 2)
                        (send gTestMessager:say(3 0 3 0))
                    )(else
                        (send gRoom:setScript(sSetCones))
                    )
 )
                )
                (case 18
                    (
                    (if (proc0_1(6))
                        (send gTestMessager:say(4 0 5 0))
                    )(else
                        (self:setScript(placeScrubber))
                        return 1
                    )
 )
                )
                (case 4
                    (
                    (if (((not local27 and (send gCast:contains(disk))) and (== local26 2)) and (> (send gEgo:distanceTo(ap)) 75))
                        (send gRoom:setScript(getOffScrubber))
                    )(else
                        (if (local27 and (send gCast:contains(disk)))
                            (send gTestMessager:say(5 4 8 0))
                        )(else
                            (if (proc0_1(6))
                                (send gTestMessager:say(5 4 5 0))
                            )(else
                                (send gTestMessager:say(5 4 8 0))
                            )
                        )
                    )
 )
                )
                (case 3
                    (
                    (if (not theCone1_2)
                        (if (== local26 2)
                            (send gEgo:setMotion(GravMover gPEventX gPEventY))
                        )(else
                            (super:doVerb(param1 rest param2))
                        )
                    )
 )
                )
                (default 
                    ((super:doVerb(param1 rest param2)) )
                )
            )
    )

)
(instance enterRoom of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send gEgo:
                    setLoop(
                        (if (< (send gEgo:x) 160)
                            4
                        )(else
                            1
                        )
)
                    setMotion(MoveTo 150 129 self)
                )
  )
            )
            (case 1
                ((send gEgo:setLoop(-1)) (send gSQ5:handsOn()) (self:dispose()) )
            )
        )
    )

)
(instance exitRoom of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) 
                (if (< (send gEgo:y) 21)
                    = gEgoY_2 (- (send gEgo:y) 50)
                )(else
                    (if (> (send gEgo:y) 169)
                        = gEgoY_2 (+ (send gEgo:y) 50)
                    )(else
                        = gEgoY_2 (send gEgo:y)
                    )
                )
 
                (if (< (send gEgo:x) 31)
                    = gEgoX_2 (- (send gEgo:x) 50)
                )(else
                    (if (> (send gEgo:x) 299)
                        = gEgoX_2 (+ (send gEgo:x) 50)
                    )(else
                        = gEgoX_2 (send gEgo:x)
                    )
                )
 (send gEgo:ignoreHorizon(1)) = cycles 5  )
            )
            (case 1
                ((send gEgo:setMotion(MoveTo gEgoX_2 gEgoY_2 self))  )
            )
            (case 2
                (
                (if (< (send gEgo:x) 160)
                    (send gRoom:newRoom(117))
                )(else
                    (send gRoom:newRoom(115))
                )
 )
            )
        )
    )

)
(instance bounceBack of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send gTestMessager:say(2 0 2 0 self))  )
            )
            (case 1
                (= gEgoX_2 (send gEgo:x) = gEgoY_2 (send gEgo:y) 
                (if (< (send gEgo:y) 20)
                    = gEgoY_2 (+ (send gEgo:y) 50)
                )(else
                    (if (> (send gEgo:y) 180)
                        = gEgoY_2 (- (send gEgo:y) 50)
                    )
                )
 
                (if (< (send gEgo:x) 31)
                    = gEgoX_2 (+ (send gEgo:x) 50)
                )(else
                    (if (> (send gEgo:x) 299)
                        = gEgoX_2 (- (send gEgo:x) 50)
                    )
                )
 = cycles 5  )
            )
            (case 2
                ((send gEgo:setMotion(PolyPath gEgoX_2 gEgoY_2 self))  )
            )
            (case 3
                ((send gSQ5:handsOn()) (self:dispose()) )
            )
        )
    )

)
(instance quirkYells of Script
    (properties)

    (method (dispose param1)
        = theSeconds_2 seconds
        (super:dispose(rest param1))
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((starCon:setScript(0)) 
                (if (theSeconds_2)
                    (if (not local27)
                        = seconds theSeconds_2
                    )(else
                        = seconds (* theSeconds_2 6)
                    )
                )
 )
            )
            (case 1
                (= seconds 15 = local41 1  )
            )
            (case 2
                ((send gSq5Music1:fade(0 10 5 1)) (send gSq5Music2:fade(0 10 5 1)) (send gSQ5:handsOff()) (send gEgo:setMotion(MoveTo 160 100 self))  )
            )
            (case 3
                (
                (if ((send gEgo:looper))
                    (send ((send gEgo:looper)):dispose())
                    (send gEgo:looper(0))
                )
 (send gEgo:
                    setCycle(0)
                    setCel(10)
                )
 (quirk:
                    init()
                    posn(250 -1)
                    setCycle(Walk)
                    setLoop(0)
                    setPri(14)
                    setMotion(MoveTo 221 96 self)
                )
  )
            )
            (case 4
                ((quirk:
                    view(132)
                    loop(1)
                    cel(0)
                    posn(219 99)
                    setCycle(End self)
                )
  )
            )
            (case 5
                (= local28 -1 (send gTestMessager:say(1 0 1 0 self))  )
            )
            (case 6
                ((send gSq5Music1:
                    number(18)
                    loop(1)
                    play(self)
                )
  )
            )
            (case 7
                ((send gRoom:newRoom(195)) )
            )
        )
    )

)
(instance placeScrubber of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send gEgo:put(1 gModNum)) (send gEgo:setMotion(PolyPath 87 108 self))  )
            )
            (case 1
                ((send gEgo:setHeading(0 self))  )
            )
            (case 2
                (localproc_023f(gEgo 130 6 5 83 114 14) (send gEgo:setCycle(Beg self))  )
            )
            (case 3
                (= local26 0 (send gSq5Music2:
                    number(416)
                    loop(1)
                    play()
                )
 (disk:init()) (send gEgo:setCycle(End self))  )
            )
            (case 4
                (localproc_020a() proc0_2(122) 
                (if (not IsObject(newPolygon_2))
                    (send gRoom:addObstacle((send ((= newPolygon_2 (Polygon:new()))):
                            type(2)
                            init(88 84 108 84 113 97 113 107 107 112 95 112 86 104 86 96)
                            yourself()
                        )
))
                )
 (send gEgo:
                    setPri(14)
                    posn(87 108)
                )
 (send gSQ5:handsOn()) (self:dispose()) )
            )
        )
    )

)
(instance activateScrubber of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send gEgo:setMotion(PolyPath 87 108 self))  )
            )
            (case 1
                ((send gEgo:setHeading(0 self))  )
            )
            (case 2
                (localproc_023f(gEgo 130 6 5 83 114 14) (send gEgo:setCycle(Beg self))  )
            )
            (case 3
                ((send gSq5Music2:
                    number(124)
                    loop(1)
                    play()
                )
 (send gEgo:setCycle(End self))  )
            )
            (case 4
                ((send gSq5Music2:
                    number(127)
                    loop(1)
                    play()
                )
 (disk:setCycle(End self)) localproc_020a() (send gEgo:posn(87 108))  )
            )
            (case 5
                (proc0_2(123) = local26 1 (send gSQ5:handsOn()) (self:dispose()) )
            )
        )
    )

)
(instance getOnScrubber of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send ((send gRoom:obstacles)):delete(newPolygon_2)) (send gEgo:setMotion(PolyPath 115 101 self))  )
            )
            (case 1
                ((send gEgo:setHeading(270 self))  )
            )
            (case 2
                ((disk:
                    ignoreActors(1)
                    setPri(2)
                )
 localproc_023f(gEgo 136 3 0 109 108 14) (send gEgo:setCycle(End self))  )
            )
            (case 3
                ((p1:stopUpd()) (send gEgo:
                    view(136)
                    setStep(5 5)
                    setPri(3)
                    setLoop(0)
                    setCycle(SpecialCycler)
                    cel(0)
                    setAvoider(0)
                    ignoreActors(0)
                    posn(100 100)
                )
 = local26 2 
                (if (not local32)
                    = local32 1
                    (send gTestMessager:say(4 4 6 0 self))
                )(else
                    = cycles 3
                )
 )
            )
            (case 4
                (= next 0 
                (if (not proc0_1(0))
                    (send gSQ5:setCursor(999))
                    (switch ((Print:
                        font(gFont)
                        width(200)
                        addText(11 0 0 1 0 0 119)
                        mode(1)
                        addColorButton(1 11 0 0 2 0 85 119 0 15 23 5 5 5)
                        addColorButton(2 11 0 0 3 0 100 119 0 15 23 5 5 5)
                        init()
                    )
)
                        (case 1
                            = next itsClean
                        )
                    )
                )
 = cycles 2  )
            )
            (case 5
                ((send gSQ5:setCursor(996)) (send gEgo:setScript(quirkYells)) (send gSq5Music1:
                    number(9)
                    loop(-1)
                    play()
                )
 (send gSq5Music2:
                    number(132)
                    loop(-1)
                    play()
                )
 (send gEgo:setMotion(GravMover 225)) 
                (if (not local27)
                    (ap:init(0))
                )
 
                (if (not next)
                    (send gSQ5:handsOn())
                    (send gSq5IconBar:curIcon((send gSq5IconBar:at(0))))
                    (send gSQ5:setCursor((send ((send gSq5IconBar:curIcon)):cursor)))
                )
 (self:dispose()) )
            )
        )
    )

)
(instance getOffScrubber of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (if (== client gRoom)
                    (send gSQ5:handsOff())
                )
 (send gSq5Music1:
                    number(5)
                    loop(-1)
                    play()
                )
 (send gEgo:
                    setMotion(0)
                    setScript(0)
                    setLoop(SpecialLooper)
                    setMotion(MoveTo 115 101 self)
                )
  )
            )
            (case 1
                ((send gSq5Music2:stop()) = local26 3 (disk:setCycle(0)) localproc_023f(disk 136 2 10 100 100 2) localproc_023f(gEgo 136 3 6 109 108 14) (send gEgo:setCycle(Beg self))  )
            )
            (case 2
                (
                (if ((send gEgo:looper))
                    (send ((send gEgo:looper)):dispose())
                )
 (send gEgo:setCycle(0)) localproc_020a() (send gEgo:
                    posn(115 101)
                    setMotion(PolyPath 87 108 self)
                )
  )
            )
            (case 3
                ((send gEgo:setHeading(0 self))  )
            )
            (case 4
                (localproc_023f(gEgo 130 6 5 83 114 14) (send gEgo:setCycle(Beg self))  )
            )
            (case 5
                ((send gSq5Music2:
                    number(124)
                    loop(1)
                    play()
                )
 (send gEgo:setCycle(End self))  )
            )
            (case 6
                ((send gSq5Music2:
                    number(127)
                    loop(1)
                    play()
                )
 (disk:setCycle(Beg self))  )
            )
            (case 7
                ((send gEgo:setCycle(Beg self))  )
            )
            (case 8
                ((disk:dispose()) proc0_3(122) (send gEgo:
                    get(1)
                    setCycle(End self)
                )
  )
            )
            (case 9
                (localproc_020a() (send gEgo:posn(87 108)) 
                (if (== client gRoom)
                    (send gSQ5:handsOn())
                )
 (self:dispose()) )
            )
        )
    )

)
(instance cleanSpot of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (if (& local37 $0002)
                    (p1:startUpd())
                )
 
                (if (& local37 $0004)
                    (p2:startUpd())
                )
 
                (if (& local37 $0008)
                    (p3:startUpd())
                )
 
                (if (& local37 $0010)
                    (p4:startUpd())
                )
 = cycles 2  )
            )
            (case 1
                (localproc_02bb() = cycles 2  )
            )
            (case 2
                ((p1:stopUpd()) 
                (if (localproc_0264())
                    proc0_2(6)
                    (send gRoom:setScript(itsClean))
                )
 = cycles 2  )
            )
            (case 3
                ((self:dispose()) )
            )
        )
    )

)
(instance itsClean of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) 
                (if (not local27)
                    (quirkYells:
                        seconds(0)
                        state(1)
                        cue()
                    )
                    = local41 1
                    (self:dispose())
                )(else
                    (p1:dispose())
                    (send gSq5Music1:fade(0 10 5))
                    (send gEgo:
                        setLoop(SpecialLooper)
                        setMotion(PolyPath 218 128 self)
                    )
                )
 )
            )
            (case 1
                (proc0_10(165 50) (send gEgo:setHeading(315)) (twinkle:init()) = seconds 5  )
            )
            (case 2
                ((crestFeature:
                    init()
                    setOnMeCheck(1 2 4 8 16)
                )
 = next sMeetQuirk (self:dispose()) )
            )
        )
    )

)
(instance dirtyFloor of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (if (& local38 $0002)
                    (p1:startUpd())
                )
 
                (if (& local38 $0004)
                    (p2:startUpd())
                )
 
                (if (& local38 $0008)
                    (p3:startUpd())
                )
 
                (if (& local38 $0010)
                    (p4:startUpd())
                )
 = cycles 2  )
            )
            (case 1
                (Graph(11 + (ap:lsTop) 5 + (ap:lsLeft) 5 + (ap:lsTop) 10 + (ap:lsLeft) 8 2 -1 1 -1) Graph(11 - (ap:lsBottom) 10 - (ap:lsRight) 8 - (ap:lsBottom) 5 - (ap:lsRight) 5 2 -1 1 -1) Graph(11 + (ap:lsTop) 3 + (ap:lsLeft) 7 + (ap:lsTop) 6 + (ap:lsLeft) 12 2 -1 1 -1) Graph(11 - (ap:lsBottom) 12 - (ap:lsRight) 10 - (ap:lsBottom) 7 - (ap:lsRight) 3 2 -1 1 -1) = cycles 3  )
            )
            (case 2
                ((p1:stopUpd()) (self:dispose()) )
            )
        )
    )

)
(instance sSetCones of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send gEgo:setScript(0)) = local27 1 = register cone1 = cycles 1  )
            )
            (case 1
                ((send gEgo:setMotion(PolyPath (- (send register:x) 11) (+ (send register:y) 6) self))  )
            )
            (case 2
                ((send gEgo:setHeading(0 self))  )
            )
            (case 3
                ((send gEgo:
                    posn(- (send register:x) 15 + (send register:y) 12)
                    view(130)
                    loop(3)
                    cel(0)
                    setCycle(End self)
                )
  )
            )
            (case 4
                ((send register:init()) (send gSq5Music2:
                    number(133)
                    loop(-1)
                    setVol(64)
                    play()
                )
 (send gEgo:
                    loop(6)
                    cel(0)
                    setCycle(End self)
                )
  )
            )
            (case 5
                (localproc_020a() (send gEgo:posn((- (send register:x) 11) (+ (send register:y) 6))) 
                (switch (register)
                    (case cone1
                        (= register cone2 = state (- state 5)  )
                    )
                    (case cone2
                        (= register cone3 = state (- state 5) )
                    )
                )
 = cycles 1  )
            )
            (case 6
                ((send gEgo:setMotion(MoveTo 98 116 self))  )
            )
            (case 7
                ((send gEgo:put(2 gModNum)) (send gSQ5:handsOn()) (self:dispose()) )
            )
        )
    )

)
(instance sMeetQuirk of Script
    (properties)

    (method (changeState newState)
        (var temp0)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) (send gEgo:setScript(0)) proc958_0(128 132 133 134 132 131) proc958_0(129 26 27) (send gSq5Music2:fade(0 10 5 1)) (ap:ignoreActors(1)) (p1:dispose()) (twinkle:dispose()) (quirk:
                    init()
                    posn(250 -1)
                    setCycle(Walk)
                    setLoop(0)
                    setPri(14)
                    setMotion(MoveTo 211 106 self)
                )
 (bea:
                    init()
                    posn(273 4)
                    setLoop(0)
                    setCycle(Walk)
                    setPri(14)
                    setMotion(MoveTo 248 116 self)
                )
  )
            )
            (case 1
                ( )
            )
            (case 2
                ((send gSq5Music2:stop()) (quirk:
                    view(132)
                    loop(1)
                    cel(0)
                    posn(209 109)
                    setCycle(End self)
                )
 (bea:setCel(6)) (send gEgo:setHeading(45))  )
            )
            (case 3
                ((send gCast:eachElementDo(301)) 
                (if ((send gEgo:looper))
                    (send ((send gEgo:looper)):dispose())
                )
 = cycles 2  )
            )
            (case 4
                ((send gSq5Music1:
                    number(10)
                    loop(-1)
                    play()
                )
 (send gCast:eachElementDo(102)) (send gRoom:drawPic(26 32777)) localproc_023f(quirk 133 0 0 39 81 14) (quirk:
                    show()
                    addToPic()
                )
 localproc_023f(bea 133 8 0 200 99 14) (bea:
                    show()
                    addToPic()
                )
 localproc_023f(quirkHead 133 1 0 94 38 2) (quirkHead:init()) localproc_023f(extra1 133 6 1 148 87 -1) (extra1:init()) localproc_023f(extra2 133 7 0 170 125 -1) (extra2:init()) localproc_023f(beaHead 133 9 1 220 60 -1) (beaHead:init()) = cycles 10  )
            )
            (case 5
                ((send gTestMessager:say(6 0 0 1 self))  )
            )
            (case 6
                ((send gTestMessager:say(6 0 0 2 self))  )
            )
            (case 7
                (localproc_023f(extra1 133 6 0 148 87 -1) (extra1:init()) (extra2:dispose()) (quirkTalker:cel(1)) (quirkEyes:
                    loop(4)
                    nsLeft(15)
                    nsTop(16)
                )
 (quirkMouth:
                    loop(2)
                    nsLeft(5)
                    nsTop(24)
                )
 = cycles 4  )
            )
            (case 8
                ((send gTestMessager:say(6 0 0 3 self))  )
            )
            (case 9
                (localproc_023f(quirkHead 133 1 1 94 38 2) (quirkHead:init()) (send gTestMessager:say(6 0 0 4 self))  )
            )
            (case 10
                (localproc_023f(beaHead 133 9 0 220 60 -1) (beaHead:init()) = seconds 2  )
            )
            (case 11
                ((quirkTalker:talkWidth(0)) (send gTestMessager:say(6 0 0 5 self))  )
            )
            (case 12
                ((quirkTalker:talkWidth(280)) (beaTalker:cel(0)) (beaEyes:
                    loop(13)
                    nsLeft(6)
                    nsTop(18)
                )
 (beaMouth:
                    loop(11)
                    nsLeft(7)
                    nsTop(28)
                )
 (send gTestMessager:say(6 0 0 6 self))  )
            )
            (case 13
                ((send gSq5Music1:fade(0 5 5 1 self))  )
            )
            (case 14
                ((send gSq5Music1:
                    number(11)
                    loop(-1)
                    play(0)
                    fade(127 5 5 0)
                )
 (send gRoom:drawPic(27 3)) localproc_023f(bea 134 0 0 82 34 1) (bea:addToPic()) (quirk:dispose()) (quirkHead:dispose()) (beaHead:dispose()) (extra2:dispose()) (extra1:dispose()) = seconds 3  )
            )
            (case 15
                (localproc_023f(extra1 134 1 0 128 90 14) (extra1:init()) (extra1:show()) = temp0 0 (while (< temp0 4)= theCone1[temp0] (send ((Prop:new())):
                            view(134)
                            loop(3)
                            cel(Random(0 10))
                            signal(16400)
                            init()
                            setCycle(Fwd)
                            yourself()
                        )
 ++temp0  ) (send theCone1[0]:posn(223 48)) (send theCone1[1]:posn(229 101)) (send theCone1[2]:posn(114 44)) (send theCone1[3]:posn(102 130)) = seconds 2  )
            )
            (case 16
                ((extra1:hide()) localproc_023f(extra2 134 2 0 144 98 15) (extra2:
                    init()
                    setCycle(End self)
                )
  )
            )
            (case 17
                ((extra2:setCycle(Beg self))  )
            )
            (case 18
                ((extra2:dispose()) = seconds 2  )
            )
            (case 19
                ((extra1:show()) = temp0 4 (while (< temp0 8)= theCone1[temp0] (send ((Prop:new())):
                            view(134)
                            loop(3)
                            cel(Random(0 10))
                            signal(16400)
                            init()
                            setCycle(Fwd)
                            yourself()
                        )
 ++temp0  ) (send theCone1[4]:posn(202 134)) (send theCone1[5]:posn(232 113)) (send theCone1[6]:posn(93 87)) (send theCone1[7]:posn(80 112)) = seconds 2  )
            )
            (case 20
                ((extra1:hide()) = temp0 8 (while (< temp0 10)= theCone1[temp0] (send ((Prop:new())):
                            view(134)
                            loop(3)
                            cel(Random(0 10))
                            signal(16400)
                            init()
                            setCycle(Fwd)
                            yourself()
                        )
 ++temp0  ) (send theCone1[8]:posn(241 68)) (send theCone1[9]:posn(84 64)) = seconds 2  )
            )
            (case 21
                ((extra1:dispose()) = cycles 3  )
            )
            (case 22
                ((send gTestMessager:say(6 0 0 7 self))  )
            )
            (case 23
                ((send gTestMessager:say(6 0 0 8 self))  )
            )
            (case 24
                ((send gTestMessager:say(6 0 0 9 self))  )
            )
            (case 25
                ((send gSq5Music1:fade(0 10 5 1 self))  )
            )
            (case 26
                (= temp0 0 (while (< temp0 10)(send theCone1[temp0]:dispose()) ++temp0  ) (bea:dispose()) = cycles 1  )
            )
            (case 27
                ((send gSq5Music1:
                    number(10)
                    loop(-1)
                    play()
                )
 (send gRoom:drawPic(26 9)) localproc_023f(quirk 133 0 0 39 81 -1) (quirk:addToPic()) localproc_023f(bea 133 8 0 200 99 -1) (bea:addToPic()) localproc_023f(quirkHead 133 1 0 94 38 2) (quirkHead:init()) localproc_023f(extra1 133 6 1 148 87 -1) (extra1:init()) localproc_023f(extra2 133 7 0 170 125 -1) (extra2:init()) localproc_023f(beaHead 133 9 1 220 60 -1) (beaHead:init()) = seconds 2  )
            )
            (case 28
                ((send gTestMessager:say(6 0 0 10 self))  )
            )
            (case 29
                ((send gTestMessager:say(6 0 0 11 self))  )
            )
            (case 30
                ((extra1:setCel(1)) (extra2:setCel(1)) (quirkTalker:talkWidth(0)) (send gTestMessager:say(6 0 0 12 self))  )
            )
            (case 31
                (= seconds 3  )
            )
            (case 32
                ((quirkHead:dispose()) (beaHead:dispose()) (extra1:dispose()) (extra2:dispose()) (send gRoom:drawPic(27 3)) localproc_023f(quirk 134 4 0 97 62 -1) (quirk:addToPic()) = local28 1 (quirkTalker:
                    loop(14)
                    x(146)
                    y(119)
                )
 (quirkEyes:
                    loop(14)
                    nsLeft(0)
                    nsRight(0)
                )
 (quirkMouth:
                    view(134)
                    loop(5)
                    nsLeft(0)
                    nsTop(0)
                )
 = seconds 2  )
            )
            (case 33
                ((send gTestMessager:say(6 0 0 13 self))  )
            )
            (case 34
                ((send gTestMessager:say(6 0 0 14 self))  )
            )
            (case 35
                ((send gTestMessager:say(6 0 0 18 self))  )
            )
            (case 36
                ((quirkTalker:talkWidth(280)) (send gRoom:drawPic(25 32775)) (cone1:show()) (cone2:show()) (cone3:show()) (send gEgo:show()) (disk:show()) localproc_023f(quirk 132 2 0 209 109 15) (quirk:
                    signal(16400)
                    init()
                )
 localproc_023f(bea 131 0 6 248 116 15) (bea:
                    signal(16400)
                    init()
                )
 = seconds 2  )
            )
            (case 37
                ((send gSq5Music1:stop()) (send gSq5Music2:
                    number(152)
                    loop(1)
                    play()
                )
 (quirk:setCycle(End self))  )
            )
            (case 38
                ((send gSq5Music2:
                    number(136)
                    loop(1)
                    play(self)
                )
  )
            )
            (case 39
                ((send gSq5Music1:
                    number(12)
                    loop(-1)
                    play()
                )
 (send gCast:eachElementDo(102)) (send gRoom:drawPic(26 32775)) localproc_023f(quirk 135 1 0 263 88 -1) (quirk:addToPic()) localproc_023f(bea 135 0 0 67 159 -1) (bea:addToPic()) localproc_023f(extra1 135 4 0 228 142 -1) (extra1:
                    init()
                    ignoreActors(1)
                    setLoop(4)
                )
 localproc_023f(extra2 135 2 0 263 88 -1) (extra2:
                    init()
                    ignoreActors(1)
                    setLoop(2)
                )
 localproc_023f(extra3 135 3 0 262 94 -1) (extra3:
                    init()
                    ignoreActors(1)
                    setLoop(3)
                )
 (beaHead:dispose()) (quirkHead:dispose()) = local28 2 = seconds 2  )
            )
            (case 40
                ((rogTalker:talkWidth(90)) (send gTestMessager:say(6 0 0 19 self))  )
            )
            (case 41
                ((send gTestMessager:say(6 0 0 15 self))  )
            )
            (case 42
                ((rogTalker:talkWidth(180)) (extra1:setCycle(End self)) (extra3:setCycle(End self))  )
            )
            (case 43
                ( )
            )
            (case 44
                ((extra1:stopUpd()) (extra3:dispose()) (extra2:setCycle(End self))  )
            )
            (case 45
                ((extra2:stopUpd()) (quirkTalker:
                    view(135)
                    loop(6)
                    cel(0)
                    x(225)
                    y(130)
                )
 (quirkEyes:
                    view(135)
                    loop(6)
                    nsLeft(0)
                    nsTop(0)
                )
 (quirkMouth:
                    view(135)
                    loop(5)
                    nsLeft(65525)
                    nsTop(65525)
                )
 = cycles 4  )
            )
            (case 46
                ((send gTestMessager:say(6 0 0 16 self))  )
            )
            (case 47
                ((send gTestMessager:say(6 0 0 17 self))  )
            )
            (case 48
                ((send gSq5Music1:
                    number(10)
                    loop(-1)
                    play()
                )
 (send gRoom:drawPic(25 32775)) localproc_023f(bea 131 1 0 246 110 15) (bea:
                    show()
                    signal(16400)
                    init()
                )
 localproc_023f(quirk 132 3 0 207 91 15) (quirk:
                    show()
                    signal(16400)
                    init()
                )
 (extra1:dispose()) (extra2:dispose()) (extra3:dispose()) (beaHead:dispose()) (quirkHead:dispose()) (cone1:show()) (cone2:show()) (cone3:show()) (send gEgo:show()) (disk:show()) = cycles 2  )
            )
            (case 49
                ((bea:setCycle(End self))  )
            )
            (case 50
                ((bea:
                    setLoop(2)
                    cel(0)
                    setCycle(Walk)
                    ignoreHorizon(1)
                    setMotion(MoveTo 150 4)
                )
 (send gSq5Music2:
                    number(132)
                    loop(-1)
                    play()
                )
 (quirk:
                    posn(207 91)
                    setCycle(End self)
                )
 (send gSq5Music1:fade(0 10 5 1))  )
            )
            (case 51
                (= seconds 1  )
            )
            (case 52
                ((quirk:
                    setLoop(4)
                    cel(0)
                    posn(207 91)
                    setCycle(Walk)
                    ignoreHorizon(1)
                    setMotion(MoveTo 97 65526 self)
                )
  )
            )
            (case 53
                ((send gSq5Music1:
                    number(5)
                    loop(-1)
                    play(0)
                    fade(127 10 5 0)
                )
 (bea:hide()) (quirk:hide()) = cycles 2  )
            )
            (case 54
                ((bea:
                    dispose()
                    delete()
                )
 (send gCast:eachElementDo(299)) (send gEgo:startUpd()) (quirk:
                    dispose()
                    delete()
                )
 (self:setScript(getOffScrubber self))  )
            )
            (case 55
                ((send gSQ5:handsOn()) (self:dispose()) )
            )
        )
    )

)
(instance disk of Prop
    (properties
        x 100
        y 100
        noun 4
        view 136
        loop 2
        priority 2
        signal 2064
        cycleSpeed 1
    )

    (method (doit param1)
        (if (== local26 2)
            (self:
                setLoop(1)
                x((send gEgo:x))
                y((send gEgo:y))
            )
            (if (not cycler)
                (self:setCycle(Fwd))
            )
            (if ((((not proc0_1(6) and (& (= local37 OnControl(4 nsLeft nsTop nsRight nsBottom)) $001e)) and (& OnControl(2 nsLeft nsTop nsRight nsBottom) $0002)) and not script) and not (quirkYells:state))
                (self:setScript(cleanSpot))
            )
        )
        (super:doit(rest param1))
    )


    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                (
                (switch (local26)
                    (case 0
                        ((send gRoom:setScript(activateScrubber))  )
                    )
                    (case 1
                        ((send gRoom:setScript(getOnScrubber))  )
                    )
                    (case 2
                        (
                        (if (local27)
                            (send gTestMessager:say(4 4 7 0 self))
                        )(else
                            (if (>= (send gEgo:distanceTo(ap)) 75)
                                (send gRoom:setScript(getOffScrubber))
                            )(else
                                (super:doVerb(param1 rest param2))
                            )
                        )
 )
                    )
                )
  )
            )
            (case 1
                (
                (switch (local26)
                    (case 0
                        ((send gTestMessager:say(noun 1 10 0))  )
                    )
                    (case 1
                        ((send gTestMessager:say(noun 1 11 0))  )
                    )
                    (default 
                        ((super:doVerb(param1 rest param2)) )
                    )
                )
  )
            )
            (default 
                ((super:doVerb(param1 rest param2)) )
            )
        )
    )

)
(class CrestPiece of View
    (properties
        x 0
        y 0
        z 0
        heading 0
        noun 5
        modNum -1
        nsTop 0
        nsLeft 0
        nsBottom 0
        nsRight 0
        sightAngle 26505
        actions 0
        onMeCheck 26505
        state 0
        approachX 0
        approachY 0
        approachDist 0
        _approachVerbs 0
        yStep 2
        view 139
        loop 0
        cel 0
        priority 1
        underBits 0
        signal 20496
        lsTop 0
        lsLeft 0
        lsBottom 0
        lsRight 0
        brTop 0
        brLeft 0
        brBottom 0
        brRight 0
        scaleSignal 0
        scaleX 128
        scaleY 128
        maxScale 128
        case 8
    )

    (method (init param1)
        (super:init(rest param1))
        (self:stopUpd())
    )


    (method (handleEvent pEvent)
        return 
            (if ((send pEvent:claimed))
                return 1
            )(else
                (if ((((& (send pEvent:type) $4000) and (self:onMe(pEvent))) and (self:isNotHidden())) and proc999_5((send pEvent:message) 18 4))
                    (self:doVerb((send pEvent:message)))
                    return 1
                )(else
                    (super:handleEvent(pEvent))
                )
            )
    )


    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                ((crestFeature:doVerb(param1))  )
            )
            (case 1
                ((send gTestMessager:say(noun param1 case 0))  )
            )
            (default 
                ((send gRoom:doVerb(param1 rest param2)) )
            )
        )
    )

)
(instance p1 of CrestPiece
    (properties
        x 71
        y 18
    )

    (method (init param1)
        (super:init(rest param1))
        (p2:init())
        (p3:init())
        (p4:init())
    )


    (method (dispose param1)
        (p2:dispose())
        (p3:dispose())
        (p4:dispose())
        (super:dispose(rest param1))
    )


    (method (stopUpd)
        (p2:stopUpd())
        (p3:stopUpd())
        (p4:stopUpd())
        (super:stopUpd())
    )

)
(instance p2 of CrestPiece
    (properties
        x 84
        y 57
        cel 1
    )
)
(instance p3 of CrestPiece
    (properties
        x 171
        y 57
        cel 2
    )
)
(instance p4 of CrestPiece
    (properties
        x 100
        y 107
        cel 3
    )
)
(class MyCones of Prop
    (properties
        x 0
        y 0
        z 0
        heading 0
        noun 3
        modNum -1
        nsTop 0
        nsLeft 0
        nsBottom 0
        nsRight 0
        sightAngle 26505
        actions 0
        onMeCheck 26505
        state 0
        approachX 0
        approachY 0
        approachDist 0
        _approachVerbs 0
        yStep 2
        view 138
        loop 0
        cel 0
        priority 2
        underBits 0
        signal 16400
        lsTop 0
        lsLeft 0
        lsBottom 0
        lsRight 0
        brTop 0
        brLeft 0
        brBottom 0
        brRight 0
        scaleSignal 0
        scaleX 128
        scaleY 128
        maxScale 128
        cycleSpeed 6
        script 0
        cycler 0
        timer 0
        detailLevel 0
        scaler 0
    )

    (method (init param1)
        (super:init(rest param1))
        (if (== (send ((send gSq5Inv:at(2))):owner) gModNum)
            (self:cue())
        )(else
            (self:setCycle(ForwardCounter 1 self))
        )
    )


    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                (
                (if (proc0_1(6))
                    (send gTestMessager:say(noun param1 4 0))
                )(else
                    (send gTestMessager:say(noun param1 1 0))
                )
 )
            )
            (default 
                ((super:doVerb(param1 rest param2)) )
            )
        )
    )


    (method (cue)
        (self:
            setLoop(1)
            cel(0)
            stopUpd()
        )
        (if (<> (send gEgo:view) 136)
            (send gSq5Music2:stop())
        )
    )

)
(instance cone1 of MyCones
    (properties
        x 58
        y 23
    )

    (method (init param1)
        (super:init(rest param1))
        (send gRoom:addObstacle((send ((Polygon:new())):
                type(2)
                init(69 14 69 34 47 34 47 14)
                yourself()
            )
))
    )

)
(instance cone2 of MyCones
    (properties
        x 264
        y 67
    )

    (method (init param1)
        (super:init(rest param1))
        (send gRoom:addObstacle((send ((Polygon:new())):
                type(2)
                init(250 58 276 58 276 79 250 79)
                yourself()
            )
))
    )

)
(instance cone3 of MyCones
    (properties
        x 144
        y 154
    )

    (method (init param1)
        (super:init(rest param1))
        (send gRoom:addObstacle((send ((Polygon:new())):
                type(2)
                init(128 146 158 146 158 165 128 165)
                yourself()
            )
))
    )

)
(instance twinkle of Prop
    (properties
        view 138
        loop 3
        priority 10
        signal 16400
    )

    (method (init param1)
        (super:init(rest param1))
        (self:
            cel(0)
            posn(Random(72 253) Random(19 100))
            setCycle(End self)
        )
    )


    (method (cue)
        (self:init())
    )

)
(instance extra1 of Actor
    (properties
        view 134
    )
)
(instance extra2 of Actor
    (properties
        view 134
    )
)
(instance extra3 of Actor
    (properties
        view 134
    )
)
(instance quirkHead of Prop
    (properties
        view 133
    )
)
(instance beaHead of Prop
    (properties
        view 133
    )
)
(instance bea of Actor
    (properties
        view 131
    )
)
(instance quirk of Actor
    (properties
        view 132
    )
)
(instance ap of Actor
    (properties
        view 146
        priority 14
        signal 8208
    )

    (method (init param1 param2)
        (var temp0, temp1)
        (super:init(rest param2))
        (self:baseSetter(myBaseSetter))
        = temp0 param1
        (self:
            setLoop(param1)
            setCycle(Walk)
        )
        (if (loop)
            = noun 8
        )(else
            = noun 7
        )
        = param1 (* param1 13)
        (if (local27)
            (self:
                posn(local43[= param1 (+ param1 (* Random(0 1) 4))] local43[+ (= param1 (+ param1 (* Random(0 1) 4))) 1])
                setMotion(PolyPath local43[+ param1 2] local43[+ param1 3] self)
            )
        )(else
            = temp1 Random(local43[(= param1 (+ param1 8))] local43[(+ (= param1 (+ param1 8)) 1)])
            (if (< temp0 2)
                (self:
                    posn(65514 temp1)
                    setMotion(PolyPath 320 temp1 self)
                )
            )(else
                (self:
                    posn(temp1 local43[+ param1 3])
                    setMotion(PolyPath + temp1 local43[(+ param1 2)] local43[+ param1 4] self)
                )
            )
        )
    )


    (method (doit param1)
        (super:doit(rest param1))
        (if ((not local27 and not script) and (& OnControl(2 x y) $0004))
            = local38 OnControl(4 nsLeft nsTop nsRight nsBottom)
            (self:setScript(dirtyFloor))
        )
    )


    (method (cue)
        (if ((((== (send gEgo:view) 129) or (== (send gRoom:script) sMeetQuirk)) or (send gCast:contains(quirk))) or local41)
            (self:dispose())
        )(else
            (self:init((= local39 (% ++local39 8))))
        )
    )

)
(instance quirkMouth of Prop
    (properties
        nsTop 25
        view 133
        loop 3
        signal 16384
    )
)
(instance quirkEyes of Prop
    (properties
        nsTop 15
        nsLeft 5
        view 133
        loop 5
        signal 16384
    )
)
(instance public quirkTalker of Talker
    (properties
        x 94
        y 38
        view 133
        loop 1
        talkWidth 280
        textX 65466
        textY 65506
    )

    (method (init param1)
        = font gFont
        = gSq5Win gNewSpeakWindow
        (switch (local28)
            (case 1
                ((send gSq5Win:
                    tailX(92)
                    tailY(64)
                    xOffset(65533)
                    isBottom(1)
                )
  )
            )
            (case 0
                ((send gSq5Win:
                    tailX(132)
                    tailY(proc0_12(38 38 38 38 35))
                    xOffset(40)
                    isBottom(1)
                )
  )
            )
            (case 2
                ((self:
                    talkWidth(200)
                    textX(65496)
                )
 (send gSq5Win:
                    tailX(160)
                    tailY(proc0_12(80 80 80 80 65))
                    xOffset(65506)
                    isBottom(1)
                )
  )
            )
            (case -1
                ((self:
                    loop(4)
                    cel(1)
                    talkWidth(100)
                )
 (send gSq5Win:
                    tailX((quirk:x))
                    tailY(- (quirk:y) 40)
                    xOffset(0)
                )
 )
            )
        )
        (if (>= local28 0)
            (super:init(0 quirkEyes quirkMouth rest param1))
        )(else
            (super:init(0 rest param1))
        )
    )


    (method (dispose param1)
        = gSq5Win gSq5Win_2
        (super:dispose(rest param1))
    )

)
(instance beaMouth of Prop
    (properties
        nsTop 24
        nsLeft 2
        view 133
        loop 10
        signal 16384
    )
)
(instance beaEyes of Prop
    (properties
        nsTop 13
        view 133
        loop 15
        signal 16384
    )
)
(instance public beaTalker of Talker
    (properties
        x 220
        y 60
        view 133
        loop 9
        cel 1
        talkWidth 200
        textX 65376
        textY 65496
    )

    (method (init param1)
        = font gFont
        = gSq5Win gNewSpeakWindow
        (if (== local28 2)
            (send gSq5Win:
                tailX(100)
                tailY(40)
                xOffset(30)
                isBottom(1)
            )
            (self:
                cel(0)
                loop(14)
                talkWidth(0)
            )
            (super:init(0 0 0 rest param1))
        )(else
            (send gSq5Win:
                tailX(210)
                tailY(55)
                xOffset(65476)
                isBottom(1)
            )
            = talkWidth 200
            (super:init(0 beaEyes beaMouth rest param1))
        )
    )


    (method (dispose param1)
        = gSq5Win gSq5Win_2
        (super:dispose(rest param1))
    )

)
(instance public rogTalker of Narrator
    (properties
        x 20
        y 160
        talkWidth 180
    )

    (method (init param1)
        = font gFont
        = gSq5Win gNewSpeakWindow
        (if (== (send gRoom:script) sMeetQuirk)
            (send gSq5Win:
                tailX(110)
                tailY(170)
                xOffset(0)
                isBottom(1)
            )
        )(else
            (send gSq5Win:
                tailX((send gEgo:x))
                tailY(+ (send gEgo:y) 15)
                xOffset(0)
                isBottom(0)
            )
        )
        (super:init(rest param1))
    )


    (method (dispose param1)
        = gSq5Win gSq5Win_2
        (super:dispose(rest param1))
    )

)
(instance public quirkTalker2 of Narrator
    (properties
        talkWidth 100
    )

    (method (init param1)
        = font gFont
        = gSq5Win gNewSpeakWindow
        (send gSq5Win:
            tailX(- (quirk:x) 50)
            xOffset(65516)
            tailY((quirk:y))
        )
        (super:init(rest param1))
    )


    (method (dispose param1)
        = gSq5Win gSq5Win_2
        (super:dispose(rest param1))
    )

)
(instance public genTalker of Narrator
    (properties
        talkWidth 100
    )

    (method (init param1)
        = font gFont
        = gSq5Win gSq5Win_2
        (super:init(rest param1))
    )


    (method (dispose param1)
        = gSq5Win gSq5Win_2
        (super:dispose(rest param1))
    )

)
(instance myBaseSetter of Code
    (properties)

    (method (doit param1)
        (var temp0, temp1, temp2, temp3)
        = temp0 (- (send param1:nsBottom) (send param1:nsTop))
        = temp1 (- (send param1:nsRight) (send param1:nsLeft))
        = temp2 (- (send param1:x) (/ temp1 2))
        = temp3 (- (send param1:y) (/ temp0 2))
        (send param1:
            brLeft(temp2)
            brRight(+ temp2 temp1)
            brTop(temp3)
            brBottom(+ temp3 temp0)
        )
    )

)
(instance crestFeature of Feature
    (properties
        x 160
        y 100
        noun 5
        onMeCheck 30
    )

    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                (
                (if (proc0_1(6))
                    (send gTestMessager:say(noun param1 5 0))
                )(else
                    (send gRoom:doVerb(param1 rest param2))
                )
 )
            )
            (case 1
                (
                (if (proc0_1(6))
                    (send gTestMessager:say(noun param1 5 0))
                )(else
                    (send gTestMessager:say(noun param1 (p1:case) 0))
                )
 )
            )
            (default 
                ((send gRoom:doVerb(param1 rest param2)) )
            )
        )
    )

)
