! All Quiet on the Library Front ! An Interactive-Fiction Vignette by Michael Phillips (msphil@mail.wm.edu) ! (c) 1995 ! ! Switches ev5d; Constant Story "ALL QUIET ON THE LIBRARY FRONT"; Constant Headline "^An Interactive Vignette^"; Release 1; Constant MAX_SCORE 30; Constant OBJECT_SCORE 0; Constant ROOM_SCORE 0; Fake_Action Invoke; Statusline time; ! I only used these because I had access to a computer that ran through the ! abbreviation creation algorithm (for this game) in a couple minutes. Abbreviate ". "; Abbreviate ", "; Abbreviate " the "; Abbreviate "You"; Abbreviate "The"; Abbreviate "ing"; Abbreviate "circulation desk"; Abbreviate "reference librarian"; Abbreviate "That"; Abbreviate "you"; Abbreviate "Rare Books Room"; Abbreviate " th"; Abbreviate "librar"; Abbreviate " book"; Abbreviate " to"; Abbreviate " of"; Abbreviate "t i"; Abbreviate "and"; Abbreviate "tion"; Abbreviate " fi"; Abbreviate " com"; Abbreviate "'t see"; Abbreviate " lo"; Abbreviate "This"; Abbreviate " someth"; Abbreviate " for"; Abbreviate " game"; Abbreviate " de"; Abbreviate "ystem announces ~"; Abbreviate " no"; Abbreviate " have"; Abbreviate "Inform"; Abbreviate " are"; Abbreviate "ter"; Abbreviate " with"; Abbreviate "Encyclopedia Frobozzic"; Abbreviate " clos"; Abbreviate " need"; Abbreviate " Graham Nelson"; Abbreviate " on"; Abbreviate " in"; Abbreviate " co"; Abbreviate "ere"; Abbreviate " ha"; Abbreviate "for"; Abbreviate " can"; Abbreviate " is"; Abbreviate "ian"; Abbreviate " attendan"; Abbreviate " so"; Abbreviate "loor"; Abbreviate "tho"; Abbreviate "which"; Abbreviate " seem"; Abbreviate " already"; Abbreviate "t's"; Abbreviate "^A voice ov"; Abbreviate "urs"; Abbreviate " do"; Abbreviate " shelves"; Abbreviate " pr"; Abbreviate "irs"; Abbreviate " techn"; Abbreviate " gates"; Include "Parser"; Include "VerbLib"; ! ! This is the Lobby. Among the features are a circulation desk (with ! attendant), security gates, and card catalog. ! Object Lobby "Lobby" has light !has general ! if player has tried to leave without the book with name "entrance", description "This is the entrance to the library. There is the \ circulation desk, the card catalog, and security gates to \ prevent people from stealing books. Doors to the west lead \ to the book shelves, a door to the north is marked 'Private', \ and the exit is to the east.", w_to G_Flr_Stacks, before [; Go: if (noun==e_obj or out_obj) { if (parent(R_Key) ~= Circ_Attendant) "Whoops! You really need to return that key to the \ circulation desk!"; if (parent(ID_Card) ~= player) "Hey, don't forget your ID card! You can't eat without \ it, and there's a looooong week-end of writing ahead of \ you!"; if (parent(book) ~= player) "You're leaving without the book? You can't afford to \ do that, you'll flunk out!"; if (Sec_Gates hasnt general) "The alarm goes off as you try to leave, and, shamed, you \ turn back to the distrustful stare of the circulation \ desk attendant."; if (Circ_Attendant hasnt general) "As you are about to cross the threshold out, the guy at \ the circulation desk says, ~Hey, you can't leave with the \ book!~"; if (Ref_Librarian hasnt general) "The reference librarian comes into the lobby, huffing \ and puffing. ~I'm sorry, but we can't allow you out of \ the library with that valuable book.~ She heads back to \ the stacks as you turn away from the gates."; PlayerTo(End_Game); rtrue; } if (noun==n_obj) "That's a PRIVATE door, maybe you shouldn't go that way."; ]; Object Card_Catalog "card catalog" Lobby has scenery with name "card" "catalog" "drawers", description "This bank of small drawers filled with cards is covered \ with cobwebs. Looks like it doesn't see much use!"; Object Sec_Gates "security gates" Lobby has scenery !has general ! if currently being repaired by the technician with name "security" "gates", description [; if (self has general) "The security gates are in pieces, with parts strewn \ everywhere. It looks like someone could walk right out \ without setting off the alarm!"; "A pair of forbidding-looking, grey towers flank the \ exit. They are topped by a matching pair of red flashing lights, \ and they exude menace. It seems as if they are simply waiting \ for a chance to pounce on an unsuspecting book-smuggler."; ], before [; Disable: "Software was your specialty, not hardware."; ]; Object Pieces "Pieces-Parts" Lobby has scenery with name "pieces" "parts" "piece" "part" "hardware", description [; if (Sec_Gates has general) "Wow, what a lot of hardware on the floor!"; "You can't see any such thing."; ]; Object Circ_Desk "circulation desk" Lobby has scenery with name "circ" "circulation" "desk" "barrier", description "This imposing desk forms a barrier between the \ circulation staff and patrons. Many outdated notices and \ signs are posted on the walls nearby."; Object Signs "outdated signs and notices" Lobby has scenery, with name "outdated" "signs" "notices" "posters" "suggestions" "board" "calendar" "calendars", description "There are notices of closing times for each of the past \ ten years, posters mentioning upcoming events of 1971, calendars \ which are decades old, and a suggestion board that has a note \ saying the library could use some more books."; Object Private_Door "private door" Lobby has scenery, with name "private" "door" "sign", description "The door to the north has a large sign on it. The sign \ reads ~Private! Employees only!~"; ! ! The Circ Desk Attendant ! Object Circ_Attendant "circulation desk attendant" Lobby has animate, with name "attendant" "staff" "kid" "him" "he", description [; if (self has general) "The circulation desk attendant is thoroughly engrossed in \ the novel ~Debt of Honor~, by Tom Clancy."; "The circulation desk attendant is a bored-looking young man, \ who glances up from the novel he is reading (~Without Remorse~, \ by Tom Clancy), to survey the lobby."; ], life [; Give: if (noun == ID_Card) { move ID_Card to Circ_Attendant; move R_Key to player; if (R_Key hasnt general) score = score + 5; give R_Key general; "The circulation attendant gives you the key to the \ Rare Books Room, and he holds your ID card in exchange."; } if (noun == R_Key) { if (R_Door has open) "~Did you remember to close the \ door?~"; if (R_Door hasnt locked) "~Did you remember to lock the \ door?~"; move ID_Card to player; move R_Key to Circ_Attendant; "The circulation attendant puts the key away, then he \ returns your ID card."; } if (noun == novel) { if (self hasnt general) score = score + 2; give self general; move novel to Circ_Attendant; "The circulation attendant gets a big smile on his face. \ ~I wondered where that had gotten off to!~ He \ immediately becomes immersed in the novel."; } "~I don't need that.~"; Kiss: "~Yuck! Get away from me! I hate that mushy stuff!~ \ He turns away, muttering about technothrillers being better than \ ~that durn romantic stuff~."; Attack: "The desk attendant cowers. ~Don't hit me!~"; ThrowAt: "The desk attendant ducks, sighs, and returns the item \ from behind the circulation desk. ~You appear to have \ dropped this.~"; Show: if (noun==ID_Card) "~You need to give me the card before I can give you \ the key.~"; if (self has general) "The attendant seems immersed in ~Debt of Honor~, and you \ are utterly unable to get his attention."; if (noun==R_Key) "~You need to give me the key before I can return your \ ID card.~"; if (noun==novel) "~I've been looking for that ever since I lost it! \ Could you please give it to me?~"; "He doesn't appear to be interested other than his book."; Ask: if (second=='book' or 'bio' or 'biography' || second=='graham' or 'nelson' or 'help' || second=='find' or 'assistance' or 'where') "~Try talking to the reference librarian.~"; if (second=='key' or 'rare' or 'room') "~You need to give me your ID card in order to get the \ key to the Rare Books Room.~"; if (second=='reference' or 'librarian') "~Try going through those doors, she's probably at her \ desk.~"; if (second=='novel' or 'debt' or 'of' || second=='honor' or 'technothriller') { if (self has general) "~Thanks for finding it,~ he murmurs as he continues \ reading."; "~Yeah, a couple days ago I lost a novel upstairs.~"; } "He shrugs, and continues reading.~"; Answer: if (noun=='book' or 'bio' or 'biography' || noun=='graham' or 'nelson' or 'help' || noun=='find' or 'assistance' or 'where') "~Try talking to the reference librarian.~"; if (noun=='key' or 'rare' or 'room') "~You need to give me your ID card in order to get the \ key to the Rare Books Room.~"; if (noun=='reference' or 'librarian') "~Try going through those doors, she's probably at her \ desk.~"; if (noun=='novel' or 'debt' or 'of' || noun=='honor' or 'technothriller') { if (self has general) "~Thanks for finding it,~ he murmurs as he continues \ reading."; "~Yeah, a couple days ago I lost a novel upstairs.~"; } "He shrugs, and continues reading."; ]; ! ! The Rare Books Room Key ! Object R_Key "key" Circ_Attendant with name "key" "wood" "keychain" "chain", description "This key is on a flourescent yellow keychain, which \ is, in turn, attached to a rather large chunk of wood. The \ whole thing is awkward, and difficult to hide within a backpack \ (not that you have one with you) or a pocket."; ! ! The Ground Floor Stacks. The only thing of particular interest here is the ! reference librarian, who will be coded after the basic layout is done. ! Object G_Flr_Stacks "Ground Floor Stacks" has light, with name "ground floor stacks", description "This room is filled with half-empty shelves, upon which \ rest the boxes of many ancient and dusty early games. To one \ side, there is a desk, behind which sits a prim and proper \ librarian. She is probably the reference librarian, if the sign \ over her desk is any guide. A door to the north is marked \ ~Stairs~, and glass doors to the east lead to the lobby.", before [; Smell: "You're not sure exactly what the combination of books and \ old game boxes would smell like, but this room gives you \ something to compare it to."; ], e_to Lobby, out_to Lobby, n_to G_Flr_Stairwell; Object G_Flr_Shelves "ground floor shelves" G_Flr_Stacks has scenery, with name "shelves" "stacks" "books" "boxes" "games", description "The games on these shelves range from every installment \ of the Zork series, through something simply marked as LTOI. \ There is a special shelf devoted to a game called, simply, \ ~Curses~, with labels like ~R12~, ~R14~, ~R15~, and ~Curses95~. \ Other shelves cover ~Christminster~, ~Theatre~, ~Balances~, and \ many, many others.\ ^^Off in one corner are several magazines dedicated to IF, \ including XYZZYNews and SPAG."; Object G_Flr_Games "ground floor games" G_Flr_Stacks has scenery, with name "theatre" "balances" "curses" "curses95" "christminster" "ltoi" "box" "game", description "Wow, what a complete collection of games!", before [; Take: "You're in enough trouble grade-wise, now is not the time to \ get involved in a game!"; ]; Object Ref_Desk "reference desk" G_Flr_Stacks has scenery, with name "reference" "desk" "brown desk", description "The squat, brown desk is covered with papers, printouts, \ games, and source listings. It looks like the reference \ librarian has her hands full cataloging all this information!"; Object Ref_Sign "reference sign" G_Flr_Stacks has scenery, with name "sign", description "The sign reads ~Reference Librarian~, so it's a good \ bet that the person sitting at the desk is the reference \ librarian."; Object Ref_Doors "reference doors" G_Flr_Stacks has scenery, with name "doors" "double" "double-doors", description "These glass-paned doors lead to the Lobby."; Object Magazines "magazines" G_Flr_Stacks has scenery, with name "xyzzy" "xyzzynews" "news" "spag" "stack" "magazines", description "These IF magazines include XYZZYNews (named for an \ old magic word from ~Adventure~) and SPAG, the Society for \ the Preservation of Adventure Games."; ! ! The Reference Librarian ! Object Ref_Librarian "reference librarian" G_Flr_Stacks has animate female !has general ! if she is looking at the encyclopedia with name "reference" "librarian" "ref" "lib" "harried" "woman", description [; if (self has general) "The reference librarian is furiously arguing with the \ library's computer system, trying to get the Encyclopedia \ Frobozzica into the not-yet-ready online catalog."; "The reference librarian is a slender lady, looking a little \ harried. She certainly seems to have a lot of information \ around her!"; ], life [; Kiss: "Bookish people turn you on, eh?"; Attack, ThrowAt: "As prepare to do so, she looks at you sternly, and you \ quail under her gaze. Maybe some other time."; Give: if (noun==Frobozzica) { if (self hasnt general) score = score + 2; give self general; move Frobozzica to Ref_Librarian; "~Wow, a copy of the Encyclopedia Frobozzica! I've been \ wanting one of those! I need to add it to the \ collection right away.~ She begins furiously working at \ the computer at her desk."; } "~I don't need that, but thanks anyways.~"; Show: if (noun==Frobozzica) "~I've been waiting for a printout of that! Would you \ please give it to me?~"; "She sniffs and turns back to her work."; Order: "She sniffs and turns back to her work."; Ask: if (second=='book') "~What sort of book? We have many books here!~"; if (second=='biography' or 'graham' or 'nelson') "~Ah, that valuable book. We keep it locked away, in \ the Rare Books Room.~"; if (second=='rare' or 'books' or 'room' || second=='where') "~The Rare Books Room is on the second floor. Stairs are \ north of here. You will need the key, though.~"; if (second=='key' or 'locked' or 'lock') "~The key may be obtained at the circulation desk.~"; if (second=='techie' or 'technician') "~Ah, yes, he is currently printing some very important \ information out for me.~"; if (second=='printout' or 'encyclopedia' or 'frobozzica') "~I am waiting for the Encyclopedia Frobozzica, which the \ technician is currently printing out for me.~"; if (second=='attendant' or 'circulation') "~He's always reading. I think he lost a book recently.~"; if (second=='novel') "~I'm pretty certain the circulation desk attendant lost \ a novel upstairs recently.~"; "The reference librarian looks at you sternly and asks that \ you please be quiet."; Answer: if (noun=='book') "~What sort of book? We have many books here!~"; if (noun=='biography' or 'graham' or 'nelson') "~Ah, that delicious book. We keep it locked away, in \ the Rare Books Room.~"; if (noun=='rare' or 'books' or 'room' || noun=='where') "~The Rare Books Room is on the second floor. Stairs are \ north of here. You will need the key, though.~"; if (noun=='key' or 'locked' or 'lock' || noun=='may') "~The key may be obtained at the circulation desk.~"; if (noun=='techie' or 'technician') "~Ah, yes, he is currently printing some very important \ information out for me.~"; if (noun=='printout' or 'encyclopedia' or 'frobozzica') "~I am waiting for the Encyclopedia Frobozzica, which the \ technician is currently printing out for me.~"; if (noun=='attendant' or 'circulation') "~He's always reading. I think he lost a book recently.~"; if (noun=='novel') "~I'm pretty certain the circulation desk attendant lost \ a novel upstairs recently.~"; "The reference librarian looks at you sternly and asks that \ you please be quiet."; ]; ! ! The Ground Floor Stairs. ! Object G_Flr_Stairwell "Ground Floor Stairwell" has light, with name "ground floor stairs", description "Grungy stairs lead upwards, to the second level. A \ particularly inane and dusty picture hangs on the wall. The \ door to the ground floor shelving area is to the south.", before [; Smell: "There is a slight, fishy odor."; ], u_to S_Flr_Stairwell, s_to G_Flr_Stacks, out_to G_Flr_Stacks; Object G_Flr_Painting "ground floor painting" G_Flr_Stairwell has scenery, with name "inane" "dusty" "picture" "painting", description "You're not certain, but the painting could be some \ sort of stylized game company logo. Then again, it might also \ be the random splotches caused by a monkey flinging paint at a \ canvas."; Object G_Flr_Stairs "stairs" G_Flr_Stairwell has scenery, !general if red herring found with name "stairs" "steps" "stairway" "stair" "dust" "bunnies", description "These grungy stairs lead upwards. Dust bunnies romp \ and play all over the place, and the dust sure seems thick. \ Maybe the cleaning staff is on vacation.", before [; LookUnder: if (self has general) "You find nothing."; give self general; move Red_Herring to player; score = score + 1; "You found a red herring!"; ]; Object Red_Herring "red herring" !has nothing ! No, really! with name "red" "herring" "fish", description "This is a smelly, reddish fish."; ! ! The Second Floor Stairs ! Object S_Flr_Stairwell "Second Floor Stairwell" has light, with name "second floor stairs", description "Grungy stairs lead downwards. The lights are dim, and \ a painting hangs on the wall. A door to the south appears to \ open into a room of shelves.", before [; Smell: "You sneeze from inhaling the dust!"; ], d_to G_Flr_Stairwell, s_to S_Flr_Stacks, out_to S_Flr_Stacks; Object S_Flr_Stairs "stairs" S_Flr_Stairwell has scenery, with name "stairs" "steps" "stairway" "stair" "dust", description "The stairs wind down into the dinginess. They could \ use a good sweeping and mopping, or even some traffic to cut \ through all the dust."; ! The GRUE, which sits invisibly, and will eat the fish if it is given ! to it! Object Grue "grue" S_Flr_Stairwell has animate concealed, with name "black" "picture" "painting" "plaque" "grue" "canvas", description "This painting could almost pass for a black canvas. \ The small plaque below it has ~Grue~ engraved.", life [; ThrowAt, Attack: "Defacing paintings? Why?"; Touch, Kiss, Show, Ask, Answer: "It's just a painting."; Give: if (noun == Red_Herring) { remove Red_Herring; score = score + 2; "It almost appears as if an indescribable blackness forms \ in the painting and reaches out, taking the herring. It \ is followed by a terrible gnawing noise, and then all is \ silent again."; } "Give something to a painting? You've got to be kidding!"; ]; ! ! The Second Floor Stacks ! Object S_Flr_Stacks "Second Floor Stacks" has light, !has general ! after the 'maze of twisty shelves' joke with name "second floor stacks", description [; if (self hasnt general) { print "You are in a maze of twisty shelves, all alike.\ ^^(Well, okay, not really)^^"; give self general; } "This room is full of shelves. There is a door to the east, \ which has a sign ~Computers~ over it, and the stairwell to the \ north."; ], n_to S_Flr_Stairwell, in_to R_Door, s_to R_Door, out_to S_Flr_Stairwell, e_to Computer_Lab; Object S_Flr_Shelves "Second Floor Shelves" S_Flr_Stacks has scenery, !has general ! if the novel "Debt of Honor" has been found with name "stacks" "shelves" "books" "games" "labels", description "These shelves are bare, although they seem to be \ well-dusted. Labels are already on the sides, despite the lack of \ a collection. The labels read ~FTP~ on the far left, ~GMD~ in the \ middle and ~DE~ on the far right. \ ^^It is a very confusing order, not Dewey Decimal or \ alphabetical. At a guess, it is the Library of Congress \ classification system.", before [; LookUnder, Search: if (self has general) "The shelves are bare, and surprisingly free of dust."; give self general; move novel to player; score = score + 5; "Tucked away in a corner, you find the novel ~Debt of Honor~, \ by Tom Clancy. Someone must've lost it!"; ]; Object S_Flr_Sign "sign" S_Flr_Stacks has scenery, with name "sign" "circulation", description "The sign reads ~Key may be obtained from the circulation \ desk."; Object R_Door "rare books door" S_Flr_Stacks has static door openable locked lockable, with name "rare" "door", description "It is a heavy, wooden door with a sign reading \ ~Rare Books Room~ on it.", door_dir S_Flr_Stacks, door_to Rare_Books_Room, describe [; if (self has open) "^The door stands open."; if (self hasnt locked) "^The door is unlocked but shut."; if (self hasnt general) "^A heavy wooden door bars the way to the rare books room. \ A sign indicates that the key may be obtained from the \ circulation desk."; "^A heavy wooden door bars the way to the rare books room."; ], before [; Unlock: give self general; ], found_in S_Flr_Stacks, with_key R_Key; ! ! The novel ! Object novel "copy of ~Debt of Honor~" !has nothing ! no, really! with name "debt" "honor" "novel" "paperback" "tom" "clancy" "techno" "thriller" "technothriller", description "A rollicking read, but not quite suited to your tastes \ (which run more towards fiction with a good atmosphere, \ memorable characters, and a certain level of interaction with \ the plot)."; ! ! The Computer Lab. This room has a number of computers, but more ! importantly, it has a printout of the Encyclopedia Frobozzica (to use ! on the Reference Librarian), and the Technician, who can be convinced ! to screw up the gates. ! Object Computer_Lab "Computer Lab" has light, with name "computer lab", description "This room has a score of computers, and a stack of \ printouts. A printer at the far side of the room is churning \ out a massive printout.", w_to S_Flr_Stacks, out_to S_Flr_Stacks; Object Computer_Screens "Computer Screens" Computer_Lab has scenery, with name "computer" "computers" "screen" "screens" "terminal" "terminals", description "The faintly-glowing, phosphorescent screens are \ displaying various IF games in different positions. There are \ also some screen dumps, and the technician's terminal is showing \ a maze of twisty Web pages, all alike."; Object How_To_Book "howto manual" Computer_Lab has scenery, !has general ! if the entire description has been used with name "how-to" "howto" "how" "to" "manual" "security" "gates" "technical", description [; if (Technician has general) "You can't see any such thing."; if (self has general) "What a complicated series of diagrams!"; give self general; "This is a very complicated and technical manual. Hmmmm, \ maybe you'd understand it better if you had concentrated on \ hardware instead of software. Quite frankly, the circuit \ diagrams and instructions are incomprehensible. Better leave \ that sort of work to a professional!"; ]; Object Print_Out "Print Out" Computer_Lab has scenery, with name "printout" "printouts" "print" "printer" "printers", description "The printer is churning away at the source for a \ very complicated game, while a stack of printouts is piled \ nearby.", before [; Take: if (Technician hasnt general) { <> } "Wow, there's a lot of printouts here! You couldn't possibly \ carry all of them."; Search, Examine: if (Technician hasnt general) { <> } if (Frobozzica has general) { "You find nothing."; } give Frobozzica general; move Frobozzica to player; score = score + 5; "Wow, a complete copy of the ~Encyclopedia Frobozzica~! \ You take it, as it might prove useful."; ]; ! ! The Technician ! ! Note the customization of several actions, and the description which alters ! depending on whether or not he is currently repairing the gates. ! Object Technician "technician" Computer_Lab has animate, !has general ! if the technician is downstairs, repairing the gates with name "technician" "techie" "man", description [; print "This frazzled-looking man is slender, wears glasses, and \ exhibits nervous twitching. He is obviously uncomfortable \ around people, and the pallor of his skin indicates that he \ spends his time away from the sun.^^"; if (self has general) "He has taken the security gates apart, and he is poring \ over a maintainence manual, complaining the whole time."; "Between mysterious actions performed at his computer, he \ is skimming a How-To manual for repairing library security \ systems, and cursing the unreliability of the security \ gates."; ], life [; Attack, ThrowAt: "He looks harmless enough. No need to do that!"; Kiss: "Geeky-looking guys in glasses turn you on, eh?"; Give: if (noun==Frobozzica) "~No, that's for the librarians. I don't need it.~"; "The technician refuses. ~With my computers, I have all \ I need!~"; Show: if (noun==Frobozzica) "~That printout is for the librarians.~"; Ask: if (self has general) "~Hey, I gotta fix these gates before going home. Go \ pester the librarians, or something.~"; if (second=='security' or 'gates' or 'problem' || second=='broken' or 'fix' or 'entrance' || second=='gate' or 'tower' or 'towers') { if (self hasnt general) score = score + 2; give self general; move self to Lobby; give Sec_Gates general; "Muttering under his breath about the unreliability of \ the security system, the technician immediately heads \ to the lobby."; } "~Yeah, sure. Whatever. Don't distract me. I have work \ to do for the librarians.~"; Answer: if (self has general) "~Hey, I gotta fix these gates before going home. Go \ pester the librarians, or something.~"; if (noun=='security' or 'gates' or 'problem' || noun=='broken' or 'fix' or 'entrance' || noun=='gate' or 'tower' or 'towers') { if (self hasnt general) score = score + 2; give self general; move self to Lobby; give Sec_Gates general; "Muttering under his breath about the unreliability of \ the security system, the technician immediately heads \ to the lobby."; } "~Yeah, sure. Whatever. Don't distract me. I have work \ to do for the librarians.~"; Order: if (second=='fix') { move self to Lobby; give Sec_Gates general; "Muttering under his breath about the unreliability of \ the security system, the technician immediately heads \ to the lobby."; } "~Yeah, whatever. Leave me alone, I have work to do.~"; ], before [; Invoke: if (self hasnt general) { "The technician blocks you. ~Uh-uh! Those printouts \ are for the librarians, so keep your hands off!~"; } ]; ! ! The Encyclopedia Frobozzica ! ! Note that this does *not* start in a room! It only becomes available after ! the player *searches* the printouts (which, of course, requires that the ! technician is not in the room). ! Object Frobozzica "printout of the Encyclopedia Frobozzica" !has general ! if the player has found it with name "encyclopedia" "frobozzica" "printout", description "This is a lengthy printout of the life and times of the \ entire Zork series, cross-referenced and annotated. It appears \ to have been printed from a World-Wide Web page. There sure is \ a lot of information in it! \ ^^(Unfortunately, none of it is even remotely useful to you at \ the present time.)"; ! ! The Rare Books Room ! Object Rare_Books_Room "Rare Books Room" has light, with name "rare books room", description "The shelves are nearly bare, although there is a \ complete set of the ~New Zork Times~, a box labeled \ ~Avalon~, and several biographies of various computer game \ authors. The door out is to the north", out_to S_Flr_Stacks, n_to S_Flr_Stacks; Object Biographies "biographies" Rare_Books_Room has scenery, with name "books" "biographies" "various" "computer" "game" "authors", description "There are half a dozen biographies of computer game \ authors, including William Gates III, who is said to have \ produced a game called, simply, ~Microsloth Windoesn't~."; Object Avalon "avalon" Rare_Books_Room has scenery, with name "avalon", description [; print "Whoa, you thought this game was merely a legend, but \ here is a "; style bold; print "real copy"; style roman; "!"; ]; ! ! The Book (the object of your search!) ! Object book "biography of Graham Nelson" Rare_Books_Room with name "book" "bio" "biography" "graham" "nelson" "grimoire" "text", description "This charming little book details the life and times \ of Graham Nelson, author of ~Inform~, ~Curses~, ~Jigsaw~, \ and other fascinating IF adventures. It will be invaluable \ in saving your tail, given that you have slacked off all \ semester long!", before [; Take: if (self hasnt general) score = score + 5; give self general; ]; ! ! The ID Card, which begins in the player's possession (this is a convenient ! place to define it) ! Object ID_Card "ID card" with name "id" "card" "id card", article "an", description "This small, plastic card has all sorts of information \ about you, most of it at least half wrong, and a picture of you \ that doesn't look anything like you at all."; Object End_Game "End Game" has light, with description [; if (book notin player) { deadflag = 3; "You are kicked out of the library without the needed \ biography, and so you flunk the course, drop out of college \ in disgrace, and spend the rest of your days as the peon \ who sorts the hate mail in Microsoft's mail room.\ ^^Life sucks, doesn't it?"; } deadflag = 2; print "^^You succeed in gaining the biography, and you exit the \ library. The paper is written over the week-end, you return \ the book on Monday (of course), and you pass the class with \ flying colors (despite slacking off for the whole semester), and \ you graduate from college. \ ^^Shortly thereafter, you meet an investor who loves IF, and you \ write a wildly successful game, get rich off of it, and live \ the rest of your life thanking all the IF authors of the past."; ]; ! One last item -- the daemon which will announce how long until closing, ! and kick the player out if it passes 5:00 p.m. Object Kick_Out "kick out" with daemon [; if (the_time == 960) "^A voice over the PA system announces ~It is now 4:00. The \ library will be closing in one hour.~"; if (the_time == 990) "^A voice over the PA system announces ~It is now 4:30. The \ library will be closing in half an hour.~"; if (the_time == 1005) "^A voice over the PA system announces ~It is now 4:45. The \ library will be closing in fifteen minutes.~"; if (the_time == 1015) "^A voice over the PA system announces ~It is now 4:55. The \ library will be closing in five minutes.~"; if (the_time == 1020) { print "^A voice over the PA system announces ~The library \ is closing!~"; if (book in player) { remove book; print "^The librarian escorting you out of the library \ relieves you of the biography.^"; } PlayerTo(End_Game); } ]; [ DeathMessage; if (deadflag == 3) print "YOU HAVE LOST!"; ]; [ Initialise; location = Lobby; move ID_Card to player; ! 930 = 15*60 + 30 = 15:00 = 3:00 p.m. SetTime(900, 1); StartDaemon(Kick_Out); lookmode=2; print "^You are a student at Anycollege, in Anytown, and it's \ the end of the semester! You've been slacking off all \ semester long, and it's catching up to you. \ That final paper is due for your Computer Science class \ (~The History of IF Games~), and you desperately need to \ check out a comprehensive book on Graham Nelson, one of the \ foremost authors of the obscure genre of interactive-fiction. \ You know there is exactly one such book, but you have no idea \ where it might be! \ ^^The first time player should probably type ~help~.^^"; ]; ! ! This isn't a very clever way of doing this, and arguably is a bit wasteful. ! As a result, in Release 2 this is implemented using a variable. ! Object XyzzyStorage "xyzzy object" !has general ! if XYZZY has been used with name "doesn^t exist!", description "what a hollow voice!"; [ XyzzySub; if (XyzzyStorage hasnt general) score = score + 1; give XyzzyStorage general; "You invoke an ancient word of power, and a hollow voice whispers \ in your ear, ~Quiet, please. No talking in the library.~"; ]; [ HintsSub; if (R_Key hasnt general) "It might be a good idea to find the biography and get to wherever \ it is!"; if (book hasnt general) "Hmmmm, maybe you should find and get the book!"; if (Sec_Gates hasnt general) "Surely there's a way to disable the gates! Uh, could you get \ someone to help you with it or to do it for you? (You never were \ that good at hardware problems!)"; if (Circ_Attendant hasnt general) "Hmmmm, I wonder if there isn't something that could distract the \ circulation attendant....."; if (Ref_Librarian hasnt general) "I wonder what could possibly interest the librarian enough to get \ her to overlook your pilfering?"; "Maybe heading out of the lobby will get you away!"; ]; ! ! Due to the rigors of learning a new language, coming up with an idea ! (however pedestrian it may be) and implementing it, I did not feel I had ! the time to mess around with the DoMenu command. The reader is referred ! to the source code in Release 2 for a better implementation of the help ! system (which does understand several topics). ! [ HelpSub; "ALL QUIET ON THE LIBRARY FRONT was written by Michael S. Phillips \ (msphil@@64aardvark.cc.wm.edu) for the 1995 interactive fiction \ competition. \ ^^ For more information, try ~help xxx~, where xxx is one of the \ following: author, gmd, inform, intro (or introduction), or license. \ The command for the hints is ~hints~. \ ^^Relax, this game is easy (as these things go)....."; ]; [ HelpLicenseSub; "This game is (c) 1995 Michael S. Phillips. It may be freely distributed \ electronically, provided it remains unmodified (in other words, it can be \ uuencoded, MIME-encoded, etc., but not hacked up and re-distributed). \ ^^It was written for the 1995 interactive fiction competition using \ Inform, the free Z-Machine game compiler written by Graham Nelson and \ available, along with various higher-quality games (many referenced \ herein), at ftp.gmd.de. \ ^^Though it uses the Infocom Z-Machine file format, no code is derived \ from Infocom sources. \ ^^Try ~help inform~ or ~help gmd~ for FTP and compiler information."; ]; [ HelpIntroSub; "The Computer Science class on Interactive Fiction (CS 441) sounded \ really interesting when you signed up for it. Of course, with all the \ IF games to play, you slacked off all semester, and here it is, finals \ time, and you're in trouble. \ ^^However, to get yourself out of the hole you dug for yourself, the \ professor has stated that an in-depth paper studying Graham Nelson \ (author of the Inform compiler, used in the course) will get you a \ passing grade. \ ^^You know there's a biography on him somewhere in the pitiful library \ this university has, but you've never set foot in the library before! \ So, all you have to do is find this book and get out the door with it. \ The professor was kind enough to point out that the book is \ non-circulating, which means you can't check it out. \ ^^Oh yes, due to budget constraints, the library is no longer open on \ week-ends, and it's Friday afternoon. The library closes at 5:00 p.m., \ and the paper is due Monday morning at 8:00 a.m. ^^This game defaults to ~Verbose~ mode. To return to normal game play, use the command ~Brief~."; ]; [ HelpInformSub; "Inform is written and maintained by Graham Nelson, who is also the \ author of ~Curses~, ~Balances~, and the forthcoming ~Jigsaw~. The \ current version (as of this writing) is Inform 5.5, with library 5/11, \ which were used to compile this game. \ ^^Inform takes the source file(s) and generates a machine-independant \ Z-code file, which may be run on any of several Z-machine interpreters. \ The Z-machine format was invented and first used by Infocom. \ ^^Inform is available from ftp.gmd.de, in the directory \ /if-archive/infocom/compilers/inform. Documentation, a number of \ example games and pre-compiled binaries of inform are available."; ]; [ HelpGMDSub; "The big repository of Interactive Fiction on the Internet is ftp.gmd.de, \ which is probably where this game was found. Check out \ /if-archive/competition for the other competition game files, and \ /if-archive/games/infocom for the Inform-based games such as ~Curses~, \ ~Theatre~, ~Jigsaw~ (forthcoming as of this writing), ~Christminster~, \ ~Balances~, and others. \ ^^Also look in /if-archive/infocom/compilers/inform for information \ about Inform, the free Infocom Z-Machine game compiler."; ]; [ HelpAuthorSub; "This vignette was written by Michael S. Phillips, based (extremely) \ loosely on the library in which he works. The author may be reached at \ msphil@@64aardvark.cc.wm.edu. \ ^^He would like to express thanks to those people he browbeat into testing \ this, and to Gareth Rees for his excellent tutorial (check it out at \ http://www.cl.cam.ac.uk/users/gdr11/inform/) and to Graham Nelson for \ Inform, and all the folks on rec.arts.int-fiction and \ rec.games.int-fiction for rekindling his interest in interactive fiction."; ]; [ BadHelpSub; "I didn't understand that request for help. The words known to the help \ subsytem are: author, ftp, inform, intro, and license."; ]; [ DisableSub; "You're not sure how to do that."; ]; Include "Grammar"; Verb "xyzzy" * -> Xyzzy; Verb "hint" "hints" * -> Hints; Verb "help" * -> Help * "xxx" -> Help * "license" -> HelpLicense * "licence" -> HelpLicense * "intro" -> HelpIntro * "introduction" -> HelpIntro * "author" -> HelpAuthor * "ftp" -> HelpGMD * "gmd" -> HelpGMD * "ftp.gmd.de" -> HelpGMD * "inform" -> HelpInform * special -> BadHelp; Verb "disable" * noun -> Disable; end;