(include "sci.sh")
(use "Main")
(use "rm201")
(use "eureka")
(use "Print")
(use "Sound")
(use "Obj")
(script 216)


(local
    local0
    local1

)
(procedure (localproc_008f param1)
    (if (proc0_1(30))
        (send gTestMessager:say(28 0 4 Random(1 3) param1))
    )(else
        (send gTestMessager:say(28 0 3 Random(1 3) param1))
    )
)


(procedure (localproc_00ca param1)
    (if (proc0_1(30))
        (send gTestMessager:say(4 0 3 Random(1 3) param1))
    )(else
        (send gTestMessager:say(4 0 4 Random(1 3) param1))
    )
)


(procedure (localproc_05bd param1)
    (if (>= (eureka:puke) 4)
        (send gTestMessager:say(18 0 16 1 
            (if (paramTotal)
                param1
            )(else
                0
            )
))
    )(else
        (if (proc0_1(61))
            (send gTestMessager:say(18 0 13 1 
                (if (paramTotal)
                    param1
                )(else
                    0
                )
))
        )(else
            (if (< global127 3)
                (if (proc0_1(31))
                    (send gTestMessager:say(25 0 21 1 
                        (if (paramTotal)
                            param1
                        )(else
                            0
                        )
 202))
                )(else
                    (send gTestMessager:say(18 0 4 Random(1 3) 
                        (if (paramTotal)
                            param1
                        )(else
                            0
                        )
))
                )
            )(else
                (if (not proc0_1(30))
                    (send gTestMessager:say(25 0 22 1 
                        (if (paramTotal)
                            param1
                        )(else
                            0
                        )
 202))
                )(else
                    (if (not proc0_1(93))
                        (send gTestMessager:say(25 0 26 1 
                            (if (paramTotal)
                                param1
                            )(else
                                0
                            )
 202))
                    )(else
                        (if (== global142 1)
                            (if (not proc0_1(94))
                                (send gTestMessager:say(25 0 24 0 
                                    (if (paramTotal)
                                        param1
                                    )(else
                                        0
                                    )
 202))
                            )(else
                                (send gTestMessager:say(18 0 33 1 
                                    (if (paramTotal)
                                        param1
                                    )(else
                                        0
                                    )
))
                            )
                        )(else
                            (if (== global142 2)
                                (if (not proc0_1(75) and (<> gEurekaCurLocation 8))
                                    (send gTestMessager:say(25 0 25 0 
                                        (if (paramTotal)
                                            param1
                                        )(else
                                            0
                                        )
 202))
                                )(else
                                    (send gTestMessager:say(18 0 33 1 
                                        (if (paramTotal)
                                            param1
                                        )(else
                                            0
                                        )
))
                                )
                            )(else
                                (if (proc0_1(30))
                                    (send gTestMessager:say(18 0 3 Random(1 3) 
                                        (if (paramTotal)
                                            param1
                                        )(else
                                            0
                                        )
))
                                )(else
                                    (send gTestMessager:say(18 0 4 Random(1 3) 
                                        (if (paramTotal)
                                            param1
                                        )(else
                                            0
                                        )
))
                                )
                            )
                        )
                    )
                )
            )
        )
    )
)


