*
* SAMPLE ADVENTURE OBJECT FILE: Level2Objects, © 1989 by Kevin Kelm and
*                               Alternate Realities
*
OBJECT Slot1

NAME Slot, Keyslot

ADJ Security

INITROOM Quarters_Hallway

CODE           * described in the room's code
ENDCODE

ACTION EXAMINE, LOOK, SEE, VIEW, READ
 T It is a security keyslot that reads "Q2S1."
ENDACT

ACTION USE
 T It wants a security keycard.
ENDACT

ENDOBJECT
*
*
*
OBJECT Sink

NAME Sink, Basin

ATTRIB
 FirstUse Y
ENDATTRIB

INITROOM Bathroom

CODE     * described in the room's code
ENDCODE

ACTION EXAMINE, LOOK, SEE, VIEW
  T You can't remember the last time you saw a sink this dirty.
ENDACT

ACTION USE
  T You gingerly turn the HOT knob and get a trickle of cold water.  Its
  T hard to tell which is getting cleaner:  your hands or the water?
  IF Sink IS FirstUse THEN
   SCORE 1
   UNSET Sink FIrstUse
  ENDIF
ENDACT

ENDOBJ
*
*
*
OBJECT Toilet

NAME Toilet, John, Crapper

ATTRIB
 FirstUse Y
ENDATTRIB
INITROOM Bathroom

CODE           * described in room's code
ENDCODE

ACTION EXAMINE, SEE, LOOK, VIEW
  T It is outfitted for a variety of anatomies, including human.  It appears
  IF PLAYER IN Restroom THEN
   T unsanitary.  It smells unsanitary.  So does the alien in front of it.
  ELSE
   T unsanitary.  It smells unsanitary.
  ENDIF
ENDACT

ACTION USE, FLUSH
  IF PLAYER IN Restroom THEN
   T The alien takes exception to someone interrupting its stupor.  It
   T heaves its massive body in your general direction.  You are quickly
   T crushed.
   DIE
  ELSE
   T Duties done, you flush the toilet.  It seems to be a little backed up;
   T your shoes are wet.
   IF Toilet IS FirstUse THEN
    SCORE 2
    UNSET Toilet FirstUse
   ENDIF
  ENDIF
ENDACT

ENDOBJECT
*
*
*
OBJECT Mirror

NAME Mirror

INITROOM Bathroom

CODE
 T There is a mirror on the wall.
ENDCODE

ACTION LOOK, EXAMINE, SEE, VIEW
  T Through the grime, you see your reflection.  Is that your face or is the
  T mirror warped?
ENDACT

ENDOBJECT
*
*
*
OBJECT Bed

NAME Bed

ATTRIB
 FirstUse Y
ENDATTRIB

INITROOM Your_Quarters

CODE
 T There is a bed here.
ENDCODE

ACTION EXAMINE, LOOK, SEE, VIEW
  T It's a little small, the sheets are dirty, but it does look comfortable
  T enough.
ENDACT

ACTION USE, SLEEP
  T You lay down and sack out for a while.  You wake up and realize that,
  T unfortunately, you really ARE in this rathole.  But you do feel better.
  IF Bed IS FirstUse THEN
   SCORE 3
   UNSET Bed FirstUse
  ENDIF
ENDACT

ENDOBJECT
*
*
*
OBJECT Dresser

NAME Dresser, Bureau, Drawer,

ADJ Clothes

ATTRIB
 Opened
ENDATTRIB

INITROOM Your_Quarters

CODE
 T You also see a clothes dresser.
ENDCODE

ACTION EXAMINE, LOOK, SEE, VIEW
  T It is a small (1 drawer) dresser with an artificial plastic finish.
ENDACT

ACTION OPEN
 IF Dresser NOT Opened THEN
  T You open the drawer and find a flashlight!
  SET Dresser Opened
  PLACEOBJ Flashlight Your_Quarters
  SCORE 3
 ELSE
  T The drawer is already open.
 ENDIF
ENDACT

ACTION CLOSE
 IF Dresser NOT Opened THEN
  T Don't bother.  It's already closed.
 ELSE
  T You stand to gain nothing in doing so.
 ENDIF
ENDACT

ENDOBJECT
*
*
*
OBJECT FlashLight

NAME Flashlight, Light, Lamp, Vac-O-Ray

ADJ Flash

ATTRIB
 On N
ENDATTRIB

INITROOM NoWhere

CODE
 IF PLAYER HAS FlashLight THEN
  IF Flashlight IS On THEN
   T A flashlight  (Currently on)
  ELSE
   T A flashlight  (Currently off)
  ENDIF
 ELSE
  T There is a flashlight here.
 ENDIF
ENDCODE

ACTION EXAMINE, LOOK, SEE, VIEW, READ
 T It is a "Vac-O-Ray" flashlight, with with a beam so sealed, it's good for
 IF Flashlight IS On THEN
  T use in space!  The flashlight is on.
 ELSE
  T use in space!  It is off.
 ENDIF
ENDACT

ACTION GET, GRAB, TAKE
 IF PLAYER HAS Flashlight THEN
  T You already have it!
 ELSE
  T Taken.
  GRAB Flashlight
 ENDIF
ENDACT

ACTION DROP
 IF OnSurface = 0 THEN
  IF PLAYER HAS Flashlight THEN
   T Dropped.
   DROP Flashlight
  ELSE
   T You don't even have it!
  ENDIF
 ELSE
  T You can't do that here.
 ENDIF
ENDACT

ACTION TURN
 IF PREP IS ON THEN
  IF Flashlight IS On THEN
   T It is already on.
  ELSE
   T The blinding white beam does indeed blind you (temporarily).
   SET Flashlight On
   EQU CanSee 1
  ENDIF
 ELSE
  IF Flashlight NOT On THEN
   T It is already off.
  ELSE
   T The lamp goes dark.
   UNSET Flashlight On
   EQU CanSee 0
  ENDIF
 ENDIF
ENDACT 

ENDOBJECT
*
*
*
NPC Cops       * NOT REALLY LEVEL2, BUT ITS GOTTA GO SOMEWHERE!

NAME Cops

INITROOM NoWhere  * never SEE the cops, they just work.

CODE
 IF CallCops # -1 THEN    * execute only if not yet on planet
  CALL DoCallCops
 ENDIF
ENDCODE

ENDNPC
*
* -------- END OF FILE (!)
*
