(version 2)
(include "sci.sh")
(exports
    0 rm700
)
(use "Main")
(use "FPRoom")
(use "n958")
(use "View")
(use "Obj")
(script 700)



(instance public rm700 of FPRoom
    (properties
        noun 3
        picture 700
    )

    (method (init)
        proc958_0(132 2701 2700 703)
        proc958_0(128 700)
        proc0_8(1)
        (super:init())
        (send gGame:handsOn())
        (send gNarrator:
            x(15)
            y(140)
            talkWidth(280)
        )
        (lid:
            init()
            setPri(9)
        )
        (if (not (send gEgo:has(38)))
            (scarf:
                init()
                setPri(6)
            )
        )
        (if (not (send gEgo:has(44)))
            (pistols:
                init()
                setPri(5)
            )
        )
        (send gIconBar:curIcon((send gIconBar:at(2))))
        (send gGame:setCursor(2))
    )


    (method (doVerb theVerb)
        (switch (theVerb)
            (case 8
                proc0_8(0)
                (if ((send gOldCast:contains(lid)))
                    (self:cue())
                )(else
                    (send global2:setScript(sDoBox self 0))
                )
            )
            (case 4
                (send global2:setScript(sDoBox 0 (send gOldCast:contains(lid))))
            )
            (case 59
                (send gEgo:put(38))
                (scarf:
                    x(166)
                    setLoop(3)
                    setPri(4)
                    init()
                )
            )
            (case 47
                (send gEgo:put(44))
                (pistols:init())
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )


    (method (cue)
        (send global2:newRoom(690))
    )

)
(instance sDoBox of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (lidSound:play(self))
                (send gGame:handsOff())
                (if (register)
                    (lid:dispose())
                )(else
                    (lid:init())
                    (if (== (scarf:loop) 3)
                        (scarf:
                            x(167)
                            setLoop(1)
                            setPri(6)
                        )
                        (pistols:y(126))
                    )
                )
            )
            (case 1
                (send gGame:handsOn())
                (self:dispose())
            )
        )
    )

)
(instance scarf of View
    (properties
        x 167
        y 127
        noun 1
        view 700
        loop 1
        signal $1000
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case 4
                (if (== loop 1)
                    (self:
                        x(166)
                        setLoop(3)
                        setPri(4)
                    )
                    (if ((send gOldCast:contains(pistols)))
                        (pistolSound:play())
                        (pistols:y(128))
                    )
                )(else
                    (if ((send gEgo:has(44)))
                        (send gFpMessager:say(noun theVerb))
                        (send gEgo:get(-1 38))
                        (if ((((send gEgo:has(2)) and (send gEgo:has(10))) and (send gEgo:has(52))) and (send gEgo:has(44)))
                            proc0_3(58)
                        )
                        (send gGame:points(3 144))
                        (self:dispose())
                    )(else
                        (self:
                            x(167)
                            setLoop(1)
                            setPri(6)
                        )
                        (pistols:y(126))
                    )
                )
            )
            (case 47
                (send gEgo:put(44))
                (pistols:
                    y(126)
                    init()
                )
            )
            (case 8
                (send global2:doVerb(8))
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )

)
(instance pistols of View
    (properties
        x 167
        y 126
        z 6
        noun 2
        view 700
        loop 2
        signal $1000
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case 4
                (send gFpMessager:say(noun theVerb))
                (send gEgo:get(-1 44))
                (send gGame:points(1 143))
                (if ((send gEgo:has(3)))
                    = global119 17
                )
                (self:dispose())
            )
            (case 8
                (send global2:doVerb(8))
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )

)
(instance lid of View
    (properties
        x 179
        y 132
        noun 3
        view 700
        signal $1000
    )

    (method (doVerb theVerb)
        (switch (theVerb)
            (case 4
                (send global2:setScript(sDoBox 0 1))
            )
            (case 8
                (send global2:doVerb(8))
            )
            (default 
                (super:doVerb(theVerb))
            )
        )
    )

)
(instance lidSound of FPSound
    (properties
        flags $0001
        number 2700
    )
)
(instance pistolSound of FPSound
    (properties
        flags $0001
        number 2701
    )
)
