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

		(switch(gPreviousRoomNumber)
			(case 100
				(send gEgo:
					posn(224 184)
					loop(3)
				)
			)
   	(case 104
				(send gEgo:
					posn(315 122)
					loop(1)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
   (method (handleEvent pEvent)
   (super:handleEvent(pEvent))
   (if(Said('bath,wash/water,well'))
  Print("You don't want to mess up the water.")
   )
 (if(Said('drink/water'))
 Print("You're not very thirsty at the moment. And the helmet prevents drinking anyway.")
 )
(if(Said('look>'))
(if(Said('/door,doorway'))
Print("It leads to another room.")
)
(if(Said('/floor'))
Print("It's just a stone floor.")
)
(if(Said('/water'))
Print("That water must be the cleanest you've ever seen.")
)
(if(Said('/marking,markings'))
Print("There is none here.")
)
(if(Said('/wall'))
Print("On closer look you discover nothing special on the walls.")
)
(if(Said('/well'))
Print("It contains the cleanest water you've ever seen.")
)
(if(Said('/'))
Print("You're in one of the rooms of the maze. The walls contain lots of scratches and stuff. There's a well in the corner.")
)
)


   
  (if(Said('fill,take/water,bottle') or (if(Said('use,take,put/bottle,water/water,well'))))
  (if(==(send gEgo: onControl()) ctlNAVY)
  
  (if(filledBottle)
  Print("You already did that.")
  return
  )
  Print("You put the bottle in the water and fill it.")
  = filledBottle TRUE
  += gScore 2
  (send gEgo: put(INV_EMPTY_BOTTLE))
    (send gEgo: get(INV_WATER))
  return
   )
   Print("You're not close enough to the well.")
   )
   )
)
/******************************************************************************/
