(version 2)
(include "sci.sh")
(exports
    0 rm120
)
(use "Main")
(use "Class_255_0")
(use "Follow")
(use "Chase")
(use "Sound")
(use "Cycle")
(use "Game")
(use "User")
(use "Feature")
(use "Obj")
(script 120)


(local
    local0
    local1
    local2 =     1
    local3
    local4
    local5
    local6
    local7
    userPrevDir
    local9
    local10[4] = (1 0 3 2 )
    local14
    local15
    local16
    local17
    local18 =     3
    local19

)
(procedure (localproc_1f54 param1 param2)
    DirLoop(param1 GetAngle((send param1:x) (send param1:y) (send param2:x) (send param2:y)))
)


(procedure (localproc_1f80 param1 param2)
    (var temp0, temp1, temp2, temp3, temp4, temp5)
    = temp0 (- (send param2:x) 10)
    = temp1 (+ temp0 19)
    = temp2 (- (send param2:y) 20)
    = temp3 (+ temp2 20)
    (switch ((send param1:loop))
        (case 0
            = temp4 (+ (send param1:x) 37)
            = temp5 (- (send param1:y) 13)
        )
        (case 1
            = temp4 (- (send param1:x) 38)
            = temp5 (- (send param1:y) 13)
        )
        (case 2
            = temp4 (- (send param1:x) 8)
            = temp5 (- (send param1:y) 10)
        )
        (case 3
            = temp4 (+ (send param1:x) 6)
            = temp5 (- (send param1:y) 10)
        )
    )
    return 
        (if ((((<= temp0 temp4) and (<= temp4 temp1)) and (<= temp2 temp5)) and (<= temp5 temp3))
            return 1
        )(else
            return 0
        )
)


(procedure (localproc_2066 param1)
    (var temp0, temp1)
    = temp0 1000
    = temp1 0
    = temp0 1000
    (while (< temp1 paramTotal)
        (if (< param1[temp1] temp0)
            = temp0 param1[temp1]
        )
        ++temp1
    )
    return temp0
)


(procedure (localproc_2096)
    = local2 0
    (User:canControl(0))
)


(procedure (localproc_20a4)
    = local2 1
    (User:canControl(1))
)


(procedure (localproc_20b2)
    (send gEgo:
        view(200)
        setMotion(0)
        setLoop(-1)
        setCel(-1)
        setCycle(Walk)
    )
    (legs:
        view(201)
        setLoop(-1)
        setCycle(0)
    )
)


