(version 2)
(include "sci.sh")
(exports
    0 rm360
    1 anubisTalker
    2 desTalker
)
(use "Main")
(use "GloryWindow")
(use "Class_255_0")
(use "Print")
(use "Blink")
(use "IconI")
(use "GameControls")
(use "Game")
(use "User")
(use "View")
(use "Obj")
(script 360)


(local
    local0[6] = (5 2 1 7 8 11 )
    local6[6] = (6 4 9 3 1 )
    local12[6] = (8 0 11 2 10 5 )
    theActor_2
    local19
    local20
    local21
    local22
    local23
    local24
    local25
    local26
    local27[3]
    theActor[3]
    local33
    local34
    local35
    local36[200]

)
(procedure (localproc_01d1)
    = local33 Palette(palSAVE)
    DrawPic(360 dpCLOSEREOPEN_HCENTER)
    Palette(palRESTORE local33)
    Animate((send gGQg3KDHandler:elements) 1)
)


(procedure (localproc_01f8)
    return 
        (switch (local34)
            (case 0
                return 60
            )
            (case 1
                return 61
            )
            (case 2
                return 62
            )
            (default 
                return 63
            )
        )
)


(procedure (localproc_0220)
    (var temp0)
    return 
        (switch (= temp0 (+ (= temp0 (+ (= temp0 (+ (= temp0 0) local27[0])) local27[1])) local27[2]))
            (case 3
                return 68
            )
            (case 4
                return 67
            )
            (case 5
                return 66
            )
            (default 
                return 65
            )
        )
)


(procedure (localproc_0265)
    return 
        (switch (theActor[0])
            (case keyObj
                return 35
            )
            (case pentagram
                return 36
            )
            (case sword
                return 34
            )
            (case heart
                return 37
            )
            (case cup
                return 38
            )
            (case ankh
                return 39
            )
        )
)


(procedure (localproc_02b1)
    return 
        (switch (theActor[1])
            (case ringObj
                return 48
            )
            (case keyObj
                return 47
            )
            (case infinity
                return 46
            )
            (case yinYang
                return 44
            )
            (case raisedFist
                return 43
            )
            (case hourglass
                return 45
            )
        )
)


(procedure (localproc_02fd)
    return 
        (switch (theActor[2])
            (case ringObj
                return 50
            )
            (case pentagram
                return 52
            )
            (case sword
                return 54
            )
            (case cup
                return 49
            )
            (case candle
                return 53
            )
            (case ankh
                return 51
            )
        )
)


(procedure (localproc_0349)
    (var theGCursorNumber, temp1)
    = temp1 Message(2 360 2 6 local19 2)
    = local22 Memory(2 temp1)
    = temp1 Message(2 360 2 6 local19 3)
    = local23 Memory(2 temp1)
    = temp1 Message(2 360 2 6 local19 4)
    = local24 Memory(2 temp1)
    = temp1 Message(2 360 2 6 local19 5)
    = local25 Memory(2 temp1)
    = temp1 Message(2 360 2 6 local19 6)
    = local26 Memory(2 temp1)
    Message(0 360 2 6 local19 1 @local36)
    Message(0 360 2 6 local19 2 local22)
    Message(0 360 2 6 local19 3 local23)
    Message(0 360 2 6 local19 4 local24)
    Message(0 360 2 6 local19 5 local25)
    Message(0 360 2 6 local19 6 local26)
    (myPrint:
        addText(@local36)
        init()
    )
    = theGCursorNumber gCursorNumber
    (quest:
        init()
        show()
        dispose()
    )
    (while (local35)
        (myPrint:
            addText(@local36)
            init()
        )
        (quest:
            init()
            show()
            dispose()
        )
    )
    Memory(3 local22)
    Memory(3 local23)
    Memory(3 local24)
    Memory(3 local25)
    Memory(3 local26)
    ++local21
    (send gGame:setCursor(theGCursorNumber))
    (choices:cycles(5))
)


