(version 2)
(include "sci.sh")
(exports
    0 rm420
)
(use "Main")
(use "TellerIcon")
(use "Inset")
(use "PAvoider")
(use "PolyPath")
(use "Polygon")
(use "Blk")
(use "CueObj")
(use "n958")
(use "StopWalk")
(use "Rev")
(use "Grooper")
(use "Cycle")
(use "Game")
(use "View")
(use "Obj")
(script 420)


(local
    local0[3] = (0 -1 999 )
    local3[5]
    local8

)
(procedure (localproc_1e03)
    (crowd:
        x(92)
        y(189)
        loop(3)
        ignoreActors(1)
        init()
        addToPic()
    )
    (send (ScriptID(42 1)):
        view(454)
        loop(1)
        x(160)
        y(117)
        setScale(350)
        ignoreActors(1)
        init()
    )
    (send (ScriptID(34 1)):
        view(971)
        loop(4)
        cel(6)
        x(28)
        y(133)
        setScale(350)
        init()
        addToPic()
    )
    (simba:
        loop(4)
        cel(0)
        x(21)
        y(135)
        setScale(350)
        init()
        addToPic()
    )
)


(instance public rm420 of Rm
    (properties
        noun 3
        picture 420
        vanishingY -60
    )

    (method (init)
        proc0_2()
        = local3[0] @local0
        = local3[1] 999
        (send global2:addObstacle((send ((Polygon:new())):
                type(2)
                init(140 161 100 160 78 150 80 137 98 133 121 131 143 133 155 141 155 153)
                yourself()
            )
 (send ((Polygon:new())):
                type(2)
                init(319 120 269 103 272 89 262 88 262 103 238 103 243 83 267 74 319 74)
                yourself()
            )
 (send ((Polygon:new())):
                type(2)
                init(145 68 146 84 97 84 94 76 98 64 211 65 219 70 226 82 200 83 167 83 167 68)
                yourself()
            )
 (send ((Polygon:new())):
                type(2)
                init(35 102 0 96 0 82 68 76 99 91 93 104 73 104 79 84 72 82 71 98)
                yourself()
            )
 (send ((Polygon:new())):
                type(2)
                init(223 64 212 63 200 58 100 58 49 60 0 63 0 0 319 0 319 60 271 58 267 64 254 65 239 64 230 71)
                yourself()
            )
))
        (guard:
            setScale()
            scaleX(44)
            scaleY(44)
            maxScale(78)
            loop(8)
            cel(2)
            stopUpd()
            approachVerbs(2)
            init()
        )
        (egoActions:init(gOwner @local0 @local3))
        (send gOwner:
            actions(egoActions)
            normalize()
            setScale(350)
            noun(1)
            init()
        )
        (chiefHut:
            approachVerbs(
                (if (== global362 2)
                    1
                )(else
                    0
                )
)
            init()
        )
        (if (global121)
            (fire:
                setCycle(Fwd)
                init()
            )
        )
        (campfire:init())
        (tree:init())
        (fence:init())
        (mountain:init())
        (uhuraHutLook:init())
        (guestHut:init())
        (guestHutLook:init())
        (leaderDoor:
            approachVerbs(1)
            init()
        )
        (if ((((>= global122 (+ global452 3)) and not proc0_6(29)) and (<> global366 3)) and not proc0_6(74))
            = global366 2
        )(else
            (if ((proc0_6(29) and not proc0_6(38)) and (<> global366 5))
                = global366 4
            )(else
                (if ((((proc0_6(38) and not proc0_6(11)) and not (send gOwner:has(22))) and (== global362 0)) and (<> global366 7))
                    = global366 6
                )(else
                    (if ((((== global362 0) and not proc0_6(11)) and (send gOwner:has(22))) and (<> global366 9))
                        = global366 8
                    )(else
                        (if (((proc0_6(38) and not proc0_6(65)) and (== global392 0)) and (<> global366 11))
                            = global366 10
                        )(else
                            (if ((((((== global392 1) and (send gOwner:has(3))) and (send gOwner:has(40))) and (send gOwner:has(21))) and (> (send ((send gInv:at(21))):amount) 4)) and (<> global366 13))
                                = global366 12
                            )
                        )
                    )
                )
            )
        )
        (if (not proc0_6(87))
            (send global2:style(9))
        )
        (super:init())
        (if (<> (send gLongSong:number) 160)
            (send gLongSong:changeTo(160))
        )
        (if (not proc0_6(87))
            (send global2:setScript(enterFirstTime))
        )(else
            (if ((== gGClientModNum 620) or (== gGClientModNum 630))
                (send global2:setScript(returnSpear))
            )(else
                (if (((== gGClientModNum 470) and proc0_6(16)) and not proc0_6(154))
                    (send global2:setScript(afterMatch))
                )(else
                    (if (== gGClientModNum 500)
                        (send global2:setScript(afterContest))
                    )(else
                        (if ((((== global125 0) or (== global125 3)) and proc0_6(11)) and not proc0_6(56))
                            (send global2:setScript(startContest))
                        )(else
                            (if (((>= global122 5) and ((== global123 5) or (== global123 4))) and not proc0_6(9))
                                (send global2:setScript(enterStoryTell))
                            )(else
                                (if (== gGClientModNum 440)
                                    (send global2:setScript(enterFromUHut))
                                )(else
                                    (if ((((== gGClientModNum 450) and (== global362 2)) and (== global122 global470)) and global121)
                                        (send global2:setScript(enterThief))
                                    )(else
                                        (if (== gGClientModNum 450)
                                            (send global2:setScript(enterFromLHut))
                                        )(else
                                            (if (== gGClientModNum 430)
                                                (send global2:setScript(enterFromEHut))
                                            )(else
                                                (if (== gGClientModNum 460)
                                                    (send global2:setScript(enterFromSpRoom))
                                                )(else
                                                    (if (== gGClientModNum 470)
                                                        (send global2:setScript(enterFromWrRoom))
                                                    )(else
                                                        (if (== gGClientModNum 480)
                                                            (send global2:setScript(enterFromPrisCage))
                                                        )(else
                                                            (send global2:setScript(enterRoom))
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )


    (method (doit)
        (if (script)
            0
        )(else
            (if (== (send gOwner:onControl(1)) 8)
                (if (global121 and (< global123 6))
                    (send global2:setScript(enterUhHut))
                )(else
                    (send global2:setScript(cantEnterUhHut))
                )
            )(else
                (if ((guestHut:onMe(gOwner)))
                    (send global2:newRoom(430))
                )(else
                    (if (== (send gOwner:onControl(1)) 4)
                        (if ((not global121 and (>= global122 (+ global452 3))) and not (& global366 $0001))
                            (send global2:setScript(enterLeader))
                        )(else
                            (send global2:setScript(cantEnter))
                        )
                    )(else
                        (if ((<= (send gOwner:x) 90) and (< (send gOwner:y) 70))
                            (send global2:setScript(exitWest))
                        )(else
                            (if (< (send gOwner:x) 10)
                                (send global2:setScript(exitWest))
                            )(else
                                (if (>= (send gOwner:x) 310)
                                    (send global2:setScript(exitEast))
                                )(else
                                    (if (>= (send gOwner:y) 180)
                                        (send global2:setScript(exitSouth))
                                    )(else
                                        (if (((< 90 (send gOwner:x)) and (< (send gOwner:x) 240)) and (< (send gOwner:y) 70))
                                            (send global2:newRoom(480))
                                        )(else
                                            (if ((> (send gOwner:x) 239) and (< (send gOwner:y) 80))
                                                (send global2:newRoom(470))
                                            )(else
                                                (if ((< (send gOwner:x) 78) and (< (send gOwner:y) 79))
                                                    (send global2:newRoom(460))
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
        (super:doit())
    )


    (method (dispose)
        proc958_0(0 970 949 34 35 39 42 53 923)
        (super:dispose())
    )


    (method (setInset param1 param2 param3 param4)
        (if (inset)
            (send inset:dispose())
        )
        (if (paramTotal and param1)
            (send param1:init(
                (if (>= paramTotal 2)
                    param2
                )(else
                    0
                )
 self 
                (if (>= paramTotal 3)
                    param3
                )(else
                    0
                )
 rest param4))
        )
    )

)
(instance egoActions of Teller
    (properties)

    (method (doChild)
        (if (== query -1)
            (if ((send gOwner:inRect(108 79 218 90)))
                (send gOwner:addHonor(3))
                = query -2
            )(else
                (if ((send gOwner:inRect(250 104 280 116)))
                    (if (((> global122 global452) and global121) and (< global123 6))
                        = local8 1
                        (send gOwner:addHonor(10))
                        = query -6
                    )(else
                        = query -7
                    )
                )(else
                    = query -3
                )
            )
        )
        return 1
    )

)
(instance enterThief of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:
                    x(221)
                    y(75)
                    setMotion(PolyPath 230 90 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance goTo620 of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (if (== global125 1)
                    (send gQg3Messager:say(18 6 42 0 self))
                )(else
                    (self:cue())
                )
            )
            (case 1
                (send gGQg3KDHandler:
                    eachElementDo(111)
                    eachElementDo(81)
                )
                DrawPic(0 dpOPEN_HCENTER)
                = cycles 3
            )
            (case 2
                (send gQg3Messager:say(11 6 32 0 self))
            )
            (case 3
                (send global2:newRoom(620))
            )
        )
    )

)
(instance goTo350 of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gGQg3KDHandler:
                    eachElementDo(111)
                    eachElementDo(81)
                )
                DrawPic(0 dpOPEN_HCENTER)
                = cycles 3
            )
            (case 1
                (send gQg3Messager:say(11 6 31 0 self))
            )
            (case 2
                = gGOwnerMaxStamina[16] (send gOwner:maxHealth())
                = gGOwnerMaxStamina[17] (send gOwner:maxStamina())
                = gGOwnerMaxStamina[18] (send gOwner:maxMana())
                (send global2:newRoom(350))
            )
        )
    )

)
(instance goTo280 of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gGQg3KDHandler:
                    eachElementDo(111)
                    eachElementDo(81)
                )
                DrawPic(0 dpOPEN_HCENTER)
                = cycles 3
            )
            (case 1
                (send gQg3Messager:say(11 6 30 0 self))
            )
            (case 2
                = gGOwnerMaxStamina[16] (send gOwner:maxHealth())
                = gGOwnerMaxStamina[17] (send gOwner:maxStamina())
                = gGOwnerMaxStamina[18] (send gOwner:maxMana())
                (send global2:newRoom(280))
            )
        )
    )

)
(instance goTo340 of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gGQg3KDHandler:
                    eachElementDo(111)
                    eachElementDo(81)
                )
                DrawPic(0 dpOPEN_HCENTER)
                = cycles 3
            )
            (case 1
                (send gQg3Messager:say(11 6 29 0 self))
            )
            (case 2
                = gGOwnerMaxStamina[16] (send gOwner:maxHealth())
                = gGOwnerMaxStamina[17] (send gOwner:maxStamina())
                = gGOwnerMaxStamina[18] (send gOwner:maxMana())
                (send global2:newRoom(340))
            )
        )
    )

)
(instance enterUhHut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(PolyPath 267 103 self))
            )
            (case 1
                (send global2:newRoom(440))
            )
        )
    )

)
(instance enterFromPrisCage of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:
                    x(215)
                    y(68)
                    setMotion(PolyPath 225 75 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance cantEnterUhHut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gQg3Messager:say(11 6 41 0 self))
            )
            (case 1
                (send gOwner:setMotion(PolyPath (- (send gOwner:x) 5) (+ (send gOwner:y) 5) self))
            )
            (case 2
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance cantEnter of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(0))
                (send gQg3Messager:say(11 6 34 0 self))
            )
            (case 1
                (send gOwner:setMotion(PolyPath (send gOwner:x) (+ (send gOwner:y) 10) self))
            )
            (case 2
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterLeader of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(0))
                ++global366
                (send gQg3Messager:say(11 6 33 0 self))
            )
            (case 1
                (send global2:newRoom(450))
            )
        )
    )

)
(instance exitWest of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(MoveTo (- (send gOwner:x) 15) (send gOwner:y) self))
            )
            (case 1
                (send global2:newRoom(460))
            )
        )
    )

)
(instance exitEast of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(MoveTo (+ (send gOwner:x) 15) (send gOwner:y) self))
            )
            (case 1
                (send global2:newRoom(470))
            )
        )
    )

)
(instance exitSouth of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gOwner:setMotion(MoveTo (send gOwner:x) (+ (send gOwner:y) 15) self))
            )
            (case 1
                (send global2:newRoom(410))
            )
        )
    )

)
(instance enterRoom of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gOwner:
                    x(190)
                    y(210)
                    setMotion(PolyPath 190 170 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterFromUHut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gOwner:
                    x(265)
                    y(105)
                    normalize()
                    setMotion(MoveTo 270 115 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterFromLHut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (if (proc0_6(125))
                    proc0_5(125)
                    (self:setScript(enterFromPrisCage self))
                )(else
                    (send gOwner:
                        x(154)
                        y(78)
                        normalize()
                        setMotion(MoveTo 154 90 self)
                    )
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterFromEHut of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gOwner:
                    x(74)
                    y(99)
                    normalize()
                    setMotion(MoveTo 60 110 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterFromWrRoom of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gOwner:
                    x(280)
                    y(74)
                    normalize()
                    setMotion(PolyPath 240 84 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterFromSpRoom of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gOwner:
                    x(65)
                    y(74)
                    normalize()
                    setMotion(MoveTo 85 82 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance enterFirstTime of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_4(87)
                = global452 global122
                (send (ScriptID(34 1)):
                    view(969)
                    loop(0)
                    cel(0)
                    x(144)
                    y(133)
                    setScale(300)
                    ignoreActors(1)
                    init()
                )
                (simba:
                    x(158)
                    y(135)
                    setScale(300)
                    ignoreActors(1)
                    init()
                )
                = gGOwnerMoveSpeed (send gOwner:moveSpeed)
                (send gOwner:
                    normalize()
                    x(215)
                    y(220)
                    setScale(300)
                    setSpeed(6)
                    setMotion(MoveTo 173 145 self)
                    ignoreActors(1)
                )
                (send (ScriptID(35 1)):
                    view(967)
                    setLoop(3)
                    x(254)
                    y(220)
                    setCycle(Walk)
                    setScale(300)
                    setLoop(lionGroop)
                    ignoreActors(1)
                    setMotion(PolyPath 195 138 self)
                    init()
                )
            )
            (case 1
                0
            )
            (case 2
                (send (ScriptID(35 1)):
                    view(962)
                    setLoop(1)
                )
                = ticks 90
            )
            (case 3
                (send gQg3Messager:say(8 6 8 0 self))
            )
            (case 4
                (send gOwner:setSpeed(gGOwnerMoveSpeed))
                (send (ScriptID(34 1)):
                    view(971)
                    setCycle(Walk)
                    setAvoider(PAvoider)
                    setMotion(PolyPath 144 115 self)
                )
            )
            (case 5
                (send global2:newRoom(450))
            )
        )
    )

)
(instance enterStoryTell of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong:
                    changeTo(420)
                    hold()
                )
                (send global2:addObstacle((send ((Polygon:new())):
                        type(2)
                        init(32 189 72 128 122 109 217 109 236 122 235 189)
                        yourself()
                    )
))
                (crowd:
                    init()
                    addToPic()
                )
                (send (ScriptID(53 1)):
                    x(85)
                    y(136)
                    setScale()
                    scaleX(66)
                    scaleY(66)
                    init()
                )
                (send (ScriptID(34 1)):
                    view(971)
                    loop(4)
                    cel(1)
                    x(160)
                    y(119)
                    setScale()
                    scaleX(61)
                    scaleY(61)
                    init()
                    addToPic()
                )
                (simba:
                    loop(4)
                    cel(3)
                    x(141)
                    y(120)
                    setScale()
                    scaleX(64)
                    scaleY(64)
                    init()
                    addToPic()
                )
                (extra:
                    setScale()
                    scaleX(66)
                    scaleY(66)
                    init()
                    addToPic()
                )
                (extra2:
                    setScale()
                    scaleX(66)
                    scaleY(66)
                    init()
                    addToPic()
                )
                (fire:
                    setCycle(Fwd)
                    init()
                )
                (switch (gGClientModNum)
                    (case 410
                        (send gOwner:
                            x(240)
                            y(210)
                        )
                    )
                    (case 430
                        (send gOwner:
                            x(74)
                            y(99)
                        )
                    )
                    (case 440
                        (send gOwner:
                            x(265)
                            y(105)
                        )
                    )
                    (case 450
                        (send gOwner:
                            x(154)
                            y(75)
                        )
                    )
                    (case 460
                        (send gOwner:
                            x(-5)
                            y(160)
                        )
                    )
                    (case 470
                        (send gOwner:
                            x(320)
                            y(160)
                        )
                    )
                    (case 480
                        (send gOwner:
                            x(215)
                            y(68)
                        )
                    )
                    (default 
                        (send gOwner:
                            x(240)
                            y(210)
                        )
                    )
                )
                (send gOwner:
                    setScale(290)
                    setAvoider(PAvoider)
                    setMotion(PolyPath 240 140 self)
                )
            )
            (case 1
                proc0_12(gOwner ScriptID(53 1))
                = cycles 15
            )
            (case 2
                proc0_4(9)
                (send gQg3Messager:say(9 6 9 0 self))
            )
            (case 3
                (send (ScriptID(53 1)):setCycle(End self))
            )
            (case 4
                (send gQg3Messager:say(9 6 11 0 self))
            )
            (case 5
                (send (ScriptID(53 1)):
                    cel(0)
                    loop(1)
                    setCycle(End self)
                )
            )
            (case 6
                (send gQg3Messager:say(9 6 12 0 self))
            )
            (case 7
                (send (ScriptID(53 1)):
                    cel(0)
                    loop(0)
                    setCycle(End self)
                )
            )
            (case 8
                (send (ScriptID(53 1)):
                    cel(0)
                    loop(1)
                    setCycle(End self)
                )
            )
            (case 9
                (send gQg3Messager:say(9 6 13 0 self))
            )
            (case 10
                (send (ScriptID(53 1)):
                    cel(0)
                    loop(1)
                    setCycle(End self)
                )
            )
            (case 11
                (send gQg3Messager:say(9 6 14 0 self))
            )
            (case 12
                (send (ScriptID(53 1)):
                    cel(0)
                    loop(2)
                    setCycle(End self)
                )
            )
            (case 13
                (send gQg3Messager:say(9 6 15 0 self))
            )
            (case 14
                (send gOwner:solvePuzzle(262 2))
                proc0_4(118)
                (send global2:newRoom(430))
            )
        )
    )

)
(instance startContest of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong:
                    changeTo(420)
                    hold()
                )
                localproc_1e03()
                (send gOwner:
                    changeGait(1)
                    ignoreActors(1)
                    setCycle(StopWalk 5)
                    x(187)
                    y(117)
                )
                (send (ScriptID(39 1)):
                    view(983)
                    heading(180)
                    loop(2)
                    cel(4)
                    x(208)
                    y(117)
                    setScale(350)
                    init()
                )
                = cycles 1
            )
            (case 1
                (send gOwner:setHeading(180))
                = cycles 10
            )
            (case 2
                (send gQg3Messager:say(10 6 16 0 self))
            )
            (case 3
                (send gOwner:setMotion(PolyPath 187 220 self))
                (send (ScriptID(39 1)):
                    origStep(2053)
                    setCycle(StopWalk -1)
                    setMotion(PolyPath 208 220)
                )
            )
            (case 4
                (send global2:newRoom(500))
            )
        )
    )

)
(instance afterContest of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong:
                    changeTo(420)
                    hold()
                )
                proc0_4(56)
                localproc_1e03()
                = gGOwnerMoveSpeed (send gOwner:moveSpeed)
                (send gOwner:
                    view(1)
                    changeGait(1)
                    setCycle(StopWalk 5)
                    setSpeed(6)
                    x(190)
                    y(220)
                    ignoreActors(1)
                    setHeading(0)
                    setMotion(PolyPath 190 130 self)
                )
                (send (ScriptID(39 1)):
                    view(983)
                    x(220)
                    y(220)
                    origStep(2053)
                    setScale(350)
                    setCycle(StopWalk -1)
                    init()
                    setMotion(PolyPath 220 130)
                )
            )
            (case 1
                = cycles 15
            )
            (case 2
                (send gQg3Messager:say(10 6 17 0 self))
            )
            (case 3
                (if (global406)
                    (send gOwner:
                        setMotion(PolyPath 177 117 self)
                        solvePuzzle(264 10 9)
                    )
                )(else
                    (send gOwner:solvePuzzle(263 5 9))
                    (send (ScriptID(39 1)):setMotion(PolyPath 177 117 self))
                )
            )
            (case 4
                (if (global406)
                    (send gOwner:setHeading(270))
                )(else
                    (send (ScriptID(39 1)):setHeading(270))
                )
                = cycles 15
            )
            (case 5
                (send gQg3Messager:say(10 6 18 0 self))
            )
            (case 6
                (if (global406)
                    (send gOwner:
                        view(13)
                        loop(0)
                        cel(0)
                        setCycle(End self)
                    )
                )(else
                    (send (ScriptID(39 1)):
                        view(427)
                        loop(0)
                        cel(0)
                        setCycle(End self)
                    )
                )
            )
            (case 7
                (send gOwner:setSpeed(gGOwnerMoveSpeed))
                (send gQg3Messager:say(10 6 19 0 self))
            )
            (case 8
                (send global2:newRoom(460))
            )
        )
    )

)
(instance afterMatch of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong:
                    changeTo(420)
                    hold()
                )
                proc0_4(154)
                localproc_1e03()
                (send gOwner:
                    setHeading(180)
                    x(152)
                    y(114)
                )
                (send (ScriptID(39 1)):
                    setHeading(180)
                    setScale(350)
                    x(194)
                    y(114)
                    init()
                )
                (send (ScriptID(42 1)):
                    setLoop(
                        (if (global406)
                            3
                        )(else
                            2
                        )
)
                    x(171)
                    y(118)
                )
                = cycles 1
            )
            (case 1
                = cycles 15
            )
            (case 2
                (send gQg3Messager:say(10 6 20 0 self))
            )
            (case 3
                (send gQg3Messager:say(10 6 22 0 self))
            )
            (case 4
                (if (global406)
                    (send gQg3Messager:say(10 6 23 0 self))
                )(else
                    (send gQg3Messager:say(10 6 24 0 self))
                )
            )
            (case 5
                (send (ScriptID(42 1)):
                    cycleSpeed(6)
                    setCycle(End self)
                )
            )
            (case 6
                (if (global406)
                    (send gOwner:
                        view(13)
                        setCycle(End self)
                    )
                )(else
                    (send (ScriptID(39 1)):
                        view(427)
                        setCycle(End self)
                    )
                )
            )
            (case 7
                (send global2:newRoom(450))
            )
        )
    )

)
(instance returnSpear of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong:
                    changeTo(420)
                    hold()
                )
                (send global2:vanishingY(-80))
                (send gOwner:
                    solvePuzzle(265 20)
                    addHonor(50)
                    drop(45)
                )
                (crowd:
                    loop(2)
                    x(146)
                    y(189)
                    init()
                    addToPic()
                )
                (send (ScriptID(42 1)):
                    view(454)
                    loop(1)
                    cel(0)
                    setScale(300)
                    x(22)
                    y(142)
                    ignoreActors(1)
                    init()
                )
                (send (ScriptID(34 1)):
                    view(970)
                    loop(4)
                    cel(1)
                    x(67)
                    y(132)
                    setScale(300)
                    init()
                )
                (send (ScriptID(35 1)):
                    view(432)
                    loop(2)
                    cel(0)
                    setScale(300)
                    x(165)
                    y(119)
                    init()
                    addToPic()
                )
                (simba:
                    x(141)
                    y(120)
                    setScale(300)
                    init()
                    addToPic()
                )
                (send (ScriptID(53 1)):
                    loop(3)
                    cel(0)
                    setScale(300)
                    x(130)
                    y(117)
                    init()
                    addToPic()
                )
                (send gOwner:
                    changeGait(0)
                    setCycle(StopWalk 5)
                    setHeading(0)
                    setScale(300)
                    x(46)
                    y(168)
                )
                (send (ScriptID(39 1)):
                    view(989)
                    loop(0)
                    cel(0)
                    x(9)
                    y(165)
                    setScale(300)
                    ignoreActors(1)
                    init()
                )
                (extra:
                    setScale()
                    scaleX(69)
                    scaleY(69)
                    init()
                    addToPic()
                )
                (extra2:
                    setScale()
                    scaleX(69)
                    scaleY(69)
                    init()
                    addToPic()
                )
                = cycles 1
            )
            (case 1
                = ticks 180
            )
            (case 2
                (send gQg3Messager:say(10 6 26 0 self))
            )
            (case 3
                (send gOwner:setMotion(PolyPath 52 139 self))
            )
            (case 4
                (send gOwner:
                    view(32)
                    loop(1)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 5
                (send gOwner:
                    view(0)
                    setCycle(StopWalk 5)
                    setMotion(MoveTo 30 142 self)
                )
            )
            (case 6
                = ticks 30
            )
            (case 7
                (send gOwner:
                    setLoop(1)
                    setCycle(Rev)
                    setMotion(MoveTo 52 142 self)
                )
            )
            (case 8
                (send gOwner:
                    view(5)
                    setCycle(0)
                    setLoop(1)
                )
                (send (ScriptID(42 1)):
                    loop(5)
                    setCycle(End self)
                )
            )
            (case 9
                = ticks 30
            )
            (case 10
                (send gQg3Messager:say(10 6 27 0 self))
            )
            (case 11
                (if ((== global125 1) or (not proc0_6(74) and (== global125 2)))
                    (send gOwner:get(46))
                    (send gQg3Messager:say(10 6 28 0 self))
                )(else
                    = cycles 1
                )
            )
            (case 12
                = ticks 60
            )
            (case 13
                (if (not proc0_6(13))
                    (send global2:setScript(goTo620))
                )(else
                    (if (((== global125 0) and (>= gGOwnerMaxStamina[14] 150)) and not proc0_6(19))
                        (send client:setScript(goTo280))
                    )(else
                        (if ((send gOwner:has(36)))
                            (send global2:setScript(goTo350))
                        )(else
                            (send client:setScript(goTo340))
                        )
                    )
                )
            )
        )
    )

)
(instance showHole of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gLongSong2:
                    number(926)
                    setLoop(1)
                    play(127)
                )
                (send gQg3Messager:say(12 12 40 0 self))
            )
            (case 1
                (send ((hutHole:insetView)):setCel(1))
                (send gQg3Messager:say(11 6 38 0 self))
            )
            (case 2
                (self:dispose())
            )
        )
    )

)
(instance campfire of Feature
    (properties
        x 116
        y 145
        noun 13
        nsTop 134
        nsLeft 88
        nsBottom 157
        nsRight 145
        sightAngle 180
    )
)
(instance tree of Feature
    (properties
        x 235
        y 33
        noun 14
        nsTop 16
        nsLeft 202
        nsBottom 51
        nsRight 268
        sightAngle 180
    )
)
(instance fence of Feature
    (properties
        x 159
        y 52
        noun 15
        nsTop 47
        nsBottom 58
        nsRight 319
        sightAngle 180
    )
)
(instance mountain of Feature
    (properties
        x 159
        y 31
        noun 16
        nsTop 26
        nsBottom 37
        nsRight 319
        sightAngle 180
    )
)
(instance guestHut of Feature
    (properties
        x 72
        y 92
        nsTop 81
        nsLeft 68
        nsBottom 103
        nsRight 77
        sightAngle 40
        approachX 58
        approachY 106
    )

    (method (doVerb theVerb param2)
        (if (== theVerb 1)
            (guestHutLook:doVerb(1 rest param2))
        )(else
            (super:doVerb(theVerb rest param2))
        )
    )

)
(instance leaderDoor of Feature
    (properties
        x 160
        y 54
        sightAngle 40
        onMeCheck $0004
        approachX 120
        approachY 84
    )

    (method (doVerb theVerb param2)
        (if (== theVerb 1)
            (chiefHut:doVerb(1 rest param2))
        )(else
            (super:doVerb(theVerb rest param2))
        )
    )

)
(instance chiefHut of Feature
    (properties
        x 162
        y 68
        noun 5
        nsTop 54
        nsLeft 107
        nsBottom 82
        nsRight 218
        sightAngle 40
        approachX 225
        approachY 81
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 1
                (if ((send global2:script) or (<> global362 2))
                    (super:doVerb(1 rest param2))
                )(else
                    (if (proc0_6(50))
                        (send gQg3Messager:say(5 1 37))
                    )(else
                        (send gQg3Messager:say(5 1 35 0))
                        (send global2:setInset(hutHole))
                    )
                )
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )

)
(instance uhuraHutLook of Feature
    (properties
        x 283
        y 92
        noun 6
        nsTop 78
        nsLeft 248
        nsBottom 107
        nsRight 318
        sightAngle 40
        approachX 282
        approachY 111
    )
)
(instance guestHutLook of Feature
    (properties
        x 47
        y 87
        noun 4
        nsTop 74
        nsLeft 2
        nsBottom 100
        nsRight 93
        sightAngle 40
        approachX 58
        approachY 106
    )
)
(instance crowd of View
    (properties
        x 146
        y 190
        view 420
        loop 1
        signal $4000
    )
)
(instance fire of Prop
    (properties
        x 117
        y 147
        noun 13
        view 420
        priority 11
        signal $0010
    )
)
(instance simba of Actor
    (properties
        view 425
    )
)
(instance guard of Actor
    (properties
        x 140
        y 85
        noun 2
        view 482
        signal $4000
    )
)
(instance extra of Actor
    (properties
        x 191
        y 122
        view 207
        loop 5
        cel 3
    )
)
(instance extra2 of Actor
    (properties
        x 209
        y 132
        view 205
        loop 5
        cel 1
    )
)
(instance simbaCage of Cage
    (properties
        top 140
        left 240
        bottom 170
        right 280
    )
)
(instance hutHole of Inset
    (properties
        view 420
        loop 4
        x 200
        y 85
        disposeNotOnMe 1
        noun 17
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 20
                (if (not global121)
                    (send gQg3Messager:say(12 12 39))
                )(else
                    (self:setScript(showHole))
                )
            )
            (case 12
                (self:doVerb(20))
            )
            (case 3
                (if (== (send ((self:insetView)):cel) 1)
                    proc0_4(50)
                    (if (not proc0_6(266))
                        (send gOwner:addHonor(-50))
                    )
                    (send gOwner:solvePuzzle(266 8 4))
                    (self:dispose())
                    (send global2:newRoom(450))
                )(else
                    (super:doVerb(theVerb rest param2))
                )
            )
            (case 1
                (if (== (send ((self:insetView)):cel) 1)
                    (send gQg3Messager:say(17 1 38))
                )(else
                    (send gQg3Messager:say(17 1 36))
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance lionGroop of Grooper
    (properties)

    (method (doit param1)
        (if (not (send (ScriptID(35 1)):mover))
            (send (ScriptID(35 1)):view(962))
        )(else
            (if ((< 15 (send (ScriptID(35 1)):heading)) and (< (send (ScriptID(35 1)):heading) 75))
                (send (ScriptID(35 1)):view(967))
            )(else
                (if ((< 105 (send (ScriptID(35 1)):heading)) and (< (send (ScriptID(35 1)):heading) 165))
                    (send (ScriptID(35 1)):view(967))
                )(else
                    (if ((< 195 (send (ScriptID(35 1)):heading)) and (< (send (ScriptID(35 1)):heading) 255))
                        (send (ScriptID(35 1)):view(967))
                    )(else
                        (if ((< 285 (send (ScriptID(35 1)):heading)) and (< (send (ScriptID(35 1)):heading) 345))
                            (send (ScriptID(35 1)):view(967))
                        )
                    )
                )
            )
        )
        (super:doit(rest param1))
    )

)
