Constant Story "The Meaning of Life^"; Constant Headline "An Interactive Short Story^ Copyright (c) 1998 by Adam Mathes.^"; Release 2; Constant MAX_SCORE 1; Include "Parser"; Include "VerbLib"; !Global variables Global heads=0; Global r_heads=36; Global void_time=0; Global gave_key=0; Global TOWERDEATH=15; Global IMMINENTDEATH=30; !Locations Object Forest "Dark Forest" with description "The forest is very thick.^^ To the south the forest thins out and you can see a clearing.^", s_to Clearing, n_to bridge_loc, before [; Look: if (OffersLight(self)) { parrot.squawk("Yes... look around..."); rfalse; } else "You see nothing"; Taste: "You taste nothing"; Touch: "Try examining your inventory"; Ugga: parrot.squawk("Ugga... ugga ugga..."); "^ugga? what is that supposed to mean?."; Look: ], after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; ], has light; Object bridge_loc "Bridge entrance" with description "In front of you to the north is a bridge.^^ North along the bridge, you can see nothing.^ To the south is the forest.^", n_to bridge, s_to forest, after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; move void_obj to bridge_loc; ], has light proper; Object bridge_obj "bridge" bridge_loc with name 'bridge', description "The bridge seems sturdy enough, except for the fact that only half of it seems to exist. It leads north to utter darkness and void.^", has static concealed; Object bridge "On the bridge to nowhere" with name 'bridge', s_to bridge_loc, n_to void, description "The bridge seems sturdy enough, except for the fact that only half of it seems to exist. It leads north to utter darkness and void.^ To the south is the bridge entrance and forest.", after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; move void_obj to bridge; ], has light static; Object void_obj "void" bridge with name 'void' 'darkness', description "The void seems to be infinite past the bridge.^", has proper; Object Void "Void" with description "You see nothing.^", s_to bridge, before [; Look: "You see nothing."; Smell: "You smell nothing.^"; Touch: if (noun~=nothing) "You can feel nothing.^"; Listen: "You hear nothing.^"; Sleep: "You are tired, but not quite tired enought to fall asleep.^"; ], after [; Go: void_time=0; ], each_turn Void_Stuff, has light; Object Clearing "A clearing" with description "You are in a very desolote, empty clearing.^^ To the north there is denser forest.^ To the east you can begin to make out a path up to some daunting mountains.^", n_to forest, e_to path, before [; Go: print "As you are walking away, the parrot enthusiastically squawks, ~Go back and see the tree!~^^"; ], after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; remove barren_tree; move leaved_tree to clearing; ], has light; !Objects within the clearing !The original tree Object barren_tree "tree" clearing with name "tree", description "It is barren.^" has static; !Swapped with leaved tree after you first leave clearing... Object leaved_tree "tree" with initial "Something seems different about the tree.", name "tree", description "It seems to have many leaves now.^" has static; !boring rock from waiting for godot Object rock "rock" clearing with name "rock", description "The rock is grey and large enough to sit on. There is an inscription carved into the rock.^", has static enterable supporter; Object inscription "inscription" rock with name "inscription" "words" "writing", description "The inscription reads, ~Godot wasn't here.~^", has static; Object paper "sheet of paper" rock with name "paper" "sheet", description " The sheet of paper says: ^ THINGS TO DO IN MATHESIA^ A checklist for those in pursuit of the meaning of life^^^ Use your rope and grappling hook to find the mountain entrance to the the caves.^ Cast coins into the ponds of reflection.^ Ask natives about life, death, meaning, purpose, shakespeare, tower and girlpower.^ Find an entrance to the great underground empire of Zork.^ Find the azuran amulet of eternal light, and use it to illuminate the Mazes of Ubatha.^ Ask Linus Torvalds about the latest Linux kernel release.^ Obtain the Hrekkan rune of ancient knowledge from the band of gnomes that use it as a coaster.^ Explore the wreckage of the TCS Concordia.^ Learn and perform the powerful spells of Poqs.^ Journey across the endless fields of the Lergers. "; !The mountain path... R+G should be here eventually... Object path "Mountain Path" with initial "After a very long hike, you reach the mountain path and proceed halfway up it.^^ There are two pecuilar danish people flipping coins while walking on the road.^^ ~Heads again~ one of them says, and puts the coin in has bag.^ ~Heads again~, and puts another coin in his bag. Amidst this furious coin tossing one of the coins does not make it into the bag, and lies along the path. As you approach, the two men take notice of you and approach you. ~Hello,~ one of them says. ~I am Guildenstern, and this is Rosencrantz.~^^ His companion briefly confers with him, and then without embarrasment he says, ~I'm sorry-- his name's Guildenstern and I'm Rosencrantz. Would you like to play a game of questions?~", description "The path is narrow, and seems much too dangerous for someone of your limitted adventuring abilities to be traversing.^^ Further up the path you can see the outlines of a tower's spires slightly above the clouds. ^ Below, you can still see the clearing.^", u_to tower, d_to clearing, before [; ], after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; StopTimer(tower_timer); ], has light; !Objects on path Object coin "coin" path with name "coin" "token", description "The coin is rather heavy, and seems to be made of bronze.^ On one side is a face, bearing an unmistakable resemblance to William Shakespeare. The other coin has what you perceive to be the likeness of an ancient Greek building.", before [; Turn: if (noun==coin) { print "Heads.^^"; Heads=Heads+1; if (Heads>1) print "That would be ", Heads, " in a row.^"; if (Heads>10) print "This could be a new record.^"; if (parent(Rosencrantz)==location) { print "~Funny, I only flipped heads today as well,~ remarks Rosencrantz^"; print "~Maybe you can beat the record.~^^"; } rtrue; } ]; Object tower "The base of a magnificent tower" with description "You are flabbergasted by the sheer size of the tower. Spires extend up above the clouds. A rather refined looking man is leaning against the tower, looking witty.^^ Below you is the mountain path.", initial "After journeying for what seems like an eternity, you reach the tower.", d_to path, in_to stonedoor, before [; Look: if (noun==sign) { print "The man wildly gestures at the sky and says, ~Ulkjalk woiuaplkjw vb;lkaj;wlkejr!^"; rfalse; } Go: ], after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; StartTimer(tower_timer, TOWERDEATH); ], has light; !Stuff near tower Object sign "sign" tower with name 'sign', description "The sign appears to have writing on it, but you can't make it out.^ The man wildly gestures at the sky and says, ~Ulkjalk woiuaplkjw vb;lkaj;wlkejr!^", before [; ], has static; object tower_obj "tower" tower with name 'tower' 'building', description "The huge tower looks like it is made of a polished, purple, marble-like material.", has static; object sky "sky" tower with name 'sky' 'up', description "You don't see anything pecuilar when you look up.^", has static concealed; Object stonedoor "stone door" tower with description "It's a big stone door.^ There is a plaque on the door which reads ~tower of meaning~.^", name "door" "massive" "big" "stone" "yellow", when_closed "The entrance to the tower is blocked by a large door.", when_open "There is an entrance into the tower through the door.", door_to anvildeath, door_dir in_to, with_key stone_key, before [; ], after [; Go: move parrot to location; print "The parrot follows you, squawking wildly.^"; ], has static door openable lockable locked; Object anvildeath "doom" with after [; Go: print "Just as you are about to enter the tower of meaning, a very large anvil falls from the sky directly on top of you. With a satisfying ~crunch,~ you are flattened and killed.^^ The man takes some angelfood cake out of his mouth and says, ~I told you to watch out for the anvils!~^^ Seconds later the sign high on the castle floats to the ground. It, of course reads, ~Watch out for falling anvils~, with a cartoon of a flattened man under it."; deadflag=1; rtrue; ]; !People and animals... !our parrot pal Bill Object parrot "red-tailed parrot" clearing with name "parrot" "bird" "bill" "william" "shakespeare", description "The parrot has beautiful plumage.^ Upon closer examination, the parrot has a bizarre resemblance to William Shakespeare.", squawk [ utterance; if (self in location) print "The parrot squawks, ~", (string) utterance, "! ", (string) utterance, "!~^"; ], life [; Talk: "Hello. I am a parrot. An English parrot. I like to read. An English parrot. I am a parrot. I like to read.^ Reading is fun."; Answer: "Go to hell. I have no answer."; Ask: switch(second) { 'english': "~English sucks. Squqwk!! English Sucks.~"; 'name', 'parrot', 'bird', 'bill', 'billy', 'william', 'shakespeare': "~My name is Billy Shakespeare.~"; 'hamlet': "~To be or not to be! Squawk! To be or not to be!~"; 'life', 'meaning': "Life's but a walking shadow, a poor player,^ That struts and frets his hour upon the stage^ And then is heard no more. It is a tale^ Told by an idiot, full of sound and fury,^ Signifying nothing."; 'tree': parrot.squawk("Go see the tree"); rtrue; 'rosencrantz', 'guildenstern': parrot.squawk("They are on the mountain path."); rtrue; 'mersault', 'man': parrot.squawk("He is in the forest."); rtrue; 'girlpower': parrot.squawk("I really really really wanna zigga zigga ah"); rtrue; 'anvil', 'anvils', 'death': parrot.squawk("Watch out for anvils"); rtrue; 'coin', 'coins', 'head', 'heads', 'game': parrot.squawk("Everyone's a winner"); rtrue; } parrot.squawk("You must find your own answers. I'm just a parrot.~"); rtrue; Tell: "The parrot does not care about whatever you are about to say."; Attack: "The parrot easily evades your clumsy attacks, then squawks, ~You can't catch me! I'm Shakespeare! I'll live forever to annoy people!!~^"; ThrowAt: move noun to location; <>; ], react_before [; Eat: parrot.squawk("I wouldn't eat that if I were you"); ], each_turn ParrotAnnoy, has animate; !good old mersault Object mersault "bland man" forest with name "man" "guy" "bland" "Mersault", description "The man could not look more apathetic.^", life [; Answer: "~I do not know the answer to your question, and I would be lying if I said that I cared about it.~^^"; Ask: switch(second) { 'name', 'mersault': "~My name is Mersault.~"; 'death', 'void': "~My death was a long time ago. I'm sure the leaves on the tree must have changed by now...^ I did not like the void.~^ Some embrace it, I do not. All I have is my existence. You can see the void yourself at the bridge north of here.^"; 'life', 'meaning', 'tower', 'mountain': "~I have found peace in my existence right here. That is enough for me.^ Others prefer the ~meaning~ you can find at the tower at the mountaintop. The path to the mountains is south and east of here. It was unsatisfying for me.^"; 'girlpower': parrot.squawk("I really really really wanna zigga zigga ah"); 'parrot', 'bird', 'bill', 'william', 'shakespeare': "~He seems to like you. He lost interest in following me around."; 'rosencrantz', 'guildenstern': "~They seem to be very pecuilar men.~^"; } "~I do not know the answer to your question. I would be lying if I said that I cared about it.~^^"; Tell: "Mersault listens, but displays no reaction to your comments."; Attack: "You attack Mersault as ferociously as possible. He is unaffected.^"; ThrowAt: move noun to location; <>; ], react_before [; Go: print "Mersault politely says, ~Good day.~"; rfalse; ], has animate male; !Rosencrantz - the nutty one Object Rosencrantz "Rosencrantz" path with name "rosencrantz" "r", description "Rosencrantz looks anxious.", life [; Answer: "Rosencrantz retorts with much glee, ~FAULT: statement.~ ^ Guildenstern angrily says, ~Not now.~"; Ask: switch(second) { 'name', 'rosencrantz', 'mersault', 'orator', 'guildenstern': "~Wait, my name is Rosencrantz. Yes I'm sure of it.~^^ He pauses, then continues, ~I'm Rosencrantz and he is Guildenstern.~^^"; 'death': "~Have you been to the void past the bridge?~^"; 'purpose': "~Why we were summoned?~"; 'life', 'meaning': "~Why does life have to have meaning?~"; 'girlpower': parrot.squawk("I really really really wanna zigga zigga ah"); 'parrot', 'bird', 'bill', 'william', 'shakespeare': print "~Why does he keep squawking like that?^"; parrot.squawk("Like that"); rtrue; 'game', 'questions', 'tennis': "~Are we playing?~"; 'coin', 'coins', 'head', 'heads': "~Why do they always turn up heads?~^"; } "~FAULT: non sequitir.~^ Guildenstern gives Rosencrantz a look of annoyance.^^"; Tell: "Rosencrantz retorts with much glee, ~FAULT: statement.~ ^ Guildenstern angrily says, ~Not now.~"; Attack: print "You run full speed at the pair and attempt to attack them.^^ As you lunge toward Rosencrantz he quickly steps to the side. Your momentum continues and you quickly run off of the path, and keep going. A second later, you stop, look down, see that only air is below you, and then fall to your death with a faint whistling noise, and then a soft splat.^^"; print "Then, unexplicably, a truck runs over your barely alive body.^"; print "Then, a very large anvil falls from the sky directly on top of you. With a satisfying ~crunch,~ you are flattened and killed.^^"; print "Rosencrantz looks over the mountain path and says, ~I guess the player was right, it does always end in death.~^"; deadflag=1; rtrue; ], react_after [; ], has animate proper; !Guildenstern - the straigh man Object Guildenstern "Guildenstern" path with name "Guildenstern" "g", description "Guildenstern look slightly annoyed, like he has an odd sense of foreboding.^", life [; Answer: "stuff"; Ask: switch(second) { 'name', 'rosencrantz', 'guildenstern': "Annoyed, Guildenstern responds, ~I am Guildenstern.~ He then gestures to his companion. ~He is Rosencrantz. It is not really that complicated.~^^"; 'death': "~I suppose it is very like sleep, except that you don't wake up.~^"; 'purpose': "~We were summoned.~^ ~A royal summons,~ says Rosencrantz.~^"; 'life', 'meaning': "~I don't have time to contemplate the meaning of life We've been summoned, and must see the king.~^"; 'girlpower': parrot.squawk("I really really really wanna zigga zigga ah"); 'parrot', 'bird', 'bill', 'william', 'shakespeare': print "~Annoying little chap, isn't he?^"; parrot.squawk("Annoying chap"); print "~Damned Brits.~^"; rtrue; 'game', 'questions', 'tennis': "~There is nothing quite like a good game of verbal tennis. Rosencrantz and I have gone on for days volleying sometimes.~^ Rosencrantz remarks, ~FAULT, statement.~^ ~NOT NOW!,~ responds Guildenstern.^"; 'coin', 'coins', 'head', 'heads': "~There does seem to be a problem with the laws of probability today. Rosencrantz may have set a new record today of consecutive heads.~^"; } "~I don't know what you're talking about, and we really must move on.~^"; Tell: "We would both like to stay and chat, but we've been summoned, and really must go.~^"; Attack: print "You run full speed at the pair and attempt to attack them.^^ As you lunge toward Guildenstern, he quickly steps to the side. Your momentum continues and you quickly run off of the path, and keep going. A second later, you stop, look down, see that only air is below you, and then fall to your death with a faint whistling noise, and then a soft splat.^"; print "Then, unexplicably, a truck runs over your barely alive body.^"; print "Then, a very large anvil falls from the sky directly on top of you. With a satisfying ~crunch,~ you are flattened and killed.^^"; print "Rosencrantz looks over the mountain path and says, ~I guess the player was right, it does always end in death.~^"; deadflag=1; rtrue; ], each_turn FlipCoins, has animate proper; Object orator "witty man" tower with name "man" "witty" "orator" "refined", description "The man could looks refined, polished, and bursting with knowledge.^", life [; Answer: "~Blalkh wubls aswoapokj aslkwjelkjrwa~^^"; Ask: switch(second) { 'name', 'orator': "~Jlkjwo wyouapw gblakjwer~^"; 'death', 'sign', 'anvil': "He gestures wildly at the sky and says, ~Ulkjalk woiuaplkjw vb;lkaj;wlkejr!^"; 'life', 'meaning': "~xzcbmnlq pqoiupzx p;lkjqpoiwj.^"; 'girlpower': parrot.squawk("I really really really wanna zigga zigga ah"); 'parrot', 'bird', 'bill', 'william', 'shakespeare': "~q;lkjqw;e oiuvpok jaoi poipoww."; 'door', 'key', 'tower', 'lock': if (gave_key==0) { print "~Tqwerfjh poiq qpohvbx oiwuyq.~^ The man then gives you a beautiful crafted gold key.^"; move gold_key to player; gave_key=1; rtrue; } if (gave_key==1) { print "The man chuckles to himself and says, ~Nmqoiu pqoiu qwezgwiu qpoiu vpoiuq pqoiuzvbib xjhhlkjha.~^ The man then gives you an ugly stone key.^"; move stone_key to player; gave_key=2; rtrue; } } "The man shrugs and says, ~Jualkjw qpoiu qpqwo poius qpoiuwer.~^"; Tell: "The man listens intently, then responds, ~Ujalk a;lkjbhw bnmaasw~."; Attack: "So close to the magnificent tower, you don't feel comfortable attacking anyone.^"; ThrowAt: move noun to location; <>; ], each_turn OratorGesture, react_after [; ], react_before [; ], has animate male; !Misc. Objects ! This is the end of game timer that drops an anvil on you after a specified ! number of moves. Object end_timer with time_left 0, time_out [; print "A very large anvil falls from the sky directly on top of you. With a satisfying ~crunch,~ you are flattened and killed.^^"; deadflag=1; ]; Object tower_timer with time_left 0, time_out [; AnvilTowerDeath(); rtrue; ]; Object gold_key "gold key" with name "gold" "key", description "The gold key is elaborate to say the least. It has diamonds, rubies, and other priceless jems on it. It is more a piece of fine jewelry than a key.^"; Object stone_key "stone key" with name "stone" "key", description "The stone key is ugly.^"; [ DarkInitial; "You are surrounded by complete darkness."; ]; [ HelpSub; "You must find your own way."; ]; !My functions !Setup initial conditions [ Initialise; location = clearing; thedark.short_name = "Void"; thedark.initial = DarkInitial; StartTimer(end_timer,IMMINENTDEATH); print "^^^^Your quest for the meaning of life has taken you to an uncharted, unexplored place. Almost as an answer to your wondering of what to do, a single sheet of paper slowly drifts down and lands on a rock near you.^"; ]; !Prints a random shakespeare quote from the parrot [ParrotAnnoy i; i=random(7); switch(i) { 1: parrot.squawk("Et tu brute?"); 2: parrot.squawk("Something is rotten in Denmark"); 3: parrot.squawk("This time is out of joint"); 4: parrot.squawk("To be or not to be"); 5: parrot.squawk("Fair is foul and foul is fair"); 6: parrot.squawk("The fault lies in ourselves, not the stars"); 7: parrot.squawk("Beware the ides of march"); } ]; !Performs a coin flipping by r+g [FlipCoins; r_heads++; print "Guildenstern takes a coin out of his bag, spins it, letting it fall. Rosencrantz studies it, announces ~heads~ and puts it into his own bag.^ ~That is ", r_heads, " in a row,~ Guildenstern remarks with some concern.^"; ]; !The orator's crazy gestures every turn [OratorGesture; "The orator excitedly gestures at the sky and says, ~Tyqoiu uipoinm bjbhaa wropnvbqer.~^"; ]; !Peforms weird void mooing and the like [Void_Stuff; if (random(100)<60) print "You hear something go ~mooooo.~^^"; ++void_time; switch(void_time) { 1: "You feel a little bit drowsy."; 2: "You yawn audibly and feel a bit tired."; 3: "Your extremities are starting to get a bit numb."; 4: "You feel very sleepy and ready for a nap."; 5: "You are so tired that you can barely keep your eyes open."; 6: print "Your feelings of numbness and fatigue overcome you. You lie down and immediately fall asleep. The void encompasses you, and you fall into a deep slumber.^^ Soon after you fall asleep, a very large anvil falls from the sky directly on top of you. With a satisfying ~crunch,~ you are flattened and killed.^^"; deadflag=1; } ]; [AnvilTowerDeath; print "A very large anvil falls from the sky directly on top of you. With a satisfying ~crunch,~ you are flattened and killed.^^ The man takes some angelfood cake out of his mouth and says, ~I told you to watch out for the anvils!~^^ Seconds later the sign high on the castle floats to the ground. It, of course reads, ~Watch out for falling anvils~, with a cartoon of a flattened man under it."; deadflag=1; ]; !Misc added crap [TalkSub; "Sorry, talk doesn't work. Try ~ask character about subject~ or ~tell character about subject~"; ]; [ UggaSub; print "Timer now stopped."; StopTimer(end_timer); ]; Include "Grammar"; Verb "help" * -> Help; Verb "ugga" * -> Ugga; Verb "flip" * multi -> Turn; Verb "talk" * -> Talk; Extend "talk" * "to" noun -> Talk; Extend "speak" * "to" noun -> Talk;