(version 2)
(include "sci.sh")
(exports
    0 rm49
)
(use "Main")
(use "Class_255_0")
(use "NewFeature")
(use "n958")
(use "RFeature")
(use "Cycle")
(use "Game")
(use "User")
(use "PicView")
(use "Obj")
(script 49)



(instance public rm49 of Rm
    (properties
        picture 49
        north 12
    )

    (method (init)
        (self:style(
            (switch (gGNumber)
                (case north
                    5
                )
                (case south
                    8
                )
            )
))
        proc958_0(128 249 13 14 19)
        (if (proc0_12(20))
            Load(rsVIEW 61)
        )
        proc958_0(132 14 24 9)
        (send (ScriptID(0 23)):
            number(9)
            loop(-1)
            play()
        )
        (super:init())
        (if (proc0_12(20))
            (send gAddToPics:
                add(rope (send (Clone(rope)):
                        x(159)
                        y(41)
                        yourself()
                    )
 (send (Clone(rope)):
                        cel(2)
                        x(159)
                        y(62)
                        yourself()
                    )
 (send (Clone(rope)):
                        cel(0)
                        x(159)
                        y(83)
                        yourself()
                    )
 (send (Clone(rope)):
                        x(159)
                        y(104)
                        yourself()
                    )
 (send (Clone(rope)):
                        cel(2)
                        x(159)
                        y(125)
                        yourself()
                    )
 (send (Clone(rope)):
                        cel(0)
                        x(159)
                        y(146)
                        yourself()
                    )
)
                eachElementDo(#init)
                doit()
            )
        )
        (if (proc0_12(21) and not proc0_12(24))
            (bucket:
                setPri(3)
                init()
                stopUpd()
            )
        )
        (if (proc0_12(47))
            (bucket:
                setLoop(4)
                posn(171 180)
                setCycle(Fwd)
                init()
            )
        )
        (switch (gGNumber)
            (case north
                = global130 0
                (if (proc0_12(18))
                    (send gEgo:
                        posn(159 145)
                        init()
                    )
                )(else
                    (send gEgo:
                        posn(158 152)
                        init()
                    )
                )
            )
            (default 
                (send (ScriptID(0 21)):
                    number(51)
                    loop(-1)
                    init()
                    play()
                )
                (send gEgo:
                    view(13)
                    illegalBits(-24576)
                    setStep(1 1)
                    setCycle(Fwd)
                    setPri(-1)
                    posn(158 184)
                    init()
                )
                = global130 4
            )
        )
        (water1:init())
        (well1:init())
        (if (proc0_12(19))
            (send global2:setScript(climbDownRope))
            proc0_19(96 1)
            proc0_19(73 1)
        )(else
            (if (proc0_12(18))
                (send global2:setScript(fallInBucket))
                proc0_19(96 1)
                proc0_19(73 1)
            )(else
                (if (== gGNumber north)
                    (send global2:setScript(fallThru))
                )
            )
        )
    )


    (method (doit)
        (var temp0)
        (if (script)
            (send script:doit())
        )(else
            (if (== (send gEgo:view) 13)
                (if (global136 and not --global136)
                    (send global2:setScript(drowning))
                )
            )(else
                = temp0 
                    (switch ((send ((User:alterEgo)):edgeHit))
                        (case 1
                            north
                        )
                        (case 3
                            south
                        )
                    )
                (if (temp0)
                    (self:newRoom((= temp0 
                            (switch ((send ((User:alterEgo)):edgeHit))
                                (case 1
                                    north
                                )
                                (case 3
                                    south
                                )
                            )
)))
                )
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('cast/dagger'))
                    (if ((send gEgo:has(0)))
                        proc255_0(49 0)
                    )(else
                        proc0_6()
                    )
                )(else
                    (if (Said('climb,climb<down'))
                        (if (== (send gEgo:view) 61)
                            proc255_0(49 1)
                        )(else
                            (if (proc0_12(18))
                                proc255_0(49 2)
                            )(else
                                proc255_0(49 3)
                            )
                        )
                    )(else
                        (if (Said('rub/ring'))
                            proc255_0(49 4)
                            (send pEvent:claimed(1))
                        )(else
                            (if (Said('look,look>'))
                                (if (Said('[<at,around][/room,well,cave]'))
                                    (if (>= global130 4)
                                        proc255_0(49 5)
                                    )(else
                                        (if (proc0_12(18))
                                            proc255_0(49 6)
                                        )(else
                                            proc255_0(49 7)
                                        )
                                    )
                                )(else
                                    (if (Said('<up'))
                                        proc255_0(49 8)
                                    )(else
                                        (if (Said('<down'))
                                            (if (>= global130 4)
                                                proc255_0(49 9)
                                            )(else
                                                proc255_0(49 10)
                                                (send pEvent:claimed(1))
                                            )
                                        )(else
                                            (if (Said('/bucket'))
                                                (if (proc0_12(18))
                                                    proc255_0(49 11)
                                                )(else
                                                    (send pEvent:claimed(0))
                                                )
                                            )(else
                                                (if (Said('/algae,algae'))
                                                    proc255_0(49 12)
                                                )
                                            )
                                        )
                                    )
                                )
                            )(else
                                (if (Said('swim<cease'))
                                    (switch ((send gEgo:view))
                                        (case 13
                                            proc255_0(49 13)
                                        )
                                        (default 
                                            proc255_0(49 14)
                                        )
                                    )
                                )(else
                                    (if (Said('swim'))
                                        (switch ((send gEgo:view))
                                            (case 13
                                                proc255_0(49 15)
                                            )
                                            (case 61
                                                proc255_0(49 16)
                                            )
                                            (case 14
                                                = global130 4
                                                (send (ScriptID(0 21)):
                                                    number(51)
                                                    loop(-1)
                                                    play()
                                                )
                                                (send gEgo:
                                                    show()
                                                    view(13)
                                                    illegalBits(-24576)
                                                    setStep(1 1)
                                                    setCycle(Fwd)
                                                    setLoop(-1)
                                                    setCel(-1)
                                                    setPri(-1)
                                                    cycleSpeed(0)
                                                )
                                                = global136 3000
                                                (send global2:setScript(0))
                                                proc0_3()
                                            )
                                            (default 
                                                proc255_0(49 17)
                                            )
                                        )
                                    )(else
                                        (if (Said('dive'))
                                            (switch ((send gEgo:view))
                                                (case 13
                                                    proc0_19(97 4)
                                                    (send global2:newRoom(52))
                                                )
                                                (default 
                                                    proc255_0(49 18)
                                                )
                                            )
                                        )(else
                                            (if (Said('climb,climb/wall'))
                                                (switch ((send gEgo:view))
                                                    (case 13
                                                        = global136 0
                                                        (send global2:setScript(climbWall))
                                                    )
                                                    (case 14
                                                        proc255_0(49 19)
                                                    )
                                                    (default 
                                                        proc255_0(49 20)
                                                    )
                                                )
                                            )(else
                                                (if (Said('get,get/rope'))
                                                    (if (not proc0_12(20))
                                                        proc255_0(49 21)
                                                    )(else
                                                        proc255_0(49 22)
                                                    )
                                                )(else
                                                    (if (Said('get,get,jump,climb,climb[<up]/rope') or Said('climb,climb,get,get,jump[<up]//rope'))
                                                        (if (not proc0_12(20))
                                                            proc255_0(49 21)
                                                        )(else
                                                            (switch ((send gEgo:view))
                                                                (case 61
                                                                    = global136 0
                                                                    (send global2:setScript(climbUpRope))
                                                                )
                                                                (case 13
                                                                    = global136 0
                                                                    proc255_0(49 23)
                                                                    (User:canControl(0))
                                                                    (send gEgo:
                                                                        view(61)
                                                                        ignoreHorizon(1)
                                                                        ignoreActors(1)
                                                                        setMotion(0)
                                                                        illegalBits(0)
                                                                        setLoop(0)
                                                                        setCel(0)
                                                                        posn(158 102)
                                                                        setStep(1 2)
                                                                        setCycle(Walk)
                                                                        setPri(4)
                                                                    )
                                                                    = global130 0
                                                                    (climbDownRope:start(1))
                                                                    (send global2:setScript(climbDownRope))
                                                                )
                                                                (case 14
                                                                    proc255_0(49 24)
                                                                )
                                                                (default 
                                                                    proc255_0(49 25)
                                                                )
                                                            )
                                                        )
                                                    )(else
                                                        (if (Said('cut/rope'))
                                                            (if (not proc0_12(20))
                                                                proc255_0(49 21)
                                                            )(else
                                                                (if (not (send gEgo:has(0)))
                                                                    proc255_0(49 26)
                                                                )(else
                                                                    proc255_0(49 27)
                                                                )
                                                            )
                                                        )(else
                                                            (if (Said('enter,(get,get,jump,climb,climb,sit<in,onto,in)/bucket'))
                                                                (if (proc0_12(21))
                                                                    (switch ((send gEgo:view))
                                                                        (case 249
                                                                            proc255_0(49 28)
                                                                        )
                                                                        (case 14
                                                                            proc255_0(49 19)
                                                                        )
                                                                        (case 13
                                                                            (if ((<> (bucket:loop) 4) and not proc0_12(24))
                                                                                proc255_0(49 29)
                                                                                = global136 0
                                                                                (send global2:setScript(sitBucket))
                                                                            )(else
                                                                                proc255_0(49 30)
                                                                            )
                                                                        )
                                                                        (default 
                                                                            (if (<> (bucket:loop) 4)
                                                                                = global136 0
                                                                                (send global2:setScript(sitBucket))
                                                                            )(else
                                                                                proc255_0(49 31)
                                                                            )
                                                                        )
                                                                    )
                                                                )(else
                                                                    (if (proc0_12(47))
                                                                        proc255_0(49 32)
                                                                    )(else
                                                                        proc255_0(49 33)
                                                                    )
                                                                )
                                                            )(else
                                                                (if (Said('climb,climb/water'))
                                                                    proc255_0(49 34)
                                                                )(else
                                                                    (if (Said('climb,climb[<up]'))
                                                                        (if (== (send gEgo:view) 14)
                                                                            proc255_0(49 35)
                                                                        )(else
                                                                            = global136 0
                                                                            (send global2:setScript(
                                                                                (switch ((send gEgo:view))
                                                                                    (case 13
                                                                                        climbWall
                                                                                    )
                                                                                    (case 61
                                                                                        climbUpRope
                                                                                    )
                                                                                    (default 
                                                                                        climbUpRope
                                                                                    )
                                                                                )
))
                                                                        )
                                                                    )(else
                                                                        (if (Said('get,get/water') or Said('fill/bucket'))
                                                                            (if (== (send gEgo:view) 14)
                                                                                proc255_0(49 19)
                                                                            )(else
                                                                                (if (<> (send gEgo:view) 13)
                                                                                    proc255_0(49 36)
                                                                                )(else
                                                                                    (if ((send gEgo:has(8)))
                                                                                        (if (proc0_12(9))
                                                                                            proc255_0(49 37)
                                                                                        )(else
                                                                                            proc255_0(49 38)
                                                                                            proc0_20(1)
                                                                                        )
                                                                                    )(else
                                                                                        proc255_0(49 39)
                                                                                    )
                                                                                )
                                                                            )
                                                                        )(else
                                                                            (if (Said('get,get/drink') or Said('drink/water'))
                                                                                (if (== (send gEgo:view) 14)
                                                                                    proc255_0(49 19)
                                                                                )(else
                                                                                    (if (<> (send gEgo:view) 13)
                                                                                        (if ((send gEgo:has(8)) and proc0_12(9))
                                                                                            proc255_0(49 40)
                                                                                            proc0_20(0)
                                                                                        )(else
                                                                                            proc255_0(49 36)
                                                                                        )
                                                                                    )(else
                                                                                        proc255_0(49 41)
                                                                                    )
                                                                                )
                                                                            )(else
                                                                                (if (Said('jump'))
                                                                                    proc255_0(49 42)
                                                                                )(else
                                                                                    (if (Said('get,get<out/bucket'))
                                                                                        (if (<> (send gEgo:view) 249)
                                                                                            proc255_0(49 43)
                                                                                        )(else
                                                                                            proc255_0(49 44)
                                                                                        )
                                                                                    )(else
                                                                                        (if (Said('get,get/bucket'))
                                                                                            (if ((send gEgo:has(8)))
                                                                                                proc255_0(49 45)
                                                                                            )(else
                                                                                                (if (== 4 (bucket:loop))
                                                                                                    (send (ScriptID(0 21)):
                                                                                                        number(105)
                                                                                                        loop(1)
                                                                                                        init()
                                                                                                        play()
                                                                                                    )
                                                                                                    proc255_0(49 46)
                                                                                                    proc0_19(95 2)
                                                                                                    (send gEgo:get(8))
                                                                                                    proc0_11(47)
                                                                                                    proc0_10(24)
                                                                                                    (bucket:dispose())
                                                                                                )(else
                                                                                                    proc255_0(49 47)
                                                                                                )
                                                                                            )
                                                                                        )(else
                                                                                            (if (Said('tie,drop,drop/bucket'))
                                                                                                (if ((send gEgo:has(8)))
                                                                                                    proc255_0(49 48)
                                                                                                )(else
                                                                                                    proc0_6()
                                                                                                )
                                                                                            )
                                                                                        )
                                                                                    )
                                                                                )
                                                                            )
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance bucket of Actor
    (properties
        x 159
        y 165
        view 249
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('enter,(get,get,climb,climb<in,onto,in)/bucket'))
                    (send pEvent:claimed(0))
                )(else
                    (if (Said('look,look/bucket'))
                        (self:doVerb(1))
                    )
                )
            )
        )
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                proc255_0(49 49)
            )
        )
    )

)
(instance rope of RPicView
    (properties
        x 159
        y 20
        view 249
        loop 1
        cel 1
        priority 2
    )

    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('look,look/rope'))
                    (self:doVerb(1))
                )
            )
        )
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 1
                proc255_0(49 50)
            )
        )
    )

)
(instance fallThru of Script
    (properties)

    (method (doit param1)
        (super:doit(rest param1))
        (send gEgo:setStep(1 (+ (send gEgo:yStep) 1)))
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:
                    ignoreHorizon(1)
                    ignoreActors(1)
                    illegalBits(0)
                    view(14)
                    setLoop(1)
                    setCel(0)
                    posn(158 -4)
                    setStep(1 2)
                    setCycle(0)
                    setPri(1)
                    setMotion(MoveTo 158 184 self)
                )
            )
            (case 1
                (send (ScriptID(0 21)):
                    number(14)
                    loop(1)
                    init()
                    play()
                )
                (send gEgo:
                    setCel(-1)
                    ignoreActors(0)
                    setCycle(End self)
                )
            )
            (case 2
                = seconds 3
            )
            (case 3
                (User:canInput(1))
                (send (ScriptID(0 21)):
                    number(96)
                    play()
                )
                (send gEgo:
                    cycleSpeed(1)
                    setLoop(0)
                    setCycle(End self)
                )
            )
            (case 4
                (send gEgo:
                    setLoop(0)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 5
                (send gEgo:hide())
                = cycles 9
            )
            (case 6
                (send gEgo:
                    show()
                    setLoop(0)
                    cel(0)
                    setCycle(End)
                )
                = seconds 3
            )
            (case 7
                proc0_16("You've sunk your chances for saving Daventry.")
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('dive,swim'))
                    proc255_0(49 51)
                )
            )
        )
    )

)
(instance climbDownRope of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:
                    view(61)
                    ignoreHorizon(1)
                    ignoreActors(1)
                    illegalBits(0)
                    setLoop(0)
                    setCel(0)
                    posn(158 -4)
                    setPri(4)
                    setStep(1 3)
                    setCycle(Walk)
                    setMotion(MoveTo 158 102 self)
                )
            )
            (case 1
                proc0_3()
                (User:canControl(0))
            )
        )
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('enter,(climb,climb,get,get<in,in,onto)/bucket'))
                    (if (proc0_12(24))
                        proc255_0(49 52)
                    )(else
                        (if (proc0_12(21))
                            (if (<> (bucket:loop) 4)
                                = global136 0
                                (send global2:setScript(sitBucket))
                            )(else
                                proc255_0(49 31)
                            )
                        )(else
                            (if (proc0_12(47))
                                proc255_0(49 32)
                            )(else
                                proc255_0(49 53)
                            )
                        )
                    )
                )(else
                    (if (Said('climb,climb[<up]'))
                        = global136 0
                        (send global2:setScript(climbUpRope))
                    )(else
                        (if ((((Said('jump') or Said('exit[/bucket]')) or Said('free[/rope]')) or Said('go,enter,drop[<in][/water]')) or ((== (send gEgo:view) 61) and Said('let//go')))
                            = global136 0
                            (send global2:setScript(jumpInWater))
                        )(else
                            (if (Said('look,look>'))
                                (if (Said('<up'))
                                    (send pEvent:claimed(0))
                                )(else
                                    (if (Said('[<at,around][/room,well]'))
                                        proc255_0(49 54)
                                    )(else
                                        (if (Said('/rope'))
                                            proc255_0(49 55)
                                        )(else
                                            (if (Said('/water'))
                                                proc255_0(49 56)
                                            )(else
                                                (if (Said('/bucket'))
                                                    (if (proc0_12(21) and not (send gEgo:has(8)))
                                                        proc255_0(49 57)
                                                    )(else
                                                        (send pEvent:claimed(0))
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance climbUpRope of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_10(19)
                proc0_11(18)
                (send (ScriptID(0 21)):stop())
                (if (== (send gEgo:view) 249)
                    (bucket:init())
                )
                proc0_2()
                (send gEgo:
                    view(61)
                    ignoreHorizon(1)
                    ignoreActors(1)
                    illegalBits(0)
                    setLoop(0)
                    setCel(0)
                    posn(158 102)
                    setStep(1 2)
                    setCycle(Walk)
                    setPri(4)
                    setMotion(MoveTo 158 -4 self)
                )
            )
            (case 1
                proc0_3()
                = global130 0
                (send global2:newRoom(12))
            )
        )
    )

)
(instance fallInBucket of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send (ScriptID(0 21)):
                    number(24)
                    init()
                    play()
                    fade()
                )
                = cycles 3
            )
            (case 1
                (send gEgo:
                    ignoreActors()
                    illegalBits(0)
                    view(249)
                    setLoop(0)
                    setCel(1)
                    setPri(4)
                    cycleSpeed(1)
                    setMotion(MoveTo 159 165 self)
                )
            )
            (case 2
                proc0_10(21)
                = global136 0
                (send global2:setScript(sitBucket))
            )
        )
    )

)
(instance sitBucket of Script
    (properties)

    (method (init param1)
        proc0_11(19)
        (super:init(rest param1))
        proc0_3()
        (User:canControl(0))
        (send (ScriptID(0 21)):stop())
        (send gEgo:
            ignoreActors()
            illegalBits(0)
            view(249)
            setLoop(0)
            setCel(1)
            setCycle(0)
            setMotion(0)
            cycleSpeed(0)
            setPri(4)
            posn(159 165)
        )
        = global130 0
        (bucket:dispose())
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )(else
            (if ((super:handleEvent(pEvent)))
                return 
            )(else
                (if (Said('climb,climb[<up]/rope'))
                    proc0_11(18)
                    (bucket:
                        init()
                        stopUpd()
                    )
                    = global136 0
                    (send global2:setScript(climbUpRope))
                )(else
                    (if ((((Said('jump') or Said('exit[/bucket]')) or Said('free[/rope]')) or Said('go,enter,drop[<in][/water]')) or ((== (send gEgo:view) 61) and Said('let//go')))
                        (bucket:
                            init()
                            stopUpd()
                        )
                        proc0_11(18)
                        = global136 0
                        (send global2:setScript(jumpInWater))
                    )(else
                        (if (Said('cut/rope'))
                            (if ((send gEgo:has(0)))
                                (bucket:
                                    init()
                                    stopUpd()
                                )
                                proc0_11(18)
                                = global136 0
                                proc0_11(21)
                                (send global2:setScript(cutOffBucket))
                            )(else
                                proc255_0(49 26)
                            )
                        )(else
                            (if (Said('stand'))
                                proc255_0(49 58)
                            )(else
                                (if (Said('look,look>'))
                                    (if (Said('<up'))
                                        (send pEvent:claimed(0))
                                    )(else
                                        (if (Said('/rope'))
                                            proc255_0(49 55)
                                        )(else
                                            (if (Said('/water') or Said('<down'))
                                                proc255_0(49 59)
                                            )(else
                                                (if (Said('[/around,well]'))
                                                    proc255_0(49 60)
                                                )(else
                                                    (send pEvent:claimed(0))
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

)
(instance jumpInWater of Script
    (properties)

    (method (doit param1)
        (super:doit(rest param1))
        (if (< state 3)
            (send gEgo:setStep(1 (+ (send gEgo:yStep) 1)))
        )
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (if (== (send gEgo:view) 61)
                    proc0_11(19)
                    (send gEgo:posn(164 146))
                )
                (send gEgo:
                    ignoreHorizon(1)
                    ignoreActors(1)
                    illegalBits(0)
                    view(14)
                    setLoop(1)
                    setCel(0)
                    setCycle(0)
                    setPri(13)
                    setStep(1 4)
                    moveSpeed(0)
                    setMotion(MoveTo 150 186 self)
                )
            )
            (case 1
                (send (ScriptID(0 21)):
                    number(14)
                    loop(1)
                    init()
                    play()
                )
                (send gEgo:
                    setCel(-1)
                    setCycle(End self)
                )
            )
            (case 2
                = global130 4
                = seconds 3
            )
            (case 3
                (send (ScriptID(0 21)):
                    number(51)
                    loop(-1)
                    play()
                )
                (send gEgo:
                    show()
                    view(13)
                    illegalBits(-24576)
                    setStep(1 1)
                    setCycle(Fwd)
                    setLoop(-1)
                    setCel(-1)
                    setPri(-1)
                    cycleSpeed(0)
                    ignoreActors(0)
                )
                = global136 3000
                (send global2:setScript(0))
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance splashBucket of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = cycles 3
            )
            (case 1
                proc0_10(47)
                (bucket:
                    view(249)
                    setLoop(2)
                    setCel(0)
                    ignoreActors()
                    setMotion(MoveTo 170 186 self)
                )
            )
            (case 2
                (send (ScriptID(0 21)):
                    number(14)
                    loop(1)
                    init()
                    play()
                )
                (bucket:
                    setLoop(3)
                    setCycle(End self)
                )
            )
            (case 3
                (bucket:
                    setLoop(4)
                    ignoreActors(0)
                    setCycle(Fwd)
                    setMotion(MoveTo 171 180 self)
                )
            )
            (case 4
                (self:dispose())
            )
        )
    )

)
(instance cutOffBucket of Script
    (properties)

    (method (doit param1)
        (super:doit(rest param1))
        (if (< state 3)
            (send gEgo:setStep(1 (+ (send gEgo:yStep) 1)))
        )
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (bucket:setScript(splashBucket))
                (send gEgo:
                    ignoreHorizon(1)
                    ignoreActors(1)
                    illegalBits(0)
                    view(14)
                    setLoop(1)
                    setCel(0)
                    setCycle(0)
                    setPri(13)
                    setStep(1 4)
                    moveSpeed(0)
                    setMotion(MoveTo 150 186 self)
                )
            )
            (case 1
                (send (ScriptID(0 21)):
                    number(14)
                    loop(1)
                    init()
                    play()
                )
                (send gEgo:
                    setCel(-1)
                    ignoreActors(0)
                    setCycle(End self)
                )
            )
            (case 2
                = seconds 3
            )
            (case 3
                (send (ScriptID(0 21)):
                    number(51)
                    loop(-1)
                    play()
                )
                (send gEgo:
                    show()
                    view(13)
                    illegalBits(-24576)
                    setStep(1 1)
                    setCycle(Fwd)
                    setLoop(-1)
                    setCel(-1)
                    setPri(-1)
                    cycleSpeed(0)
                )
                = global136 3000
                = global130 4
                (send global2:setScript(0))
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance climbWall of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (if (proc0_12(47))
                    proc255_0(49 61)
                    (self:dispose())
                )(else
                    proc0_2()
                    (send gEgo:
                        view(13)
                        setStep(1 1)
                        illegalBits(0)
                        setMotion(MoveTo 159 176 self)
                    )
                )
            )
            (case 1
                (send (ScriptID(0 21)):stop())
                (send gEgo:
                    setPri(1)
                    view(19)
                    setLoop(0)
                    posn(159 180)
                    setStep(2 2)
                    setCycle(Fwd)
                    setMotion(MoveTo 159 156 self)
                )
            )
            (case 2
                (send gEgo:
                    setCycle(0)
                    setMotion(MoveTo 159 180 self)
                )
            )
            (case 3
                proc255_0(49 62)
                (send (ScriptID(0 21)):
                    number(51)
                    loop(-1)
                    init()
                    play()
                )
                (send gEgo:
                    illegalBits(-24576)
                    view(13)
                    setStep(1 1)
                    setCel(-1)
                    setLoop(-1)
                    setCycle(Fwd)
                )
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance well1 of NewFeature
    (properties
        x 158
        y 94
        noun 7366
        nsTop -1
        nsLeft 117
        nsBottom 189
        nsRight 200
        description 7563
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        contClick 371
        lookStr 7568
    )
)
(instance water1 of NewFeature
    (properties
        x 158
        y 183
        noun 7380
        nsTop 177
        nsLeft 128
        nsBottom 189
        nsRight 188
        description 7640
        sightAngle 360
        getableDist 320
        seeableDist 320
        shiftClick 369
        lookStr 7646
    )
)
(instance drowning of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (User:canControl(0))
                (send (ScriptID(0 21)):
                    number(96)
                    loop(1)
                    init()
                    play()
                )
                (send gEgo:
                    setMotion(0)
                    setLoop(0)
                    view(14)
                    cel(5)
                    cycleSpeed(1)
                    setCycle(End self)
                )
            )
            (case 1
                (send gEgo:
                    cel(5)
                    setCycle(End self)
                )
            )
            (case 2
                (send gEgo:
                    cel(5)
                    setCycle(End self)
                )
            )
            (case 3
                (send gEgo:hide())
                = seconds 4
            )
            (case 4
                (if (not global136)
                    proc0_16("After swimming for a long time, your strength ebbs and your arms and legs grow weary.  As your life swims before your eyes, you decide to...")
                )(else
                    proc0_16("You splash around for awhile, but unfortunately that won't keep your head above water.  As you go down for the third time, a sense of peace washes over you...")
                )
            )
        )
    )

)
