(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "PolyPath")
(use "Class_950_0")
(use "Rev")
(use "Cycle")
(use "Game")
(use "InvI")
(use "IconI")
(use "PicView")
(use "Obj")
(script 702)


(local
    local0
    gEgoX_2
    gEgoY_2
    local3[52]
    local55
    local56
    local57
    local58
    gEgoX
    gEgoY
    local61
    local62
    local63
    local64
    local65
    local66
    local67

)
(procedure (localproc_03fa)
    (if (== (theSlime:loop) 3)
        = local55 (- (theSlime:x) 9)
        = local56 (- (theSlime:y) 27)
        = local57 (- (theSlime:x) 9)
        = local58 (+ (theSlime:y) 26)
        (sewer:distance(localproc_0960()))
        = local55 (- (theSlime:x) 9)
        = local56 (- (theSlime:y) 27)
        = local57 (+ (theSlime:x) 9)
        = local58 (- (theSlime:y) 27)
        = local61 localproc_0960()
        (if (< local61 (sewer:distance))
            (sewer:distance(local61))
        )
        = local55 (+ (theSlime:x) 9)
        = local56 (- (theSlime:y) 27)
        = local57 (+ (theSlime:x) 9)
        = local58 (+ (theSlime:y) 26)
        = local61 localproc_0960()
        (if (< local61 (sewer:distance))
            (sewer:distance(local61))
        )
        = local55 (- (theSlime:x) 9)
        = local56 (+ (theSlime:y) 26)
        = local57 (+ (theSlime:x) 9)
        = local58 (+ (theSlime:y) 26)
        = local61 localproc_0960()
        (if (< local61 (sewer:distance))
            (sewer:distance(local61))
        )
    )(else
        (if (== (theSlime:loop) 2)
            = local55 (- (theSlime:x) 35)
            = local56 (- (theSlime:y) 5)
            = local57 (- (theSlime:x) 35)
            = local58 (+ (theSlime:y) 6)
            (sewer:distance(localproc_0960()))
            = local55 (- (theSlime:x) 35)
            = local56 (- (theSlime:y) 5)
            = local57 (+ (theSlime:x) 35)
            = local58 (- (theSlime:y) 5)
            = local61 localproc_0960()
            (if (< local61 (sewer:distance))
                (sewer:distance(local61))
            )
            = local55 (+ (theSlime:x) 35)
            = local56 (- (theSlime:y) 5)
            = local57 (+ (theSlime:x) 35)
            = local58 (+ (theSlime:y) 6)
            = local61 localproc_0960()
            (if (< local61 (sewer:distance))
                (sewer:distance(local61))
            )
            = local55 (+ (theSlime:x) 35)
            = local56 (+ (theSlime:y) 6)
            = local57 (- (theSlime:x) 35)
            = local58 (+ (theSlime:y) 6)
            = local61 localproc_0960()
            (if (< local61 (sewer:distance))
                (sewer:distance(local61))
            )
        )(else
            (if (== (theSlime:loop) 0)
                = local55 (- (theSlime:x) 28)
                = local56 (+ (theSlime:y) 15)
                = local57 (+ (theSlime:x) 9)
                = local58 (- (theSlime:y) 17)
                (sewer:distance(localproc_0960()))
                = local55 (- (theSlime:x) 28)
                = local56 (+ (theSlime:y) 15)
                = local57 (- (theSlime:x) 10)
                = local58 (+ (theSlime:y) 21)
                = local61 localproc_0960()
                (if (< local61 (sewer:distance))
                    (sewer:distance(local61))
                )
                = local55 (- (theSlime:x) 10)
                = local56 (+ (theSlime:y) 21)
                = local57 (+ (theSlime:x) 23)
                = local58 (- (theSlime:y) 9)
                = local61 localproc_0960()
                (if (< local61 (sewer:distance))
                    (sewer:distance(local61))
                )
                = local55 (+ (theSlime:x) 9)
                = local56 (- (theSlime:y) 17)
                = local57 (+ (theSlime:x) 23)
                = local58 (- (theSlime:y) 9)
                = local61 localproc_0960()
                (if (< local61 (sewer:distance))
                    (sewer:distance(local61))
                )
            )(else
                (if (== (theSlime:loop) 1)
                    = local55 (- (theSlime:x) 24)
                    = local56 (- (theSlime:y) 9)
                    = local57 (+ (theSlime:x) 13)
                    = local58 (+ (theSlime:y) 23)
                    (sewer:distance(localproc_0960()))
                    = local55 (- (theSlime:x) 24)
                    = local56 (- (theSlime:y) 9)
                    = local57 (- (theSlime:x) 8)
                    = local58 (- (theSlime:y) 17)
                    = local61 localproc_0960()
                    (if (< local61 (sewer:distance))
                        (sewer:distance(local61))
                    )
                    = local55 (- (theSlime:x) 8)
                    = local56 (- (theSlime:y) 17)
                    = local57 (+ (theSlime:x) 28)
                    = local58 (+ (theSlime:y) 16)
                    = local61 localproc_0960()
                    (if (< local61 (sewer:distance))
                        (sewer:distance(local61))
                    )
                    = local55 (+ (theSlime:x) 13)
                    = local56 (+ (theSlime:y) 23)
                    = local57 (+ (theSlime:x) 28)
                    = local58 (+ (theSlime:y) 16)
                    = local61 localproc_0960()
                    (if (< local61 (sewer:distance))
                        (sewer:distance(local61))
                    )
                )
            )
        )
    )
)


