(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "mall")
(use "MoveToY")
(use "Inertia")
(use "SQRoom")
(use "n940")
(use "MCyc")
(use "PolyPath")
(use "Polygon")
(use "Class_950_0")
(use "MoveFwd")
(use "n958")
(use "Sound")
(use "Cycle")
(use "PicView")
(use "Obj")
(script 405)


(local
    local0[101] = (0 0 65436 65436 0 0 250 4 0 0 236 16 0 0 223 26 0 0 207 35 0 0 192 45 0 0 178 60 0 1 168 70 0 2 158 74 0 3 153 78 0 4 153 84 0 5 156 93 0 6 166 97 0 7 176 102 0 8 192 104 0 9 206 107 0 9 220 108 0 10 235 113 0 10 253 120 0 10 253 120 0 10 270 130 0 10 283 140 0 10 297 149 0 10 313 161 0 0 65436 65436 32768 )
    local101[165] = (0 0 65436 65436 3 0 220 23 3 0 231 39 3 0 241 50 3 0 248 63 3 0 251 78 3 0 254 94 3 1 254 112 3 2 250 127 3 2 244 142 3 2 236 154 3 2 225 163 3 3 213 169 3 3 199 173 3 3 186 179 3 3 173 181 3 4 158 183 3 4 145 181 3 5 131 177 3 5 116 167 3 6 111 149 3 6 123 129 3 7 141 121 3 7 161 116 3 8 168 118 3 9 156 119 3 10 143 120 3 10 130 116 3 10 116 110 3 11 105 105 3 11 99 95 3 11 100 81 3 11 108 66 3 12 118 55 3 12 132 45 3 13 148 40 3 13 165 27 3 13 180 13 3 13 192 7 3 0 210 10 0 0 65436 65436 32768 )
    local266
    local267
    local268
    local269
    local270
    local271
    local272
    local273
    local274
    local275
    local276
    local277
    local278

)
(instance public rm405 of SQRoom
    (properties
        picture 405
        north 406
        east 410
        west 370
    )

    (method (init)
        proc0_2()
        proc958_0(128 400 403)
        (switch ((send gEgo:view))
            (case 0
                proc958_0(128 406 407)
            )
            (case 402
                proc958_0(128 398 411)
            )
        )
        proc958_0(132 0 105 401 406)
        (switch (gWest)
            (case north
                (self:
                    setScript(enterScript 0 north)
                    style(30)
                )
            )
            (case east
                (self:
                    setScript(enterScript 0 east)
                    style(40)
                )
            )
            (default 
                (send gLongSong:
                    number(406)
                    loop(-1)
                    vol(127)
                    flags(1)
                    playBed()
                )
                (send gLongSong2:
                    number(0)
                    stop()
                )
                (self:
                    setScript(enterScript 0 west)
                    style(30)
                )
            )
        )
        (self:addObstacle((send ((Polygon:new())):
                type(2)
                init(0 168 16 168 50 189 0 189)
                yourself()
            )
 (send ((Polygon:new())):
                type(2)
                init(69 125 41 125 0 111 0 0 44 0 44 112)
                yourself()
            )
))
        (send gEgo:init())
        (super:init())
        (skate0Snd:init())
        (skate3Snd:init())
        (skater0:
            init()
            setScript(Clone(skaterScript))
        )
        (skater3:
            init()
            setScript(Clone(skaterScript))
        )
        (if (Btest(20) or ((== gWest 370) and Btest(22)))
            proc958_0(128 408 409 28)
            (send (ScriptID(700 6)):
                init()
                hide()
                setScript(swimAfterEgo)
            )
        )(else
            (if (not Btest(19))
                0
            )(else
                (if (== gWest 370)
                    proc958_0(128 7 13 28 409)
                    (send (ScriptID(700 6)):
                        init()
                        hide()
                        setScript(enterAndShootEgo)
                    )
                )(else
                    proc958_0(128 13 28 409)
                    (send (ScriptID(700 6)):
                        init()
                        setScript(shootEgo)
                    )
                )
            )
        )
        (self:setRegions(700))
        (send gFeatures:
            add(skateorama light steps wall restOfMall)
            eachElementDo(102)
            doit()
        )
    )


    (method (doit param1)
        (if (script)
            0
        )(else
            (if (((== (send gEgo:view) 409) or (>= local277 8)) or ((== (send (ScriptID(700 6)):script) swimAfterEgo) and (swimAfterEgo:state)))
                0
            )(else
                (if (proc0_5(gEgo 2))
                    proc0_2()
                    (if (proc999_5((send gEgo:view) 373 374))
                        (send gEgo:
                            x(- (send gEgo:x) 4)
                            setMotion(0)
                        )
                        Print("A real lady doesn't go Zero-G swimming in a dress!")
                        proc0_3()
                    )(else
                        (if (proc999_5((send gEgo:view) 406 398))
                            (self:setScript(endSwimScript))
                        )(else
                            (self:setScript(startSwimScript))
                        )
                    )
                )(else
                    (if (proc0_5(gEgo 4))
                        proc0_2()
                        (self:setScript(landScript))
                    )(else
                        (if (== (send gEgo:edgeHit) 1)
                            proc0_2()
                            (self:setScript(exitScript 0 north))
                        )(else
                            (if (== (send gEgo:edgeHit) 2)
                                proc0_2()
                                (self:setScript(exitScript 0 east))
                            )(else
                                (if (== (send gEgo:edgeHit) 3)
                                    proc0_2()
                                    (self:setScript(stayInScript))
                                )
                            )
                        )
                    )
                )
            )
        )
        (super:doit(rest param1))
    )


    (method (dispose param1)
        (if ((send gSounds:contains(skate0Snd)))
            (skate0Snd:dispose())
        )
        (if ((send gSounds:contains(skate3Snd)))
            (skate3Snd:dispose())
        )
        (super:dispose(rest param1))
    )


    (method (newRoom param1)
        (if ((<> param1 east) and (<> param1 north))
            (send gLongSong:fade())
        )
        (if (Btest(20) and not Btest(22))
            Bset(22)
            Bset(8)
            Bset(10)
            Bset(11)
            Bset(13)
            Bset(12)
            Bclear(9)
        )
        (super:newRoom(param1))
    )

)
(instance enterScript of Script
    (properties)

    (method (changeState newState)
        (var temp0)
        (switch (= state newState)
            (case 0
                (switch (register)
                    (case (send global2:west)
                        (send gEgo:
                            x(65516)
                            y(106)
                            setMotion(MoveTo 22 142 self)
                        )
                    )
                    (case (send global2:north)
                        = temp0 CelHigh((send gEgo:view) (send gEgo:loop) (send gEgo:cel))
                        (send (ScriptID(700 4)):init(gEgo))
                        (send gEgo:
                            setCycle(Swim)
                            setHeading(180)
                            x(
                                (if (< (send gEgo:x) 90)
                                    90
                                )(else
                                    (send gEgo:x)
                                )
)
                            y(- (send global2:horizon) temp0)
                        )
                        Animate((send gCast:elements) 0)
                        (send gEgo:setMotion(MoveTo (send gEgo:x) 10 self))
                    )
                    (case (send global2:east)
                        = temp0 CelWide((send gEgo:view) (send gEgo:loop) (send gEgo:cel))
                        (send (ScriptID(700 4)):
                            init(gEgo)
                            inertizing(1)
                            inertia(5)
                            oldDir(270)
                            xOff(-1)
                        )
                        (send gEgo:
                            normal(0)
                            setHeading(270)
                            setCycle(Swim)
                            x(- 319 (+ (/ temp0 2) 1))
                            y((send gEgo:y))
                        )
                        = cycles 1
                    )
                )
            )
            (case 1
                (if (proc999_5((send gEgo:view) 373 374))
                    = local278 0
                )(else
                    (if (proc999_5((send gEgo:view) 402 14 398))
                        = local278 1
                    )(else
                        (if (proc999_5((send gEgo:view) 0 4 406))
                            = local278 2
                        )
                    )
                )
                (switch (register)
                    (case (send global2:west)
                        (switch (local278)
                            (case 0
                                proc0_1(0 373 374)
                            )
                            (case 1
                                proc0_1(0 402 14)
                            )
                            (case 2
                                proc0_1(0 0 4)
                            )
                        )
                        proc700_5(1)
                    )
                    (default 
                        proc700_5(0)
                    )
                )
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance skater0 of Prop
    (properties
        x 65436
        y 65436
        description "Zero-G skater"
        lookStr "The Zero-G skaters look to be having fun.  But I wouldn't get in their way if I were you.  They enjoy playing \"Spin the Dweeb\" with any non-skaters who happen to wander into their air space."
        view 400
        priority 2
        signal 24592
    )

    (method (doit param1)
        (if ((not (send global2:script) and proc999_5((send gEgo:view) 406 398)) and (self:onMe(gEgo)))
            (send global2:setScript(spinEgo self))
        )
        (super:doit(rest param1))
    )

)
(instance skater3 of Prop
    (properties
        x 65436
        y 65436
        description "Zero-G skater"
        lookStr "The Zero-G skaters look to be having fun.  But I wouldn't get in their way if I were you.  They enjoy playing \"Spin the Dweeb\" with any non-skaters who happen to wander into their air space."
        view 400
        loop 3
        priority 2
        signal 24592
    )

    (method (doit param1)
        (if ((not (send global2:script) and proc999_5((send gEgo:view) 323 398)) and (self:onMe(gEgo)))
            (send global2:setScript(spinEgo self))
        )
        (super:doit(rest param1))
    )

)
(instance skaterScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = seconds Random(3 10)
            )
            (case 1
                (send client:setCycle(MCyc 
                    (switch (client)
                        (case skater0
                            @local0
                        )
                        (case skater3
                            @local101
                        )
                    )
 self))
                (switch (client)
                    (case skater0
                        (skate0Snd:play())
                    )
                    (case skater3
                        (skate3Snd:play())
                    )
                )
            )
            (case 2
                (switch (client)
                    (case skater0
                        (skate0Snd:stop())
                    )
                    (case skater3
                        (skate3Snd:stop())
                    )
                )
                (self:init())
            )
        )
    )

)
(instance enterAndShootEgo of Script
    (properties)

    (method (doit param1)
        (if ((send global2:script))
        )(else
            (if ((<= (send gEgo:x) 18) and proc999_5(state 0 3 6))
                (self:changeState(7))
            )(else
                (if (proc999_5((send gEgo:view) 406 407) and proc999_5(state 0 3 6))
                    (self:changeState(9))
                )
            )
        )
        (super:doit(rest param1))
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = seconds 5
            )
            (case 1
                = local267 1
                = local268 121
                = local269 54
                = local270 107
                = local266 Graph(7 (- local270 1) local267 (+ local268 1) (+ local269 1) 1)
                Graph(4 local268 local267 local270 local269 proc0_18(global133 global143) 2 -1)
                Graph(13 - local270 1 local267 + local268 1 + local269 1)
                (aSound:
                    number(105)
                    loop(1)
                    vol(127)
                    play()
                )
                = cycles 1
            )
            (case 2
                (blast:
                    init()
                    posn(local269 local270)
                    setCycle(End)
                )
                Graph(8 local266)
                Graph(13 - local270 1 local267 + local268 1 + local269 1)
                = cycles 1
            )
            (case 3
                = cycles 16
            )
            (case 4
                = local267 1
                = local268 181
                = local269 58
                = local270 108
                = local266 Graph(7 (- local270 1) local267 (+ local268 1) (+ local269 1) 1)
                Graph(4 local270 local267 local268 local269 proc0_18(global133 global143) 2 -1)
                Graph(13 - local270 1 local267 + local268 1 + local269 1)
                (aSound:
                    number(105)
                    loop(1)
                    vol(127)
                    play()
                )
                = cycles 1
            )
            (case 5
                (blast:
                    cel(0)
                    posn(local269 local268)
                    setCycle(End)
                )
                Graph(8 local266)
                Graph(13 - local270 1 local267 + local268 1 + local269 1)
                = cycles 1
            )
            (case 6
                = cycles 14
            )
            (case 7
                (if (proc999_5((send gEgo:view) 406 407 403))
                    (self:changeState((+ state 2)))
                )(else
                    proc0_2()
                    (send gEgo:setMotion(0))
                    = local267 1
                    = local270 (- (send gEgo:y) 36)
                    = local269 (- (send gEgo:x) 3)
                    = local268 (- (send gEgo:y) 32)
                    Graph(4 local268 local267 local270 local269 proc0_18(global133 global143) - (send gEgo:priority) 1 -1)
                    Graph(13 - local270 1 local267 + local268 1 + local269 1)
                    (aSound:
                        number(105)
                        loop(1)
                        vol(127)
                        play()
                    )
                    = cycles 4
                )
            )
            (case 8
                proc0_10(8 12)
            )
            (case 9
                = cycles 20
            )
            (case 10
                (send (ScriptID(700 6)):
                    show()
                    view(7)
                    setCycle(Walk)
                    setLoop(-1)
                    setCel(-1)
                    posn(65529 122)
                    setMotion(MoveTo 34 135 self)
                )
            )
            (case 11
                (send client:setScript(shootEgo))
            )
        )
    )

)
(instance shootEgo of Script
    (properties)

    (method (doit param1)
        (super:doit(rest param1))
        (if (((not state and (< (send gEgo:x) 155)) and (> (send gEgo:y) 6)) and (< local277 8))
            = local277 8
            (send gEgo:setMotion(0))
            (send (ScriptID(700 4)):inertia(0))
            (self:cue())
        )
    )


    (method (changeState newState)
        (var temp0)
        (switch (= state newState)
            (case 0
                (send (ScriptID(700 6)):
                    view(13)
                    setMotion(0)
                    loop(
                        (if (register)
                            0
                        )(else
                            4
                        )
)
                    cel(0)
                    posn(34 135)
                    init()
                )
                = seconds 3
            )
            (case 1
                = register (<= (send gEgo:y) 120)
                ++local277
                (send (ScriptID(700 6)):
                    loop(
                        (if (register)
                            0
                        )(else
                            4
                        )
)
                    cel(0)
                    cycleSpeed(1)
                    setCycle(CT 1 1 self)
                )
            )
            (case 2
                (if (register)
                    = local271 54
                    = local272 
                        (if ((<= 105 (send gEgo:y)) and (<= (send gEgo:y) 120))
                            110
                        )(else
                            104
                        )
                    = local273 proc999_2((+ (send gEgo:x) 6) 318)
                    = local274 proc999_3((- (send gEgo:y) 10) 5)
                )(else
                    = local271 42
                    = local272 113
                    = local273 proc999_2((+ (send gEgo:x) 6) 318)
                    = local274 proc999_2((- (send gEgo:y) 8) 188)
                )
                (if (>= local277 8)
                    = local275 local273
                    = local276 local274
                )(else
                    = temp0 (/ (* (- local272 local274) 100) (- local273 local271))
                    (if (= temp0 (/ (* (- local272 local274) 100) (- local273 local271)))
                        (if (< (= temp0 (/ (* (- local272 local274) 100) (- local273 local271))) 0)
                            = local276 188
                        )(else
                            = local276 2
                        )
                        = local275 proc999_2(318 (+ (/ (* (- local272 local276) 100) temp0) local271))
                    )(else
                        = local275 318
                        = local276 local272
                    )
                )
                (if ((> local275 318) and temp0)
                    = local275 318
                    = local276 proc999_3((- 188 (+ (/ (* temp0 (- local275 local271)) 100) local272)))
                )
                (if (< local272 local276)
                    = local270 local272
                    = local268 local276
                )(else
                    = local270 local276
                    = local268 local272
                )
                = local266 Graph(7 (- local270 1) (- local271 1) (+ local268 1) (+ local275 1) 1)
                Graph(4 local272 local271 local276 local275 proc0_18(global133 global143) 0 -1)
                Graph(13 - local270 1 - local271 1 + local268 1 + local275 1)
                (send (ScriptID(700 6)):setCycle(End))
                (aSound:
                    number(105)
                    loop(1)
                    vol(127)
                    play()
                )
                = cycles 1
            )
            (case 3
                (if (>= local277 8)
                    proc0_2()
                    (send gEgo:
                        view(409)
                        setLoop(5)
                        cel(0)
                        cycleSpeed(1)
                        setCycle(Fwd)
                    )
                )
                (send (ScriptID(700 6)):
                    cel(0)
                    stopUpd()
                )
                Graph(8 local266)
                Graph(13 - local270 1 - local271 1 + local268 1 + local275 1)
                (if (>= local277 8)
                    (blast:
                        init()
                        cel(0)
                        posn(local273 local274)
                        setCycle(End)
                    )
                    (send gEgo:
                        view(409)
                        setLoop(4)
                        cel(0)
                        setCycle(End self)
                        setMotion(0)
                    )
                )(else
                    = state 0
                    = cycles Random(16 24)
                )
            )
            (case 4
                proc940_0("SQ QUIZ QUESTION #1052\nWhen being shot at by crazed Sequel Police Cyborgs, a space hero should:" 101 101 81 "A>" 0 "Wait patiently until they get lucky." 101 81 "B>" 1 "Yell \"Hey, I'm over here!\"" 101 81 "C>" 2 "Gently stroke your bunny." 101 81 "D>" 3 "Get your sorry self outta here!!!")
                proc0_10(8 18)
            )
        )
    )

)
(instance swimAfterEgo of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = cycles 
                    (if ((== gWest 370) and Btest(22))
                        16
                    )(else
                        120
                    )
            )
            (case 1
                (if (((not (send global2:script) and (< (send gEgo:x) 236)) and (> (send gEgo:y) 30)) or ((== gWest 370) and Btest(22)))
                    (send gEgo:setMotion(0))
                    (send (ScriptID(700 4)):inertia(0))
                    (send (ScriptID(700 6)):
                        show()
                        view(408)
                        setLoop(1)
                        cel(0)
                        setCycle(End)
                        setStep(2 2)
                        posn(
                            (if ((== gWest 370) and Btest(22))
                                318
                            )(else
                                358
                            )
 - (send gEgo:y) 18)
                        setMotion(MoveTo 310 - (send gEgo:y) 10 self)
                    )
                )(else
                    (self:init())
                )
            )
            (case 2
                proc0_2()
                (send (ScriptID(700 6)):
                    view(409)
                    setLoop(1)
                    cel(0)
                    setCycle(CT 1 1 self)
                )
            )
            (case 3
                = local272 (- (send (ScriptID(700 6)):y) 4)
                = local271 (- (send (ScriptID(700 6)):x) 57)
                = local274 proc999_3(2 proc999_2(188 (- (send gEgo:y) 10)))
                = local273 proc999_2(318 (send gEgo:x))
                (if (< local274 local272)
                    = local270 local274
                    = local268 local272
                )(else
                    = local270 local272
                    = local268 local274
                )
                = local266 Graph(7 (- local270 1) (- local273 1) (+ local268 1) (+ local271 1) 1)
                Graph(4 local272 local271 local274 local273 proc0_18(global133 global143) 1 -1)
                Graph(13 - local270 1 - local273 1 + local268 1 + local271 1 1)
                (aSound:
                    number(105)
                    loop(1)
                    vol(127)
                    play()
                )
                = cycles 1
            )
            (case 4
                Graph(8 local266)
                Graph(13 - local270 1 - local273 1 + local268 1 + local271 1 1)
                (blast:
                    init()
                    cel(0)
                    posn(local273 local268)
                    setCycle(End)
                )
                (send (ScriptID(700 6)):cel(0))
                (send gEgo:
                    view(409)
                    setLoop(4)
                    cel(0)
                    setCycle(End self)
                    setMotion(0)
                )
            )
            (case 5
                proc940_0("SQ QUIZ QUESTION #1052\nWhen being shot at by crazed Sequel Police Androids, a space hero should:" 101 101 81 "A>" 0 "Wait patiently until they get lucky?" 101 81 "B>" 1 "Make a list of favorite campfire songs?" 101 81 "C>" 2 "Play with a pink bunny rabbit?" 101 81 "D>" 3 "RUN LIKE HECK!!!")
                proc0_10(8 18)
            )
        )
    )

)
(instance exitScript of Script
    (properties)

    (method (changeState newState)
        (var temp0)
        (switch (= state newState)
            (case 0
                (send (ScriptID(700 4)):dispose())
                (if (== register (send global2:north))
                    = temp0 0
                )(else
                    = temp0 90
                )
                (send gEgo:setHeading(temp0 self))
            )
            (case 1
                (switch (register)
                    (case (send global2:north)
                        (send gEgo:setMotion(MoveToY 65506 self))
                    )
                    (case (send global2:east)
                        (send gEgo:setMotion(MoveToX 350 self))
                    )
                )
            )
            (case 2
                (send global2:newRoom(register))
            )
        )
    )

)
(instance startSwimScript of Script
    (properties)

    (method (changeState newState)
        (var temp0, temp1)
        (switch (= state newState)
            (case 0
                (if (== local278 1)
                    = temp1 2
                )(else
                    = temp1 0
                )
                (send gEgo:
                    normal(0)
                    view(403)
                    setLoop(temp1)
                    cycleSpeed(2)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 1
                (if (== local278 2)
                    = temp0 406
                )(else
                    = temp0 398
                )
                (send (ScriptID(700 4)):init(gEgo))
                (send gEgo:
                    normal(0)
                    loop(0)
                    setLoop(-1)
                    view(temp0)
                    posn(+ (send gEgo:x) 37 - (send gEgo:y) 3 0)
                    setStep(3 2)
                    setCycle(Swim)
                    cycleSpeed(0)
                    setHeading(90)
                    setMotion(MoveFwd 20 self)
                )
            )
            (case 2
                proc700_5(0)
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance endSwimScript of Script
    (properties)

    (method (changeState newState)
        (var temp0, temp1)
        (switch (= state newState)
            (case 0
                (if (== local278 2)
                    = register 1
                )(else
                    = register 3
                )
                (send gEgo:
                    view(403)
                    setMotion(0)
                    setCycle(0)
                    setLoop(register)
                    cel(1)
                    posn(+ (send gEgo:x) 12 + (send gEgo:y) 5)
                )
                (send (ScriptID(700 4)):dispose())
                = cycles 3
            )
            (case 1
                (send gEgo:
                    setLoop(register)
                    cel(0)
                    posn(- (send gEgo:x) 20 + (send gEgo:y) 4)
                )
                = cycles 3
            )
            (case 2
                (if (== local278 2)
                    = temp0 0
                    = temp1 4
                )(else
                    = temp0 402
                    = temp1 14
                )
                proc0_1(1 temp0 temp1)
                proc700_5(1)
                (send gEgo:
                    posn(- (send gEgo:x) 17 + (send gEgo:y) 4)
                    setMotion(PolyPath 24 136 self)
                )
            )
            (case 3
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance landScript of Script
    (properties)

    (method (changeState newState)
        (var temp0, temp1)
        (switch (= state newState)
            (case 0
                (if (== local278 2)
                    = register 1
                )(else
                    = register 3
                )
                (send gEgo:
                    view(403)
                    setMotion(0)
                    setCycle(0)
                    setLoop(register)
                    cel(1)
                    posn(+ (send gEgo:x) 12 + (send gEgo:y) 5)
                )
                (send (ScriptID(700 4)):dispose())
                = cycles 2
            )
            (case 1
                (send gEgo:
                    setLoop(register)
                    cel(0)
                    posn(- (send gEgo:x) 20 + (send gEgo:y) 4)
                )
                = cycles 2
            )
            (case 2
                (if (== local278 2)
                    = temp0 0
                )(else
                    = temp0 402
                )
                proc0_1(1 temp0)
                (send gEgo:
                    setLoop(1)
                    setStep(6 4)
                    setCycle(0)
                    setMotion(MoveTo 21 132 self)
                )
            )
            (case 3
                (if (== local278 2)
                    = temp1 4
                )(else
                    = temp1 14
                )
                proc700_5(1)
                proc0_1(1 (send gEgo:view) temp1)
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance stayInScript of Script
    (properties)

    (method (changeState newState)
        (var gEgoX, temp1)
        (switch (= state newState)
            (case 0
                (send ((send gEgo:code)):
                    xOff(0)
                    yOff(0)
                    inertia(0)
                )
                = gEgoX (send gEgo:x)
                = temp1 220
                (send gEgo:
                    illegalBits(0)
                    setMotion(MoveTo gEgoX temp1 self)
                )
            )
            (case 1
                (send ((send gEgo:code)):
                    xOff(0)
                    yOff(0)
                    inertia(0)
                )
                (if (> (send gEgo:x) 300)
                    (send gEgo:x(300))
                )
                (if (< (send gEgo:x) 78)
                    (send gEgo:x(78))
                )
                Animate((send gCast:elements) 0)
                = gEgoX (send gEgo:x)
                = temp1 185
                (send gEgo:setMotion(MoveTo gEgoX temp1 self))
            )
            (case 2
                (send gEgo:illegalBits(32768))
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance spinEgo of Script
    (properties)

    (method (doit param1)
        (super:doit(rest param1))
        (if (proc0_5(gEgo 4) or proc0_5(gEgo 2))
            (send gEgo:setMotion(0))
            (send (ScriptID(700 4)):inertia(0))
        )
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                = register 
                    (if (> (send caller:x) (send gEgo:x))
                        1
                    )(else
                        -1
                    )
                = caller 0
                (send gEgo:
                    view(
                        (switch ((send gEgo:view))
                            (case 406
                                407
                            )
                            (case 398
                                411
                            )
                            (default 
                                407
                            )
                        )
)
                    loop(0)
                    cel(
                        (switch ((send gEgo:loop))
                            (case 0
                                0
                            )
                            (case 1
                                2
                            )
                            (case 2
                                1
                            )
                            (case 3
                                4
                            )
                            (case 4
                                0
                            )
                            (case 5
                                2
                            )
                            (case 6
                                5
                            )
                            (case 7
                                3
                            )
                        )
)
                    cycleSpeed(0)
                    setCycle(CT (send gEgo:cel) register self)
                )
            )
            (case 1
                (send gEgo:
                    setCycle(CT (send gEgo:cel) register self)
                    cycleSpeed(1)
                )
            )
            (case 2
                (send gEgo:
                    setCycle(CT (send gEgo:cel) register self)
                    cycleSpeed(2)
                )
            )
            (case 3
                (send gEgo:
                    view(
                        (switch ((send gEgo:view))
                            (case 407
                                406
                            )
                            (case 411
                                398
                            )
                        )
)
                    loop(
                        (switch ((send gEgo:cel))
                            (case 0
                                0
                            )
                            (case 2
                                1
                            )
                            (case 1
                                2
                            )
                            (case 4
                                3
                            )
                            (case 0
                                4
                            )
                            (case 2
                                5
                            )
                            (case 5
                                6
                            )
                            (case 3
                                7
                            )
                        )
)
                    cycleSpeed(0)
                    setCycle(Swim)
                )
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance blast of Prop
    (properties
        view 28
    )
)
(instance skate0Snd of Sound
    (properties
        number 401
        priority 15
        loop -1
    )
)
(instance skate3Snd of Sound
    (properties
        number 401
        priority 15
        loop -1
    )
)
(instance skateorama of Feature
    (properties
        x 75
        y 100
        description "Skate-O-Rama"
        sightAngle 180
        lookStr "It's a Zero-G Skate-O-Rama.  In here, the mall's gravity generators have no effect, providing an ideal and unique entertainment opportunity for the entire family."
    )

    (method (onMe param1)
        return == OnControl(4 (send param1:x) (send param1:y)) 2048
    )

)
(instance light of Feature
    (properties
        x 1
        y 189
        description "center light"
        lookStr "The Skate-O-Rama is illuminated by a nearby sun whose glow is reflected through a mirror set into the floor.  With this latest innovation, you can now enjoy zero-G while tuning up your tan."
    )

    (method (onMe param1)
        return == OnControl(4 (send param1:x) (send param1:y)) 1024
    )

)
(instance steps of Feature
    (properties
        x 280
        y 90
        description "steps"
        sightAngle 180
        lookStr "These steps lead up to the rest of the Galaxy Galleria Mall."
    )

    (method (onMe param1)
        return & OnControl(4 (send param1:x) (send param1:y)) $1002
    )

)
(instance wall of Feature
    (properties
        x 190
        y 80
        description "wall"
        sightAngle 180
        lookStr "These walls protect shoppers from errant sky-skaters."
    )

    (method (onMe param1)
        return 
            (if (not (& OnControl(4 (send param1:x) (send param1:y)) $e000) and (& OnControl(4 (send param1:x) (send param1:y)) $0004))
                > (send param1:y) 71
            )(else
                0
            )
    )

)
(instance restOfMall of Feature
    (properties
        x 110
        y 80
        description "rest of the mall"
        sightAngle 180
        lookStr "The rest of the Galaxy Galleria awaits the unwary and uninformed shopper."
    )

    (method (onMe)
        return 1
    )

)
(instance aSound of Sound
    (properties)
)
