Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Museum.inf

Second Floor Mezzanine (lines 705-1052)

0705  Object Second_Floor "Mezzanine"
0706    with description
0707            "Halfway up the marble staircase of the building, a second floor 
0708             mezzanine which leads south into Grammar Hall (an extension 
0709             purpose-built for the Room 16 exhibition).",
0710         d_to Foyer,
0711         s_to Grammar_Hall,
0712         u_to Third_Floor,
0713    has  light;
0714   
0715  Object -> "map"
0716    with name "map" "mezzanine" "level",
0717         initial "A map of the mezzanine level is embossed in one wall.",
0718         description
0719         [;  font off;
0720             print
0721            "^+------------------------------------------+
0722             ^|                                          |
0723             ^|                                          |
0724             ^|                                          |
0725             ^|                                          |
0726             ^|               Mezzanine                  |
0727             ^|             (you are here)               |
0728             ^|                   |                      |
0729             ^|                   |                      |
0730             ^|             Grammar Hall 16              |
0731             ^|       (telepathy, clock)                 |
0732             ^|       (Charlotte, Dan)   --- Ten Forward |
0733             ^|                   |         (replicator) |
0734             ^|               Liberator     (computer)   |
0735             ^|                Bridge       (tricorder)  |
0736             ^|                 (Zen)                    |
0737             ^+------------------------------------------+^";
0738             font on;
0739         ],
0740    has  static;
0741   
0742  Object -> "Room 16 exhibition leaflet"
0743    with name "leaflet" "exhibition" "guide" "room" "sixteen",
0744         initial "An exhibition leaflet has fallen to the floor.",
0745         description
0746            "Among the rare & fascinating exhibits in Room 16 are:...^^
0747             Telekinetic (and telepathic) Martha. In the telepathy
0748             booth, you can speak to her as though she were in Room 16
0749             with you -- but she's not, she is far away. Tell her to
0750             ~look~ to find out where, and you can also ask her to give
0751             you things (by telekinesis).^^
0752             Charlotte, who is playing Simon Says. She'll obey
0753             instructions you give as long as you preface it with
0754             ~simon says~. (Though she only knows how to wave, or how to
0755             clap many times (just tell her a number).)^^
0756             Dyslexic Dan knows how to take and drop things and how to
0757             perform an inventory, but unfortunately confuses Take and
0758             Drop orders.^^
0759             The alarm clock can be told ~on~, ~off~ or a time of day
0760             (to set its alarm to).";
0761             
0762  ! --------------------------------------------------------------------------
0763   
0764  Object Grammar_Hall "Grammar Hall"
0765    has  light,
0766    with description
0767            "The main exhibit on the second floor: Room 16, south of the 
0768             mezzanine. A Jeffreys Tube runs @00 into a Star Trek: The
0769             Next Generation room, while a hexagonal corridor to the south
0770             leads to the bridge of the spaceship ~Liberator~.",
0771         n_to Second_Floor, e_to Star_Trek, s_to Blakes_Seven;
0772   
0773  Object -> booth "telepathy booth"
0774    with name "booth" "telepathy",
0775         initial
0776            "A telepathy booth stands invitingly open: 
0777             ~Talk To Telekinetic Martha~.",
0778    has  enterable static;
0779   
0780  Object -> "Charlotte"
0781    with name "charlotte" "charlie" "chas",
0782         number 0,
0783         grammar
0784         [;  give self ~general;
0785             wn=verb_wordnum;
0786             if (NextWord()=='simon' && NextWord()=='says')
0787             {   give self general;
0788                 verb_wordnum=verb_wordnum+2;
0789             }
0790             self.number=TryNumber(verb_wordnum);
0791             if (self.number~=-1000)
0792             {    action=##Clap; noun=0; second=0; rtrue; }
0793         ],
0794         orders
0795         [ i;  if (self hasnt general) "Charlotte sticks her tongue out.";
0796             WaveHands: "Charlotte waves energetically.";
0797             Clap: if (self.number==0) "Charlotte folds her arms.";
0798                   for (i=0:i<self.number:i++)
0799                   {   print "Clap! ";
0800                       if (i==100)
0801                           print "(You must be regretting this by now.) ";
0802                       if (i==200)
0803                           print "(What a determined girl she is.) ";
0804                   }
0805                   if (self.number>100)
0806                       "^^Charlotte's a bit out of breath now.";
0807                  "^^~Easy!~ says Charlotte.";
0808             default: "~Don't know how,~ says Charlotte.";
0809         ],
0810         initial "Charlotte wants to play Simon Says.",
0811    has  animate female proper crewmember;
0812   
0813  Object -> "Dyslexic Dan"
0814    with name "dan" "dyslexic",
0815         grammar
0816         [;  if (verb_word == 'take') { verb_wordnum++; return 'drop'; }
0817             if (verb_word == 'drop') { verb_wordnum++; return 'take'; }
0818         ],
0819         orders
0820         [;
0821             Take: "~What,~ says Dan, ~ you want me to take ",
0822                       (the) noun, "?~";
0823             Drop: "~What,~ says Dan, ~ you want me to drop ",
0824                       (the) noun, "?~";
0825             Inv: "~That I can do,~ says Dan. ~I'm empty-handed.~";
0826             default: "~Don't know how,~ says Dan.";
0827         ],
0828         initial "Dyslexic Dan is here.",
0829    has  animate proper crewmember;
0830   
0831  [ PrintTime x;
0832    print (x/60), ":", (x%60)/10, (x%60)%10;
0833  ];
0834   
0835  Object -> "alarm clock"
0836    with name "alarm" "clock", article "an",
0837         number 480,
0838         description
0839         [;  print "The alarm is ";
0840             if (self has general) print "on, "; else print "off, but ";
0841             "the clock reads ", (PrintTime) the_time,
0842             " and the alarm is set for ", (PrintTime) self.number, ".";
0843         ],
0844         react_after
0845         [;  Inv:  if (self in player)   { new_line; <<Examine self>>; }
0846             Look: if (self in location) { new_line; <<Examine self>>; }
0847         ],
0848         daemon
0849         [;  if (the_time >= self.number && the_time <= self.number+3
0850                 && self has general) "^Beep! Beep! The alarm goes off.";
0851         ],
0852         grammar
0853         [;  return 'alarm,';
0854         ],
0855         orders
0856         [;  SwitchOn: give self general; StartDaemon(self); "~Alarm set.~";
0857             SwitchOff: give self ~general; StopDaemon(self);
0858                 "~Alarm cancelled.~";
0859             SetTo:   self.number=noun; <<Examine self>>;
0860             default: "~Commands are on, off or a time of day only, pliz.~";
0861         ],
0862         life
0863         [;  Ask, Answer, Tell:
0864             "[Try ~clock, something~ to address the clock.]";
0865         ],
0866    has  talkable;
0867   
0868  ! --------------------------------------------------------------------------
0869   
0870  Object Blakes_Seven "Spaceship Liberator: Bridge"
0871    has  light,
0872    with description
0873            "The great serried bridge of the alien spaceship Liberator,
0874             captured by Blake's group of revolutionary criminals on the
0875             run from the oppressive Earth Federation.  (Don't worry --
0876             it's just a convincing replica, and the museum still lies
0877             back north.)",
0878         n_to Grammar_Hall;
0879   
0880  Object -> "informative plaque"
0881    with name "informative" "plaque",
0882         article "an",
0883         description
0884            "[Among the commands which Zen was often given by the hard-pressed
0885             Liberator crew were:^^
0886             zen, scan 360 orbital^
0887             zen, speed standard by six^
0888             zen, clear the neutron blasters for firing^
0889             zen, raise the force wall^
0890             zen, set course for centauro]",
0891    has  static;
0892   
0893  Object -> "Zen"
0894    with name "zen" "flight" "computer",
0895         initial
0896            "Square lights flicker unpredictably across a hexagonal fascia 
0897             on one wall, indicating that the flight computer Zen is on-line.",
0898         grammar
0899         [;  return -'zen,';
0900         ],
0901         orders
0902         [;  Show: "The main screen shows a starfield, 
0903                    turning through ", noun, " degrees.";
0904             Go:  "~Confirmed.~  The ship turns to a new bearing.";
0905             SetTo: if (noun==0) "~Confirmed.~  The ship comes to a stop.";
0906                 if (noun>12) "~Standard by ", (number) noun,
0907                              " exceeds design tolerances.~";
0908                 "~Confirmed.~  The ship's engines step to 
0909                  standard by ", (number) noun, ".";
0910             Take: if (noun~=force_wall) "~Please clarify.~";
0911                  "~Force wall raised.~";
0912             Drop: if (noun~=blasters)   "~Please clarify.~";
0913                "~Battle-computers on line. 
0914                  Neutron blasters cleared for firing.~";
0915             NotUnderstood: "~Language banks unable to decode.~";
0916             default: "~Information. That function is unavailable.~";
0917         ],
0918    has  talkable proper static;
0919  Object -> -> force_wall "force wall"     with name "force" "wall" "shields";
0920  Object -> -> blasters "neutron blasters" with name "neutron" "blasters";
0921   
0922  ! --------------------------------------------------------------------------
0923   
0924  Object "Captain Picard"
0925    with name "captain" "picard",
0926    has  proper animate crewmember;
0927   
0928  Object Star_Trek "10 Forward"
0929    has  light,
0930    with description
0931            "The starswept observation lounge forward of deck 10
0932             of the Starship Enterprise, where many milkshakes have
0933             been consumed in crisis situations. (It's only a replica,
0934             of course, and the museum lies back @01.)",
0935         w_to Grammar_Hall;
0936   
0937  Object -> "informative plaque"
0938    with name "informative" "plaque",
0939         article "an",
0940         description
0941            "[The computer, called just ~computer~, is useful for locating
0942             crew-members: try ~computer, where is commander data~, or
0943             ~...captain picard~, or any of the other people who can be
0944             found in the Museum.^^
0945             The tricorder will scan something if you tell it the name of
0946             whom or what you wish to scan.^^
0947             The replicator is a superior drinks machine: for instance,
0948             Captain Picard is fond of saying ~replicator, tea earl grey~.
0949             There's also brandy and distilled water.]",
0950    has  static;
0951   
0952  Object -> "computer"
0953    with name "computer",
0954         initial "The computer, of course, always responds to your voice here.",
0955         grammar
0956         [;  return 'stc,';
0957         ],
0958         orders
0959         [;  Examine:
0960                 if (parent(noun)==0)
0961                     "~", (name) noun,
0962                     " is no longer aboard this demonstration game.~";
0963                 "~", (name) noun, " is in ", (name) parent(noun), ".~";
0964             default: "The computer's only really good for locating the crew.";
0965         ],
0966         life
0967         [;  Ask, Answer, Tell: "The computer is too simple.";
0968         ],
0969    has  talkable static;
0970   
0971  Object -> "tricorder"
0972    with name "tricorder",
0973         grammar
0974         [;  return 'tc,';
0975         ],
0976         orders
0977         [;  Examine: if (noun==player) "~You radiate life signs.~";
0978                 print "~", (The) noun, " radiates ";
0979                 if (noun hasnt animate) print "no ";
0980                "life signs.~";
0981             default: "The tricorder bleeps. It can only accept commands 
0982                 ~tricorder, ~.";
0983         ],
0984         life
0985         [;  Ask, Answer, Tell: "The tricorder is too simple.";
0986         ],
0987    has  talkable;
0988   
0989  Object -> "replicator"
0990    with name "replicator",
0991         initial
0992            "A replicator (i.e. Star Trek drinks machine) occupies a niche 
0993             in one wall.",
0994         grammar
0995         [;  return 'rc,';
0996         ],
0997         orders
0998         [;  Give:
0999                 "The replicator serves up a cup of ",
1000                 (name) noun, " which you drink eagerly.";
1001             default: "The replicator is unable to oblige. You must give 
1002                 it the name of a drink it knows about.";
1003         ],
1004         life
1005         [;  Ask, Answer, Tell: "The replicator has no conversation skill.";
1006         ],
1007    has  talkable static;
1008  Object -> -> "Earl Grey tea"    with name "earl" "grey" "tea";
1009  Object -> -> "Aldebaran brandy" with name "aldebaran" "brandy";
1010  Object -> -> "distilled water"  with name "distilled" "water";
1011   
1012  ! --------------------------------------------------------------------------
1013   
1014  Object "Sealed Room"
1015    with description
1016            "I'm in a sealed room, like a squash court without a door, 
1017             maybe six or seven yards across",
1018    has  light;
1019  Object -> "fish" with name "fish";
1020  Key -> "cadmium key"
1021    with name "cadmium",
1022         after
1023         [;  Drop: remove self; "The key smashes into smithereens!";
1024         ];
1025   
1026  Object -> martha "Martha"
1027     has animate female concealed proper crewmember
1028    with name "martha",
1029         orders
1030         [ r; r=parent(self);
1031             Give:
1032                 if (noun notin r) "~That's beyond my telekinesis.~";
1033                 if (noun==self) "~Teleportation's too hard for me.~";
1034                 move noun to player;
1035                 "~Here goes...~ and Martha's telekinetic talents 
1036                  magically bring ", (the) noun, " to your hands.";
1037             Look:
1038                 print "~", (string) r.description;
1039                 if (children(r)==1) ". There's nothing here but me.~";
1040                 print ". I can see ";
1041                 WriteListFrom(child(r),CONCEAL_BIT+ENGLISH_BIT);
1042                ".~";
1043             default: "~Afraid I can't help you there.~";
1044         ],
1045         life
1046         [;  Ask: "~You're on your own this time.~";
1047             Tell: "Martha clucks sympathetically.";
1048             Answer: "~I'll be darned,~ Martha replies.";
1049         ];
1050   
1051  ! ==========================================================================
1052   


Last updated 23 June 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.