!---------------------------------------------CODING NOTES ! NOTES on coding style: ! ! Objects always begin with capital letters, and for compound names, ! the first letter of each word is capitalized. ! ! I use the variable "general" to indicate when puzzles are solved. ! I always give "general" to the object directly involved with the puzzle. ! For example, if one puzzle is to read a tabloid magazine, I give ! the magazine "general" when the player types "read magazine" ! ! Objects are declared in the order they appear in the room hierarchy. ! Example: ! Kitchen ! Door ! Counter ! Sink ! Fridge ! Milk ! etc... ! ! For each door, I declare it twice. For example, if there is a door ! between room A and room B, I declare 2 objects representing doors: ! A_B and B_A. By opening one, the other corresponding door on the other ! side is automatically opened to ensure consistency. !---------------------------------------------MAP ! ! ------------- ! | Kitchen | ! ------------- ! | ! ------------- ! |Living Room| ! ------------- ! | ! ------------- ------------- ------------- ------------- ! | Store | - | Street | - | Courtyard | - | Graceland | ! ------------- ------------- ------------- ------------- ! | ! ------------- ! |Gas Station| ! ------------- ! !---------------------------------------------TITLE Constant Story "Monty Bing and his Search for the King"; Constant Headline "^An Interactive Fiction Story^ Copyright (c) 2001 by Scott Stella.^"; !---------------------------------------------INCLUDES Include "Parser"; Include "VerbLib"; Include "Grammar"; !---------------------------------------------HIDDEN OBJECTS ! These are objects that are created or given to the player ! during the course of the game. They are not present in any ! existing room, but are put into the players possession. !********Sandwich ! Given to the player when he/she "makes a sandwich" using the ! peanut butter, banana, and bread. Object Sandwich "peanut butter and banana sandwich" has edible absent with name "sandwich", description "Just like the king, you love a good peanut butter and 'nanner sandwich!", before [; ! Do not allow player to eat sandwich Eat: "You're not hungry...you've already eaten one sandwich."; ]; !********Money ! Given to the player at the beginning of the game Object Money "couple bucks" has absent with name "money" "dollar" "dollars" "bill" "bills", description "You only have a couple bucks to your name"; !********Ticket ! Given to the player by the admissions woman at Graceland after the ! player presents his ID card to her. Object Ticket "ticket to Graceland" has absent with name "ticket" "pass" "Graceland" "admission", description "Graceland: admit one"; !---------------------------------------------VERBS !********Pet (Cat) ! Defined so that player can interact with his/her cat Verb "pet" "scratch" * noun -> Pet; [PetSub; !Only allow player to pet certain designated objects "You can't pet that!"; ]; !********Play (RecordPlayer) ! Defined so that the player can play the stereo Verb "play" * noun -> Play; [PlaySub; !Only allow player to play certain designated objects "You can't play that!"; ]; !********Stop (RecordPlayer) ! Defined so that the player can stop the stereo Verb "stop" * noun -> Stop; [StopSub; !Only allow player to stop certain designated objects "You can't do that!"; ]; !********Dance (self) ! Defined to allow the player to dance ! (Note: can only dance in the living room, and while ! the record player is on) Verb "dance" "boogie" * -> Dance; [DanceSub; ! Check the location if (player in LivingRoom) { ! Make sure music is playing if (RecordPlayer hasnt on) { "Not now...there's no music!"; } else { ! Solve record player puzzle give RecordPlayer general; print "You feel overcome by the music and start dancing. After several minutes, you've worked up quite an appetite!"; } } else { "Not here."; } ]; !********Make (Sandwich) ! Defined to allow the player to make a sandwich ! (Note: can only make a sandwich if the player has ! read the cookbook, and has the right ingredients) Verb "make" "prepare" * "sandwich" -> Make; [MakeSub; ! Make sure player has read the cookbook if (CookBook has general) { ! Make sure player is carrying the right ingredients if (Banana in player && Bread in player && PeanutButter in player) { !Give player sandwich and remove ingredients from player possession move Sandwich to player; remove Banana; remove Bread; remove PeanutButter; "Using the bread, peanut butter, and banana, you whip up your specialty - a peanut butter and banana sandwich. You make two sandwiches, immediately consuming one, and saving one for later."; } else { "Great idea! A Peanut Butter and Banana sandwich would hit the spot right now...but you don't have the right ingredients."; } } else { "You really not inspired to make a sandwich right now...you don't even know what kind of sandwich you could make."; } ]; !---------------------------------------------LIVING ROOM !********LivingRoom ! Contains: ! Door to kitchen ! Door to street ! Table ! Membership card ! Posters ! Record player ! Couch ! Cat Object LivingRoom "Monty's Living Room" with name "living" "family" "room", description "It isn't much to look at, but you call it home. Your Memphis apartment is modestly furnished and poorly decorated. To your right, your prized Elvis record collection rests in a bookcase against the wall. Above it hang several Elvis movie posters. On the far side of the room, your cat Priscilla sleeps quietly on an old, delapidated couch.", n_to LivingRoom_Kitchen, s_to LivingRoom_Street; !********LivingRoom_Kitchen (door) Object -> LivingRoom_Kitchen "door leading to the kitchen" has static door openable with name "door" "kitchen", initial "There is a door leading to your kithen.", description "It's just a door leading to your kitchen.", before [; Go: ! Verify that the door is open if (self hasnt open) { "You might want to open the door first."; } ], ! Open the corresponding inverse door after [; Open: give Kitchen_LivingRoom open; Close: give Kitchen_LivingRoom ~open; ], when_open "An open door leads to your humble kitchen", when_closed "A door blocks your entrance into the kitchen", door_to Kitchen, door_dir n_to; !********LivingRoom_Street (door) Object -> LivingRoom_Street "front door leading to the street" has static door openable with name "door" "front" "apartment" "street", description "It's just your front door leading to the street outside.", before [; Open: ! Make sure player has discovered empty fridge if (Fridge hasnt general) { "You really have no reason to go out (pretty sad, eh?)."; } Go: ! Verify that the door is open if (self hasnt open) { "You might want to open it first."; } ], ! Open the corresponding inverse door after [; Open: give Street_LivingRoom open; Close: give Street_LivingRoom ~open; ], when_open "Your front door is open", when_closed "Your front door is closed", door_to Street, door_dir s_to; !********Table Object -> Table "Coffee Table" ! general if you've taken the membership card has static supporter with name "table" "coffee", initial "A coffee table sits in the center of the room, cluttered with all of your junk.", description "Lots of junk here...", after [; Examine: ! See if player has alredy examined the coffee table if (self hasnt general) { ! Reveal membership card give MembershipCard ~concealed; "Hey, there's the membership ID card that you lost!"; } else { "Nothing worth taking."; } ]; !********MembershipCard Object -> -> MembershipCard "membership Card" has concealed with name "ID" "card" "membership" "Elvis" "Alive", initial "Your Elvis Is Alive membership card sits on the coffee table.", description "It reads:^Elvis is Alive! - A Society for Believers^Montgomery J. Bing - Member, 1990.^You have been a member of this society ever since you were 18 years old...it's basically a group of people who think that Elvis never really died. You would love to be the person who finally proves what so few believe...^Not only do you get a monthly newsletter with your membership, but also free lifetime admission to Graceland!", after [; Take: ! Solve coffee table puzzle give table general; "You slip the card into your wallet."; Drop: "You put the card down."; ]; !********Poster Object -> Poster "Elvis poster" has concealed static scenery with name "poster" "posters" "picture" "pictures" "elvis" "movie", description "On your wall hang posters from Jailhouse Rock, Viva Las Vegas, and Clambake: three of your favorite movies!"; !********RecordPlayer Object -> RecordPlayer "record player" ! general if player has danced to the music has static switchable with name "record" "player" "stereo" "radio", description "You bought this record player one week before the King's alleged death. You just can't bear to part with it.", before [; Play,SwitchOn: ! Make sure record player is off if (RecordPlayer has on) { "It already playing your favorite record! (maybe you should have your ears examined...)"; } else { ! Turn on record player give RecordPlayer on; "You take Elvis' Greatest Hits out of its case and place it on the record player. Blue Suede Shoes crackles out of the old speaker. You suddenly feel inclined to dance!"; } Stop,SwitchOff: ! Make sure record player is on if (RecordPlayer hasnt on) { "It's already off! (maybe you should have your ears examined...)"; } else { ! Turn off record player give RecordPlayer ~on; "You lift the needle, remove the record and put it back in the case."; } ]; !********Couch Object -> Couch "Couch" has concealed static supporter enterable with name "couch" "old" "delapidated" "sofa", description "The couch is falling apart, but damn, is it ever comfortable! Your kitty sleeps soundly on one end."; !********Cat Object -> -> Cat "Cat" has animate female concealed static with name "cat" "kitty" "kitten" "Priscilla", description "Your calico kitten, Priscilla, has been with you for two years now.", before [; Take: "Nah, just let her sleep."; Pet: "Priscilla purrs as she rubs her head against your hand. She then proceeds to fall back asleep."; ], life [; Ask,Answer,Order: "Meow."; Kiss: "You kiss Priscilla on the head. She purrs and continues napping."; Attack: "Never!"; ]; !---------------------------------------------KITCHEN !********Kitchen ! Contains: ! Door to living room ! Fridge ! Milk ! Counter ! Cookbook ! Sink Object Kitchen "Monty's Kitchen" with description "The kitchen is outdated and cramped. The last time your kitchen was re-decorated, Elvis was live in concert! You see a sink, a counter, and your appliances.", s_to LivingRoom; !********Kitchen_LivingRoom (door) Object -> Kitchen_LivingRoom "door leading to the living room" has static door openable with name "door" "living" "room", description "It's just a door leading to your living room.", before [; Go: ! Verify that the door is open if (self hasnt open) { "You might want to open it first."; } ], ! Open the corresponding inverse door after [; Open: give LivingRoom_Kitchen open; Close: give LivingRoom_Kitchen ~open; ], when_open "An open door leads back to your living room", door_to LivingRoom, door_dir s_to; !********Fridge Object -> Fridge "refridgerator" ! general if you've already opened the fridge has static openable container, with name "fridge" "refridgerator" "icebox", initial "The refridgerator hums quietly in the corner of the kitchen.", description [; ! Make sure the player has danced and worked up an appetite if (RecordPlayer has general) { "Your stomach growls slightly as you glance at the fridge...dancing has made you work up quite an appetite!"; } else { "It's the same fridge you see every day. You don't feel hungry enough to open it yet."; } ], before [; Open: ! Make sure the player has danced and worked up an appetite if (RecordPlayer hasnt general) { "You're just not hungry."; } ], after [; Open: ! Solve fridge puzzle give self general; "You open the refridgerator only to be greeted by stale milk (Yuck!).^^You think to yourself, I guess I should go to the grocery store and get some food."; ]; !********SpoiledMilk Object -> -> SpoiledMilk "bottle of spoiled milk" has static, with name "milk" "bottle" "stale" "spoiled" "dairy" "bottle", description "Expires (six months ago)", before [; Take: ! Prevent player from taking milk "Are you insane? I wouldn't advise drinking that!"; ]; !********KitchenCounter Object -> KitchenCounter "counter top" has static concealed supporter, with name "kitchen" "counter" "top" "countertop", description "The counter top is made of a light, grainy wood-like material. There is a sink there, as well as your only cookbook.", before [; Climb: ! Prevent player from climbing on counter "You shouldn't do that."; ]; !********CookBook Object -> -> CookBook "cook book" ! general if you've already found the PBB sandwich recipe with name "cook" "book" "cookbook", description "Elvis' Favorite Recipes. It is a rather large (the King liked food!) leather-bound cook book.^", after [; Examine: ! Solve cookbook puzzle give self general; "Hmmmm...this recipe looks good; it's a recipe for Peanut Butter and Banana Sandwiches. It says here that it was a known fact the Elvis could never resist one of these savory Memphis delicacies.^Ingredients: bread, peanut butter, and one ripe banana."; ]; !********Sink Object -> -> Sink "sink" has static concealed switchable, with name "sink" "faucet", description "The sink is made of stainless steel; it has a faucet and two handles.", before [; SwitchOn: ! Verify that sink is off if (Sink has on) { "It's already running"; } else { ! Turn on sink give Sink on; "You turn the handle and wather begins to flow out."; } Stop,SwitchOff: ! Verify that sink is on if (Sink hasnt on) { "It's alredy off"; } else { ! Turn off sink give Sink ~on; "You turn the handle, which faintly squeaks, to the off position."; } ]; !---------------------------------------------STREET !********Street ! Contains: ! Door to living room ! Door to store ! Door to Graceland ! Door to gas station Object Street "Street Outside the Apartment" with name "apartment" "street" "front", description "Your apartment is in the center of downtown Memphis. The street heads in all directions; there are plenty of places you can walk to from here.", n_to Street_LivingRoom, w_to Street_Store, e_to Street_Graceland, s_to Street_GasStation; !********Street_LivingRoom (door) Object -> Street_LivingRoom "front door leading to your apartment" has static door openable with name "door" "front" "apartment" "street", description "It's just the front door to your crummy apartment.", ! Open the corresponding inverse door after [; Open: give LivingRoom_Street open; Close: give LivingRoom_Street ~open; ], when_open "Your front door is open (I hope no one robs you!).", when_closed "The door to your apartment is closed.", door_to LivingRoom, door_dir n_to; !********Street_Store (path) Object -> Street_Store "sidewalk running from your apartment to the grocery store" has static door open with name "path" "sidewalk" "store", description "The cracked sidewalk runs westward down the street and ends at the local grocery store.", door_to Store, door_dir w_to; !********Street_Graceland (path) Object -> Street_Graceland "sidewalk running from your apartment to Graceland" has static door open with name "path" "sidewalk" "graceland", description "To the east is the holiest of holy places - Graceland", door_to [; ! Verify that gas station attendant puzzle has been solved if (Attendant hasnt general) { "You've been there a million times before...you don't need to go there now."; } else { return Graceland; } ], door_dir e_to; !********Street_GasStation (path) Object -> Street_GasStation "sidewalk running from your apartment to the local gas station" has static door open with name "path" "sidewalk" "gas" "station", description "You look to the south and see a gas station at the end of the sidewalk.", door_to [; ! Verify that magazine puzzle has been solved if (Magazine hasnt general) { "Hmmmm...no car, and you want to go to a gas station? You're not THAT bored!"; } else { return GasStation; } ], door_dir s_to; !---------------------------------------------STORE !********Store ! Contains: ! Door to street ! Clerk ! Counter ! Magazine ! Candy ! Aisle 1 ! Peanut butter ! Bread ! Cereal ! Rice ! Flour ! Aisle 2 ! Banana ! Apple ! Orange ! Vegetables ! Aisle 3 ! Milk ! Cheese ! Yougrt Object Store "Parker's Grocery Store and Market" with name "parkers" "grocery" "store" "market", description "Parkers grocery store has been around as long as you can remember. It's a small, neatly kept establishment. It's just large enough that you can shop here without the need to go to the new 'Grocery World' chain down the street to get your groceries. Plus, they let you buy on credit here!", e_to Store_Street; !********Store_Street (door) Object -> Store_Street "sidewalk running from the grocery store to your apartment" has static door open with name "path" "sidewalk" "apartment", description "The cracked sidewalk runs eastward down the street and ends at your apartment.", door_to Street, door_dir e_to; !********Clerk Object -> Clerk "old store clerk sitting behind the counter" ! general if he has been paid has static animate male with name "clerk" "store" "old" "man" "guy" "cashier", description "The old man sits quietly behind the counter reading a newspaper. He seems to care less about anything except his reading material.", life [; Answer: "The clerk grumbles something and goes back to his paper."; Tell: "Do you really think he cares?"; Attack, Kiss: "Um, security, please report to the front desk!"; Show, Give: "He doesn't care."; ]; !********StoreCounter Object -> StoreCounter "old-fashioned checkout counter" has static supporter with name "counter" "checkout" "oak" "old" "fashioned", description "The counter is made out of wood and very old, just like everything else in the store. It has the typical checkout counter items such as candy, gum, etc. But it is the flashy tabloid magazine that catches your eye.", before [; Climb: ! Prevent player from climbing on counter "You shouldn't do that."; ]; !********Magazine Object -> -> Magazine "typical tabloid: The National Rumor" ! general if player has read elvis article has concealed with name "magazine" "tabloid" "national" "rumor", description "Fine american literature - aliens, sex scandals, and other sorted tales. You know most of this stuff is garbage, but you love it anyway!", after [; Examine: ! Solve magazine puzzle give self general; "^Lets see...President Has Alien's Baby...Bigfoot Saved My Life...Dog Learns to Speak German...all boring!^^Wait, what's this? Gas Station Attendant Sights Elvis...now we're talking! You pour through the article which describes a local Memphis gas station attendant who claims the King got gas from his station. Wow, that's right near your house; this is worth investigating!"; ]; !********Candy Object -> -> Candy "candy of every color and flavor" has static concealed with name "candy", description "The strategically placed candy is sure to attract the attention of any child accompanying their parent to the store.", before [; Take: ! Prevent player from taking "You're on a diet, remember?"; ]; !********Aisle1 Object -> Aisle1 "aisle containing dry goods" has static supporter with name "aisle" "first" "1" "one" "dry" "goods", description "This aisle has many items, particularly dry goods such as bread, cereal, rice, flour, and peanut butter."; !********PeanutButter Object -> -> PeanutButter "jar of peanut butter" has concealed edible with name "jar" "of" "peanut" "butter", description "GIF Extra-Crunchy Peanut Butter.", before [; Eat: ! Prevent player from eating "Not by itself!"; ]; !********Bread Object -> -> Bread "loaf of bread" has concealed edible with name "loaf" "of" "bread", description "Generic brand bread...on sale because it expires tomorrow!", before [; Eat: ! Prevent player from eating "Not by itself!"; ]; !********Cereal Object -> -> Cereal "box of cereal" has static concealed with name "box" "of" "cereal" "super" "fuity" "marshmallow" "chocolate" "squares", description "Super-fruity marshmallow chocolate squares: Part of this complete balaanced breakfast!", before [; Take: ! Prevent player from taking "Do you know how much sugar is in there? No thanks!"; ]; !********Rice Object -> -> Rice "container of rice" has static concealed with name "box" "container" "of" "rice", description "Uncle Len's 4 minute rice: Faster than the rest!", before [; Take: ! Prevent player from taking "You hate meals that take so long to prepare...you'll pass on the rice."; ]; !********Flour Object -> -> Flour "bag of flour" has static concealed with name "bag" "of" "flour", description "All-purpose baking flour.", before [; Take: ! Prevent player from taking "Nah, You never do any baking!"; ]; !********Aisle2 Object -> Aisle2 "produce aisle" has static supporter with name "aisle" "second" "2" "two" "produce" "fruit" "vegetables", description "This aisle is full of produce: apples, bananas, oranges, as well as assorted vegetables."; !********Banana Object -> -> Banana "bunch of ripe bananas" has concealed with name "banana" "bananas" "ripe" "bunch", description "You love bananas! These are perfectly ripe too.", before [; Eat: ! Prevent player from eating "Not by itself!"; ]; !********Apple Object -> -> Apple "a red apple" has static concealed with name "apple" "red" "apples", description "If you've seen one apple, you've seen 'em all.", before [; Take: ! Prevent player from taking "You don't feel like eating an apple."; ]; !********Orange Object -> -> Orange "orange" has static concealed with name "orange" "oranges", description "Yep, it's an orange. Seedless at that.", before [; Take: ! Prevent player from taking "You don't feel like eating an orange."; ]; !********Vegetables Object -> -> Vegetables "vegetables of many variety" has static concealed with name "vegetable" "vegetables", description "Just your everyday veggies.", before [; Take: ! Prevent player from taking "In general, you try not to eat a healthy diet consisting of any kind of vegetables."; ]; !********Aisle3 Object -> Aisle3 "dairy aisle" has static supporter with name "aisle" "3" "three" "dairy", description "This cold aisle contains dairy products such as milk, cheese, and yougrt."; !********Milk Object -> -> Milk "carton of milk" has static concealed edible with name "carton" "of" "milk", description "Just a standard carton of milk", before [; Take: ! Prevent player from taking "Nah, you're still feeling queesy after smelling the stale milk in your fridge."; ]; !********Cheese Object -> -> Cheese "block of cheese" has static concealed edible with name "block" "of" "cheese", description "Cheddar.", before [; Take: ! Prevent player from taking "You're allergic to cheese!"; ]; !********Yougrt Object -> -> Yougrt "container of yougrt" has static concealed edible with name "container" "of" "yougrt", description "Fruit on the bottom.", before [; Take: ! Prevent player from taking "Yougrt is not one of your favorites."; ]; !---------------------------------------------GASSTATION ! Contains: ! Door to street ! Attendant ! Shelf ! Comb ! Chapstick ! Jerkey Object GasStation "24 hour Gas Station" with name "gas" "station" "24" "hour", description "This crummy gas station, like most buildings in this town, has been around for quite some time. Since you don't own a car, you usually don't have a need to be here.", n_to Street; !********GasStation_Street (door) Object -> GasStation_Street "sidewalk running from the gas station to your apartment" has static door open with name "path" "sidewalk" "apartment", description "The sidewalk runs north towards your apartment.", door_to Street, door_dir n_to; !********Attendant Object -> Attendant "middle aged gas station attendant" ! general if he has told you about Elvis has static animate male with name "attendant" "gas" "station" "man" "cashier", description [; print "The man just stands quietly at the cash register chewing on a tooth pick and listening to headphones...he's definately not the brightest crayon in the box. He glances over at you, but doesn't say anything."; if (Magazine has general) { "^You wonder if this is the man from the magazine article..."; } ], life [; Answer: "He can't hear you with those headphones on."; Tell: "He's busy listening to the radio...do you really think he cares?"; Attack, Kiss: "He's probably got a gun behind the counter...not a good idea."; Show, Give: ! Make sure the player is giving the attendant the magazine if (noun==Magazine) { ! Only give him the magazine if the player has solved the puzzle by reading the article if (Magazine hasnt general) { "Why would you want to do that?"; } else { ! Solve attendant puzzle give Attendant general; ! Remove magazine from game remove magazine; "Now you've got his attention! He excitedly grabs the tabloid from your hand and quickly reads the article about his Elvis sighting. He procedes to tell you that a man who looked just like Elvis came to his gas station to buy some beef jerky. Recognizing the King, the attendant asked him who he was. Admitting nothing, the alleged Elvis said his name was Rodney, and that he was a janitor at Graceland. With that, the man walked out the door, jumped into a Cadillac, and disappeared.^^After telling you his tale, the man returns to ignoring you and chewing on his toothpick."; } } else { "He doesn't care."; } ]; !********Shelf Object -> Shelf "row of metal shelves containing all the typical gas station necessities" has static supporter with name "shelf" "metal" "shelves", description "The metal shelves contains mostly overpriced items that you don't need. There is a jar of plastic combs, a cardboard box filled with cherry chapstick, and some beef jerky. Everything has been marked up at least three times."; !********Comb Object -> -> Comb "plastic unbreakable comb" has static concealed with name "comb" "unbreakable" "plastic", description "I wonder if it really is unbreakable?", before [; Take: ! Prevent player from taking "$4.00 for that? I don't think so!."; ]; !********Chapstick Object -> -> Chapstick "small tubes of cherry-flavored chapstick" has static concealed with name "chapstick" "small" "tube" "cherry" "flavored" "box", description "Made with aloe vera, vitamin E, and natural flavors", before [; Take: ! Prevent player from taking "$6.00 for that? I don't think so!."; ]; !********Jerky Object -> -> Jerky "bag of beef jerky" has static concealed edible with name "beef" "jerky", description "100% natural, mesquite smoked teryaki flavored beef jerky", before [; Take: ! Prevent player from taking "No way...you could buy a nice steak for that price!"; ]; !---------------------------------------------GRACELAND ! Contains: ! Door to street ! Door to mansion ! Ticket taker Object Graceland "Courtyard of Graceland" with name "graceland" "courtyard", description "Elvis' home sweet home. You've been here so many times in the past that you know it almost as well as your own place. But this time, you've come here with a purpose -- To find the King himself.", w_to Street, e_to Mansion; !********Graceland_Street (path) Object -> Graceland_Street "sidewalk running from Graceland to your apartment" has static door open with name "path" "sidewalk" "apartment" "street", description "It's just the road back to your apartment", door_to Street, door_dir w_to; !********Graceland_Mansion (door) Object -> Graceland_Mansion "giant door entering the mansion" has static door openable with name "door" "mansion" "house" "giant" "front" "elvis", description "It's the door leading inside Elvis' mansion.", before [; Open: ! Make sure player has ticket if (Ticket notin player) { "You need a ticket to get in there."; } Go: ! Make sure door is open if (self hasnt open) { "You might want to open it first."; } ], ! Open the corresponding inverse door after [; Open: give Mansion_Graceland open; Close: give Mansion_Graceland ~open; ], door_to Mansion, door_dir e_to; !********TicketTaker Object -> TicketTaker "woman standing by the entrance wearing a bellhop-esque uniform" !general if she has given you a ticket has static animate female with name "admission" "lady" "girl" "woman" "bellhop", description "The lady stands as if guarding the door to graceland. She must be in charge of admissions.", life [; Answer: "We're open weekdays 9-5, weekends 9-6, and admission is $20."; Tell: "Sir, you'll need a ticket to get in."; Attack, Kiss: "Nah."; Show, Give: ! Make sure the player is showing the ID card to the ticket taker if (noun==MembershipCard) { ! Solve the ticket taker puzzle give TicketTaker general; ! Give player ticket move Ticket to player; "Oh, I apologize sir...didn't realize you were a VIP. Walk right in! With that, she hands you an admission ticket."; } ! Do not allow player to buy a ticket else if (noun==Money) { "Sir, you'll need more than $2 to buy a ticket!"; } ! Do not allow the player to trade for a ticket else { "Sir, we accept cash or credit cards only."; } ]; !---------------------------------------------MANSION Object Mansion "Mansion" with name "mansion" "elvis" "house" "home", description "Elvis' home sweet home. You've been here so many times in the past that you know it almost as well as your own place. But this time, you've come here with a purpose -- To find the King himself.", w_to Street; !********Mansion_Graceland (door) Object -> Mansion_Graceland "door exiting to the courtyard" has static door openable with name "mansion" "house" "outside" "giant" "front" "courtyard", description "It's the door leading outside", ! Open the corresponding inverse door after [; Open: give Graceland_Mansion open; Close: give Graceland_Mansion ~open; ], door_to Graceland, door_dir w_to; !********Elvis Object -> Elvis "suspicious looking janitor" !general if has static animate male with name "elvis" "king" "janitor", description "In the corner, you see an overweight janitor with sideburns wearing sunglasses and a hat. Yes, now that you look carefully at him, you can see an uncanny resemblence to the king. Of course add 20 years, but it basically looks like him! This must be the guy the gas station attendant saw.", life [; Answer: "He ignores you as he continues to sweep the floor."; Tell: "He obviously has no interest."; Attack, Kiss: "You love the king and would never do such a thing!"; Show, Give: if (noun==Sandwich) { ! Solve Elvis puzzle give Elvis general; ! Remove sandwich remove Sandwich; !end game print "Oh, I can't hold out any more, you got me! he exclaims as he grabs the sandwich out of your hands. I never could resist a peanut-butter and nanner sandwich! He wolfs it down, and then tells you the story of how the publicity just got to be too much for him. He faked his own death in 1977 and since been hiding out in Graceland as the acting janitor. He asks you to keep his secret, to which you agree. You take a simple pleasure in knowing that you were right, and everyone else was wrong."; deadflag = 2; } else { "Thanks, but no thanks."; } ]; !---------------------------------------------INITIALISE ROUTINE [ Initialise; location = LivingRoom; give player light; move Money to player; "^^^^^Per usual, it's a Saturday afternoon and you find yourself alone with nothing to do except listen to your record collection. Little do you know the adventure that awaits you this particular weekend...^"; ];