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

		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(54 172)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
  (Clothes: init())


  (send gTheMusic:
prevSignal(0)
stop()
number(13)
loop(-1)
play())

 )
)
/******************************************************************************/
(instance RoomScript of Script
(properties)
(method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('close/locker,door'))
Print("If this would be your locker, then yes. But now, no.")
)
(if(Said('open/locker'))
Print("You don't have to open those lockers.")
)
(if(Said('close/locker'))
Print("It's not your locker to close.")
)
(if(Said('wear,use/underwear'))
Print("Are you feeling okay?")
)
(if(Said('take>'))
(if(Said('/shower'))
Print("You want to take old used smelly underwear? Eww!!")
)
(if(Said('/underwear'))
Print("You want to take old used smelly underwear? Eww!!")
)
(if(Said('/clothes'))
Print("You don't need to take these clothes.")
)
(if(Said('/paper,note'))
(if(send gEgo: has(INV_PAPER))
Print("You have already taken it.")
return
)
(if(==(send gEgo: onControl())ctlNAVY)
Print("Ok")
+= gScore 3
(send gEgo: get(INV_PAPER))
return
)
Print("You can't reach to take the paper.")
)

)

(if(Said('search>'))
(if(Said('/shelf'))
  (if(== (send gEgo:onControl()) ctlNAVY or (if(== (send gEgo:onControl()) ctlSILVER)))
Print("You search and find the shelf empty.")
return
)
Print("You have to be closer to the shelf to search it.")
)
(if(Said('/locker'))
  (if(== (send gEgo:onControl()) ctlNAVY or (if(== (send gEgo:onControl()) ctlSILVER)))
Print("You find some old underwear inside the locker and clothes hanging on the door.")
return
)
Print("You have to be closer to the locker to search it.")
)
(if(Said('/clothes'))
(if(send gEgo: has(INV_PAPER))
Print("You search the clothes but find nothing.")
return
)
Print("You search the clothes and find a paper in one of the pockets.")
return
)
(if(Said('/pocket'))
(if(send gEgo: has(INV_PAPER))
Print("The pockets are empty.")
return
)
  (if(== (send gEgo:onControl()) ctlNAVY or (if(== (send gEgo:onControl()) ctlSILVER)))
Print("There's a paper inside the pocket.")
return
)
Print("You have to be closer to clothes to search the pocket.")
)
(if(Said('/'))
Print("You discover nothing.")
)
)


(if(Said('look>'))
(if(Said('/clothes'))
(if(send gEgo: has(INV_PAPER))
Print("These are just usual casual clothes.")
return
)
Print("These are just usual casual clothes. There seems to be a paper in one of the pockets.")
return
)
)
(if(Said('/paper'))
(if(send gEgo: has(INV_PAPER))
Print("It's in your inventory. To see it press TAB.")
return
)
Print("You can't see exactly what's on it but seems like some numbers. Maybe you should take it.")
)
(if(Said('/pocket'))
(if(send gEgo: has(INV_PAPER))
Print("The pockets are empty.")
return
)
Print("There seems to be a paper inside the pocket.")
)
(if(Said('/locker'))
Print("There are lot of them here. One of the lockers is opened.")
)
(if(Said('/sauna'))
Print("The sauna room is hardly visibe trough the steam in the shower room.")
)
(if(Said('/rack,(clothes<rack)'))
Print("The clothes are hanging on it.")
)
(if(Said('/door,doorway'))
Print("You can see the showers.")
)
(if(Said('/floor,wall,ceiling'))
Print("You don't see anything special about it.")
)
(if(Said('/(in<locker)'))
Print("There's nothing but some old loundry in there.")
)
(if(Said('/shelf'))
Print("The shelf in the locker is empty.")
)
(if(Said('/'))
Print("You're in a locker room. Lots of lockers. One of them is opened and there are some clothes hanging on the door. A doorway is leading to the showers and sauna area.")
)


)
   (method(doit)
 (if(==(send gEgo: onControl())ctlRED)
 (if(not(shower))
 = shower TRUE
 Print("You don't want to go the the showers and see all the naked aliens there. Do you?")
 return
 )
 )
 (if(==(send gEgo: onControl())ctlBLACK)
 = shower FALSE

 )
 (if(==(send gEgo: onControl())ctlYELLOW)
 (send gRoom: newRoom(41))

 )
 )
)
(instance Clothes of Prop
(properties
view 41
x 151
y 106
))
/******************************************************************************/
