(version 2)
(include "sci.sh")
(exports
    0 rm008
)
(use "Main")
(use "Class_255_0")
(use "Rev")
(use "Timer")
(use "Avoid")
(use "Sound")
(use "Jump")
(use "Cycle")
(use "Game")
(use "Feature")
(use "Obj")
(script 8)


(local
    local0
    local1
    local2
    gEgoLoop
    local4
    local5
    local6
    local7
    local8

)
(instance public rm008 of Rm
    (properties
        picture 8
        style 0
        horizon 1
    )

    (method (init)
        (var temp0[50])
        proc0_2()
        = global54 1
        = global56 120
        (if (<> global12 11)
            (self:
                setLocales(700)
                setFeatures(thePod theMallard)
                setScript(rmScript)
            )
        )
        Load(130 991)
        = local7 991
        Load(128 16)
        Load(128 6)
        Load(128 19)
        Load(128 21)
        Load(128 29)
        Load(128 257)
        Load(128 750)
        Load(128 193)
        Load(132 11)
        Load(132 56)
        (if ((<> global135 4) and (== global149 global11))
            Load(128 36)
            (motivator:init())
        )
        (if (== global12 14)
            = local1 1
            (send ((send global9:at(2))):moveTo(8))
            (send gLongSong:
                number(11)
                loop(-1)
                play()
            )
        )(else
            (if (== global12 11)
                Load(128 258)
                Load(132 76)
                = local4 
                    (if (global147)
                        215
                    )(else
                        51
                    )
                = local5 
                    (if (global147)
                        67
                    )(else
                        139
                    )
            )(else
                (send gEgo:
                    view(19)
                    setLoop(0)
                    illegalBits(0)
                    ignoreHorizon(1)
                    posn(251 14)
                    setStep(1 1)
                    setPri(-1)
                    init()
                    moveSpeed(1)
                    cycleSpeed(1)
                    setCycle(Rev)
                    setMotion(MoveTo 251 47 rmScript)
                    setScript(rmScript)
                )
            )
        )
        (if (proc0_13(2))
            (ladder:
                init()
                stopUpd()
            )
        )
        (hatch:init())
        (super:init())
        (if (== global12 11)
            (self:setScript(grabScript))
        )
    )


    (method (doit)
        (if ((== (send gEgo:view) 0) or (== (send gEgo:view) 6))
            (if ((== (send gEgo:onControl(0)) 4) or (== (send gEgo:onControl(0)) 5))
                (send gEgo:view(6))
            )(else
                (if (== (send gEgo:onControl(0)) 1)
                    (send gEgo:view(0))
                )
            )
        )
        (super:doit())
    )


    (method (dispose)
        DisposeScript(991)
        (super:dispose())
    )


    (method (handleEvent pEvent param2)
        (var temp0[50])
        (if ((<> (send pEvent:type) 128) or (send pEvent:claimed))
            return 
        )
        (if (Said('look>'))
            (if (Said('/scrap,iron,debris,garbage'))
                proc255_0(8 0)
            )(else
                (if (Said('/handle[<craft,aluminum,door]'))
                    (if (local0)
                        proc255_0(8 1)
                    )(else
                        proc255_0(8 2)
                    )
                )(else
                    (if (Said('/chute,(craft<little)'))
                        (switch (= param2 Random(1 2))
                            (case 1
                                proc255_0(8 3)
                            )
                            (case 2
                                proc255_0(8 4)
                            )
                        )
                    )(else
                        (if (Said('/aluminum,craft[<big]'))
                            proc255_0(8 5)
                        )(else
                            (if (Said('/nozzle'))
                                proc255_0(8 6)
                            )(else
                                (if (Said('/engine'))
                                    proc255_0(8 7)
                                )(else
                                    (if (Said('/neck,android,head'))
                                        proc255_0(8 8)
                                    )(else
                                        (if (not local0 and Said('[<in,through,in,in]/cavity[<chute,little,cavity,pyramid]'))
                                            (if ((send gEgo:inRect(2 64 91 109)))
                                                proc255_0(8 9)
                                            )(else
                                                proc255_0(8 10)
                                            )
                                        )(else
                                            (if ((Said('<in,in,in/chute,craft') or Said('[<at,in,through,in]/pane,port,(cavity<port)')) or Said('/cabin,chair[<scum]'))
                                                (if ((send gEgo:inRect(44 105 87 116)))
                                                    proc255_0(8 11)
                                                )(else
                                                    (if ((send gEgo:inRect(59 117 170 162)))
                                                        proc255_0(8 12)
                                                    )(else
                                                        proc0_5()
                                                    )
                                                )
                                            )(else
                                                (if (Said('/console[<craft]'))
                                                    (if ((send gEgo:inRect(59 117 170 162)))
                                                        proc255_0(8 13)
                                                    )(else
                                                        proc255_0(8 14)
                                                    )
                                                )(else
                                                    (if (Said('[<in,in,in]/motivator,cavity,compartment'))
                                                        (if (local0 and (send gEgo:inRect(193 75 260 89)))
                                                            (if (== global135 4)
                                                                proc255_0(8 15)
                                                            )(else
                                                                proc255_0(8 16)
                                                            )
                                                        )(else
                                                            proc255_0(8 17)
                                                        )
                                                    )(else
                                                        (if (Said('/plug[<modular,8,spaceware]') or Said('/spaceware[<8]'))
                                                            (if (local0)
                                                                (if (== global149 4)
                                                                    proc255_0(8 18)
                                                                )(else
                                                                    proc255_0(8 19)
                                                                )
                                                            )(else
                                                                proc255_0(8 20)
                                                            )
                                                        )(else
                                                            (if (Said('/leggo,domino,artifact'))
                                                                proc255_0(8 21)
                                                            )(else
                                                                (if (Said('/ladder'))
                                                                    (if (proc0_13(2))
                                                                        proc255_0(8 22)
                                                                    )(else
                                                                        (send pEvent:claimed(0))
                                                                    )
                                                                )(else
                                                                    (if (Said('/door'))
                                                                        (if (local0)
                                                                            proc255_0(8 23)
                                                                        )(else
                                                                            proc255_0(8 20)
                                                                        )
                                                                    )(else
                                                                        (if (Said('/stair'))
                                                                            proc255_0(8 24)
                                                                        )(else
                                                                            (if (Said('/tube,hose,conduit'))
                                                                                proc255_0(8 25)
                                                                            )(else
                                                                                (if (Said('[<around,at,in][/area,!*]'))
                                                                                    proc255_0(8 26)
                                                                                )
                                                                            )
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )(else
            (if (Said('(play[<with]),use[/leggo,domino,artifact]'))
                proc255_0(8 27)
            )(else
                (if (Said('hoist,manipulate,press,drag/craft,chute,aluminum[<escape,big,little]'))
                    proc255_0(8 28)
                )(else
                    (if (Said('get>'))
                        (if (Said('/plug[<modular]'))
                            (if (local0)
                                proc255_0(8 29)
                            )(else
                                (send pEvent:claimed(0))
                            )
                        )(else
                            (if (Said('/leggo,domino,artifact'))
                                proc255_0(8 30)
                            )(else
                                (if (Said('/ladder'))
                                    (if (proc0_13(2))
                                        (if (global194 and (send gEgo:inRect(220 115 274 140)))
                                            (send gEgo:get(2))
                                            (ladder:dispose())
                                            (send global1:changeScore(-5))
                                            proc255_0(8 31)
                                            proc255_0(8 32)
                                            = global194 0
                                        )(else
                                            (if ((send gEgo:inRect(215 114 226 121)))
                                                (send gEgo:get(2))
                                                (ladder:dispose())
                                                (send global1:changeScore(-5))
                                                proc255_0(8 31)
                                                proc255_0(8 32)
                                            )(else
                                                (if (local0)
                                                    proc255_0(8 33)
                                                )(else
                                                    proc0_5()
                                                )
                                            )
                                        )
                                    )(else
                                        proc255_0(8 34)
                                    )
                                )
                            )
                        )
                    )(else
                        (if (Said('enter/!*'))
                            proc255_0(8 35)
                        )(else
                            (if (Said('call/diagnostic'))
                                proc255_0(8 36)
                            )(else
                                (if ((send gEgo:inRect(193 75 260 89)) and Said('enter/cavity,compartment'))
                                    proc255_0(8 37)
                                )(else
                                    (if (Said('use,erect,drop,stand,place[<up,on]/ladder/chute,(craft<little)'))
                                        proc255_0(8 38)
                                    )(else
                                        (if ((((Said('open,enter/door[<craft,aluminum]') or Said('turn/handle[<craft,aluminum,door]')) or Said('get<in[/craft,aluminum]')) or Said('board,enter,(get<in)/craft,aluminum')) or Said('climb<in,through/door'))
                                            (if (local0)
                                                (if ((send gEgo:inRect(165 77 208 96)))
                                                    (hatchScript:changeState(1))
                                                )(else
                                                    proc0_5()
                                                )
                                            )(else
                                                proc255_0(8 2)
                                            )
                                        )(else
                                            (if (Said('open,enter,(get<in,in)/door<chute,(craft<little)') or Said('climb/chute,(craft<little,escape)'))
                                                proc255_0(8 39)
                                            )(else
                                                (if (Said('cable,generator'))
                                                    proc255_0(8 40)
                                                )(else
                                                    (if (Said('plug,afix/motivator,device,artifact') or Said('use/plug'))
                                                        proc255_0(8 41)
                                                    )(else
                                                        (if (Said('close/door'))
                                                            proc255_0(8 42)
                                                        )(else
                                                            (if (Said('use,erect,drop,stand,place[<up,on,down]/ladder[/craft]'))
                                                                (if ((send gEgo:has(2)))
                                                                    (if ((send gEgo:inRect(175 105 270 168)))
                                                                        (send gEgo:setScript(ladderScript))
                                                                    )(else
                                                                        (if ((send gEgo:inRect(2 64 91 109)))
                                                                            proc255_0(8 43)
                                                                        )(else
                                                                            proc255_0(8 44)
                                                                        )
                                                                    )
                                                                )(else
                                                                    proc255_0(8 45)
                                                                )
                                                            )(else
                                                                (if (Said('use,get,climb/debris,scrap,iron,artifact,domino,pole,blade'))
                                                                    (if ((send gEgo:inRect(17 122 61 155)))
                                                                        (send gEgo:setScript(bleedScript))
                                                                    )(else
                                                                        proc255_0(8 46)
                                                                    )
                                                                )(else
                                                                    (if (Said('climb,crawl[<through,in,in]/pane,port,(cavity<port)'))
                                                                        proc255_0(8 47)
                                                                    )(else
                                                                        (if ((Said('enter,(climb<in,through,in,in)/cavity[<chute,little]') or Said('reach,appendage<in,in,in/cavity,chute,craft[<little]')) or Said('reach,appendage<in,in,in/appendage/cavity,chute,craft[<little]'))
                                                                            (if ((send gEgo:inRect(2 64 91 109)))
                                                                                proc255_0(8 48)
                                                                            )(else
                                                                                proc0_5()
                                                                            )
                                                                        )(else
                                                                            (if (Said('descend,climb[<down,up]/ladder'))
                                                                                (if (proc0_13(2))
                                                                                    (if (== (ladder:cel) 1)
                                                                                        (send gEgo:setScript(climbLadderScript))
                                                                                    )(else
                                                                                        (if (== (ladder:cel) 2)
                                                                                            proc255_0(8 49)
                                                                                        )(else
                                                                                            proc255_0(8 50)
                                                                                        )
                                                                                    )
                                                                                )(else
                                                                                    (if ((send gEgo:has(2)))
                                                                                        proc255_0(8 51)
                                                                                    )(else
                                                                                        proc255_0(8 52)
                                                                                    )
                                                                                )
                                                                            )(else
                                                                                (if (Said('climb[<!*][/!*]'))
                                                                                    (if ((send gEgo:inRect(241 48 261 55)))
                                                                                        (rmScript:changeState(2))
                                                                                    )(else
                                                                                        (if ((send gEgo:inRect(193 73 222 102)) or (send gEgo:inRect(215 114 226 121)))
                                                                                            (if (proc0_13(2))
                                                                                                (if (== (ladder:cel) 1)
                                                                                                    (send gEgo:setScript(climbLadderScript))
                                                                                                )(else
                                                                                                    (if (== (ladder:cel) 2)
                                                                                                        proc255_0(8 49)
                                                                                                    )(else
                                                                                                        proc255_0(8 50)
                                                                                                    )
                                                                                                )
                                                                                            )(else
                                                                                                proc255_0(8 53)
                                                                                            )
                                                                                        )(else
                                                                                            proc255_0(8 54)
                                                                                        )
                                                                                    )
                                                                                )(else
                                                                                    (if (Said('climb[<in]/chute'))
                                                                                        proc255_0(8 55)
                                                                                    )(else
                                                                                        (if ((Said('climb[<down,off]/ladder,craft,aluminum,aluminum') or Said('climb<down,off')) or Said('descend/ladder,craft,aluminum,aluminum'))
                                                                                            (if ((send gEgo:inRect(193 73 222 102)))
                                                                                                (if (proc0_13(2))
                                                                                                    (if (== (ladder:cel) 1)
                                                                                                        (send gEgo:setScript(climbLadderScript))
                                                                                                    )(else
                                                                                                        (if (== (ladder:cel) 2)
                                                                                                            proc255_0(8 49)
                                                                                                        )(else
                                                                                                            proc255_0(8 50)
                                                                                                        )
                                                                                                    )
                                                                                                )(else
                                                                                                    proc255_0(8 53)
                                                                                                )
                                                                                            )(else
                                                                                                (send pEvent:claimed(0))
                                                                                            )
                                                                                        )(else
                                                                                            (if (Said('climb,(climb<up)[/!*]'))
                                                                                                (if ((send gEgo:inRect(241 48 261 55)))
                                                                                                    (rmScript:changeState(2))
                                                                                                )(else
                                                                                                    (if ((send gEgo:inRect(215 114 226 121)))
                                                                                                        (if (proc0_13(2))
                                                                                                            (if (== (ladder:cel) 1)
                                                                                                                (send gEgo:setScript(climbLadderScript))
                                                                                                            )(else
                                                                                                                (if (== (ladder:cel) 2)
                                                                                                                    proc255_0(8 49)
                                                                                                                )(else
                                                                                                                    proc255_0(8 50)
                                                                                                                )
                                                                                                            )
                                                                                                        )(else
                                                                                                            proc255_0(8 53)
                                                                                                        )
                                                                                                    )(else
                                                                                                        proc255_0(8 54)
                                                                                                    )
                                                                                                )
                                                                                            )(else
                                                                                                (if (Said('descend,(climb<down)[/!*]'))
                                                                                                    (if ((send gEgo:inRect(193 73 222 102)))
                                                                                                        (if (proc0_13(2))
                                                                                                            (if (== (ladder:cel) 1)
                                                                                                                (send gEgo:setScript(climbLadderScript))
                                                                                                            )(else
                                                                                                                (if (== (ladder:cel) 2)
                                                                                                                    proc255_0(8 49)
                                                                                                                )(else
                                                                                                                    proc255_0(8 50)
                                                                                                                )
                                                                                                            )
                                                                                                        )(else
                                                                                                            proc255_0(8 53)
                                                                                                        )
                                                                                                    )(else
                                                                                                        proc255_0(8 54)
                                                                                                    )
                                                                                                )
                                                                                            )
                                                                                        )
                                                                                    )
                                                                                )
                                                                            )
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
        (if (Said('climb,climb/neck,head,android,nerve,cable'))
            (if ((send gEgo:inRect(241 48 261 55)))
                (rmScript:changeState(2))
            )(else
                proc0_5()
            )
        )
        (if ((Said('climb[<up,on,to]/neck,head,android,nerve,cable') or Said('climb<up,on')) or Said('climb/neck,head,android,nerve,cable'))
            (if ((send gEgo:inRect(241 48 261 55)))
                (rmScript:changeState(2))
            )(else
                (send pEvent:claimed(0))
            )
        )
        (if ((Said('climb[<up,on]/ladder,craft,aluminum,aluminum') or Said('climb<up,on')) or Said('climb/ladder,craft,aluminum,aluminum'))
            (if ((send gEgo:inRect(215 114 226 121)))
                (if (proc0_13(2))
                    (if (== (ladder:cel) 1)
                        (send gEgo:setScript(climbLadderScript))
                    )(else
                        (if (== (ladder:cel) 2)
                            proc255_0(8 49)
                        )(else
                            proc255_0(8 50)
                        )
                    )
                )(else
                    proc255_0(8 56)
                )
            )(else
                proc255_0(8 54)
            )
        )
        (if (Said('break/pane,glass'))
            proc255_0(8 57)
        )
    )

)
(instance rmScript of Script
    (properties)

    (method (doit)
        (if ((not global155 and not global100) and (== local0 1))
            (if ((((== (send gEgo:onControl(0)) 8193) or (== (send gEgo:onControl(0)) -24576)) or (== (send gEgo:onControl(0)) -24575)) or (== (send gEgo:onControl(0)) 24577))
                = local2 1
            )
            (if (((== (send gEgo:onControl(0)) 4097) or (== (send gEgo:onControl(0)) 20481)) or (== (send gEgo:onControl(0)) -12287))
                (if (< (send gEgo:x) 175)
                    = local2 3
                )(else
                    = local2 2
                )
            )
            (if (> local2 0)
                = local0 0
                proc0_2()
                (self:changeState(4))
                = global100 1
                = gEgoLoop (send gEgo:loop)
            )
        )
        (super:doit())
    )


    (method (changeState newState)
        (var temp0[50])
        (switch (= state newState)
            (case 1
                proc0_3()
                = global100 0
                (send gEgo:
                    view(0)
                    setCycle(Walk)
                    setLoop(-1)
                    loop(2)
                    moveSpeed(0)
                    cycleSpeed(0)
                    setStep(3 2)
                )
                (if (<> local1 1)
                    (send gEgo:
                        posn(250 54)
                        setPri(-1)
                        illegalBits(-16384)
                    )
                )(else
                    = local0 1
                    (send gEgo:
                        posn(207 86)
                        illegalBits(0)
                    )
                    = local1 0
                )
            )
            (case 2
                proc0_2()
                = global100 1
                (send gEgo:
                    view(19)
                    setLoop(0)
                    setStep(1 1)
                    illegalBits(0)
                    posn(251 47)
                    setMotion(MoveTo 251 13 self)
                    setCycle(Fwd)
                    moveSpeed(1)
                    cycleSpeed(1)
                )
            )
            (case 3
                (send global2:newRoom(7))
            )
            (case 4
                (send gEgo:
                    setMotion(0)
                    view(257)
                    setLoop((send gEgo:loop))
                    cel(0)
                    cycleSpeed(1)
                    setCycle(End self)
                )
            )
            (case 5
                (send gEgo:
                    setStep(-1 10)
                    setCycle(0)
                    ignoreActors()
                    illegalBits(0)
                )
                (if (== local2 1)
                    (send gEgo:setPri(4))
                    (if (< (send gEgo:x) 175)
                        (send gEgo:setMotion(JumpTo (send gEgo:x) 134 self))
                    )(else
                        (send gEgo:setMotion(JumpTo (send gEgo:x) 110 self))
                    )
                )
                (if (== local2 3)
                    (send gEgo:
                        setStep(10)
                        setMotion(MoveTo - (send gEgo:x) 32 138 self)
                    )
                )
                (if (== local2 2)
                    (send gEgo:
                        setStep(-1 15)
                        setMotion(JumpTo + (send gEgo:x) 10 + (send gEgo:y) 30 self)
                    )
                )
            )
            (case 6
                (if (== local2 3)
                    (send gEgo:
                        view(750)
                        setLoop(1)
                        setCel(2)
                    )
                    (Timer:setReal(self 3))
                    (self:state((+ state 1)))
                    (thump:play())
                )(else
                    (if (== local2 2)
                        (send gEgo:
                            view(16)
                            loop(0)
                            cel(0)
                            stopUpd()
                        )
                        (Timer:setCycle(self 2))
                    )(else
                        (send gEgo:hide())
                        (Timer:set(self 2))
                    )
                )
            )
            (case 7
                proc255_0(8 58)
                proc0_17(901 0 15 1)
                proc0_3()
            )
            (case 8
                (send gEgo:
                    view(0)
                    setStep(3 2)
                    setLoop(-1)
                    setPri(-1)
                    setCycle(Walk)
                    cycleSpeed(0)
                    ignoreActors(0)
                    illegalBits(-16384)
                )
                = global100 0
                (if (not global194)
                    (ladder:
                        setPri(8)
                        forceUpd()
                    )
                )
                = local2 0
                = local0 0
                proc0_10()
                proc255_0(8 59)
                proc0_3()
            )
        )
    )

)
(instance bleedScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:
                    view(193)
                    setLoop(0)
                    cel(0)
                    cycleSpeed(2)
                    setCycle(End self)
                )
                = local6 proc255_0(8 60 91)
            )
            (case 1
                (send gEgo:
                    setLoop(1)
                    cel(0)
                    cycleSpeed(1)
                    setCycle(Fwd)
                )
                = seconds 4
                proc0_12()
            )
            (case 2
                (send gEgo:cycleSpeed(3))
                = cycles 25
            )
            (case 3
                (send gEgo:cycleSpeed(6))
                = seconds 4
            )
            (case 4
                (send gEgo:cycleSpeed(3))
                = cycles 25
            )
            (case 5
                (send gEgo:
                    cel(0)
                    setCycle(0)
                )
                proc0_10()
                proc255_0(8 61 67 -1 20 70 280)
                proc0_17(901 0 6 8)
            )
        )
    )

)
(instance hatchScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (if (== local1 1)
                    (self:changeState(2))
                )(else
                    (hatch:stopUpd())
                )
            )
            (case 1
                (send gEgo:
                    setMotion(0)
                    posn(205 86)
                )
                proc0_2()
                proc255_0(8 62)
                = cycles 2
            )
            (case 2
                (hatch:
                    startUpd()
                    setCycle(End self)
                )
            )
            (case 3
                (if (== local1 1)
                    (self:state((+ state 1)))
                )
                = seconds 2
            )
            (case 4
                (send gEgo:
                    view(21)
                    posn(202 87)
                    setLoop(1)
                    cel(0)
                    setMotion(0)
                    setCycle(End self)
                    cycleSpeed(1)
                )
                (self:state((+ state 1)))
            )
            (case 5
                (send gEgo:
                    view(21)
                    posn(202 87)
                    setLoop(1)
                    cel(7)
                    init()
                    setPri(9)
                    setMotion(0)
                    setCycle(Beg self)
                    cycleSpeed(1)
                )
            )
            (case 6
                (if (not local1)
                    (send gLongSong:fade())
                    (if (not global231)
                        = global231 1
                        (send global1:changeScore(10))
                    )
                    (send global2:newRoom(14))
                )(else
                    = cycles 5
                )
            )
            (case 7
                (hatch:setCycle(Beg self))
                (rmScript:changeState(1))
            )
            (case 8
                (hatch:stopUpd())
            )
        )
    )

)
(instance ladderScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send global2:setScript(rmScript))
                (send gEgo:
                    setAvoider(Avoid)
                    setMotion(MoveTo 220 120 self)
                )
            )
            (case 1
                proc0_14(2 global11)
                (send global1:changeScore(5))
                (send gEgo:
                    setAvoider(0)
                    loop(1)
                )
                (ladder:
                    init()
                    ignoreActors(1)
                    stopUpd()
                )
                DisposeScript(985)
                proc0_3()
            )
        )
    )

)
(instance climbLadderScript of Script
    (properties)

    (method (changeState newState)
        (var temp0[50])
        (switch (= state newState)
            (case 0
                = global100 1
                proc0_2()
                (send gEgo:
                    view(19)
                    setLoop(0)
                    illegalBits(0)
                    ignoreActors(1)
                    x(220)
                    y(
                        (if (local0)
                            103
                        )(else
                            119
                        )
)
                    setPri(9)
                )
                (if (not local0)
                    (send gEgo:setMotion(MoveTo 220 103 self))
                )(else
                    (ladder:
                        setPri(8)
                        forceUpd()
                    )
                    (send gEgo:
                        setMotion(MoveTo 220 119 self)
                        setCycle(Rev)
                    )
                )
            )
            (case 1
                proc0_3()
                = global100 0
                (send gEgo:
                    view(0)
                    setLoop(-1)
                    setCycle(Walk)
                    setStep(3 2)
                    ignoreActors(0)
                )
                (if (not local0)
                    = local0 1
                    (ladder:
                        setPri(10)
                        forceUpd()
                    )
                    (send gEgo:
                        setPri(9)
                        illegalBits(0)
                        posn(216 89)
                    )
                    proc0_10()
                    (send global2:setScript(rmScript))
                    proc255_0(8 63)
                )(else
                    (send gEgo:
                        setPri(-1)
                        illegalBits(-16384)
                        posn(220 120)
                    )
                    = local2 0
                    = local0 0
                )
            )
        )
    )

)
(instance grabScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (claw:
                    init()
                    setMotion(MoveTo local4 local5 self)
                )
            )
            (case 1
                = cycles 15
            )
            (case 2
                (if (== global135 3)
                    (if (== global147 1)
                        (send gLongSong:
                            number(76)
                            loop(1)
                            play()
                        )
                        (send global1:changeScore(15))
                        proc0_10()
                        proc255_0(8 64)
                        = global135 4
                        = global149 global147
                    )(else
                        (send gLongSong:
                            number(76)
                            loop(1)
                            play()
                        )
                        (send global1:changeScore(-15))
                        proc0_10()
                        proc255_0(8 65)
                        (motivator:init())
                        = global149 global11
                        = global135 global147
                    )
                    = global148 4
                )(else
                    (if ((== global135 global147) and ((== global149 global11) or (== global135 4)))
                        (claw:setLoop(2))
                        (if (<> global147 1)
                            (motivator:hide())
                        )
                        = global149 0
                        = global135 3
                        = global148 5
                        (send gLongSong:
                            number(76)
                            loop(1)
                            play()
                        )
                        (send global1:changeScore(15))
                        proc0_10()
                        proc255_0(8 66)
                    )(else
                        proc255_0(8 67)
                        = global148 4
                    )
                )
                = cycles 2
            )
            (case 3
                (claw:
                    setLoop(
                        (if (== global135 3)
                            2
                        )(else
                            0
                        )
)
                    setMotion(MoveTo local4 -19 self)
                )
            )
            (case 4
                (send global2:newRoom(11))
            )
        )
    )

)
(instance ladder of View
    (properties)

    (method (init)
        (super:init())
        (self:
            view(29)
            loop(0)
            cel(
                (if (global194)
                    2
                )(else
                    1
                )
)
            ignoreActors(1)
            posn(
                (if (global194)
                    242
                )(else
                    219
                )
 
                (if (global194)
                    131
                )(else
                    114
                )
)
            setPri(
                (if (global194)
                    4
                )(else
                    (if (local0)
                        10
                    )(else
                        8
                    )
                )
)
        )
    )

)
(instance hatch of Prop
    (properties
        view 21
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setPri(8)
            posn(188 89)
            setScript(hatchScript)
            cycleSpeed(1)
        )
    )

)
(instance claw of Act
    (properties)

    (method (init)
        (super:init())
        (self:
            view(258)
            setLoop(
                (if (== global135 3)
                    2
                )(else
                    0
                )
)
            setPri(15)
            setStep(1 2)
            illegalBits(0)
            ignoreHorizon(1)
            ignoreActors(1)
            posn(local4 -19)
            setCycle(Fwd)
        )
    )

)
(instance motivator of Act
    (properties)

    (method (init)
        (super:init())
        (self:
            view(36)
            setLoop(0)
            setCel(0)
            posn(66 155)
            setStep(1 3)
            setPri(11)
            stopUpd()
        )
    )


    (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if ((<> (send pEvent:type) 128) or (send pEvent:claimed))
            return 
        )
        (if (Said('look>'))
            (if (Said('/motivator,artifact,device'))
                (if (global186)
                    proc255_0(8 68)
                )(else
                    proc255_0(8 69)
                )
            )(else
                (if (Said('/plug[<modular,8,spaceware]'))
                    proc255_0(8 70)
                )(else
                    (if (Said('[<down,below,at][/dirt,deck]'))
                        proc255_0(8 71)
                    )
                )
            )
        )(else
            (if (Said('remove,turn,get,manipulate,press,roll,drag/motivator,artifact,device'))
                proc255_0(8 72)
            )(else
                (if (Said('(turn<on),begin/motivator,artifact,device[<little,round]'))
                    proc255_0(8 73)
                )(else
                    (if (Said('remove,drag,press,get/plug[<modular,8,spaceware]'))
                        proc255_0(8 74)
                    )
                )
            )
        )
    )

)
(instance thump of Sound
    (properties
        number 56
        priority 2
    )
)
(instance thePod of Feature
    (properties
        y 104
        x 54
    )

    (method (handleEvent pEvent param2)
        (if ((send pEvent:claimed) or (<> (send pEvent:type) 128))
            return 
        )(else
            (if (Said('look/craft,chute[<little]'))
                (switch (= param2 Random(1 2))
                    (case 1
                        proc255_0(8 75)
                    )
                    (case 2
                        proc255_0(8 76)
                    )
                )
            )
        )
    )

)
(instance theMallard of Feature
    (properties
        y 106
        x 187
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed) or (<> (send pEvent:type) 128))
            return 
        )(else
            (if (Said('look/craft,aluminum[<big]'))
                proc255_0(8 5)
            )
        )
    )

)
