(version 2)
(include "sci.sh")
(exports
    0 rm260
)
(use "Main")
(use "OccasionalCycle")
(use "FPRoom")
(use "Scaler")
(use "PolyPath")
(use "Polygon")
(use "CueObj")
(use "Door")
(use "n958")
(use "Cycle")
(use "View")
(use "Obj")
(script 260)



(instance public rm260 of FPRoom
    (properties
        noun 16
        picture 260
        horizon 40
        north 320
        east 270
        west 250
    )

    (method (init)
        proc958_0(132 260 2942)
        proc958_0(128 260 263 269)
        (switch (gGNumber)
            (case west
                = style 12
            )
            (case east
                = style 11
                (if (< (send gEgo:y) 100)
                    (send gEgo:y(100))
                )
            )
            (case 570
                (send gIconBar:disable())
                (send gEgo:posn(176 79))
                = style 9
                (self:setScript(sTimeToConfront))
            )
            (case 680
                (send gGame:handsOn())
            )
            (case north
                (send gEgo:
                    x(= style 100)
                    y(45)
                )
            )
            (default 
                = style 100
                (send gEgo:
                    x(160)
                    y(160)
                )
            )
        )
        (send gEgo:
            init()
            setScale(Scaler 100 50 175 95)
            normalize()
        )
        (super:init())
        (if (< global119 14)
            (send global2:addObstacle((send ((Polygon:new())):
                    type(2)
                    init(0 0 319 0 319 99 278 108 221 97 184 81 144 72 84 33 84 7 48 7 49 43 113 93 0 91)
                    yourself()
                )
 (send ((Polygon:new())):
                    type(2)
                    init(0 181 251 179 301 141 319 135 319 189 0 189)
                    yourself()
                )
 (send ((Polygon:new())):
                    type(2)
                    init(0 96 22 96 22 117 0 117)
                    yourself()
                )
))
            (if (not proc999_5(global119 9 8 7 25))
                (if (<> global119 2)
                    (penelope:
                        init()
                        stopUpd()
                        setScale(-1 gEgo)
                        approachVerbs(4 2)
                        setCycle(Walk)
                        hide()
                        setScript(sWander)
                    )
                    UnLoad(128 269)
                    (if (== gGNumber 270)
                        (send gGameMusic2:fade(127 10 16 0))
                    )(else
                        (send gGameMusic2:
                            number(260)
                            loop(-1)
                            play()
                        )
                    )
                )
                (if (> (send gGame:detailLevel()) 2)
                    (craps1:
                        init()
                        approachVerbs(4 2)
                        setScript(sThrowDice)
                    )
                    (craps2:
                        init()
                        approachVerbs(4 2)
                    )
                    (jumper:
                        setCycle(OccasionalCycle 1 30 120 8 15)
                        init()
                        approachVerbs(2)
                    )
                )
                (if (> (send gGame:detailLevel()) 2)
                    (swinger:
                        init()
                        setCycle(Fwd)
                        setPri(6)
                        setScript(sStartKidsSample)
                    )
                )(else
                    (swinger:
                        init()
                        setCel(1)
                        setPri(6)
                        stopUpd()
                    )
                )
                (seeSawKid:
                    setCycle(OccasionalCycle 1 10 20 10 20)
                    init()
                )
            )(else
                (swing:
                    init()
                    cel(3)
                    setPri(8)
                    stopUpd()
                    ignoreActors()
                    approachVerbs(4)
                )
                (seesaw:
                    init()
                    setPri(5)
                    stopUpd()
                    ignoreActors()
                    approachVerbs(4 41)
                )
            )
            (send gGame:handsOn())
        )(else
            (send global2:addObstacle((send ((Polygon:new())):
                    type(2)
                    init(0 0 319 0 319 99 278 108 221 97 204 67 211 39 234 49 234 33 206 33 201 66 176 63 144 72 84 33 84 7 48 7 49 43 113 93 0 96)
                    yourself()
                )
 (send ((Polygon:new())):
                    type(2)
                    init(0 181 251 179 301 141 319 135 319 189 0 189)
                    yourself()
                )
 (send ((Polygon:new())):
                    type(2)
                    init(0 104 23 104 23 121 0 121)
                    yourself()
                )
))
            (swing:
                init()
                cel(3)
                setPri(8)
                stopUpd()
                ignoreActors()
                approachVerbs(4)
            )
            (seesaw:
                init()
                setPri(5)
                stopUpd()
                ignoreActors()
                approachVerbs(4 41)
            )
            (burnedShell:
                setPri(5)
                ignoreActors()
                init()
                stopUpd()
                approachVerbs(4)
            )
            (send gGame:handsOn())
        )
        (if ((((not (send gEgo:has(28)) and not proc0_2(2)) and not proc0_2(16)) and (< global119 14)) and not proc999_5(global119 9 8 7))
            (slider:
                init()
                approachVerbs(4 2)
                ignoreActors()
                ignoreHorizon()
                setScript(sSlideDown)
            )
        )
        (if (((not (send gEgo:has(28)) and not proc0_2(2)) and not proc0_2(16)) and (< global119 14))
            (ladder:
                init()
                stopUpd()
                ignoreActors()
                approachVerbs(4)
            )
        )
        (schoolDoor:
            init()
            stopUpd()
        )
        (assayOffice:
            init()
            approachVerbs(4)
            setOnMeCheck(1 1024)
        )
        (school:
            init()
            approachVerbs(4)
            setOnMeCheck(1 32)
        )
        (buildings:
            init()
            approachVerbs(4)
            setOnMeCheck(1 256)
        )
        (street:
            init()
            approachVerbs(4)
            setOnMeCheck(1 2)
        )
        (slide:
            init()
            approachVerbs(4)
            setOnMeCheck(1 4)
        )
        (seesawBase:
            init()
            approachVerbs(4)
            setOnMeCheck(1 8)
        )
        (tree:
            init()
            approachVerbs(4)
            setOnMeCheck(1 16)
        )
        (windowPanes:
            init()
            approachVerbs(4)
            setOnMeCheck(1 64)
        )
        (roof:
            init()
            approachVerbs(4)
            setOnMeCheck(1 128)
        )
        (clutter:
            init()
            approachVerbs(4)
            setOnMeCheck(1 512)
        )
        (if (proc0_2(52))
            (dummyCredits:
                init()
                setScript(ScriptID(32 0))
            )
        )
    )


    (method (dispose)
        (if (== (send gGameMusic1:number) 2942)
            (send gGameMusic1:
                number(2943)
                loop(1)
                play()
            )
        )
        (send gGameMusic2:fade())
        DisposeScript(32)
        (super:dispose())
    )


    (method (cue)
        (super:cue())
        (seesaw:setScript(sPlayContinuously))
    )

)
(instance sStartKidsSample of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = cycles 5
            )
            (case 1
                (send gGameMusic1:
                    number(2941)
                    loop(1)
                    play(global2)
                )
                (self:dispose())
            )
        )
    )

)
(instance sPlayContinuously of Script
    (properties)

    (method (doit)
        (super:doit())
        (if ((== (send gGameMusic1:number) 2942) and (== (send gGameMusic1:prevSignal) -1))
            (send gGameMusic1:
                number(2942)
                flags(1)
                loop(1)
                play(self)
            )
        )
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send gGameMusic1:
                    number(2942)
                    flags(1)
                    loop(1)
                    play(self)
                )
            )
            (case 1
                (send gGameMusic1:prevSignal(0))
                (self:changeState(0))
            )
        )
    )

)
(instance sThrowDice of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send client:
                    setLoop(7)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 1
                = ticks 30
            )
            (case 2
                (send client:
                    cel(9)
                    stopUpd()
                )
                (craps2:
                    setLoop(10)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 3
                (craps2:
                    setLoop(9)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 4
                = ticks 30
            )
            (case 5
                (craps2:
                    cel(9)
                    stopUpd()
                )
                (send client:
                    setLoop(8)
                    cel(0)
                    setCycle(End self)
                )
            )
            (case 6
                (self:changeState(0))
            )
        )
    )

)
(instance sWander of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = seconds Random(20 30)
            )
            (case 1
                (schoolDoor:setCycle(End self))
                (schoolDoorSound:
                    number((schoolDoor:openSnd))
                    play()
                )
            )
            (case 2
                (penelope:
                    show()
                    setMotion(MoveTo 189 74 self)
                )
            )
            (case 3
                (schoolDoor:setCycle(Beg self))
                (schoolDoorSound:
                    number((schoolDoor:closeSnd))
                    play()
                )
            )
            (case 4
                (penelope:stopUpd())
                (schoolDoor:stopUpd())
                = seconds Random(6 10)
            )
            (case 5
                (penelope:setMotion(MoveTo 197 67 self))
            )
            (case 6
                (schoolDoor:setCycle(End self))
                (schoolDoorSound:
                    number((schoolDoor:openSnd))
                    play()
                )
            )
            (case 7
                (penelope:setMotion(MoveTo 217 55 self))
            )
            (case 8
                (penelope:
                    setHeading(180)
                    stopUpd()
                    hide()
                )
                (schoolDoor:setCycle(Beg self))
                (schoolDoorSound:
                    number((schoolDoor:closeSnd))
                    play()
                )
            )
            (case 9
                (schoolDoor:stopUpd())
                (schoolDoor:caller(0))
                UnLoad(128 269)
                (self:changeState(0))
            )
        )
    )

)
(instance sSlideDown of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send client:
                    setLoop(3)
                    posn(154 27)
                )
                = cycles 5
            )
            (case 1
                (send client:setMotion(MoveTo 147 44 self))
            )
            (case 2
                (send client:setMotion(MoveTo 143 44 self))
            )
            (case 3
                (send client:
                    setLoop(4)
                    posn(143 63)
                    setCycle(End self)
                )
            )
            (case 4
                = ticks 30
            )
            (case 5
                (if (not (send gEgo:has(28)))
                    (send client:
                        setLoop(5)
                        posn(143 67)
                        setMotion(MoveTo 167 62)
                        setCycle(End self)
                    )
                )(else
                    (send client:stopUpd())
                    (self:dispose())
                )
            )
            (case 6
                (send client:
                    setLoop(6)
                    posn(167 64)
                    setCycle(End self)
                )
            )
            (case 7
                (self:changeState(0))
            )
        )
    )

)
(instance sTimeToConfront of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = cycles 2
            )
            (case 1
                (send gFpMessager:say(22 0 0 0 self))
            )
            (case 2
                (send gEgo:
                    setSpeed(7)
                    setMotion(PolyPath 197 67 self)
                )
            )
            (case 3
                (schoolDoor:setCycle(End self))
                (schoolDoorSound:
                    number((schoolDoor:openSnd))
                    play()
                )
            )
            (case 4
                (send gEgo:setMotion(MoveTo 217 55 self))
            )
            (case 5
                (send global2:newRoom(720))
                (self:dispose())
            )
        )
    )

)
(instance seesaw of Prop
    (properties
        x 252
        y 81
        noun 4
        approachX 216
        approachY 108
        view 260
        loop 2
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (if (proc999_5(global119 9 8 7))
                    (send gFpMessager:say(noun theVerb 3))
                )(else
                    (super:doVerb(theVerb rest param2))
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance swing of Prop
    (properties
        x 300
        y 60
        z 40
        noun 3
        approachX 271
        approachY 74
        view 260
        loop 4
        signal $1000
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (if (proc999_5(global119 9 8 7))
                    (send gFpMessager:say(noun theVerb 3))
                )(else
                    (super:doVerb(theVerb rest param2))
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance schoolDoor of Door
    (properties
        x 210
        y 60
        noun 2
        approachX 199
        approachY 70
        view 260
        locked 1
        openSnd 2146
        closeSnd 2147
        openVerb 4
        moveToX 227
        moveToY 39
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (send gFpMessager:say(noun theVerb))
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance craps1 of Actor
    (properties
        x 253
        y 74
        noun 20
        approachX 201
        approachY 89
        view 263
        loop 7
        detailLevel 2
    )
)
(instance craps2 of Actor
    (properties
        x 276
        y 74
        noun 21
        approachX 201
        approachY 89
        view 263
        loop 9
        cel 9
        signal $4000
        detailLevel 2
    )
)
(instance seeSawKid of Prop
    (properties
        x 248
        y 85
        noun 4
        view 263
        cel 1
        signal $1000
        cycleSpeed 10
        detailLevel 2
    )

    (method (doit)
        (super:doit())
        (if ((== cel 0) or (== cel (self:lastCel())))
        )
    )


    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (if (< global119 14)
                    (send gFpMessager:say(noun theVerb 1))
                )(else
                    (super:doVerb(theVerb rest param2))
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance swinger of Prop
    (properties
        x 300
        y 20
        noun 3
        view 263
        loop 1
        cel 7
        cycleSpeed 10
        detailLevel 2
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (if (< global119 14)
                    (send gFpMessager:say(noun theVerb 1))
                )(else
                    (super:doVerb(theVerb rest param2))
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance jumper of Prop
    (properties
        x 298
        y 97
        noun 19
        view 263
        loop 2
        cel 2
        detailLevel 2
    )
)
(instance slider of Actor
    (properties
        x 154
        y 27
        noun 18
        approachX 167
        approachY 78
        view 263
        loop 3
    )
)
(instance penelope of Actor
    (properties
        x 217
        y 59
        noun 17
        approachX 175
        approachY 74
        view 269
    )

    (method (doVerb theVerb param2)
        (var temp0)
        (switch (theVerb)
            (case 2
                (if (== (send script:state) 4)
                    (if ((== global120 1) and not proc0_2(84))
                        = temp0 10
                        proc0_3(84)
                    )(else
                        (if (== global120 1)
                            = temp0 9
                        )(else
                            (if ((== global119 13) and not proc0_2(84))
                                = temp0 15
                                proc0_3(84)
                            )(else
                                (if (== global119 13)
                                    = temp0 16
                                )(else
                                    (if ((== global119 12) and not proc0_2(84))
                                        = temp0 13
                                        proc0_3(84)
                                    )(else
                                        (if (== global119 12)
                                            = temp0 14
                                        )(else
                                            (if ((== global119 10) and not proc0_2(84))
                                                = temp0 12
                                                proc0_3(84)
                                            )(else
                                                (if (== global119 10)
                                                    = temp0 11
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                    (send gFpMessager:say(noun theVerb temp0))
                )(else
                    (if (loop)
                        (send gFpMessager:say(noun 2 19))
                    )(else
                        (send gFpMessager:say(noun 2 18))
                    )
                )
            )
            (default 
                (if (== (send script:state) 4)
                    (super:doVerb(theVerb rest param2))
                )(else
                    (if (loop)
                        (send gFpMessager:say(noun 2 19))
                    )(else
                        (send gFpMessager:say(noun 2 18))
                    )
                )
            )
        )
    )

)
(instance dummyCredits of Prop
    (properties
        x -10
        y -10
        view 996
    )
)
(instance burnedShell of View
    (properties
        x 1
        y 2
        noun 11
        approachX 84
        approachY 98
        approachDist 76
        view 265
    )
)
(instance ladder of View
    (properties
        x 169
        y 48
        noun 1
        approachX 166
        approachY 75
        view 260
        loop 3
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (if (proc999_5((slider:loop) 3 4))
                    (send gEgo:get(-1 28))
                    (send gGame:points(1))
                    (self:dispose())
                    (send gFpMessager:say(noun theVerb))
                )(else
                    (send gFpMessager:say(noun theVerb 1))
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance assayOffice of Feature
    (properties
        x 38
        y 44
        noun 11
        sightAngle 40
        approachX 84
        approachY 98
        approachDist 76
    )

    (method (doVerb theVerb param2)
        (var temp0)
        (if (< global119 14)
            = temp0 5
        )(else
            = temp0 6
        )
        (if (proc999_5(theVerb 1 4))
            (send gFpMessager:say(noun theVerb temp0))
        )(else
            (super:doVerb(theVerb rest param2))
        )
    )

)
(instance school of Feature
    (properties
        x 247
        y 28
        noun 12
        sightAngle 40
        approachX 200
        approachY 84
        approachDist 80
    )
)
(instance buildings of Feature
    (properties
        x 130
        y 21
        noun 13
        sightAngle 40
        approachX 112
        approachY 61
        approachDist 49
    )
)
(instance street of Feature
    (properties
        x 130
        y 21
        noun 5
        sightAngle 40
        approachX 112
        approachY 61
        approachDist 49
    )
)
(instance slide of Feature
    (properties
        x 130
        y 21
        noun 6
        sightAngle 40
        approachX 112
        approachY 61
        approachDist 49
    )
)
(instance seesawBase of Feature
    (properties
        x 130
        y 21
        noun 4
        sightAngle 40
        approachX 216
        approachY 108
        approachDist 49
    )

    (method (doVerb theVerb param2)
        (switch (theVerb)
            (case 4
                (if (proc999_5(global119 9 8 7))
                    (send gFpMessager:say(noun theVerb 3))
                )(else
                    (if (< global119 14)
                        (send gFpMessager:say(noun theVerb 1))
                    )(else
                        (super:doVerb(theVerb rest param2))
                    )
                )
            )
            (default 
                (super:doVerb(theVerb rest param2))
            )
        )
    )

)
(instance tree of Feature
    (properties
        x 130
        y 21
        noun 7
        sightAngle 40
        approachX 216
        approachY 108
        approachDist 49
    )
)
(instance windowPanes of Feature
    (properties
        x 130
        y 21
        noun 8
        sightAngle 40
        approachX 200
        approachY 84
        approachDist 49
    )
)
(instance roof of Feature
    (properties
        x 130
        y 21
        noun 9
        sightAngle 40
        approachX 200
        approachY 84
        approachDist 49
    )
)
(instance clutter of Feature
    (properties
        x 130
        y 21
        noun 10
        sightAngle 40
        approachX 160
        approachY 138
        approachDist 49
    )
)
(instance schoolDoorSound of FPSound
    (properties
        flags $0001
    )
)
