(version 2)
(include "sci.sh")
(exports
    0 rm380
)
(use "Main")
(use "TargFeature")
(use "n026")
(use "Blink")
(use "Scaler")
(use "PolyPath")
(use "Polygon")
(use "CueObj")
(use "ForwardCounter")
(use "n958")
(use "Jump")
(use "Cycle")
(use "Game")
(use "User")
(use "View")
(use "Obj")
(script 380)


(local
    local0
    local1
    local2
    local3

)
(instance public rm380 of Rm
    (properties
        noun 5
        picture 380
    )

    (method (init)
        proc0_2()
        = global426 0
        proc958_0(130 956 991)
        (send gOwner:
            x(164)
            y(68)
            setScale(Scaler 75 50 95 0)
            init()
            normalize(2)
        )
        (super:init())
        (send gLongSong:
            number(380)
            setLoop(-1)
            play(127)
        )
        (send global2:addObstacle((send ((Polygon:new())):
                type(3)
                init(0 92 85 92 81 103 60 109 70 115 70 136 140 179 177 184 251 184 293 152 232 110 141 96 133 87 178 80 178 76 227 76 263 69 287 71 319 53 319 1 0 1)
                yourself()
            )
))
        (if (proc0_6(52))
            = local3 1
        )
        (if (proc0_6(55))
            = local3 2
        )
        (if (proc0_6(148))
            = local3 3
        )
        (holes:init())
        (sky:init())
        (switch (local3)
            (case 0
                (bat1:
                    setPri(14)
                    init()
                    stopUpd()
                )
                (bat2:
                    setPri(14)
                    init()
                    stopUpd()
                )
                (bat3:
                    setPri(14)
                    init()
                    stopUpd()
                )
                (smallBat:
                    setPri(14)
                    init()
                    stopUpd()
                )
                (mainVine:init())
                (vine1:
                    init()
                    stopUpd()
                )
                (vine2:
                    init()
                    stopUpd()
                )
                (vine3:
                    init()
                    stopUpd()
                )
                (vine4:
                    init()
                    stopUpd()
                )
                (vine5:
                    init()
                    stopUpd()
                )
            )
            (case 1
                (mainVine:init())
                (send gOwner:code(ambushChek))
            )
            (case 2
                (if (not proc0_6(148))
                    (stoneRing:
                        setPri(14)
                        init()
                        approachVerbs(4)
                        stopUpd()
                    )
                )
                (smallBat:
                    setPri(14)
                    init()
                    stopUpd()
                    setScript(thankYou)
                )
            )
        )
        proc0_2()
        (self:setScript(egoEnters))
    )


    (method (doit)
        (if (not (== global2 script) and ((not (== (send global2:script) egoEnters) and (& (send gOwner:onControl(1)) $0004)) or (< (send gOwner:y) 65)))
            (send global2:setScript(getOut))
        )
        (super:doit())
    )


    (method (dispose param1)
        proc0_4(54)
        (if (gNewList)
            (send gNewList:eachElementDo(111))
        )
        proc958_0(0 956 991 37)
        (super:dispose(rest param1))
    )


    (method (doVerb theVerb param2)
        return 
            (switch (theVerb)
                (case 81
                    (if (not (send global2:script))
                        (send global2:setScript(blastVine 0 theVerb))
                    )
                )
                (case 83
                    (if (not (send global2:script))
                        (send global2:setScript(blastVine 0 theVerb))
                    )
                )
                (case 88
                    (if (not (send global2:script))
                        (send global2:setScript(blastVine 0 theVerb))
                    )
                )
                (case 20
                    (if (not (send global2:script))
                        ++global426
                        (send global2:setScript(blastVine 0 theVerb))
                    )
                )
                (case 33
                    (if (not (send global2:script))
                        (send global2:setScript(blastVine 0 theVerb))
                    )
                )
                (case 1
                    (if (not local0)
                        (send gQg3Messager:say(5 1))
                    )(else
                        (send gQg3Messager:say(5 1 15))
                    )
                    return 1
                )
                (case 75
                    (send gQg3Messager:say(1 6 18))
                )
                (case 4
                    (if ((> (send ((User:curEvent)):y) 30) and (== (grabEgo:state) -1))
                        (send global2:setScript(getRocks))
                    )(else
                        (super:doVerb(theVerb rest param2))
                    )
                )
                (default 
                    (super:doVerb(theVerb rest param2))
                )
            )
    )

)
(instance getOut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:get(10 global426))
                = seconds 1
            )
            (case 1
                = global426 0
                (send gLongSong2:setLoop(1))
                (send global2:newRoom(150))
            )
        )
    )

)
(instance thankYou of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = seconds 5
            )
            (case 1
                (send client:setCycle(End self))
            )
            (case 2
                (send client:dispose())
            )
        )
    )

)
(instance savedBatEntrance of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(PolyPath 120 110 self))
            )
            (case 1
                (send gQg3Messager:say(1 6 17 0 self))
            )
            (case 2
                (smallBat:setCycle(End self))
            )
            (case 3
                (smallBat:dispose())
                (self:dispose())
            )
        )
    )

)
(instance blastVine of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = local0 1
                proc0_2()
                (self:setScript(ScriptID(32 0) self register))
            )
            (case 1
                (send gOwner:normalize())
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance throwHook of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (if ((send gOwner:has(35)))
                    (self:dispose())
                )
                proc0_2()
                (send gOwner:setMotion(PolyPath 90 72 self))
            )
            (case 1
                (send gOwner:setMotion(PolyPath 93 89 self))
            )
            (case 2
                (send gOwner:
                    view(8)
                    setLoop(4)
                    setCycle(End self)
                )
                (send gLongSong2:
                    number(721)
                    setLoop(1)
                    play(127)
                )
            )
            (case 3
                (grapThingy:
                    x(95)
                    y(79)
                    setLoop(6)
                    setScale()
                    init()
                    setMotion(JumpTo 165 143 self)
                )
            )
            (case 4
                (mainVine:cel(1))
                (mainVine:setScript(vinesTwist))
                (send gOwner:setCycle(Beg))
                (grapThingy:setMotion(JumpTo 95 79 self))
                (send gLongSong2:
                    number(511)
                    setLoop(1)
                    play(127)
                )
            )
            (case 5
                (grapThingy:dispose())
                (send gQg3Messager:say(1 6 11 0 self))
            )
            (case 6
                (send gOwner:
                    get(35)
                    solvePuzzle(256 8)
                    normalize()
                )
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance egoHacksBat of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                proc0_5(55)
                (flutterBackToRock:dispose())
                (send gOwner:setMotion(PolyPath 104 178 self))
            )
            (case 1
                (send gOwner:
                    view(385)
                    loop(1)
                    cel(0)
                    setCycle(End self)
                )
                (send gLongSong2:
                    number(520)
                    setLoop(1)
                    play(127)
                )
            )
            (case 2
                (send gOwner:setCycle(Beg self))
            )
            (case 3
                (send gQg3Messager:say(1 6 9 0 self))
            )
            (case 4
                (if ((((== global125 0) and not (send gOwner:has(16))) and (send gOwner:code(ambushChek))) and (mainVine:
                    init()
                    setCycle(Beg)
                )
)
                )
                (send gOwner:normalize())
                (smallBat:dispose())
                proc0_4(52)
                proc0_4(19)
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance flutterBackToRock of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (smallBat:
                    loop(6)
                    cel(8)
                    setCycle(Beg self)
                )
            )
            (case 1
                (send gLongSong2:
                    number(383)
                    setLoop(1)
                    play(127)
                )
                (smallBat:
                    loop(5)
                    setMotion(JumpTo 79 167 self)
                )
                (send gOwner:code(egoChek))
            )
            (case 2
                (smallBat:
                    loop(1)
                    cel(0)
                )
                = seconds 30
            )
            (case 3
                (send gLongSong2:stop())
                (smallBat:
                    loop(0)
                    setCycle(End self)
                )
            )
            (case 4
                (smallBat:hide())
                (self:dispose())
            )
        )
    )

)
(instance smallBatJump of Script
    (properties)

    (method (doit)
        (if (== local0 1)
            proc0_4(55)
            (if (not proc0_6(257))
                (send gOwner:addHonor(20))
            )
            (send gOwner:solvePuzzle(257 8 9))
            (smallBat:setCycle(0))
            (self:dispose())
        )
        (super:doit())
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                = seconds 7
            )
            (case 1
                (send gOwner:code(0))
                (smallBat:
                    loop(2)
                    setCycle(End self)
                )
            )
            (case 2
                (send gLongSong2:
                    number(383)
                    setLoop(1)
                    play(127)
                )
                (smallBat:
                    setLoop(4)
                    setCycle(Fwd)
                    setMotion(JumpTo 163 147 self)
                )
            )
            (case 3
                (smallBat:setMotion(MoveTo 192 126 self))
            )
            (case 4
                (mainVine:setCycle(Fwd))
                (vine4:
                    setPri(+ (smallBat:priority) 1)
                    setCycle(Fwd)
                )
                (smallBat:
                    cycleSpeed(6)
                    loop(4)
                    setCycle(End self)
                )
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
            )
            (case 5
                proc0_3()
                (send gLongSong2:
                    number(382)
                    setLoop(-1)
                    play(127)
                )
                (if (> (send gGame:detailLevel()) 2)
                    (smallBat:setCycle(Fwd))
                )(else
                    (smallBat:stopUpd())
                )
                = seconds 20
            )
            (case 6
                (smallBat:setCycle(End self))
            )
            (case 7
                (vine4:
                    loop(5)
                    setCycle(End self)
                )
            )
            (case 8
                (mainVine:setCycle(0))
                (smallBat:hide())
                (send gLongSong2:stop())
                proc0_4(52)
                (if (not local2)
                    proc0_3()
                )
                (self:dispose())
            )
        )
    )

)
(instance ambush of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc958_0(128 6)
                proc0_2()
                (vine1:
                    loop(2)
                    cel(5)
                    init()
                    setCycle(Beg)
                )
                (vine2:
                    loop(3)
                    cel(5)
                    init()
                    setCycle(Beg)
                )
                (vine3:
                    loop(2)
                    cel(5)
                    init()
                    setCycle(Beg)
                )
                (vine4:
                    loop(3)
                    cel(4)
                    init()
                    setCycle(Beg)
                )
                (vine5:
                    loop(2)
                    cel(5)
                    init()
                    setCycle(Beg)
                )
                (mainVine:
                    setLoop(0)
                    setCycle(Fwd)
                )
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
                (send gOwner:
                    view(11)
                    setCycle(End self)
                )
            )
            (case 1
                (vine1:
                    loop(0)
                    setCycle(Fwd)
                )
                (vine2:
                    loop(0)
                    setCycle(Fwd)
                )
                (vine3:
                    loop(0)
                    setCycle(Fwd)
                )
                (vine4:
                    loop(0)
                    setCycle(Fwd)
                )
                (vine5:
                    loop(0)
                    setCycle(Fwd)
                )
                (send gOwner:
                    cycleSpeed(8)
                    setCycle(ForwardCounter 3 self)
                )
                (send gLongSong2:
                    number(918)
                    setLoop(-1)
                    play(127)
                )
            )
            (case 2
                (send gOwner:
                    view(6)
                    setCycle(End self)
                )
            )
            (case 3
                proc26_0(6 0 386 End)
                (self:dispose())
            )
        )
    )

)
(instance chopVines of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                = local0 1
                (grabEgo:dispose())
                (send gOwner:
                    view(385)
                    loop(0)
                    cel(0)
                    setCycle(End self)
                )
                (send gLongSong2:
                    number(520)
                    setLoop(1)
                    play(127)
                )
            )
            (case 1
                (mainVine:setScript(vinesGoDown))
                (send gOwner:setCycle(Beg self))
            )
            (case 2
                (if (not (send gGQg3KDHandler:contains(smallBat)))
                    (send gOwner:code(egoChek))
                )
                (send gOwner:normalize())
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance vinesGoDown of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = local0 1
                (vine1:
                    loop(2)
                    cel(0)
                    setCycle(End)
                    ignoreActors(1)
                )
                (vine2:
                    loop(3)
                    cel(0)
                    setCycle(End)
                    ignoreActors(1)
                )
                (vine3:
                    loop(2)
                    cel(0)
                    setCycle(End)
                    ignoreActors(1)
                )
                (vine4:
                    loop(3)
                    cel(0)
                    setCycle(End)
                    ignoreActors(1)
                )
                (vine5:
                    loop(2)
                    cel(0)
                    setCycle(End)
                    ignoreActors(1)
                )
                (mainVine:
                    loop(1)
                    cel(0)
                    setCycle(End self)
                    ignoreActors(1)
                )
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
            )
            (case 1
                = seconds 1
            )
            (case 2
                (vine1:stopUpd())
                (vine2:stopUpd())
                (vine3:stopUpd())
                (vine4:stopUpd())
                (vine5:stopUpd())
                (mainVine:stopUpd())
                (if (proc0_6(55))
                    (smallBat:setScript(flutterBackToRock))
                )
                (self:dispose())
            )
        )
    )

)
(instance grabEgo of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(0))
                proc0_4(115)
                = local2 1
                (vine3:setCycle(End self))
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
            )
            (case 1
                (send gQg3Messager:say(1 6 3 0 self))
            )
            (case 2
                (send gOwner:
                    view(11)
                    cycleSpeed(8)
                    setCycle(Fwd)
                    setMotion(MoveTo 115 93)
                )
                proc0_3()
                (send gMainIconBar:
                    disable(1 6 5 3)
                    advanceCurIcon()
                )
                (vine3:setCycle(Fwd))
                (mainVine:setCycle(Fwd))
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
                = seconds 1
            )
            (case 3
                (if (<= gGOwnerMaxStamina[16] 1)
                    proc26_0(7 0 386 End)
                )
                (send gOwner:takeDamage(1))
                = seconds 1
            )
            (case 4
                = state (- state 2)
                (self:cue())
            )
        )
    )

)
(instance egoEnters of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gOwner:setMotion(MoveTo (send gOwner:x) 80 self))
            )
            (case 1
                = cycles 10
            )
            (case 2
                (if (not proc0_6(54))
                    (send gQg3Messager:say(1 6 2 0 self))
                )(else
                    (self:cue())
                )
            )
            (case 3
                (if (proc0_6(150))
                    (send gQg3Messager:say(1 6 14 0 self))
                )(else
                    (self:cue())
                )
            )
            (case 4
                (if (== local3 2)
                    (send gOwner:setScript(savedBatEntrance))
                    proc0_3()
                )(else
                    (if ((proc0_6(52) and (== global125 0)) and not (send gOwner:has(16)))
                        (send gOwner:code(ambushChek))
                        proc0_3()
                    )(else
                        (if (not proc0_6(52) and not proc0_6(55))
                            (bat1:setScript(bat1Hoark))
                            (send gLongSong2:
                                number(381)
                                setLoop(1)
                                play(127)
                            )
                            (send gOwner:code(egoChek))
                        )(else
                            proc0_3()
                        )
                    )
                )
                (self:dispose())
            )
        )
    )

)
(instance vinesTwist of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (mainVine:setCycle(End))
                (if ((send gGQg3KDHandler:contains(vine1)))
                    (vine1:setCycle(End))
                    (vine2:setCycle(End))
                    (vine3:setCycle(End))
                    (vine4:setCycle(End))
                    (vine5:setCycle(End self))
                )
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
            )
            (case 1
                (mainVine:setCycle(Beg))
                (if ((send gGQg3KDHandler:contains(vine1)))
                    (vine1:setCycle(Beg))
                    (vine2:setCycle(Beg))
                    (vine3:setCycle(Beg))
                    (vine5:setCycle(Beg))
                )
                (send gLongSong2:
                    number(918)
                    setLoop(1)
                    play(127)
                )
                = seconds 2
            )
            (case 2
                (vine1:stopUpd())
                (vine2:stopUpd())
                (vine3:stopUpd())
                (vine4:stopUpd())
                (vine5:stopUpd())
                (mainVine:stopUpd())
                (self:dispose())
            )
        )
    )

)
(instance bat1Hoark of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (bat1:
                    moveSpeed(1)
                    setLoop(2)
                    setCycle(End self)
                )
            )
            (case 1
                (send gLongSong2:
                    number(383)
                    setLoop(1)
                    play(127)
                )
                (bat1:
                    setLoop(4)
                    setCycle(ForwardCounter 3 self)
                )
            )
            (case 2
                (bat1:setCycle(End self))
            )
            (case 3
                (send gLongSong2:
                    number(383)
                    setLoop(1)
                    play(127)
                )
                (bat1:setMotion(JumpTo 169 132 self))
            )
            (case 4
                (bat1:setCycle(Beg self))
            )
            (case 5
                (send gLongSong2:
                    number(383)
                    setLoop(1)
                    play(127)
                )
                (mainVine:setScript(vinesTwist))
                (bat1:
                    setCycle(Fwd)
                    setMotion(MoveTo 214 105 self)
                )
            )
            (case 6
                (bat1:setMotion(MoveTo 360 110 self))
            )
            (case 7
                (send gLongSong2:
                    number(383)
                    setLoop(1)
                    play(127)
                )
                (bat1:
                    setLoop(5)
                    setMotion(JumpTo 42 160 self)
                )
            )
            (case 8
                (bat1:
                    setLoop(2)
                    setCycle(Beg self)
                )
            )
            (case 9
                (send gLongSong2:
                    number(381)
                    setLoop(1)
                    play(127)
                )
                (bat1:
                    setLoop(0)
                    setCycle(0)
                    stopUpd()
                )
                proc0_3()
                (if (((proc0_6(54) and not proc0_6(55)) and not proc0_6(52)) and not (== local0 1))
                    (smallBat:setScript(smallBatJump))
                )
                (self:dispose())
            )
        )
    )

)
(instance batsComeOut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (bat1:
                    show()
                    setCycle(Beg self)
                )
            )
            (case 1
                (bat2:
                    show()
                    setCycle(Beg self)
                )
            )
            (case 2
                (if ((send gGQg3KDHandler:contains(smallBat)) and not proc0_6(55))
                    (smallBat:
                        show()
                        setCycle(Beg self)
                    )
                )(else
                    (self:cue())
                )
            )
            (case 3
                (bat3:
                    show()
                    setCycle(Beg self)
                )
            )
            (case 4
                (send gLongSong2:
                    number(381)
                    setLoop(1)
                    play(127)
                )
                = local1 0
                = seconds 2
            )
            (case 5
                (bat1:stopUpd())
                (bat2:stopUpd())
                (bat3:stopUpd())
                (self:dispose())
            )
        )
    )

)
(instance theyHide of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong2:
                    number(381)
                    setLoop(1)
                    play(127)
                )
                (bat1:setCycle(End self))
            )
            (case 1
                (bat1:hide())
                (if (((send gGQg3KDHandler:contains(smallBat)) and not (== (smallBat:script) flutterBackToRock)) and not proc0_6(55))
                    (smallBat:setCycle(End self))
                )(else
                    (self:cue())
                )
            )
            (case 2
                (if (((send gGQg3KDHandler:contains(smallBat)) and not (== (smallBat:script) flutterBackToRock)) and not proc0_6(55))
                    (smallBat:hide())
                )
                (bat3:setCycle(End self))
            )
            (case 3
                (bat3:hide())
                (bat2:setCycle(End self))
            )
            (case 4
                (bat2:hide())
                (self:dispose())
            )
        )
    )

)
(instance getRocks of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (if (IsObject((send gOwner:looper)))
                    (send ((send gOwner:looper)):dispose())
                    (send gOwner:looper(0))
                )
                (send gOwner:
                    setMotion(0)
                    view(4)
                    loop(% (send gOwner:loop) 2)
                    setCycle(End self)
                )
                = register (Narrator:y)
            )
            (case 1
                (Narrator:y(20))
                (send gQg3Messager:say(1 6 19 0 self))
                (send gOwner:get(23 Random(2 5)))
            )
            (case 2
                (Narrator:y(register))
                (send gOwner:setCycle(Beg self))
            )
            (case 3
                (send gOwner:normalize())
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance grapThingy of Actor
    (properties
        view 21
        loop 6
        signal $4000
    )
)
(instance stoneRing of Prop
    (properties
        x 95
        y 185
        noun 3
        approachX 109
        approachY 163
        view 384
        signal $4000
    )

    (method (doVerb theVerb)
        return 
            (switch (theVerb)
                (case 1
                    (if (== (stoneRing:cel) 0)
                        (send gQg3Messager:say(3 1))
                    )(else
                        (send gQg3Messager:say(3 1 16))
                    )
                    return 1
                )
                (case 4
                    (if (not (send gOwner:has(35)))
                        (send gOwner:
                            get(35)
                            solvePuzzle(256 8)
                        )
                        (if (== (stoneRing:cel) 0)
                            (stoneRing:setCycle(End))
                        )
                    )
                    (if (not (send gOwner:has(34)))
                        (send gOwner:get(34))
                        (if (== (stoneRing:cel) 0)
                            (stoneRing:setCycle(End))
                        )
                    )
                    (if (not proc0_6(148))
                        (send gQg3Messager:say(3 4 10))
                    )(else
                        (send gQg3Messager:say(3 4 20))
                    )
                    proc0_4(148)
                    return 1
                )
                (case 26
                    (if (not (send global2:script))
                        proc0_14(95 180)
                        (send global2:setScript(ScriptID(37 0) 0 mainVine))
                    )
                )
                (case -82
                    (send gQg3Messager:say(1 6 21))
                    (if (not (send gOwner:has(35)))
                        (send gOwner:
                            solvePuzzle(256 8)
                            get(35)
                        )
                    )
                    (if (not (send gOwner:has(34)))
                        (send gOwner:get(34))
                    )
                    (stoneRing:setCel(1))
                )
                (default 
                    (super:doVerb(theVerb))
                )
            )
    )

)
(instance smallBat of Actor
    (properties
        x 79
        y 167
        noun 7
        view 383
        signal $4000
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case 22
                (if (< (self:distanceTo(gOwner)) 30)
                    (send gQg3Messager:say(1 6 5))
                    (send gOwner:
                        drop(12 1)
                        addHonor(20)
                    )
                )(else
                    (send gQg3Messager:say(1 6 12))
                )
            )
            (case 11
                (if (not (send gOwner:script) and (== (smallBat:script) flutterBackToRock))
                    (send gOwner:setScript(egoHacksBat))
                )
            )
            (case 20
                (if (not (send gOwner:script) and (== (smallBat:script) flutterBackToRock))
                    (send gOwner:setScript(egoHacksBat))
                )(else
                    (super:doVerb(theVerb))
                )
            )
            (case 12
                (if (not (send gOwner:script) and (== (smallBat:script) flutterBackToRock))
                    (send gOwner:setScript(egoHacksBat))
                )
            )
            (case 66
                (if (proc0_6(55))
                    (send gQg3Messager:say(1 6 5))
                    = gGOwnerMaxStamina[17] (/ gGOwnerMaxStamina[17] 2)
                    (send gOwner:addHonor(20))
                )
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )

)
(instance bat3 of Prop
    (properties
        x 118
        y 184
        noun 6
        view 382
        signal $4000
    )
)
(instance bat2 of Prop
    (properties
        x 58
        y 182
        noun 6
        view 382
        signal $4000
    )
)
(instance bat1 of Actor
    (properties
        x 42
        y 160
        noun 6
        view 382
        signal $4000
    )
)
(instance vine1 of TargProp
    (properties
        x 179
        y 160
        noun 9
        view 380
        signal $4000
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case 81
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 83
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 88
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 20
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 33
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 4
                (if (not (send global2:script))
                    (send gOwner:setMotion(PolyPath 127 95))
                )
            )
            (case 11
                (send gOwner:setMotion(PolyPath 127 95))
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )


    (method (getHurt)
        (self:setScript(vinesGoDown))
    )

)
(instance vine2 of TargProp
    (properties
        x 112
        y 140
        noun 9
        view 380
        cel 8
        signal $4000
    )

    (method (doVerb theVerb)
        (vine1:doVerb(theVerb))
    )


    (method (getHurt)
        (self:setScript(vinesGoDown))
    )

)
(instance vine3 of TargProp
    (properties
        x 115
        y 95
        noun 9
        view 380
        cel 8
        signal $4000
    )

    (method (doit param1)
        (if ((not local0 and not local2) and (< GetDistance(x y (send gOwner:x) (send gOwner:y) gPicAngle) 20))
            (self:setScript(grabEgo))
        )
        (super:doit(rest param1))
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 20
                (if (== (self:script) grabEgo)
                    (send gOwner:setScript(chopVines))
                )(else
                    (vine1:doVerb(theVerb))
                )
            )
            (case 11
                (if (== (self:script) grabEgo)
                    (send gOwner:setScript(chopVines))
                )(else
                    (send gOwner:setMotion(PolyPath 127 95))
                )
            )
            (case 12
                (if (== (self:script) grabEgo)
                    (send gOwner:setScript(chopVines))
                )
            )
            (case 81
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 83
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 88
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 20
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 33
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 4
                (vine1:doVerb(theVerb))
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )


    (method (getHurt)
        (self:setScript(vinesGoDown))
    )

)
(instance vine4 of TargProp
    (properties
        x 194
        y 115
        noun 9
        view 380
        cel 8
        signal $4000
    )

    (method (doVerb theVerb)
        (vine1:doVerb(theVerb))
    )


    (method (getHurt)
        (self:setScript(vinesGoDown))
    )

)
(instance vine5 of TargProp
    (properties
        x 251
        y 158
        noun 9
        view 380
        cel 8
        signal $4000
    )

    (method (doVerb theVerb)
        (vine1:doVerb(theVerb))
    )


    (method (getHurt)
        (self:setScript(vinesGoDown))
    )

)
(instance mainVine of TargProp
    (properties
        x 165
        y 143
        noun 8
        view 381
        signal $4000
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case -82
                (send gQg3Messager:say(1 6 4))
                (send gOwner:
                    solvePuzzle(256 8)
                    get(35)
                )
                (self:setScript(vinesTwist))
            )
            (case 82
                (if ((send gOwner:has(35)))
                    (send gQg3Messager:say(1 6 13))
                )(else
                    (if (not (send global2:script))
                        proc0_14(165 138)
                        (send global2:setScript(ScriptID(37 0) 0 mainVine))
                    )
                )
            )
            (case 16
                (if ((send gOwner:has(35)))
                    (send gQg3Messager:say(1 6 13))
                )(else
                    (if ((not (vine3:script) and not (send global2:script)) and not (send gOwner:has(35)))
                        (send global2:setScript(throwHook))
                    )
                )
            )
            (case 20
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 33
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 81
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 83
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 88
                (if (not (send global2:script))
                    (self:setScript(blastVine 0 theVerb))
                )
            )
            (case 4
                (if (not (send global2:script))
                    (send gOwner:setMotion(PolyPath 129 95))
                )
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )


    (method (getHurt)
        (self:setScript(vinesGoDown))
    )

)
(instance holes of Feature
    (properties
        x 91
        y 172
        noun 2
        nsTop 155
        nsLeft 53
        nsBottom 189
        nsRight 130
        sightAngle 180
    )
)
(instance sky of Feature
    (properties
        x 159
        y 21
        noun 4
        nsBottom 42
        nsRight 319
        sightAngle 180
    )
)
(instance egoChek of Code
    (properties)

    (method (doit)
        (if ((((< (send gOwner:x) 200) and (> (send gOwner:y) 91)) and (== local1 0)) and not (bat1:script))
            = local1 1
            (send global2:setScript(theyHide))
        )(else
            (if (((== local1 1) and (> (send gOwner:x) 127)) and (< (send gOwner:y) 91))
                = local1 0
                (send global2:setScript(batsComeOut))
            )
        )
    )

)
(instance ambushChek of Code
    (properties)

    (method (doit)
        (if (not (mainVine:script) and (< (send gOwner:distanceTo(mainVine)) 30))
            (mainVine:setScript(ambush))
        )
    )

)
