(include "sci.sh")
(use "Main")
(use "Sound")
(use "Cycle")
(use "Sounds")
(use "View")
(use "Obj")
(script 460)


(local
    local0
    local1[10]
    local11
    local12[500]
    local512
    local513 = 3
    local514
    local515

)
(procedure (localproc_00b9)
    (var temp0, temp1, temp2[6])
    = temp1 1
    = temp0 0
    (while (< temp0 5)
        (if (<> StrAt(@local1 temp0) StrAt("80869" temp0))
            break
        )
        ++temp0
    )
    return temp1
)


(instance theMusic4 of Sound
    (properties)
)
(instance public rm460 of Rm
    (properties
        picture 119
    )

    (method (init)
        (switch (gGModNum)
            (case 420
                ((send gRoom:setScript(sComputer))  )
            )
            (default 
                ((send gRoom:setScript(sComputer)) )
            )
        )
        (super:init())
    )


    (method (dispose param1)
        (super:dispose(rest param1))
    )


    (method (notify param1 param2 param3 param4 param5 param6)
        Format(@local1 460 0 + param2 48 + param3 48 + param4 48 + param5 48 + param6 48)
        (if (== param1 -1)
            = local11 -1
        )(else
            = local11 localproc_00b9()
        )
    )

)
(instance sComputer of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (= cycles 2  )
            )
            (case 1
                ((previousIcon:init()) (nextIcon:init()) (exitIcon:init()) (self:setScript(ScriptID(203 0) self 0))  )
            )
            (case 2
                (
                (switch (local11)
                    (case 1
                        ((theMusic4:
                            number(124)
                            loop(1)
                            play()
                        )
 = local514 1 = local11 0 proc0_10(221 20) (compHeading:init()) GetMessage(0 460 2 0 0 1 @local12) Display(@local12 100 50 50 102 39 103 0 105 1605 106 240)  )
                    )
                    (case 0
                        (= state -1 = cycles 1  )
                    )
                    (case -1
                        ((send gSq5IconBar:enable(0 3 5 4 7)) (send gRoom:newRoom(420))  )
                    )
                    (default 
                        (= cycles 1 )
                    )
                )
 = cycles 5  )
            )
            (case 3
                ((self:setScript(resetIconbar self))  )
            )
            (case 4
                ((self:dispose()) )
            )
        )
    )

)
(instance resetIconbar of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOn()) = cycles 5  )
            )
            (case 1
                ((send gSq5IconBar:disable(0 1 3 4 7)) = cycles 3  )
            )
            (case 2
                ((send gSq5IconBar:curIcon((send gSq5IconBar:at(2)))) (send gSQ5:setCursor((send ((send gSq5IconBar:at(2))):cursor))) (self:dispose()) )
            )
        )
    )

)
(instance sComputerLog of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (switch (local512)
                    (case 0
                        (GetMessage(0 460 2 0 0 1 @local12) Display(@local12 100 50 50 102 39 103 0 105 1605 106 240)  )
                    )
                    (case 1
                        (GetMessage(0 460 2 0 0 2 @local12) Display(@local12 100 50 50 102 39 103 0 105 1605 106 240)  )
                    )
                    (case 2
                        (GetMessage(0 460 2 0 0 3 @local12) Display(@local12 100 50 50 102 39 103 0 105 1605 106 240)  )
                    )
                    (case 3
                        (GetMessage(0 460 2 0 0 4 @local12) Display(@local12 100 50 50 102 39 103 0 105 1605 106 240) )
                    )
                )
 = cycles 2  )
            )
            (case 1
                ((self:setScript(resetIconbar self))  )
            )
            (case 2
                ((self:dispose()) )
            )
        )
    )

)
(instance sExitIcon of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((exitIcon:setCycle(Beg self))  )
            )
            (case 1
                ((send gSq5IconBar:enable(0 3 5 4 6 7)) = cycles 1  )
            )
            (case 2
                ((send gRoom:newRoom(420)) )
            )
        )
    )

)
(instance compHeading of Prop
    (properties
        x 119
        y 26
        view 627
        loop 13
        cel 1
        signal 16384
    )
)
(instance nextIcon of Prop
    (properties
        y 87
        view 627
        loop 8
        signal 16384
    )

    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                (
                (if (local514)
                    (if (< local512 local513)
                        ++local512
                    )
                    (self:setCycle(Beg))
                    (send gRoom:setScript(sComputerLog))
                )
 )
            )
            (default 
                ((super:doVerb(param1 rest param2)) )
            )
        )
    )

)
(instance previousIcon of Prop
    (properties
        y 72
        view 627
        loop 6
        signal 16384
    )

    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                (
                (if (local514)
                    (if (> local512 0)
                        --local512
                    )
                    (self:setCycle(Beg))
                    (send gRoom:setScript(sComputerLog))
                )
 )
            )
            (default 
                ((super:doVerb(param1 rest param2)) )
            )
        )
    )

)
(instance exitIcon of Prop
    (properties
        y 102
        view 627
        loop 9
        signal 16384
    )

    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                ((send gRoom:setScript(sExitIcon))  )
            )
            (default 
                ((super:doVerb(param1 rest param2)) )
            )
        )
    )

)