(instance public rm120 of Rm
    (properties
        picture 120
        picAngle 80
    )

    (method (init)
        (var temp0[50])
        (User:
            canInput(0)
            canControl(1)
        )
        Load(128 195)
        Load(128 196)
        Load(128 198)
        Load(128 200)
        Load(128 201)
        Load(128 202)
        Load(128 203)
        Load(128 204)
        Load(128 205)
        Load(128 206)
        Load(128 207)
        Load(128 208)
        Load(128 209)
        Load(128 211)
        Load(132 18)
        Load(132 19)
        Load(132 33)
        (super:init())
        (send gEgo:
            view(200)
            loop(0)
            setLoop(-1)
            posn(62 85)
            setStep(3 1)
            illegalBits(-32768)
            baseSetter(newBase)
            ignoreActors(0)
            init()
        )
        (badGuy:init())
        (bgLegs:init())
        (legs:init())
        (Scott:init())
        (Mark:
            init()
            setMotion(Follow Scott 10)
        )
        (egoPower:init())
        (bgPower:init())
        = global159 0
        (self:setScript(StartScript))
    )


    (method (doit)
        (var temp0[50])
        (super:doit())
        (if ((badGuy:isBlocked()) and not local15)
            (BadGuy:changeState(15))
        )
        (if ((send gEgo:inRect(0 0 152 86)) and not local15)
            (ScottScript:changeState(10))
        )
        (if ((send gEgo:inRect(0 87 152 189)) and not local15)
            (ScottScript:changeState(7))
        )
        (if ((send gEgo:inRect(153 0 319 86)) and not local15)
            (ScottScript:changeState(4))
        )
        (if ((send gEgo:inRect(153 87 319 189)) and not local15)
            (ScottScript:changeState(1))
        )
        (if (global219)
            --local18
        )
        (if (not local18)
            = local18 3
            = local16 1
            = local17 1
        )
    )


    (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if ((send pEvent:claimed))
            return 
        )
        (switch ((send pEvent:type))
            (case 4
                (if (((== (send pEvent:message) 74) or (== (send pEvent:message) 106)) and local2)
                    (self:setScript(Punch))
                )(else
                    (if (((== (send pEvent:message) 77) or (== (send pEvent:message) 109)) and local2)
                        (self:setScript(EgoBlock))
                    )(else
                        (if (((== (send pEvent:message) 78) or (== (send pEvent:message) 110)) and local2)
                            (send global5:showSelf())
                        )
                    )
                )
            )
        )
    )

)
(instance StartScript of Script
    (properties)

    (method (changeState newState)
        (var temp0[50])
        (switch (= state newState)
            (case 0
                localproc_2096()
                = local15 1
                (balloon:init())
                = seconds 3
            )
            (case 1
                (balloon:dispose())
                = local15 0
                localproc_20a4()
                (send client:setScript(0))
            )
        )
    )

)
(instance Punch of Script
    (properties)

    (method (changeState newState)
        (var temp0[50])
        (switch (= state newState)
            (case 0
                = userPrevDir (User:prevDir)
                localproc_2096()
                (if ((send gEgo:mover))
                    = local6 (send ((send gEgo:mover)):x)
                    = local7 (send ((send gEgo:mover)):y)
                )(else
                    = local6 0
                    = local7 0
                )
                (send gEgo:
                    view(202)
                    setCel(0)
                    setMotion(0)
                )
                (if (not local5 and not local4)
                    (BadGuy:changeState(7))
                )
                (send gEgo:setCycle(End self))
            )
            (case 1
                = local16 4
                (if (localproc_1f80(gEgo badGuy) and (<> (send gEgo:loop) (badGuy:loop)))
                    (if (not local3)
                        (clang1:play())
                        = local9 1
                        = local16 -8
                        = local17 4
                        (BadGuy:changeState(12))
                    )(else
                        (clang2:play())
                        = global176 0
                        = local16 4
                    )
                )
                = cycles 2
            )
            (case 2
                localproc_20b2()
                (if (local6 or local7)
                    (send gEgo:setMotion(MoveTo local6 local7))
                )
                = local1 0
                localproc_20a4()
                (User:prevDir(userPrevDir))
                (send client:setScript(0))
            )
        )
    )

)
(instance EgoBump of Script
    (properties)

    (method (doit)
        (if (((send gEgo:isBlocked()) and local1) and not local14)
            (self:cue())
        )
        (if (== (legs:view) 208)
            (legs:
                setLoop((send gEgo:loop))
                setPri((send gEgo:priority))
                x((send gEgo:x))
                y(- (send gEgo:y) 1)
            )
        )
        (super:doit())
    )


    (method (changeState newState)
        (var temp0[50], temp50, temp51)
        (switch (= state newState)
            (case 0
                localproc_2096()
                (if (== (send gEgo:loop) (badGuy:loop))
                    (switch ((send gEgo:loop))
                        (case 0
                            = temp50 20
                            = temp51 0
                        )
                        (case 1
                            = temp50 -20
                            = temp51 0
                        )
                        (case 2
                            = temp50 0
                            = temp51 10
                        )
                        (case 3
                            = temp50 0
                            = temp51 -10
                        )
                    )
                )(else
                    (switch ((send gEgo:loop))
                        (case 0
                            = temp50 -20
                            = temp51 0
                        )
                        (case 1
                            = temp50 20
                            = temp51 0
                        )
                        (case 2
                            = temp50 0
                            = temp51 -10
                        )
                        (case 3
                            = temp50 0
                            = temp51 10
                        )
                    )
                    (legs:
                        view(208)
                        setCycle(Fwd)
                    )
                    (send gEgo:
                        view(198)
                        signal(& (send gEgo:signal) $fbff)
                        setLoop()
                        cel(0)
                        setCycle(0)
                    )
                )
                (send gEgo:setMotion(MoveTo (+ (send gEgo:x) temp50) (+ (send gEgo:y) temp51) self))
                = local1 1
            )
            (case 1
                localproc_20b2()
                = local1 0
                localproc_20a4()
                (self:dispose())
            )
        )
    )

)
(instance EgoBlock of Script
    (properties)

    (method (changeState newState)
        (var temp0[50])
        (switch (= state newState)
            (case 0
                = userPrevDir (User:prevDir)
                localproc_2096()
                = local0 1
                (if ((send gEgo:mover))
                    = local6 (send ((send gEgo:mover)):x)
                    = local7 (send ((send gEgo:mover)):y)
                )(else
                    = local6 0
                    = local7 0
                )
                (send gEgo:
                    view(209)
                    setCel(0)
                    setMotion(0)
                )
                proc0_10()
                (send gEgo:setCycle(End self))
            )
            (case 1
                = cycles 5
            )
            (case 2
                (send gEgo:setCycle(Beg self))
            )
            (case 3
                localproc_20b2()
                (if (local6 or local7)
                    (send gEgo:setMotion(MoveTo local6 local7))
                )
                = local0 0
                = local16 2
                localproc_20a4()
                (User:prevDir(userPrevDir))
                (send client:setScript(0))
            )
        )
    )

)
(instance BadGuy of Script
    (properties)

    (method (doit)
        (if (== (bgLegs:view) 206)
            (bgLegs:
                setLoop((badGuy:loop))
                setPri((badGuy:priority))
                x((badGuy:x))
                y(- (badGuy:y) 1)
            )
        )
        (super:doit())
    )


    (method (changeState newState)
        (var temp0[50], temp50, temp51)
        (switch (= state newState)
            (case 0
                (if (< (badGuy:loop) 2)
                    (if (> (badGuy:y) (send gEgo:y))
                        (badGuy:posn((badGuy:x) (- (badGuy:y) 1)))
                    )(else
                        (badGuy:posn((badGuy:x) (+ (badGuy:y) 1)))
                    )
                )(else
                    (if (> (badGuy:x) (send gEgo:x))
                        (badGuy:posn((- (badGuy:x) 1) (badGuy:y)))
                    )(else
                        (badGuy:posn((+ (badGuy:x) 1) (badGuy:y)))
                    )
                )
                (badGuy:setMotion(Chase gEgo 45 self))
            )
            (case 1
                = cycles 1
            )
            (case 2
                (switch (Random(1 2))
                    (case 1
                        (self:changeState(3))
                    )
                    (case 2
                        (self:changeState(12))
                    )
                )
            )
            (case 3
                localproc_1f54(badGuy gEgo)
                = local5 1
                (badGuy:
                    view(205)
                    setCel(0)
                    setMotion(0)
                    signal(& (badGuy:signal) $fbff)
                )
                = cycles 2
            )
            (case 4
                (badGuy:setCycle(End self))
            )
            (case 5
                = local17 4
                (if (localproc_1f80(badGuy gEgo) and not local1)
                    (if (not local0)
                        (clang1:play())
                        = local17 -8
                        = local16 4
                        (send global2:setScript(EgoBump))
                    )(else
                        (clang2:play())
                    )
                )
                = cycles 2
            )
            (case 6
                = local5 0
                (if (< Random(1 100) 21)
                    (self:changeState(3))
                )(else
                    (self:changeState(12))
                )
            )
            (case 7
                (if ((<> (badGuy:loop) local10[(send gEgo:loop)]) or (> GetDistance((send gEgo:x) (send gEgo:y) (badGuy:x) (badGuy:y)) 55))
                    (self:changeState(15))
                )(else
                    = cycles Random(2 7)
                )
            )
            (case 8
                = local3 1
                localproc_1f54(badGuy gEgo)
                (badGuy:
                    view(207)
                    setCel(0)
                    setMotion(0)
                )
                proc0_10()
                (badGuy:setCycle(End self))
            )
            (case 9
                = cycles 5
            )
            (case 10
                (badGuy:setCycle(Beg self))
            )
            (case 11
                = local3 0
                = local17 2
                (self:changeState(12))
            )
            (case 12
                = local4 1
                (bgLegs:
                    view(206)
                    setCycle(Fwd)
                )
                (badGuy:
                    view(
                        (if (local9)
                            198
                        )(else
                            203
                        )
)
                    setLoop((badGuy:loop))
                    setCel(
                        (if (local9)
                            1
                        )(else
                            -1
                        )
)
                    setCycle(
                        (if (local9)
                            0
                        )(else
                            Walk
                        )
)
                )
                (self:changeState(13))
            )
            (case 13
                (switch ((badGuy:loop))
                    (case 0
                        = temp50 -20
                        = temp51 0
                    )
                    (case 1
                        = temp50 20
                        = temp51 0
                    )
                    (case 2
                        = temp50 0
                        = temp51 -10
                    )
                    (case 3
                        = temp50 0
                        = temp51 10
                    )
                )
                (badGuy:setMotion(MoveTo (+ (badGuy:x) temp50) (+ (badGuy:y) temp51) self))
            )
            (case 14
                = local9 0
                (self:changeState(15))
            )
            (case 15
                (bgLegs:
                    view(204)
                    setCycle(0)
                )
                (badGuy:
                    view(203)
                    setLoop(-1)
                    setCel(-1)
                    setCycle(Walk)
                    setMotion(0)
                )
                = local5 0
                = local4 0
                = local9 0
                (self:changeState(0))
            )
            (case 16
                (badGuy:setScript(0))
            )
        )
    )

)
(instance ScottScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
            )
            (case 1
                (if ((Scott:inRect(153 87 319 189)))
                    (Scott:setMotion(MoveTo 228 70 self))
                )(else
                    (self:changeState(2))
                )
            )
            (case 2
                (if ((<> (Scott:x) 82) and (<> (Scott:y) 72))
                    (Scott:setMotion(MoveTo 82 72 self))
                )
            )
            (case 3
                localproc_1f54(Scott gEgo)
            )
            (case 4
                (if ((Scott:inRect(153 0 319 86)))
                    (Scott:setMotion(MoveTo 230 105 self))
                )(else
                    (self:changeState(5))
                )
            )
            (case 5
                (if ((<> (Scott:x) 83) and (<> (Scott:y) 103))
                    (Scott:setMotion(MoveTo 83 103 self))
                )
            )
            (case 6
                localproc_1f54(Scott gEgo)
            )
            (case 7
                (if ((Scott:inRect(0 87 152 189)))
                    (Scott:setMotion(MoveTo 82 72 self))
                )(else
                    (self:changeState(8))
                )
            )
            (case 8
                (if ((<> (Scott:x) 228) and (<> (Scott:y) 70))
                    (Scott:setMotion(MoveTo 228 70 self))
                )
            )
            (case 9
                localproc_1f54(Scott gEgo)
            )
            (case 10
                (if ((Scott:inRect(0 0 152 86)))
                    (Scott:setMotion(MoveTo 228 70 self))
                )(else
                    (self:changeState(11))
                )
            )
            (case 11
                (if ((<> (Scott:x) 230) and (<> (Scott:y) 105))
                    (Scott:setMotion(MoveTo 230 105 self))
                )
            )
            (case 12
                localproc_1f54(Scott gEgo)
            )
            (case 13
                (Scott:setMotion(MoveTo 153 105 self))
            )
            (case 14
                localproc_1f54(Scott gEgo)
            )
        )
    )

)
(instance EgoDead of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (badGuy:
                    setMotion(0)
                    setCycle(0)
                )
                (send gEgo:
                    illegalBits(0)
                    setMotion(0)
                )
                proc0_10()
                (send gEgo:
                    view(211)
                    setLoop(
                        (if (> (send gEgo:x) 153)
                            0
                        )(else
                            1
                        )
)
                    setPri((send gEgo:priority))
                    y(+ (send gEgo:y) 32)
                    cycleSpeed(1)
                    setCycle(End self)
                )
                (legs:dispose())
            )
            (case 1
                (boom:play())
                ShakeScreen(10 3)
                proc255_0(120 0 67 -1 130 70 280)
                proc0_17(0 0 9 13)
            )
        )
    )

)
(instance BgDead of Script
    (properties)

    (method (doit)
        (legs:
            cel((send gEgo:cel))
            loop((send gEgo:loop))
        )
        (if (not --local18)
            = local18 Random(1 3)
            (if ((badGuy:mover))
                (badGuy:setLoop(Random(0 3)))
            )
        )
        (bgLegs:
            setLoop((badGuy:loop))
            setPri((badGuy:priority))
            x((badGuy:x))
            y(- (badGuy:y) 1)
        )
        (super:doit())
    )


    (method (changeState newState)
        (var temp0[50], temp50, temp51, temp52, temp53, temp54, temp55, badGuyX, badGuyY)
        (switch (= state newState)
            (case 0
                proc0_2()
                = local18 2
                (badGuy:
                    ignoreActors(1)
                    illegalBits(0)
                )
                (bgLegs:ignoreActors(1))
                localproc_20b2()
                (send gEgo:ignoreActors(1))
                (legs:ignoreActors(1))
                (if (> (send gEgo:x) 160)
                    (send gEgo:setMotion(MoveTo 130 90))
                )(else
                    (send gEgo:setMotion(MoveTo 170 90))
                )
                = badGuyX (badGuy:x)
                = badGuyY (badGuy:y)
                = temp50 GetDistance(badGuyX badGuyY 80 78)
                = temp51 GetDistance(badGuyX badGuyY 98 73)
                = temp52 GetDistance(badGuyX badGuyY 128 68)
                = temp53 GetDistance(badGuyX badGuyY 187 68)
                = temp54 GetDistance(badGuyX badGuyY 213 73)
                = temp55 GetDistance(badGuyX badGuyY 241 78)
                (bgLegs:
                    view(206)
                    setCycle(Fwd)
                )
                (badGuy:
                    view(198)
                    setCel(1)
                    setCycle(0)
                )
                (switch (localproc_2066(temp50 temp51 temp52 temp53 temp54 temp55))
                    (case temp50
                        (badGuy:setMotion(MoveTo 80 78 self))
                    )
                    (case temp51
                        (badGuy:setMotion(MoveTo 98 73 self))
                    )
                    (case temp52
                        (badGuy:setMotion(MoveTo 128 68 self))
                    )
                    (case temp53
                        (badGuy:setMotion(MoveTo 187 68 self))
                    )
                    (case temp54
                        (badGuy:setMotion(MoveTo 213 73 self))
                    )
                    (case temp55
                        (badGuy:setMotion(MoveTo 241 78 self))
                    )
                )
            )
            (case 1
                (bgLegs:dispose())
                (if (<= (send gEgo:y) (+ (badGuy:y) 6))
                    = temp50 1
                )(else
                    = temp50 -1
                )
                (badGuy:
                    view(211)
                    illegalBits(0)
                    setLoop(
                        (if (> (badGuy:x) 150)
                            2
                        )(else
                            3
                        )
)
                    setPri(+ (send gEgo:priority) temp50)
                    y(+ (badGuy:y) 32)
                    cycleSpeed(1)
                    setMotion(0)
                    setCycle(End self)
                )
                (if (== (badGuy:loop) 2)
                    = local19 1
                )(else
                    = local19 -1
                )
            )
            (case 2
                (boom:play())
                ShakeScreen(10 3)
                (send global1:changeScore(100))
                (Scott:
                    illegalBits(0)
                    setPri(+ (badGuy:priority) 1)
                )
                (Mark:setPri((Scott:priority)))
                (Scott:setMotion(MoveTo (+ (badGuy:x) (* local19 40)) (- (badGuy:y) 32) self))
            )
            (case 3
                (balloon:
                    init()
                    setLoop(2)
                    setCel(
                        (if (< (Scott:x) 160)
                            0
                        )(else
                            1
                        )
)
                )
                = seconds 3
            )
            (case 4
                (balloon:dispose())
                proc0_10()
                (Scott:dispose())
                (Mark:dispose())
                = cycles 2
            )
            (case 5
                (send gEgo:
                    setCel(0)
                    setLoop(2)
                )
                (legs:
                    setLoop(2)
                    posn((send gEgo:x) - (send gEgo:y) 1)
                )
                (guy:
                    init()
                    setLoop(0)
                    posn((send gEgo:x) - (send gEgo:y) 16)
                    setPri(+ (send gEgo:priority) 2)
                    setMotion(MoveTo - (send gEgo:x) 5 + (send gEgo:y) 3 self)
                )
                (square:
                    init()
                    stopUpd()
                )
            )
            (case 6
                (guy:
                    setLoop(1)
                    setCel(0)
                    setCycle(0)
                    setMotion(MoveTo - (send gEgo:x) 5 + (send gEgo:y) 30 self)
                )
            )
            (case 7
                (guy:
                    view(68)
                    setLoop(-1)
                    setStep(6 3)
                    setCycle(Walk)
                )
                (guy:setMotion(MoveTo (+ (guy:x) (* local19 12)) (guy:y) self))
            )
            (case 8
                (if (< (guy:y) (badGuy:y))
                    (guy:
                        setPri(- (send gEgo:priority) 1)
                        setMotion(MoveTo - (badGuy:x) (* local19 5) + (badGuy:y) 10 self)
                    )
                )(else
                    = cycles 2
                )
            )
            (case 9
                (guy:setMotion(MoveTo (+ (badGuy:x) (* local19 20)) (+ (badGuy:y) 10) self))
            )
            (case 10
                (guy:setMotion(MoveTo (+ (badGuy:x) (* local19 40)) (badGuy:y) self))
            )
            (case 11
                (guy:dispose())
                (send gLongSong:stop())
                = cycles 2
            )
            (case 12
                (send global2:newRoom(94))
            )
        )
    )

)
(instance legs of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(201)
            setLoop((send gEgo:loop))
            setCel((send gEgo:cel))
            posn((send gEgo:x) - (send gEgo:y) 1)
            setPri((send gEgo:priority))
            ignoreActors(1)
        )
    )


    (method (doit)
        (super:doit())
        (if (not (send gEgo:mover) and (== local2 1))
            = local16 0
        )
        (if ((send gEgo:mover) and (<> (self:view) 208))
            (self:
                setLoop((send gEgo:loop))
                setCel((send gEgo:cel))
                setPri((send gEgo:priority))
                x((send gEgo:x))
                y(- (send gEgo:y) 1)
            )
        )
    )

)
(instance bgLegs of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(204)
            setLoop((badGuy:loop))
            setCel((badGuy:cel))
            posn((badGuy:x) - (badGuy:y) 1)
            setPri((badGuy:priority))
            ignoreActors(1)
        )
    )


    (method (doit)
        (super:doit())
        (if ((badGuy:mover) and (<> (self:view) 206))
            (self:
                setLoop((badGuy:loop))
                setCel((badGuy:cel))
                setPri((badGuy:priority))
                x((badGuy:x))
                y(- (badGuy:y) 1)
            )
        )
    )

)
(instance badGuy of Act
    (properties)

    (method (init)
        (super:init())
        (self:
            view(203)
            loop(1)
            posn(272 86)
            setCycle(Walk)
            setStep(3 1)
            illegalBits(-32768)
            setScript(BadGuy)
            ignoreActors(0)
            baseSetter(newBase)
        )
    )

)
(instance Scott of Act
    (properties)

    (method (init)
        (super:init())
        (self:
            view(195)
            loop(0)
            posn(159 79)
            setCycle(Walk)
            setStep(6 3)
            illegalBits(-32768)
            ignoreActors(1)
            setScript(ScottScript)
        )
    )

)
(instance Mark of Act
    (properties)

    (method (init)
        (super:init())
        (self:
            view(196)
            loop(0)
            posn(162 82)
            setCycle(Walk)
            setStep(6 3)
            illegalBits(-32768)
            ignoreActors(1)
        )
    )

)
(instance guy of Act
    (properties)

    (method (init)
        (super:init())
        (self:
            view(97)
            loop(0)
            setCycle(Walk)
            setStep(3 3)
            illegalBits(0)
            ignoreActors(1)
        )
    )

)
(instance egoPower of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(211)
            setLoop(4)
            setCel(0)
            posn(78 12)
            setPri(14)
            setCycle(0)
            ignoreActors(1)
        )
    )


    (method (doit)
        (if (< (self:x) 32)
            (self:setCycle(Fwd))
        )(else
            (self:
                setCycle(0)
                setCel(0)
            )
        )
        (if (local16)
            (if (> (- (self:x) local16) 78)
                (self:x(78))
            )(else
                (self:x((- (self:x) local16)))
            )
            = local16 0
        )
        (if ((<= (self:x) 11) and not local15)
            = local14 1
            localproc_2096()
            (send global2:setScript(EgoDead))
            (self:dispose())
        )
        (super:doit())
    )

)
(instance bgPower of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(211)
            setLoop(4)
            setCel(0)
            posn(230 12)
            setPri(14)
            setCycle(0)
            ignoreActors(1)
        )
    )


    (method (doit)
        (if (> (self:x) 273)
            (self:setCycle(Fwd))
        )(else
            (self:
                setCycle(0)
                setCel(0)
            )
        )
        (if (local17)
            (if (< (+ (self:x) local17) 230)
                (self:x(230))
            )(else
                (self:x((+ (self:x) local17)))
            )
            = local17 0
        )
        (if ((>= (self:x) 296) and not local14)
            = local15 1
            localproc_2096()
            (BadGuy:changeState(16))
            (ScottScript:changeState(13))
            (send global2:setScript(BgDead))
            (self:dispose())
        )
        (super:doit())
    )

)
(instance square of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(117)
            setLoop(1)
            setCel(1)
            posn((send gEgo:x) - (send gEgo:y) 18)
            setPri(+ (send gEgo:priority) 1)
            setCycle(0)
            ignoreActors(1)
        )
    )

)
(instance balloon of Prop
    (properties)

    (method (init)
        (super:init())
        (self:
            view(117)
            setLoop(3)
            setCel(0)
            posn((Scott:x) + (Scott:y) 11)
            setPri(15)
            setCycle(0)
            ignoreActors(1)
        )
    )

)
(instance clang1 of Sound
    (properties
        number 18
        priority 2
    )
)
(instance clang2 of Sound
    (properties
        number 19
        priority 2
    )
)
(instance boom of Sound
    (properties
        number 33
        priority 3
    )
)
(instance newBase of Code
    (properties)

    (method (doit param1)
        (send param1:brTop((- (send param1:y) 4)))
        (send param1:brBottom((+ (send param1:y) 4)))
        (send param1:brLeft((- (send param1:x) 20)))
        (send param1:brRight((+ (send param1:x) 20)))
    )

)
