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

		(switch(gPreviousRoomNumber)
			(case
				(send gEgo:
					posn(100 140)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
  (if(not(send gEgo: has(INV_CARGO_KEY)))
  (aKey: init())
  )
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
       (method (handleEvent pEvent)
     (super:handleEvent(pEvent))
     (if(Said('read/manual,(sci<manual)'))
  Print("Chapter 1 - Simple IF statement:\n\n\(if(== someVar someValue)\n//Your code here")
     
     )
              (if(Said('look>'))
(if(Said('/key'))
Print("One key has a label 'Ship' or 'Y¤3&' if you wish.")
)
(if(Said('/board,wall'))
Print("There are some keys on the wall.")
)
(if(Said('/paper'))
Print("One paper is an SCI manual for beginners. How do you know? Because uou took some extra-terrestial language course in college.")
)
(if(Said('/manual,(sci<manual)'))
Print("Simple IF statement:\n\n\(if(== someVar someValue)\n//Your code here")
)
(if(Said('/table'))
Print("Just some papers on the table.")
)
(if(Said('/'))
Print("This is some room with some keys on the wall. There's also a table with some papers on it.")
        )
        )
     
     (if(Said('take/key') or (if(Said('take/key/board,wall'))))
     (if(==(send gEgo: onControl()) ctlNAVY)
     (if(send gEgo: has(INV_CARGO_KEY))
     Print("It's already taken.")
     return
     )
     Print("Ok")
     += gScore 3
     (send gEgo: get(INV_CARGO_KEY))
     (aKey: hide())
     return
)
     Print("You're not close enough.")
     )
     )
     
 (method(doit)
 (if(==(send gEgo: onControl()) ctlRED)
 (send gRoom: newRoom(63))
 )
)
)
(instance aKey of Prop
(properties
view 88
x 112
y 87
))
/******************************************************************************/