(procedure (localproc_0960)
    (var temp0)
    return 
        (if ((<= 0 localproc_0a0f((- local57 local55) (- local58 local56) (- gEgoX local55) (- gEgoY local56))) and (<= 0 localproc_0a0f((- local55 local57) (- local56 local58) (- gEgoX local57) (- gEgoY local58))))
            = temp0 GetDistance(local55 local56 local57 local58)
            return 
                (if (= temp0 GetDistance(local55 local56 local57 local58))
                    / Abs(localproc_0a0f((- local58 local56) (- local55 local57) (- gEgoX local55) (- gEgoY local56))) temp0
                )(else
                    0
                )
        )(else
            return proc999_2(GetDistance(gEgoX gEgoY local55 local56) GetDistance(gEgoX gEgoY local57 local58))
        )
)


(procedure (localproc_0a0f param1 param2 param3 param4)
    return 
        (if (< (sewer:distance) 200)
            return + (* param1 param3) (* param2 param4)
        )(else
            return + (* (+ (/ param1 2) 1) (+ (/ param3 2) 1)) (* (+ (/ param2 2) 1) (+ (/ param4 2) 1))
        )
)


(class sewer of Rgn
    (properties
        script 0
        number 0
        timer 0
        keep 0
        initialized 0
        lookStr 0
        regionVer 22891
        roomVer 0
        location 0
        busy 0
        cantDie 0
        status 0
        distance 0
        prevDistance 0
        oldDistance 0
        angle 0
        scoopLoop 0
        rmTimer 0
        dbg 0
    )

    (method (init param1)
        (super:init(rest param1))
        Load(rsVIEW 75)
        Load(rsVIEW 76)
        Load(rsVIEW 4)
        Load(rsSOUND 806)
        Load(rsSOUND 805)
        Load(rsSOUND 819)
        (sewer:cantDie(0))
        (if (proc999_5(gNumber 75 80 85 105 115))
            (send global2:setFeatures(thePipes theConduit theVent))
        )(else
            (send global2:setFeatures(thePipes theConduit))
        )
        (if (not (sewer:location))
            (theSlime:posn(1000 1000))
        )
    )


    (method (doit)
        (var temp0)
        (super:doit())
        (if (<> local64 GetTime(1))
            = local64 GetTime(1)
            = local65 1
        )
        (if (local65)
            = local65 0
            (self:rmTimer(++local67))
            (if (== (self:status) 4)
                ++local66
                (if (not (sewer:cantDie) and (> local66 5))
                    proc0_2()
                    Print("You took a little too long. Now it's slime time!")
                    (send global2:setScript(theDeathScript))
                )
            )
        )
        = gEgoX (send gEgo:x)
        = gEgoY (send gEgo:y)
        (if ((<> (theSlime:x) 1000) and (<> (theSlime:y) 1000))
            localproc_03fa()
        )
        (sewer:angle(GetAngle((send gEgo:x) (send gEgo:y) (theSlime:x) (theSlime:y))))
        (if ((((< (sewer:distance) 5) and (== (sewer:status) 4)) and not local0) and not (sewer:cantDie))
            (send global2:setScript(theDeathScript))
            (sewer:status(6))
        )
        (if ((> (sewer:distance) 17) and (== (sewer:status) 4))
            (sewer:status(3))
            (theSlime:setScript(theSlimeScript))
            = local66 0
        )
        (if ((((((< (sewer:status) 7) and (> (sewer:distance) 0)) and (< (sewer:distance) 9)) and (== (sewer:status) 3)) and (== (sewer:location) gNumber)) and not (sewer:cantDie))
            (sewer:status(4))
            (theSlime:
                setScript(0)
                setCycle(Fwd)
                setMotion(0)
            )
        )
    )


    (method (newRoom param1 param2)
        = keep proc999_5(param1 75 80 85 90 95 100 105 110 115)
        = initialized 0
        (theSlime:
            setCycle(0)
            setMotion(0)
        )
        (super:newRoom(param1 rest param2))
        = local67 0
        (self:
            oldDistance((sewer:prevDistance))
            prevDistance((sewer:distance))
        )
    )

)
(instance public theDrip of Actor
    (properties
        description "slime"
        lookStr "A green gel-type mass flows out the vent and down the conduit section."
        yStep 1
        view 75
        signal 26624
        illegalBits 0
        xStep 1
    )

    (method (init)
        (super:init())
        Load(rsSCRIPT 969)
    )

)
(instance public theDeathScript of Script
    (properties)

    (method (doit)
        (super:doit())
        (if ((== (self:state) 4) and (== (send gLongSong:prevSignal) -1))
            (send gLongSong:prevSignal(0))
            (self:cue())
        )
    )


    (method (changeState newState)
        (var temp0[2])
        (switch (= state newState)
            (case 0
                proc0_2()
                (sewer:status(7))
                (send gEgo:
                    illegalBits(0)
                    ignoreActors(1)
                    cycleSpeed(0)
                    setMotion(0)
                    setLoop(-1)
                    setHeading(180 self)
                )
                (send gLongSong2:
                    vol(0)
                    loop(1)
                    fade(0 10 10 0)
                )
                (send gLongSong:
                    vol(127)
                    number(818)
                    loop(1)
                    playBed()
                )
            )
            (case 1
                (theSlime:
                    moveSpeed(0)
                    cycleSpeed(0)
                    setStep(3 3)
                )
                (switch ((theSlime:loop))
                    (case 2
                        (theSlime:setMotion(MoveTo (send gEgo:x) (- (send gEgo:y) 3) self))
                    )
                    (default 
                        (theSlime:setMotion(MoveTo (send gEgo:x) (send gEgo:y) self))
                    )
                )
                (send gEgo:
                    view(76)
                    setLoop(0)
                    setCel(0)
                )
            )
            (case 2
                (theSlime:cycleSpeed(1))
                (send gEgo:
                    cycleSpeed(2)
                    setCycle(End self)
                )
            )
            (case 3
                (send gEgo:
                    setLoop(1)
                    setCycle(End self)
                )
            )
            (case 4
                (theSlime:setCycle(Fwd))
                (send gEgo:hide())
            )
            (case 5
                (send gLongSong:
                    number(0)
                    vol(0)
                    stop()
                )
                (send gLongSong2:
                    number(0)
                    vol(0)
                    stop()
                )
                proc0_10(3 13)
                (self:dispose())
            )
        )
    )

)
(instance public theSlime of Actor
    (properties
        description "slime"
        lookStr "A blob of slime has gained an attraction for you. The green, viscous, congealed wad of bile helper seems to leave the pipe cleaner than when it first flowed over.  Is it bent on your destruction?  Or is it just a friendly scum-puddle looking for some exciting new tasty treat?  Dare you find out?"
        view 75
        signal 26624
        illegalBits 0
        xStep 2
        moveSpeed 1
    )

    (method (init)
        (if (== (send gLongSong2:vol) 0)
            (send gLongSong:
                vol(0)
                fade(0 10 10 0)
            )
            (send gLongSong2:
                vol(127)
                playBed()
            )
        )
        (self:script(0))
        (super:init())
    )


    (method (dispose)
        (super:dispose())
        = local67 0
        (if ((<> (sewer:location) gNumber) and (== (sewer:status) 3))
            (send gLongSong2:
                vol(0)
                fade(0 10 10 0)
            )
            (send gLongSong:
                vol(127)
                playBed()
            )
        )
        (if (<> (sewer:status) 3)
            (send gLongSong2:
                vol(0)
                fade(0 10 10 0)
            )
            (send gLongSong:
                vol(127)
                playBed()
            )
        )
        (self:
            setMotion(0)
            setCycle(0)
        )
    )


    (method (doVerb param1 param2 param3)
        (switch (param1)
            (case 2
                (switch ((sewer:status))
                    (case 4
                        proc0_2()
                        Print("You bend down and scoop up some slime with both hands cupped.")
                        (send gEgo:setMotion(PolyPath (theSlime:x) (theSlime:y)))
                    )
                    (case 3
                        Print("You're not close enough.")
                    )
                    (default 
                        Print("You wave at the slime.")
                    )
                )
            )
            (case 3
                (if (<> param2 5)
                    Print("That has no effect on the green slime!")
                )(else
                    (if (== (send ((Inv:at(5))):cel) 2)
                        Print("You have all of that toxic spew that you wish to carry.")
                    )(else
                        Load(rsVIEW 81)
                        Load(rsSOUND 820)
                        (switch ((sewer:status))
                            (case 4
                                (send global2:setScript(scoopScript))
                            )
                            (case 3
                                (switch (gNumber)
                                    (case 90
                                        (if ((& (send gEgo:onControl(1)) $0002) and (== (theSlime:loop) 0))
                                            (if (< (theSlime:y) 70)
                                                Print("Not quite yet... wait until it's in the right position!")
                                            )(else
                                                (if (> (theSlime:y) 100)
                                                    Print("Too late!  You'd need longer arms to reach it from here.")
                                                )(else
                                                    (send global2:setScript(scoopScript))
                                                )
                                            )
                                        )(else
                                            (if (> (sewer:distance) 10)
                                                Print("Either you or the slime will have to be in a different position for that.\nTry waiting until it stops moving.")
                                            )(else
                                                (switch (Random(0 1))
                                                    (case 0
                                                        Print("You are not quite close enough!")
                                                    )
                                                    (case 1
                                                        Print("Get just a little bit closer!")
                                                    )
                                                )
                                            )
                                        )
                                    )
                                    (case 95
                                        (if ((& (send gEgo:onControl(1)) $0002) and (== (theSlime:loop) 3))
                                            (if (< (theSlime:y) 60)
                                                Print("Not quite yet... wait until it's in the right position!")
                                            )(else
                                                (if (> (theSlime:y) 110)
                                                    Print("Too late!  You'd need longer arms to reach it from here.")
                                                )(else
                                                    (send global2:setScript(scoopScript))
                                                )
                                            )
                                        )(else
                                            (if (> (sewer:distance) 10)
                                                Print("Either you or the slime will have to be in a different position for that.\nTry waiting until it stops moving.")
                                            )(else
                                                (switch (Random(0 1))
                                                    (case 0
                                                        Print("You are not quite close enough!")
                                                    )
                                                    (case 1
                                                        Print("Get just a little bit closer!")
                                                    )
                                                )
                                            )
                                        )
                                    )
                                    (case 100
                                        (if ((& (send gEgo:onControl(1)) $0002) and (== (theSlime:loop) 1))
                                            (if (< (theSlime:y) 75)
                                                Print("Not quite yet... wait until it's in the right position!")
                                            )(else
                                                (if (> (theSlime:y) 95)
                                                    Print(" Too late!  You'd need longer arms to reach it from here.")
                                                )(else
                                                    (send global2:setScript(scoopScript))
                                                )
                                            )
                                        )(else
                                            (if (> (sewer:distance) 10)
                                                Print("Either you or the slime will have to be in a different position for that.\nTry waiting until it stops moving.")
                                            )(else
                                                (switch (Random(0 1))
                                                    (case 0
                                                        Print("You are not quite close enough!")
                                                    )
                                                    (case 1
                                                        Print("Get just a little bit closer!")
                                                    )
                                                )
                                            )
                                        )
                                    )
                                    (case 115
                                        (if (((& (send gEgo:onControl(1)) $0002) and (> (theSlime:y) 105)) and (== (theSlime:loop) 1))
                                            (send global2:setScript(scoopScript))
                                        )(else
                                            Print("The slime's already too far away! Perhaps it's a personal hygiene problem on your part.")
                                        )
                                    )
                                    (case 105
                                        (if (((& (send gEgo:onControl(1)) $0002) and (> (theSlime:y) 105)) and (== (theSlime:loop) 0))
                                            (send global2:setScript(scoopScript))
                                        )(else
                                            Print("The slime's already too far away! Perhaps it's a personal hygiene problem on your part.")
                                        )
                                    )
                                    (default 
                                        (switch (Random(1 4))
                                            (case 1
                                                Print("You are not in a good position for that.")
                                            )
                                            (case 2
                                                Print("You can't do that from where you stand.")
                                            )
                                            (case 3
                                                Print("Get closer.")
                                            )
                                            (case 4
                                                Print("You're too far away to do that.")
                                            )
                                        )
                                    )
                                )
                            )
                            (default 
                                Print("That's not possible now.")
                            )
                        )
                    )
                )
            )
            (case 10
                Print("You can't do that here. Perhaps in another sequel.")
            )
            (case 11
                Print("What were you expecting, Lime Slime? You notice a burning sensation when you get a strong whiff.")
            )
            (default 
                (super:doVerb(param1 rest param3))
            )
        )
    )

)
(instance scoopScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                Print("Okay.")
                (theSlime:moveSpeed(5))
                = local0 1
                (sewer:status(5))
                = gEgoX_2 (send gEgo:x)
                = gEgoY_2 (send gEgo:y)
                (send gEgo:
                    normal(0)
                    cycleSpeed(1)
                    illegalBits(0)
                    ignoreActors(1)
                )
                (if ((> (sewer:angle) 270) or (< (sewer:angle) 20))
                    (sewer:scoopLoop(3))
                    (send gEgo:
                        setLoop(-1)
                        setHeading(315 self)
                    )
                )(else
                    (if ((> (sewer:angle) 19) and (< (sewer:angle) 100))
                        (sewer:scoopLoop(4))
                        (send gEgo:
                            setLoop(-1)
                            setHeading(45 self)
                        )
                    )(else
                        (if ((> (sewer:angle) 99) and (< (sewer:angle) 190))
                            (sewer:scoopLoop(1))
                            (send gEgo:
                                setLoop(-1)
                                setHeading(135 self)
                            )
                        )(else
                            (if ((> (sewer:angle) 189) and (< (sewer:angle) 271))
                                (sewer:scoopLoop(0))
                                (send gEgo:
                                    setLoop(-1)
                                    setHeading(225 self)
                                )
                            )
                        )
                    )
                )
            )
            (case 1
                = register (send gEgo:loop)
                (send gEgo:
                    view(81)
                    cel(0)
                    cycleSpeed(2)
                    setLoop((sewer:scoopLoop))
                    setCycle(CT 2 1 self)
                )
            )
            (case 2
                (send gLongSong:
                    vol(127)
                    number(820)
                    loop(1)
                    play()
                )
                (send gEgo:setCycle(End self))
            )
            (case 3
                (send gEgo:setMotion(MoveTo gEgoX_2 gEgoY_2 self))
            )
            (case 4
                = cycles 5
            )
            (case 5
                proc0_11(74 5)
                = cycles 5
            )
            (case 6
                (send gLongSong:
                    number(805)
                    loop(-1)
                    vol(0)
                    fade(0 10 10 0)
                )
                = local66 0
                proc0_3()
                Print("You scoop up the slimy secretion. Better get away now before it scoops you up!")
                (send ((send gInv:at(5))):
                    cel(2)
                    cursor(16)
                )
                (send ((IconBar:at(6))):cursor(16))
                proc0_1(register 0)
                (theSlime:
                    ignoreActors(0)
                    moveSpeed(1)
                )
                (send gLongSong2:
                    vol(127)
                    number(819)
                    loop(-1)
                    playBed()
                )
                = seconds 3
            )
            (case 7
                = local0 0
                (theSlime:ignoreActors(1))
                (sewer:status(4))
                (self:dispose())
            )
        )
    )

)
(instance thePipes of Feature
    (properties
        nsBottom 200
        nsRight 320
        description "pipes"
        onMeCheck 16
        lookStr "The pipes running along the sides of this conduit are coated in inert slime."
    )

    (method (doVerb param1 param2 param3)
        (switch (param1)
            (case 2
                Print("You really don't want to touch the slime-laden pipes.")
            )
            (case 10
                (switch (Random(0 1))
                    (case 0
                        Print("The pipes have the tangy taste of 100% real steel, basted with slime and rusted to a delicate crunch.")
                    )
                    (case 1
                        Print("The corrosive effect of the slimy pipes reduces your tongue to a stump.  Now you truly are tasteless!")
                    )
                )
            )
            (case 11
                Print("Your nostrils flare as you inhale the fragrant aroma of cold steel with just a hint of sewage.")
            )
            (default 
                (super:doVerb(param1 rest param3))
            )
        )
    )

)
(instance theConduit of Feature
    (properties
        nsBottom 200
        nsRight 320
        description "sewer"
        onMeCheck 34
        lookStr "This is a section of the Xenon sewer system. Happily, there seems to be very little of the kind of compost usually associated with sewers. Conduits line the sides of the dim, musty tunnel which stretches off into the darkness."
    )

    (method (doVerb param1 param2 param3)
        (switch (param1)
            (case 10
                Print("The rough floor tastes strangely like blood. Oh, that IS blood. You shredded your tongue. Your mother should have warned you about floor licking.")
            )
            (case 11
                (switch (Random(0 1))
                    (case 0
                        Print("It smells like cotton candy, roses, and and fresh roasted peanuts. Yeah, right!")
                    )
                    (case 1
                        Print("The stench lingering in this sewer reminds you of your clothes hamper!")
                    )
                )
            )
            (default 
                (super:doVerb(param1 rest param3))
            )
        )
    )

)
(instance theVent of Feature
    (properties
        nsBottom 200
        nsRight 320
        description "vent"
        onMeCheck 64
        lookStr "There's a small vent set into the side of the sewer tunnel. Unfortunately, it looks way too narrow for a space janitor, even a wiry, skinny one, to squeeze into."
    )

    (method (doVerb param1 param2 param3)
        (switch (param1)
            (case 10
                Print("Your tongue won't reach up there. Perhaps if you'd done those exercises you read about in TIME STUD magazine...")
            )
            (case 11
                Print("Your nose isn't long enough to reach the vent. That may seem like an inconvenience at this point, but you should be thankful.")
            )
            (case 2
                Print("You can't quite reach the vent.")
            )
            (default 
                (super:doVerb(param1 rest param3))
            )
        )
    )

)
(instance public theDrip1 of Prop
    (properties
        description "drip"
        view 80
    )

    (method (init)
        (super:init())
        (self:ignoreActors(1))
    )


    (method (doVerb param1 param2 param3)
        (switch (param1)
            (case 1
                Print("You see some dripping, oozing stuff.")
            )
            (case 2
                Print("There's nothing you'd want to do with the dripping liquid.")
            )
            (case 3
                Print("You don't need to do that.")
            )
            (case 10
                Print("You don't really want to do that.")
            )
            (case 11
                Print("It smells just like you thought it would.")
            )
            (default 
                (super:doVerb(param1 rest param3))
            )
        )
    )

)
(instance public theDrip2 of Prop
    (properties
        description "drip"
        view 80
    )

    (method (init)
        (super:init())
        (self:ignoreActors(1))
    )


    (method (doVerb param1 param2 param3)
        (switch (param1)
            (case 1
                Print("You see some dripping, oozing stuff.")
            )
            (case 2
                Print("There's nothing you'd want to do with the dripping liquid.")
            )
            (case 3
                Print("You don't need to do that.")
            )
            (case 10
                Print("You don't really want to do that.")
            )
            (case 11
                Print("It smells just like you thought it would.")
            )
            (default 
                (super:doVerb(param1 rest param3))
            )
        )
    )

)
(instance public theSlimeScript of Script
    (properties)

    (method (doit)
        (super:doit())
        (if ((== register 1) and (< (sewer:distance) 20))
            = register 0
            (self:init())
        )
    )


    (method (changeState newState)
        (var temp0[2])
        (switch (= state newState)
            (case 0
                (switch (gNumber)
                    (case 75
                        = local62 8
                        = local63 207
                    )
                    (case 80
                        (if (== (theSlime:loop) 2)
                            = local62 360
                            = local63 91
                        )(else
                            = local62 158
                            = local63 227
                        )
                    )
                    (case 85
                        = local62 311
                        = local63 209
                    )
                    (case 90
                        (switch ((theSlime:loop))
                            (case 2
                                (if (> (send gEgo:x) (theSlime:x))
                                    = local62 358
                                    = local63 89
                                )(else
                                    = local62 192
                                    = local63 89
                                )
                            )
                            (default 
                                (if ((< (send gEgo:y) 50) and (< (send gEgo:y) (theSlime:y)))
                                    = local62 274
                                    = local63 65528
                                )(else
                                    = local62 30
                                    = local63 195
                                )
                            )
                        )
                    )
                    (case 95
                        (switch ((theSlime:loop))
                            (case 2
                                (switch (gWest)
                                    (case 100
                                        (if (< (send gEgo:x) (theSlime:x))
                                            = local62 218
                                            = local63 89
                                        )(else
                                            = local62 359
                                            = local63 89
                                        )
                                    )
                                    (case 90
                                        (if (< (send gEgo:x) (theSlime:x))
                                            = local62 65496
                                            = local63 89
                                        )(else
                                            = local62 98
                                            = local63 89
                                        )
                                    )
                                )
                            )
                            (default 
                                = local62 158
                                = local63 220
                            )
                        )
                    )
                    (case 100
                        (switch ((theSlime:loop))
                            (case 2
                                (if (< (send gEgo:x) (theSlime:x))
                                    = local62 65497
                                    = local63 91
                                )(else
                                    = local62 120
                                    = local63 89
                                )
                            )
                            (default 
                                = local62 312
                                = local63 211
                            )
                        )
                    )
                    (case 105
                        (switch ((theSlime:loop))
                            (case 0
                                (if (< (send gEgo:y) (theSlime:y))
                                    = local62 225
                                    = local63 65529
                                )(else
                                    = local62 94
                                    = local63 111
                                )
                            )
                            (case 2
                                (switch (gWest)
                                    (case 110
                                        (if (> (send gEgo:x) (theSlime:x))
                                            = local62 337
                                            = local63 125
                                        )(else
                                            = local62 118
                                            = local63 125
                                        )
                                    )
                                    (default 
                                        = local62 337
                                        = local63 125
                                    )
                                )
                            )
                        )
                    )
                    (case 110
                        (switch ((theSlime:loop))
                            (case 2
                                (if (< (send gEgo:x) (theSlime:x))
                                    = local62 65506
                                    = local63 125
                                )(else
                                    = local62 337
                                    = local63 125
                                )
                            )
                            (case 3
                                (if (< (send gEgo:y) (theSlime:y))
                                    = local62 158
                                    = local63 65518
                                )(else
                                    = local62 158
                                    = local63 109
                                )
                            )
                        )
                    )
                    (case 115
                        (switch ((theSlime:loop))
                            (case 1
                                (if (< (send gEgo:x) (theSlime:x))
                                    = local62 85
                                    = local63 65526
                                )(else
                                    = local62 233
                                    = local63 113
                                )
                            )
                            (case 2
                                (if (< (send gEgo:x) (theSlime:x))
                                    = local62 65500
                                    = local63 127
                                )(else
                                    = local62 183
                                    = local63 127
                                )
                            )
                        )
                    )
                )
                (theSlime:
                    setPri(1)
                    setCycle(Fwd)
                    setMotion(MoveTo local62 local63 self)
                )
            )
            (case 1
                (theSlime:setCycle(Rev))
                (switch (gNumber)
                    (case 80
                        (sewer:busy(0))
                        (self:dispose())
                    )
                    (case 90
                        (if (< (theSlime:y) 0)
                            (sewer:location(75))
                        )(else
                            (if (== (theSlime:loop) 2)
                                (theSlime:setMotion(MoveTo 358 89 self))
                            )(else
                                (sewer:location(105))
                                (theSlime:dispose())
                                (self:dispose())
                            )
                        )
                    )
                    (case 95
                        (if (== (theSlime:loop) 2)
                            (if (== gWest 100)
                                (theSlime:setMotion(MoveTo 352 91 self))
                            )(else
                                = register 1
                                (theSlime:setMotion(MoveTo 65504 89 self))
                            )
                        )(else
                            (sewer:
                                busy(0)
                                location(110)
                            )
                            (theSlime:
                                posn(1000 1000)
                                dispose()
                            )
                            (self:dispose())
                        )
                    )
                    (case 100
                        (if (== (theSlime:loop) 2)
                            (theSlime:setMotion(MoveTo 65506 89 self))
                        )(else
                            (if (< (send gEgo:y) 100)
                                (sewer:
                                    location(0)
                                    status(0)
                                )
                            )(else
                                (sewer:location(115))
                            )
                            (theSlime:dispose())
                            (self:dispose())
                        )
                    )
                    (case 105
                        (switch ((theSlime:loop))
                            (case 0
                                (theSlime:setMotion(MoveTo 139 70 self))
                            )
                            (case 2
                                (switch (gWest)
                                    (case 110
                                        (if (== local62 118)
                                            (self:init())
                                        )(else
                                            (sewer:
                                                location(110)
                                                status(6)
                                            )
                                            (theSlime:dispose())
                                            (self:dispose())
                                        )
                                    )
                                    (default 
                                        = register 1
                                        (theSlime:setMotion(MoveTo 118 125 self))
                                    )
                                )
                            )
                        )
                    )
                    (case 110
                        (if (== (theSlime:loop) 3)
                            = register 1
                            (theSlime:setMotion(MoveTo 158 65515 self))
                        )(else
                            (sewer:
                                location(115)
                                status(6)
                            )
                            (theSlime:
                                posn(1000 1000)
                                dispose()
                            )
                            (self:dispose())
                        )
                    )
                    (case 115
                        (switch ((theSlime:loop))
                            (case 2
                                (theSlime:setMotion(MoveTo 65509 125 self))
                            )
                            (default 
                                (theSlime:setMotion(MoveTo 191 82 self))
                            )
                        )
                    )
                    (default 
                        (theSlime:dispose())
                        (self:dispose())
                    )
                )
            )
            (case 2
                (switch (gNumber)
                    (case 90
                        (sewer:location(95))
                        (theSlime:dispose())
                        (self:dispose())
                    )
                    (case 100
                        (sewer:
                            location(95)
                            status(6)
                        )
                        (theSlime:dispose())
                        (self:dispose())
                    )
                    (case 105
                        = register 1
                        (theSlime:setMotion(MoveTo 225 65529 self))
                    )
                    (case 110
                        (if (== (theSlime:loop) 3)
                            (if ((< (send gEgo:x) 60) or (> (send gEgo:x) 250))
                                (sewer:
                                    location(0)
                                    status(0)
                                )
                            )(else
                                (if (< (sewer:distance) 60)
                                    (sewer:status(6))
                                )
                                (sewer:
                                    location(95)
                                    rmTimer(0)
                                )
                            )
                            = register 0
                            = cycles 1
                        )
                    )
                    (case 115
                        (switch ((theSlime:loop))
                            (case 2
                                (if ((> (send gEgo:x) 206) or (< (send gEgo:y) 114))
                                    (sewer:
                                        location(0)
                                        status(0)
                                    )
                                )(else
                                    (sewer:
                                        location(110)
                                        prevDistance(+ (send gEgo:x) 25)
                                    )
                                )
                                (theSlime:dispose())
                                (self:dispose())
                            )
                            (default 
                                = register 1
                                (theSlime:setMotion(MoveTo 87 65529 self))
                            )
                        )
                    )
                    (default 
                        (self:cue())
                    )
                )
            )
            (case 3
                = register 0
                (switch (gNumber)
                    (case 95
                        (sewer:location(gWest))
                    )
                    (case 105
                        (switch ((theSlime:loop))
                            (case 0
                                (sewer:
                                    location(90)
                                    rmTimer(0)
                                )
                                (theSlime:posn(1000 1000))
                            )
                            (case 2
                                (sewer:location(110))
                            )
                        )
                    )
                    (case 115
                        (sewer:location(100))
                        (if (< (send gEgo:y) 70)
                            (sewer:prevDistance(1))
                        )(else
                            (if (< (send gEgo:y) 105)
                                (sewer:prevDistance(2))
                            )(else
                                (if (> (send gEgo:x) 190)
                                    (sewer:prevDistance(3))
                                )(else
                                    (if (> Random(0 100) 50)
                                        (sewer:status(8))
                                    )(else
                                        (sewer:prevDistance(4))
                                    )
                                )
                            )
                        )
                    )
                )
                (theSlime:dispose())
                (self:dispose())
            )
        )
    )

)
