(version 2)
(include "sci.sh")
(exports
    0 rm200
)
(use "Main")
(use "Game")
(use "Obj")
(script 200)


(local
    local0
    local1
    local2[20]

)
(instance public rm200 of Rm
    (properties
        picture 200
        horizon 66
        picAngle 15
    )

    (method (init)
        (if (<> (send gLongSong:signal) -1)
            (send gLongSong:
                client(global2)
                fade(0 1 10 1)
            )
        )(else
            (self:cue())
        )
        proc0_5(6)
        = global449 PalVary(pvGET_CURRENT_STEP)
        (if (global449)
            PalVary(pvPAUSE_RESUME 1)
        )
        (switch (gGClientModNum)
            (case 150
                = style -32759
            )
            (case 210
                = style -32761
            )
            (case 420
                = style -32759
                (self:cue())
            )
            (case 620
                = style -32759
                (self:cue())
            )
            (default 
                = style -32759
                (if (proc999_5(gGClientModNum 110 120 100))
                    (self:cue())
                )
            )
        )
        (super:init())
        (self:setScript(showTarnaFarShot))
    )


    (method (dispose)
        (if (global449)
            PalVary(pvPAUSE_RESUME 0)
        )
        proc0_4(6)
        (super:dispose())
    )


    (method (cue)
        (send gLongSong:
            number(911)
            setLoop(1)
            play(showTarnaFarShot)
        )
    )

)
(instance showTarnaFarShot of Script
    (properties)

    (method (changeState newState)
        (var temp0)
        (switch (= state newState)
            (case 0
                (send gMainIconBar:disable())
                SetCursor(0)
                = cycles 2
            )
            (case 1
                DrawCel(200 0 0 125 171 15)
                Message(0 200 0 0 1 1 @local2)
                Display(@local2 100 140 173 101 1 102 0 105 123)
                Display(@local2 100 139 172 101 1 102 29 105 123)
                (switch (gGClientModNum)
                    (case 120
                        = local0 280
                    )
                    (case 150
                        = local0 210
                    )
                    (case 420
                        = local0 210
                    )
                    (case 620
                        = local0 210
                    )
                    (default 
                        = local0 210
                    )
                )
            )
            (case 2
                (send gMainIconBar:enable())
                SetCursor(1)
                (send global2:newRoom(local0))
            )
        )
    )

)
