/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 36)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm036 of Rm
	(properties
		picture scriptNumber
		north 0
		east 0
		south 0
		west 37
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(case 29
    (send gTheMusic:
			prevSignal(0)
			stop()
			number(500)
			loop(-1)
			play()
		)
				(send gEgo:
                    posn(75 119)
					loop(2)
                    view(955))
     (aRope: init())

			)
           	(case 38
    (send gTheMusic:
			prevSignal(0)
			stop()
			number(606)
			loop(-1)
			play()
		)
				(send gEgo:
                    posn(75 119)
					loop(2)
                    view(955))
     (aRope: init())

			)
        (case 37
       (send gEgo:
					posn(4 156)
					loop(0)
     view(955))
    (aRope: init())
    )
         (case 48
       (send gEgo:
					posn(4 132)
					loop(0)
     view(955))
    (aRope: init())
    )
        )
		SetUpEgo()
		(send gEgo:init() view(955) moveSpeed(2))

	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
 
  (method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('climb/fence'))
Print("You have no need to climb the fence.")
Print("Why? Because I tell you so.")
)
(if(Said('take>'))
(if(Said('/rope'))
Print("You can't. It's tied to the rock up the mountain.")
)
)
 (if(Said('look>'))
(if(Said('/sky'))
Print("You can't see the sky from this point. Shaaa!")
)
(if(Said('/cloud'))
Print("You can't see any clouds from this point.")
)
(if(Said('/sand,ground'))
Print("You only see a lot of sand, that covers the whole ground.")
)
(if(Said('/fence'))
Print("This fence is here so you couldn't go wandering around.")
)
(if(Said('/mountain'))
Print("This is where you climbed down.")
)
(if(Said('/rock,stone'))
Print("The rope you used for climbing down is tied to that stone.")
)
(if(Said('/rope'))
Print("This rope doesn't look interesting anymore.")
)
(if(Said('/[ /* , !* ]'))
Print("You've climbed down the mountain. You can see a village to the left.")
)
)
(if(Said('go,[get<up],climb,slide/up,rope,mountain') or (if(Said('climb,go,slide,[get<up]') or (if(Said('get,climb,slide,go,[get<up]/up/rope,mountain'))))))
(if(==(send gEgo: onControl())ctlRED)
Print("Ok")
(send gRoom: newRoom(29))
return
)
Print("You're too far away from the rope.")
)
)

)
(instance aRope of Prop
(properties
view 51
x 76
y 117
priority 0
))
/******************************************************************************/