(instance public rm360 of Rm
    (properties
        noun 13
        picture 360
    )

    (method (init)
        (send gLongSong:fade())
        Palette(palSET_FLAG 72 255 4)
        (ringObj:init())
        (keyObj:init())
        (pentagram:init())
        (infinity:init())
        (yinYang:init())
        (sword:init())
        (raisedFist:init())
        (heart:init())
        (cup:init())
        (hourglass:init())
        (candle:init())
        (ankh:init())
        (anubis:init())
        (send gGQg3KDHandler:eachElementDo(102))
        (send gLongSong3:
            number(360)
            setLoop(-1)
            play(127)
        )
        (super:init())
        (self:setScript(choices))
    )


    (method (doit)
        (super:doit())
        Palette(palANIMATE 72 255 1)
    )

)
(instance choices of Script
    (properties)

    (method (changeState newState)
        (var temp0, temp1)
        (switch (= state newState)
            (case 0
                proc0_2()
                = seconds 2
            )
            (case 1
                (send gQg3Messager:say(2 6 10 0 self))
            )
            (case 2
                = seconds 2
            )
            (case 3
                = temp0 0
                (while (< temp0 6)
                    (send ((send gGQg3KDHandler:at(local0[temp0]))):show())
                    ++temp0
                )
                localproc_01d1()
                = cycles 5
            )
            (case 4
                (send gQg3Messager:say(2 6 11 0 self))
            )
            (case 5
                proc0_3(1 4 6 5 8)
                (User:
                    canControl(1)
                    canInput(1)
                )
                (send gMainIconBar:
                    enable(3)
                    curIcon((send gMainIconBar:at(3)))
                )
                (send gGame:setCursor((send ((send gMainIconBar:curIcon)):cursor) 1))
            )
            (case 6
                = temp0 0
                (while (< temp0 6)
                    (send ((send gGQg3KDHandler:at(local0[temp0]))):hide())
                    ++temp0
                )
                (send theActor_2:show())
                localproc_01d1()
                = cycles 5
            )
            (case 7
                = cycles 20
            )
            (case 8
                (send gQg3Messager:say(2 6 4 0 self))
            )
            (case 9
                localproc_0349()
            )
            (case 10
                (send gQg3Messager:say(2 6 13 0 self))
            )
            (case 11
                (send theActor_2:hide())
                = temp0 0
                (while (< temp0 6)
                    (send ((send gGQg3KDHandler:at(local6[temp0]))):show())
                    ++temp0
                )
                localproc_01d1()
                = cycles 5
            )
            (case 12
                proc0_3(1 4 6 5 8)
                (User:
                    canControl(1)
                    canInput(1)
                )
                (send gMainIconBar:
                    enable(3)
                    curIcon((send gMainIconBar:at(3)))
                )
                (send gGame:setCursor((send ((send gMainIconBar:curIcon)):cursor) 1))
            )
            (case 13
                = temp0 0
                (while (< temp0 6)
                    (send ((send gGQg3KDHandler:at(local6[temp0]))):hide())
                    ++temp0
                )
                (send theActor_2:show())
                localproc_01d1()
                = cycles 5
            )
            (case 14
                = seconds 2
            )
            (case 15
                (send gQg3Messager:say(2 6 14 0 self))
            )
            (case 16
                localproc_0349()
            )
            (case 17
                (send theActor_2:hide())
                = temp0 0
                (while (< temp0 6)
                    (send ((send gGQg3KDHandler:at(local12[temp0]))):show())
                    ++temp0
                )
                localproc_01d1()
                = cycles 5
            )
            (case 18
                (send gQg3Messager:say(2 6 2 0 self))
            )
            (case 19
                proc0_3(1 4 6 5 8)
                (User:
                    canControl(1)
                    canInput(1)
                )
                (send gMainIconBar:
                    enable(3)
                    curIcon((send gMainIconBar:at(3)))
                )
                (send gGame:setCursor((send ((send gMainIconBar:curIcon)):cursor) 1))
            )
            (case 20
                = temp0 0
                (while (< temp0 6)
                    (send ((send gGQg3KDHandler:at(local12[temp0]))):hide())
                    ++temp0
                )
                (send theActor_2:show())
                localproc_01d1()
                = cycles 5
            )
            (case 21
                = seconds 2
            )
            (case 22
                (send gQg3Messager:say(2 6 14 0 self))
            )
            (case 23
                localproc_0349()
            )
            (case 24
                (send theActor_2:hide())
                localproc_01d1()
                = cycles 3
            )
            (case 25
                (anubis:show())
                localproc_01d1()
                = cycles 3
            )
            (case 26
                (send gQg3Messager:say(3 6 30 0 self))
            )
            (case 27
                (if (((== local27[0] 4) or (== local27[1] 4)) or (== local27[2] 4))
                    (send global2:setScript(leave 0 0))
                )(else
                    (send gOwner:
                        addHonor(30)
                        solvePuzzle(254 10)
                    )
                    (self:cue())
                )
            )
            (case 28
                (send gQg3Messager:say(3 6 32 0 self))
            )
            (case 29
                (send gQg3Messager:say(2 6 41 0 self))
            )
            (case 30
                (send theActor[0]:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 31
                = seconds 2
            )
            (case 32
                (send gQg3Messager:say(2 6 localproc_0265() 0 self))
            )
            (case 33
                (send theActor[0]:hide())
                localproc_01d1()
                = cycles 3
            )
            (case 34
                (send gQg3Messager:say(2 6 40 0 self))
            )
            (case 35
                (send theActor[1]:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 36
                = seconds 2
            )
            (case 37
                (send gQg3Messager:say(2 6 localproc_02b1() 0 self))
            )
            (case 38
                (send theActor[1]:hide())
                localproc_01d1()
                = cycles 3
            )
            (case 39
                (send gQg3Messager:say(2 6 42 0 self))
            )
            (case 40
                (send theActor[2]:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 41
                = seconds 2
            )
            (case 42
                (send gQg3Messager:say(2 6 localproc_02fd() 0 self))
            )
            (case 43
                = seconds 2
            )
            (case 44
                (anubis:hide())
                (send theActor[2]:hide())
                (yinYang:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 45
                (switch (global125)
                    (case 0
                        (if (((== theActor[0] sword) or (== theActor[1] raisedFist)) or (== theActor[2] sword))
                            (send gOwner:solvePuzzle(255 5))
                            (send gQg3Messager:say(2 6 55 0 self))
                        )(else
                            (send gQg3Messager:say(2 6 57 0 self))
                        )
                    )
                    (case 1
                        (if (((== theActor[0] pentagram) or (== theActor[1] infinity)) or (== theActor[2] pentagram))
                            (send gOwner:solvePuzzle(255 5))
                            (send gQg3Messager:say(2 6 55 0 self))
                        )(else
                            (send gQg3Messager:say(2 6 58 0 self))
                        )
                    )
                    (case 2
                        (if ((((== theActor[0] keyObj) or (== theActor[1] keyObj)) or (== theActor[1] ringObj)) or (== theActor[2] ringObj))
                            (send gOwner:solvePuzzle(255 5))
                            (send gQg3Messager:say(2 6 55 0 self))
                        )(else
                            (send gQg3Messager:say(2 6 56 0 self))
                        )
                    )
                    (default 
                        (if ((((== theActor[0] ankh) or (== theActor[0] heart)) or (== theActor[1] yinYang)) or (== theActor[2] ankh))
                            (send gOwner:solvePuzzle(255 5))
                            (send gQg3Messager:say(2 6 55 0 self))
                        )(else
                            (send gQg3Messager:say(2 6 59 0 self))
                        )
                    )
                )
            )
            (case 46
                (yinYang:hide())
                localproc_01d1()
                = cycles 5
            )
            (case 47
                = seconds 2
            )
            (case 48
                (hourglass:show(1))
                localproc_01d1()
                = cycles 5
            )
            (case 49
                = seconds 1
            )
            (case 50
                (if ((== local27[0] local27[1]) or (== local27[0] local27[2]))
                    = local34 local27[0]
                )(else
                    (if (== local27[1] local27[2])
                        = local34 local27[1]
                    )(else
                        = local34 999
                    )
                )
                (if (<> local34 999)
                    (send gQg3Messager:say(2 6 localproc_01f8() 0 self))
                )(else
                    (send gQg3Messager:say(2 6 64 0 self))
                )
            )
            (case 51
                (if (<> local34 999)
                    (self:cue())
                )(else
                    (send gQg3Messager:say(2 6 localproc_0220() 0 self))
                )
            )
            (case 52
                (hourglass:hide())
                localproc_01d1()
                = cycles 3
            )
            (case 53
                = seconds 2
            )
            (case 54
                (anubis:show())
                localproc_01d1()
                = cycles 3
            )
            (case 55
                = seconds 1
            )
            (case 56
                (send gQg3Messager:say(3 6 69 0 self))
            )
            (case 57
                (anubis:hide())
                (heart:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 58
                (send gQg3Messager:say(2 6 70 0 self))
            )
            (case 59
                (heart:hide())
                (sword:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 60
                (send gQg3Messager:say(2 6 71 0 self))
            )
            (case 61
                (sword:hide())
                (keyObj:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 62
                (send gQg3Messager:say(2 6 72 0 self))
            )
            (case 63
                (keyObj:hide())
                (pentagram:show(1))
                localproc_01d1()
                = cycles 3
            )
            (case 64
                (switch (global125)
                    (case 0
                        (send gQg3Messager:say(2 6 73 0 self))
                    )
                    (case 1
                        (send gQg3Messager:say(2 6 74 0 self))
                    )
                    (case 2
                        (send gQg3Messager:say(2 6 75 0 self))
                    )
                    (default 
                        (send gQg3Messager:say(2 6 76 0 self))
                    )
                )
            )
            (case 65
                (pentagram:hide())
                (anubis:show())
                localproc_01d1()
                = cycles 3
            )
            (case 66
                (send gQg3Messager:say(3 6 77 0 self))
            )
            (case 67
                (send global2:setScript(leave 0 1))
            )
        )
    )

)
(instance leave of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_4(12)
                (if (register)
                    (self:cue())
                )(else
                    (send gQg3Messager:say(3 6 31 0 self))
                )
            )
            (case 1
                (anubis:hide())
                (send global2:drawPic(0 10))
                = seconds 3
            )
            (case 2
                (send gLongSong3:fade())
                (send global2:newRoom(310))
            )
        )
    )

)
(instance ringObj of Actor
    (properties
        x 75
        y 142
        noun 15
        view 361
        loop 2
        cel 2
    )

    (method (doVerb theVerb)
        (if (== theVerb 4)
            = theActor[local20] self
            (switch (local20)
                (case 0
                    = local19 20
                    ++local20
                )
                (case 1
                    = local19 21
                    ++local20
                )
                (default 
                    = local19 29
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 145
            = y 30
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance keyObj of Actor
    (properties
        x 106
        y 57
        noun 5
        view 361
        loop 2
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            (switch (local20)
                (case 0
                    = local19 6
                    ++local20
                )
                (default 
                    = local19 17
                    ++local20
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 150
            = y 18
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance pentagram of Actor
    (properties
        x 213
        y 47
        noun 6
        view 361
        loop 2
        cel 1
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            (switch (local20)
                (case 0
                    = local19 5
                    ++local20
                )
                (default 
                    = local19 26
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 139
            = y 16
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance infinity of Actor
    (properties
        x 208
        y 137
        noun 14
        view 361
        loop 1
        cel 2
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            = local19 19
            ++local20
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 133
            = y 23
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance yinYang of Actor
    (properties
        x 133
        y 90
        noun 8
        view 361
        cel 4
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            = local19 18
            ++local20
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 134
            = y 14
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance sword of Actor
    (properties
        x 230
        y 94
        noun 17
        view 361
        loop 2
        cel 3
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            (switch (local20)
                (case 0
                    = local19 3
                    ++local20
                )
                (default 
                    = local19 28
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 156
            = y 20
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance raisedFist of Actor
    (properties
        x 267
        y 73
        noun 7
        view 361
        cel 3
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            = local19 15
            ++local20
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 144
            = y 9
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance cup of Actor
    (properties
        x 137
        y 130
        noun 9
        view 361
        cel 2
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            (switch (local20)
                (case 0
                    = local19 12
                    ++local20
                )
                (case 1
                    = local19 22
                    ++local20
                )
                (default 
                    = local19 23
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 137
            = y 16
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance heart of Actor
    (properties
        x 21
        y 93
        noun 10
        view 361
        loop 1
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            = local19 7
            ++local20
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 136
            = y 19
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance hourglass of Actor
    (properties
        x 74
        y 38
        noun 11
        view 361
        loop 1
        cel 1
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            (switch (local20)
                (case 0
                    = local19 9
                    ++local20
                )
                (default 
                    = local19 16
                    ++local20
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 146
            = y 15
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance candle of Actor
    (properties
        x 191
        y 59
        noun 12
        view 361
        cel 1
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            = local19 24
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 153
            = y 19
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance ankh of Actor
    (properties
        x 141
        y 34
        noun 4
        view 361
    )

    (method (doVerb theVerb)
        = theActor[local20] self
        (if (== theVerb 4)
            (switch (local20)
                (case 0
                    = local19 8
                    ++local20
                )
                (default 
                    = local19 25
                )
            )
            = theActor_2 self
            proc0_2()
            (send gLongSong2:
                number(361)
                play(127)
                setLoop(1)
            )
            (choices:cue())
        )(else
            (super:doVerb(theVerb))
        )
    )


    (method (show)
        (if (paramTotal)
            = x 144
            = y 13
        )
        (super:show())
        (self:stopUpd())
    )

)
(instance anubis of Actor
    (properties
        x 10
        y 4
        noun 3
        view 361
        loop 4
    )
)
(instance quest of GameControls
    (properties)

    (method (init param1)
        (send gGame:setCursor(999))
        = window (send ((GloryWindow:new())):
                top(0)
                left(30)
                bottom(175)
                right(295)
                priority(-1)
                yourself()
            )
        (self:add(upIcon aIcon bIcon cIcon xIcon eIcon))
        (super:init(rest param1))
    )

)
(instance aIcon of IconI
    (properties
        view 361
        loop 3
        cel 0
        nsTop 15
        signal $0101
        maskView 361
        maskLoop 3
    )

    (method (show)
        (var temp0[7])
        = nsRight 240
        = nsBottom (+ nsTop 30)
        DrawCel(view loop cel nsLeft nsTop -1)
        Display(local22 105 gFont_2 100 20 15 102 1 106 245)
        (if (& signal $0004)
            (self:mask())
        )
        (if (gPseudoMouse and (send gPseudoMouse:respondsTo(#stop)))
            (send gPseudoMouse:stop())
        )
    )


    (method (select)
        = local27[local21] 0
        (quest:state((& (quest:state) $ffdf)))
        = local35 0
    )


    (method (highlight param1)
        (var temp0)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
            = temp0 46
        )(else
            DrawCel(view loop 0 nsLeft nsTop -1)
            = temp0 1
        )
        Display(local22 105 gFont_2 100 20 15 102 temp0 106 245)
    )

)
(instance bIcon of IconI
    (properties
        view 361
        loop 3
        cel 0
        nsTop 45
        signal $0101
        maskView 361
        maskLoop 3
    )

    (method (show)
        (var temp0[7])
        = nsRight 240
        = nsBottom (+ nsTop 30)
        DrawCel(view loop cel nsLeft nsTop -1)
        Display(local23 105 gFont_2 100 20 45 102 1 106 245)
        (if (& signal $0004)
            (self:mask())
        )
        (if (gPseudoMouse and (send gPseudoMouse:respondsTo(#stop)))
            (send gPseudoMouse:stop())
        )
    )


    (method (select)
        = local27[local21] 1
        (quest:state((& (quest:state) $ffdf)))
        = local35 0
    )


    (method (highlight param1)
        (var temp0)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
            = temp0 46
        )(else
            DrawCel(view loop 0 nsLeft nsTop -1)
            = temp0 1
        )
        Display(local23 105 gFont_2 100 20 45 102 temp0 106 245)
    )

)
(instance cIcon of IconI
    (properties
        view 361
        loop 3
        cel 0
        nsTop 75
        signal $0101
        maskView 361
        maskLoop 3
    )

    (method (show)
        (var temp0[7])
        = nsRight 240
        = nsBottom (+ nsTop 30)
        DrawCel(view loop cel nsLeft nsTop -1)
        Display(local24 105 gFont_2 100 20 75 102 1 106 245)
        (if (& signal $0004)
            (self:mask())
        )
        (if (gPseudoMouse and (send gPseudoMouse:respondsTo(#stop)))
            (send gPseudoMouse:stop())
        )
    )


    (method (select)
        = local27[local21] 2
        (quest:state((& (quest:state) $ffdf)))
        = local35 0
    )


    (method (highlight param1)
        (var temp0)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
            = temp0 46
        )(else
            DrawCel(view loop 0 nsLeft nsTop -1)
            = temp0 1
        )
        Display(local24 105 gFont_2 100 20 75 102 temp0 106 245)
    )

)
(instance xIcon of IconI
    (properties
        view 361
        loop 3
        cel 0
        nsTop 105
        signal $0101
        maskView 361
        maskLoop 3
    )

    (method (show)
        (var temp0[7])
        = nsRight 240
        = nsBottom (+ nsTop 30)
        Display(local25 105 gFont_2 100 20 105 102 1 106 245)
        DrawCel(view loop cel nsLeft nsTop -1)
        (if (& signal $0004)
            (self:mask())
        )
        (if (gPseudoMouse and (send gPseudoMouse:respondsTo(#stop)))
            (send gPseudoMouse:stop())
        )
    )


    (method (select)
        = local27[local21] 3
        (quest:state((& (quest:state) $ffdf)))
        = local35 0
    )


    (method (highlight param1)
        (var temp0)
        (if (param1)
            DrawCel(view loop 1 nsLeft nsTop -1)
            = temp0 46
        )(else
            DrawCel(view loop 0 nsLeft nsTop -1)
            = temp0 1
        )
        Display(local25 105 gFont_2 100 20 105 102 temp0 106 245)
    )

)
(instance eIcon of IconI
    (properties
        view 361
        loop 3
        cel 0
        nsTop 135
        signal $0101
        maskView 361
        maskLoop 3
    )

    (method (show)
        (var temp0[7])
        = nsRight 240
        = nsBottom (+ nsTop 30)
        Display(local26 105 gFont_2 100 20 135 102 1 106 245)
        DrawCel(view loop cel nsLeft nsTop -1)
        (if (& signal $0004)
            (self:mask())
        )
        (if (gPseudoMouse and (send gPseudoMouse:respondsTo(#stop)))
            (send gPseudoMouse:stop())
        )
    )


    (method (select)
        = local27[local21] 4
        (quest:state((& (quest:state) $ffdf)))
        = local35 0
    )


    (method (highlight param1)
        (var temp0)
        (if (param1)
            = temp0 46
            DrawCel(view loop 1 nsLeft nsTop -1)
        )(else
            DrawCel(view loop 0 nsLeft nsTop -1)
            = temp0 1
        )
        Display(local26 105 gFont_2 100 20 135 102 temp0 106 245)
    )

)
(instance upIcon of IconI
    (properties
        view 361
        loop 3
        cel 2
        nsLeft 250
        nsTop 0
        signal $0101
        maskView 361
        maskLoop 3
    )

    (method (show)
        (var temp0[7])
        = signal (| signal $0020)
        (if (paramTotal)
            = nsRight (+ (= nsLeft 250) CelWide(view loop cel))
            = nsTop 0
            = nsBottom CelHigh(view loop cel)
        )(else
            = nsRight (+ nsLeft CelWide(view loop cel))
            = nsBottom (+ nsTop CelHigh(view loop cel))
        )
        DrawCel(view loop cel nsLeft nsTop -1)
        (if (& signal $0004)
            (self:mask())
        )
        (if (gPseudoMouse and (send gPseudoMouse:respondsTo(#stop)))
            (send gPseudoMouse:stop())
        )
    )


    (method (select)
        = local35 1
        (quest:state((& (quest:state) $ffdf)))
    )


    (method (highlight param1)
        (if (param1)
            DrawCel(view loop 3 nsLeft nsTop -1)
        )(else
            DrawCel(view loop 2 nsLeft nsTop -1)
        )
    )

)
(instance public anubisTalker of Narrator
    (properties
        back 57
    )

    (method (doit)
        Palette(palANIMATE 72 255 1)
        (super:doit())
    )

)
(instance public desTalker of Narrator
    (properties
        back 57
    )

    (method (doit)
        Palette(palANIMATE 72 255 1)
        (super:doit())
    )

)
(instance myPrint of Print
    (properties)

    (method (addText theTheGClientModNum)
        (var theTheTheGClientModNum, theTheTheGClientModNum_2, theTheTheGClientModNum_3, temp3, theTheTheGClientModNum_4, theTheTheGClientModNum_5, theGClientModNum, temp7, temp8)
        (if (not dialog)
            = dialog (myDialog:new())
        )
        (if (> paramTotal 3)
            = theTheTheGClientModNum theTheGClientModNum[0]
            = theTheTheGClientModNum_2 theTheGClientModNum[1]
            = theTheTheGClientModNum_3 theTheGClientModNum[2]
            = temp3 
                (if (theTheGClientModNum[3])
                    theTheGClientModNum[3]
                )(else
                    1
                )
            = theTheTheGClientModNum_4 0
            = theTheTheGClientModNum_5 0
            = theGClientModNum gClientModNum
            (if (>= paramTotal 5)
                = theTheTheGClientModNum_4 theTheGClientModNum[4]
                (if (>= paramTotal 6)
                    = theTheTheGClientModNum_5 theTheGClientModNum[5]
                    (if (>= paramTotal 7)
                        = theGClientModNum theTheGClientModNum[6]
                    )
                )
            )
            = temp8 Message(2 theGClientModNum theTheTheGClientModNum theTheTheGClientModNum_2 theTheTheGClientModNum_3 temp3)
            (if (temp8)
                = temp7 Memory(1 (= temp8 Message(2 theGClientModNum theTheTheGClientModNum theTheTheGClientModNum_2 theTheTheGClientModNum_3 temp3)))
                (if (Message(0 theGClientModNum theTheTheGClientModNum theTheTheGClientModNum_2 theTheTheGClientModNum_3 temp3 temp7))
                    (send dialog:
                        add((send ((DText:new())):
                                text(temp7)
                                font(font)
                                mode(mode)
                                setSize(width)
                                moveTo(+ 4 theTheTheGClientModNum_4 + 4 theTheTheGClientModNum_5)
                                yourself()
                            )
)
                        setSize()
                    )
                )
            )
        )(else
            = theTheTheGClientModNum_4 0
            = theTheTheGClientModNum_5 0
            (if (>= paramTotal 2)
                = theTheTheGClientModNum_4 theTheGClientModNum[1]
                (if (>= paramTotal 3)
                    = theTheTheGClientModNum_5 theTheGClientModNum[2]
                )
            )
            = temp7 Memory(1 (+ StrLen(theTheGClientModNum[0]) 1))
            StrCpy(temp7 theTheGClientModNum[0])
            (send dialog:
                add((send ((DText:new())):
                        text(temp7)
                        font(font)
                        mode(mode)
                        setSize(width)
                        moveTo(+ 4 theTheTheGClientModNum_4 + 4 theTheTheGClientModNum_5)
                        yourself()
                    )
)
                setSize()
            )
        )
    )

)
(instance myDialog of Dialog
    (properties)

    (method (doit param1)
        (var temp0, temp1, temp2)
        = gLastTicks (+ global86 GetTime())
        = temp2 0
        (self:eachElementDo(110))
        (if (theItem)
            (send theItem:select(0))
        )
        = theItem 
            (if (paramTotal and param1)
                param1
            )(else
                (self:firstTrue(#checkState 1))
            )
        (if (theItem)
            (send theItem:select(1))
        )
        (if (not theItem)
            = eatTheMice gEatTheMice
            = lastTicks GetTime()
        )(else
            = eatTheMice 0
        )
        = temp1 0
        (while (not temp1)
            Palette(palANIMATE 72 255 1)
            Animate((send gGQg3KDHandler:elements) 1)
            = gLastTicks (+ global86 GetTime())
            (self:eachElementDo(186))
            = temp0 (send ((Event:new())):localize())
            (if (eatTheMice)
                --eatTheMice
                (if (== (send temp0:type) 1)
                    (send temp0:type(0))
                )
                (while (== lastTicks GetTime())
                )
                = lastTicks GetTime()
            )
            = temp1 (self:handleEvent(temp0))
            (send temp0:dispose())
            (if ((self:check()))
                break
            )
            (if (== temp1 -2)
                break
            )
            Wait(1)
        )
        return temp1
    )

)