(instance sAbandonShip of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (if (>= (eureka:puke) 4)
                    proc0_2(85)
                    proc0_10(200 10)
                    (send gTestMessager:say(1 0 2 1 self))
                )(else
                    (send gTestMessager:say(1 0 1 1 self))
                )
 )
            )
            (case 1
                ((self:dispose()) )
            )
        )
    )

)
(instance sHailPlanet of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((self:setScript(ScriptID(201 4) self 3))  )
            )
            (case 1
                (
                (switch (gEurekaCurLocation)
                    (case 0
                        ((send gTestMessager:say(20 0 32 1 self))  )
                    )
                    (case 3
                        ((send gTestMessager:say(20 0 31 1 self))  )
                    )
                    (case 32
                        ((send gTestMessager:say(20 0 29 1 self))  )
                    )
                    (case 5
                        (
                        (if (proc0_1(30))
                            (switch (global142)
                                (case 0
                                    (send gTestMessager:say(20 0 27 1 self))
                                )
                                (default 
                                    (send gTestMessager:say(20 0 54 1 self))
                                )
                            )
                        )(else
                            (send gTestMessager:say(20 0 27 2 self))
                        )
 )
                    )
                    (case 6
                        (
                        (if (proc0_1(42))
                            (send gTestMessager:say(20 0 54 1 self))
                        )(else
                            (if (== global142 1)
                                (send gTestMessager:say(20 0 30 1 self))
                            )(else
                                (if (== global142 2)
                                    (send gTestMessager:say(21 0 33 1 self))
                                )(else
                                    (send gTestMessager:say(20 0 31 1 self))
                                )
                            )
                        )
 )
                    )
                    (case 7
                        ((send gTestMessager:say(20 0 28 1 self))  )
                    )
                    (case 8
                        ((send gTestMessager:say(20 0 28 2 self))  )
                    )
                    (default 
                        (
                        (if (proc999_5(gEurekaCurLocation 9 10 11 12 13))
                            (send gTestMessager:say(20 0 31 1 self))
                        )(else
                            (if (proc0_1(30))
                                (send gTestMessager:say(20 0 3 Random(1 3) self))
                            )(else
                                (send gTestMessager:say(20 0 4 Random(1 3) self))
                            )
                        )
 )
                    )
                )
  )
            )
            (case 2
                ((self:dispose()) )
            )
        )
    )

)
(instance sHailShip of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (if ((== gEurekaCurLocation 0) and proc0_1(34))
                    = cycles 1
                )(else
                    (self:setScript(ScriptID(201 4) self 1))
                )
 )
            )
            (case 1
                (
                (switch (gEurekaCurLocation)
                    (case 0
                        (
                        (if (proc0_1(34))
                            (send gTestMessager:say(21 0 34 0 self))
                        )(else
                            (self:setScript(ScriptID(211 0) self))
                        )
 )
                    )
                    (case 5
                        (
                        (if ((not proc0_1(92) and proc0_1(93)) and (< global142 1))
                            (send gTestMessager:say(21 0 0 1 self))
                            = local1 1
                        )(else
                            (send gTestMessager:say(21 0 3 3 self))
                        )
 )
                    )
                    (case 6
                        (
                        (if (proc0_1(42))
                            (if ((eureka:damaged))
                                (send gTestMessager:say(21 0 20 1 self))
                            )(else
                                (send gTestMessager:say(21 0 22 1 self))
                            )
                        )(else
                            (if (proc0_1(33))
                                (send gTestMessager:say(21 0 33 1 self))
                            )(else
                                (if (proc0_1(30))
                                    (send gTestMessager:say(21 0 3 Random(1 3) self))
                                )(else
                                    (send gTestMessager:say(21 0 4 Random(1 3) self))
                                )
                            )
                        )
 )
                    )
                    (case 14
                        ((send gTestMessager:say(21 0 33 1 self))  )
                    )
                    (default 
                        (
                        (if (proc0_1(30))
                            (send gTestMessager:say(21 0 3 Random(1 3) self))
                        )(else
                            (send gTestMessager:say(21 0 4 Random(1 3) self))
                        )
 )
                    )
                )
  )
            )
            (case 2
                ((self:dispose()) )
            )
        )
    )

)
(instance starConMusic of Sound
    (properties)
)
(instance sHailStarcon of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (
                (if ((== gEurekaCurLocation 0) and proc0_1(31))
                    = cycles 1
                )(else
                    (self:setScript(ScriptID(201 4) self 2))
                )
 )
            )
            (case 1
                (
                (if (== gEurekaCurLocation 0)
                    (if (proc0_1(31))
                        (send gTestMessager:say(22 0 36 1 self))
                    )(else
                        (send gTestMessager:say(22 0 37 0 self))
                        = local0 1
                        proc0_2(31)
                    )
                )(else
                    (if (== gEurekaCurLocation 5)
                        (send gSQ5Narrator:keepWindow(1))
                        (send gSq5Music2:setVol(5))
                        (starConMusic:
                            loop(-1)
                            number(223)
                            play()
                        )
                        (send gTestMessager:say(22 0 27 1 self))
                    )(else
                        (if (proc0_1(33))
                            (send gTestMessager:say(22 0 33 1 self))
                        )(else
                            (if (proc0_1(30))
                                (send gTestMessager:say(22 0 3 Random(1 3) self))
                            )(else
                                (send gTestMessager:say(22 0 4 Random(1 3) self))
                            )
                        )
                    )
                )
 )
            )
            (case 2
                ((send gSQ5Narrator:keepWindow(0)) (starConMusic:dispose()) (send gSq5Music2:setVol(127)) (self:dispose()) )
            )
        )
    )

)
(instance public sCommandFlo of Script
    (properties)

    (method (dispose param1)
        (super:dispose(rest param1))
        DisposeScript(205)
        DisposeScript(216)
    )


    (method (changeState newState)
        (var temp0[20])
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) proc201_6(self)  )
            )
            (case 1
                ((send gSQ5:handsOn()) (send gSq5IconBar:select((send gSq5IconBar:at(2)))) (send gSQ5:setCursor(982 1)) 
                (switch ((Print:
                    mode(1)
                    window(ScriptID(205 0))
                    font(gFont)
                    width(125)
                    addColorButton(0 1 0 0 12 0 0 205 13 29 31 0 0 0)
                    addColorButton(1 1 0 0 13 0 10 205 13 29 31 0 0 0)
                    addColorButton(2 1 0 0 14 0 20 205 13 29 31 0 0 0)
                    addColorButton(3 1 0 0 15 0 30 205 13 29 31 0 0 0)
                    addColorButton(4 1 0 0 16 0 40 205 13 29 31 0 0 0)
                    addColorButton(5 1 0 0 17 0 50 205 13 29 31 0 0 0)
                    addColorButton(6 1 0 0 18 0 60 205 13 29 31 0 0 0)
                    init()
                )
)
                    (case 0
                        ((send gSQ5:handsOff()) (self:setScript(sHailShip self))  )
                    )
                    (case 1
                        ((send gSQ5:handsOff()) (self:setScript(sHailStarcon self))  )
                    )
                    (case 2
                        ((send gSQ5:handsOff()) (self:setScript(sHailPlanet self))  )
                    )
                    (case 3
                        ((send gSQ5:handsOff()) localproc_05bd(self)  )
                    )
                    (case 4
                        ((send gSQ5:handsOff()) localproc_008f(self)  )
                    )
                    (case 5
                        ((send gSQ5:handsOff()) (self:setScript(sAbandonShip self))  )
                    )
                    (case 6
                        ((send gSQ5:handsOff()) localproc_00ca(self)  )
                    )
                    (default 
                        ((send gSQ5:handsOff()) = ticks 5 )
                    )
                )
  )
            )
            (case 2
                ((self:setScript(ScriptID(201 4) self 0))  )
            )
            (case 3
                ((send gSQ5:handsOff()) 
                (if (proc0_1(85))
                    = next ScriptID(201 23)
                    (self:dispose())
                )(else
                    (if (local0)
                        = local0 0
                        = next ScriptID(214 4)
                        (self:dispose())
                    )(else
                        (if (local1)
                            = next ScriptID(211 2)
                            (self:dispose())
                        )(else
                            = cycles 1
                        )
                    )
                )
 )
            )
            (case 4
                ((send gSQ5:handsOn()) (send gSq5IconBar:select((send gSq5IconBar:at(4)))) (send gSQ5:setCursor(984 1)) (self:dispose()) )
            )
        )
    )

)
(instance public sTalkToFlo of Script
    (properties)

    (method (dispose param1)
        (super:dispose(rest param1))
        DisposeScript(220)
        DisposeScript(216)
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                ((send gSQ5:handsOff()) = cycles 1  )
            )
            (case 1
                (proc201_6(self)  )
            )
            (case 2
                (
                (if (== gEurekaCurLocation 0)
                    (self:setScript(ScriptID(220 1) self))
                )(else
                    (if (== global126 1)
                        (self:setScript(ScriptID(220 6) self))
                    )(else
                        (if ((not proc0_1(30) and (< 8 gEurekaCurLocation)) and (< gEurekaCurLocation 14))
                            (self:setScript(ScriptID(220 8) self))
                        )(else
                            (if (proc0_1(61))
                                (send gTestMessager:say(12 0 89 0 self 202))
                            )(else
                                (if ((proc0_1(36) and not proc0_1(30)) and ((== (eureka:prevLocation) 2) or (== (eureka:curLocation) 2)))
                                    (self:setScript(ScriptID(220 4) self))
                                )(else
                                    (if (proc0_1(30) and not proc0_1(93))
                                        (self:setScript(ScriptID(220 5) self))
                                    )(else
                                        (if (((== gEurekaCurLocation 5) and proc0_1(93)) and not proc0_1(76))
                                            (if (proc0_1(92))
                                                (send gTestMessager:say(12 0 61 0 self 202))
                                            )(else
                                                (send gTestMessager:say(12 0 62 0 self 202))
                                            )
                                        )(else
                                            (if ((== global142 1) and not proc0_1(94))
                                                (self:setScript(ScriptID(220 13) self))
                                            )(else
                                                (if ((== gEurekaCurLocation 15) and not proc0_1(87))
                                                    (send gTestMessager:say(11 2 59 1 self 202))
                                                )(else
                                                    (if ((== global142 2) and not proc0_1(75))
                                                        (self:setScript(ScriptID(220 10) self))
                                                    )(else
                                                        (if (>= (eureka:puke) 4)
                                                            (send gTestMessager:say(12 0 9 3 self 202))
                                                        )(else
                                                            (if (proc0_1(75) and (<> gEurekaCurLocation 14))
                                                                (self:setScript(ScriptID(220 12) self))
                                                            )(else
                                                                (if (proc0_1(75) and (== gEurekaCurLocation 14))
                                                                    (send gTestMessager:say(12 0 91 0 self 202))
                                                                )(else
                                                                    (self:setScript(ScriptID(220 7) self))
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
 )
            )
            (case 3
                ((self:setScript(ScriptID(201 4) self 0))  )
            )
            (case 4
                ((send gSQ5:handsOn()) (send gSq5IconBar:select((send gSq5IconBar:at(3)))) (send gSQ5:setCursor(983 1)) (self:dispose()) )
            )
        )
    )

)
