/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 119)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm119 of Rm
	(properties
		picture scriptNumber
		north 0
		east 118
		south 0
		west 0
	)
	(method (init)
		(super:init())

		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(case 118
				(send gEgo:
					posn(315 122)
					loop(1)
				)
			)
   (default
				(send gEgo:
					posn(315 122)
					loop(1)
				)
			)
   (case 121
         (send gTheMusic:
			prevSignal(0)
			stop()
			number(40)
			loop(-1)
			play()
		)
				(send gEgo:
					posn(266 86)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
    (aRope1: init() cel(rope1))
     (aRope2: init() cel(rope2))
      (aRope3: init() cel(rope3))


      )
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
   (method (handleEvent pEvent)
   (super:handleEvent(pEvent))
   (if(Said('take/rock,rocks'))
   Print("You don't need to do that.")
   )
  (if(Said('look>'))
(if(Said('/door,doorway'))
Print("It leads to another room.")
)
(if(Said('/floor'))
Print("There floor doesn't look interesting.")
)
(if(Said('/bridge'))
Print("With that bridge, you could get over the cliff crack.")
)
(if(Said('/rock'))
Print("These rocks on the ropes are for weight.")
)
(if(Said('/crack,(cliff<crack),cliff'))
Print("You have to get over it. But it's too wide to jump over.")
)

(if(Said('/ropes'))
Print("These 3 hanging ropes have probably something to do with the bridge.")
)
(if(Said('/wall'))
Print("There are some scratches on the wall. These are not important.")
)
(if(Said('/'))
Print("You're near some bridge which is currently up. On the wall, you can see 3 ropes hanging.")
)
)
      (if(Said('jump/over,cliff,crack,(cliff<crack)') or (if(Said('jump'))))
   Print("It's way too wide to jump over it.")
   )
      (if(Said('lower/bridge'))
   Print("See the ropes on the wall? Use these.")
   )
   (if(Said('use,pull>'))
      (if(Said('/rock'))
    Print("You don't need to pull that rock.")
      )
   (if(Said('/rope'))
   (if(bridgeDown)
   Print("You don't have to do it anymore.")
   return
   )
    (if(==(send gEgo: onControl()) ctlNAVY)
   Print("Ok")
   (send gRoom: newRoom(121))
    return
    )
    Print("You're not close enough to the ropes.")
    )
   )
   )
)
(instance aRope1 of Prop
(properties
view 106
x 252
y 61
))
(instance aRope2 of Prop
(properties
view 106
x 266
y 61
))
(instance aRope3 of Prop
(properties
view 106
x 281
y 61
))
/******************************************************************************/
