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

		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(97 141)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
   (aPackage: init())
  (if(packageTaken)
   (aPackage: cel(1))
  )
  
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
      (method (handleEvent pEvent)
     (super:handleEvent(pEvent))
     (if(Said('open,press,use,activate/door,button'))
   Print("Unless there is a cargo-car waiting outside you don't.")
     )
     
       (if(Said('look>'))
            (if(Said('/box,crate'))
            Print("Something big must be inside those boxes.")
            )
            (if(Said('/pack'))
            (if(==(send gEgo: onControl()) ctlNAVY)
                Print("This package is for YOU!")
                return
            )
            Print("You can see a few ones on the shelf and one on the big boxes.")
            )
            
            )
            (if(Said('/floor'))
            Print("You see a package on the floor. This must be somekind of a synth-keyboard. Maybe ...")
            )
            (if(Said('/wall'))
            Print("The walls are empty. Only thing you can see is a button near the door.")
            )
            (if(Said('/button'))
            Print("You can open the door with this button.")
            )
            (if(Said('/door'))
            Print("This must be the door where all the cargo is brought in.")
            )
            (if(Said('/ceiling'))
            Print("Nothing special up there.")
            )
            (if(Said('/shelf'))
            Print("There are some packages on the shelves. None of which are yours.")
            )
            (if(Said('/transmitter'))
            Print("Although it may be in here somewhere, you can't see it.")
            )
            (if(Said('/'))
            Print("You're in the backroom of the post office. This is where all the packages and cargo is kept. You can see a few big boxes and a few smaller ones on the shelf and one on top of the big boxes.")

        ))
        (if(Said('take/keyboard'))
        Print("It's not yours.")
        )
      (if(Said('take/transmitter'))
       (if(packageTaken)
     Print("You already have it.")
     return
     )
     Print("It's probably inside one of the packages here.")
     )
     (if(Said('open/box,crate'))
     Print("I doubt that your transmitter is inside those big boxes.")
     (if(packageTaken)
     Print("And besides, you already have the transmitter.")
     )
     )
      (if(Said('take/box,crate'))
     Print("These boxes are too big to take along.")
     )
     (if(Said('take,open/package,pack'))
 (if(==(send gEgo: onControl()) ctlNAVY)
(if(packageTaken)
 Print("You have already taken the package.")
 return
 )
    (aPackage: cel(1))
 Print("You open your package and take out the transmitter.")
 (send gEgo: get(INV_TRANSMITTER))
 Print("How long have I waited for this!" #title "Dr.Jummybummy:" #icon 777 0 19)
 += gScore 2
 = packageTaken TRUE
 return
 )
 Print("It would help a lot, if you'd move closer. You don't need any other packages besides the one that is yours.")
     )
     
     )
 (method(doit)
 (if(==(send gEgo: onControl()) ctlRED)
 (send gRoom: newRoom(6))
 )
 
 )
)

(instance aPackage of Prop
(properties
view 351
x 215
y 101
cel 0
))
/******************************************************************************/
