! ----------------------------------------------------------------------------- ! Inform for New Writers ! ! The Adventure of Lymon - Version 1 ! ! Last Modified: Justin London ! ! ------------------------------------------------------------------------------ Constant Story "Lymon's Adventure"; Constant Headline "^Inform for New Writers^ The House - Version 7^ By Justin London and Pran Mukherjee (2001) - Last Compiled: Oct-26-2001^"; Constant MAX_SCORE 100; Constant MAX_TIMERS 35; Serial "980201"; Release 1; Include "Parser"; Include "VerbLib"; Attribute multitude; Global totalmoney = 50; Global inside = true; Global clean_room = false; Global time_alive = 400; Global grounded = true; Global flag = false; Global win_flag = false; !------------------------------------------------------------------------------- ! Initialise !------------------------------------------------------------------------------- [ Initialise; location = Living_Room; move Evil_Robot to Basement; inside = true; StartDaemon(Sister); StartDaemon(Mom); StartDaemon(Dad); StartDaemon(Total_Life); ]; ! --------------------------------------------------------------------- ! The inside world ! -------------------------------------------------------------------- Object Den "Den" with description "You are in the den, where Dad used to read you old Tom Swift books. You don't come here often any more, because most of the books are technical. The living room is to the west.", name "den", w_to Kitchen, has light; Object -> Letter "letter" with name "letter" "paper", description "The letter is a simple page of notebook paper. It mentions an evil robot that eats things but you can't make out much more because someone spilled coffee on it."; Object Upper_Hallway "Upper Hallway" with description "You are in second floor hallway. Pictures from last year's summer camp adorn the wall. The bathroom is to the east, your room is to the west, Mom's room is to the North, and the linen closet is to the south. The stairs lead down.", e_to Bathroom, w_to Kids_Room, d_to Living_Room, n_to Parents_Bedroom, s_to Closet, has light; Object Kitchen "Kitchen" with initial "The kitchen is the homiest room in the house, probably because Mom's always here doing kitchen stuff. The hall to the den is to the east, and an open doorway to the west leads out to the living room.", description "As always, the kitchen is spotless. Mom's such a good homemaker.", name "kitchen", d_to Basement_Door, w_to Living_Room, e_to Den, has light; Object -> Basement_Door "Basement Door" with description "The door leads to the basement.", name "basement door" "door", before [; Open, Enter: if (Mom.ossified == false) "Mom says, ~Lymon, please don't go down there. That is your father's lab. Off limits to you and Suzy.~"; ], when_open "You see a white mist coming from the basement.", d_to Basement, u_to Kitchen, door_to [; if (location == Kitchen) return Basement; return Kitchen; ], door_dir [; if (location == Kitchen) return d_to; return u_to; ], has door openable static; Object -> candy "candy" with description "It's a Hershey's chocolate bar.", name "candy" "chocolate" , before [; Take: move candy to player; score = score + 5; "Mom says ~Be sure not to overeat, dear. Dinner is coming soon.~"; Drop, Release: remove candy; score = score - 5; Give, Offer: if (candy in player) if ((noun == candy) && (second == Sister) && (candy in player)) { remove self; closet.blocked = false; StopDaemon(Sister); move Sister to Kitchen; "You give your sister the Hershey bar. She goes to the Kitchen to enjoy the treat."; } ThrowAt, Throw: if (inside == true) { remove self; StartDaemon(Grounded_State); "You throw the candy and hit a wall. Chocolate is all over the wall. Mom finds out and grounds you."; } ], after [; Eat: remove self; move Sister to Upper_Hallway; "Delicious!"; ], has edible; Object Living_Room "Living_Room" with description "The living room is a cozy room. The coffee table is between the TV and the couch. The kitchen is to the east, and you can smell the food Mom's cooking. Stairs lead up. To the south is the foyer.", name "living" "room" "living room", e_to Kitchen, u_to Upper_Hallway, out_to Foyer, s_to Foyer, door_dir s_to has light; Object -> white_document "white document" with name "white" "document" "medical" "report", description "^Medical Report^ Lymon ^one month to live because of .^^That sounds very bad. If only there were a device that could fix medical problems like this one!^"; Object -> red_document "red document" with name "red" "document" "report" "top" "secret", description "^Top Secret^This document details the workings of a powerful device^called a Schmengulator that can repair anything.^^Pretty farfetched, huh?^"; Object Basement with description "You are in the basement. Finally, access to Dad's room! It's a wonder he ever gets anything done with all the stuff scattered around like this. There is a robot in the southeast corner of the room. There is a sign behind the robot that says ~Danger: Stay Away~. There's a huge device in the center of the room with a sign that reads ~Schmengulator~.", name "basement" "downstairs", u_to Basement_Door, se_to Evil_Robot, has light; Object -> manual "manual" with read false, name "manual" "document" "pamplet", description "It's a black book. Upon reading it, you realize that this book is awesome! It has all of Dad's notes. All that's left to do to the Schmengulator is a process called doofingling. Once someone doofingles the schmengulator it'll be fully functional.", before [; Read, Examine: self.read = true; ]; Object -> schmengulator "schmengulator" with poweron false, description "This huge device has ports and emitters and lights all over the place. It looks very complicated. It also doesn't seem to be working yet.", name "schmengulator", before [; Take, Grab: "It is too heavy to carry."; Doofingle: if (manual.read == false) "What does that mean?"; if (tools notin player) "You don't have the tools to doofingle the schmengulator."; if (dad.ossified == false) "Dad says ~Son, don't touch that. You're too young to understand."; if ((tools in player) && (manual.read == true) && (dad.ossified == true)) { score = score + 50; win_flag = true; deadflag = 2; "You doofingle the schmengluator. You start to feel a sense of euphoria, almost lightheadedness. That must mean it's working! Your skin tingles. You are cured! And you finished Dad's project! He'll be so proud."; } ], has static; Object Parents_Bedroom "Parents Bedroom" with description "This is Mom and Dad's bedroom, on the north side of the house. There is a huge canopy bed and a dresser. Mom wouldn't like you being in here, so you'd better leave. Susy might tell on you.", name "bedroom" "room", s_to Upper_Hallway, has light; Object -> Dresser "Dresser" with description "This is a wood dresser with a huge drawer.", name "dresser" "cabinet" "bureau", before [; Take, Lift, Pull, Push: "The dresser is way to big for you to lift or carry."; ], has static light; Object -> Drawer "Drawer" with closing true, description "It is a wood drawer with a handle.", name "drawer", after [; Pull, Open: "You open the drawer."; Close, Push: "You close the drawer."; ], has static light container openable; Object -> -> money "money" with description "They are American dollars.", name "money" "dollars", article "some", before [; Count: if (money in player) "A lot more money than your weekly allowance: $50."; Take, Grab, Reach: if (money notin player) { move self to player; score = score + 10; "You quickly grab the money and put it in your pocket. Mom will kill you when she finds out!"; } Give, Offer: if ((noun == money) && (second == Sister) && (money in player)) { remove money; move money to Sister; score = score - 10; "You give your Sister the money. She is shocked by your generosity. Money does not grow on trees."; } Drop, Throw: score = score - 10;; ]; Object Kids_Room "Children's Room" with name "kids" "kids_room" "room", description "You are your bedroom. Yeah, you have to share it with Suzy, but it's still yours!", before [; CleanUp, Clean: if ((noun == Kids_Room) && (player in Kids_Room)) { clean_room = true; "You clean your room and Mom is happy."; } ], e_to Upper_Hallway, has light; Object -> coat "coat" with wearing false, description "Your battered old North Face coat looks like it always does.", name "coat" "jacket", article "your", before [; Take, Grab: move coat to player; give coat ~worn; "You pick up the coat."; Wear: give coat worn; self.wearing = true; "You put the coat on."; Remove: give coat ~worn; self.wearing = false; ], has clothing; Object Bathroom "Bathroom" with name "bathroom", description "You're in the bathroom, your least favorite room of the house.", w_to Upper_Hallway, has light; Object -> Bathtub "BathTub" with description "It's a white, ceramic bathtub, the scene of many tortures.", name "tub" "bathtub", has enterable static; Object -> Sink "Sink" with description "Your typical white sink.", name "sink", has static; Object Closet "Closet" with blocked true, with description "You are in the linen closet for the house. It's cluttered with stuff. The top shelf is just out of reach, but you might be able to climb there.", name "closet" "linen_room", after [; if (self.blocked == false) "The lower shelves are full of mom's stuff. The top shelf is just out of reach."; else { PlayerTo(Upper_Hallway); "Suzy is blocking the closet and won't let you get near."; } ], u_to Top_Shelf, n_to Upper_Hallway, has light; Object Top_Shelf "Top Shelf" with initial "You climb up to the top shelf of the closet.", description "The top shelf is about a five feet above the ground.", name "top" "shelf", d_to Closet, has static light; Object -> ossifier "ossifier" with description "It looks like a lazer gun. It has a trigger and a large tube where the beams come out.", name "ossifier" "gun"; Object -> ducttape "duct tape" with article "some", description "Typical silver duct tape that is strong.", name "duct" "tape" "duct tape"; Object Foyer "Foyer" with description "You are standing in the foyer of the house, little more than an alcove. To the north is the living room. The front door leads south, as does the window facing the street.", before [; inside = true; ], s_to Front_Door, n_to Living_Room, has light; Object -> Front_Door "Front Door" with doorflag false, description "The front door is made of wood. There is a doormat in front of the door.", name "front door" "front" "door", before [; if ((self.doorflag == true) && (tools notin player)) { give self locked; "The door closes."; } Open: if (((coat notin player) || (coat hasnt worn)) && ( mom.ossified == false) && (inside == true)) "Mom says, ~Lymon, don't go out without your coat."; if ((inside == true) && (self.doorflag == false)) { self.doorflag = true; give self open; if (player in Foyer) { inside = false; "You open the door."; } inside = true; "You open the door."; } give self locked; Close: if (Front_Door has open) { give self locked; "The front door closes (and locks) behind you."; } Doofingle: if (manual.read == false) "What does that mean?"; if (tools notin player) "You don't have the tools to doofingle the door."; if ((tools in player) && (manual.read == true)) { score = score + 10; self.doorflag = false; give self open; "Your skills in doofingling allow you to open the door."; } ], when_closed "The front door is closed.", door_to [; if ((location == Porch) && (self.doorflag == false)) return Foyer; print "The door is locked."; return Porch; ], door_dir [; if ((location== Porch) && (self.doorflag == false)) return n_to; print "The door is locked"; return s_to; ], in_to Foyer, s_to Porch, found_in Porch Foyer, has door locked lockable openable; Object -> Front_Window "great glass window" with description "great glass window overlooking front lawn", name "great" "glass" "window", taped false, silent false, broken false, before [; Tape: if ((ducttape in player) && (player in Porch) && (inside == false)) { self.taped = true; "You duct tape the window frame."; } if (ducttape notin player) "You can't tape anything because you have no tape, silly!!!"; Smash, Hit, ThrowAt, Throw: if ((second == rock) && (rock in player) && (self.taped == false)) { give self open; self.broken = true; "You break the window and the glass shatters"; } Enter, Open: if (self.broken == false) "The window is closed and won't open."; else if ((self.broken == true) && (inside == false)) PlayerTo(Foyer); else if ((self.broken == true) && (inside == true)) PlayerTo(Porch); LookOut, Look: if (player in Foyer) "You can see the green lawn and some birds in the trees."; "You can see the TV and couch in the Living Room beyond the Foyer."; ], found_in Foyer Porch, has static light openable enterable; !-------------------------------------------------------------------- ! Outside objects !-------------------------------------------------------------------- Object Street "Street" with description "You are currently on Culver Street in front of your colonial house. Town lies to the west. To the north is the front door of the house.", name "road" "street" "path" "sidewalk", w_to Town, n_to Porch, nw_to Front_Window, has scenery light; Object -> rock "rock" with name "rock" "pebble" "stone", description "It's round and medium size.", before [; Insert,PutOn,ThrowAt: if ((rock in player) && (second== Front_Window) && (Front_Window.taped == true)) { move rock to Foyer; give Front_Window open; Front_Window.broken = true; print "You throw the rock at the duct taped window and it breaks silently.^"; rtrue; } else if ((rock in player) && (second == Front_Window) && (Front_Window.taped == false)) { give Front_window open; move rock to Foyer; Front_Window.broken = true; print "You throw the rock at the window and it shatters causing great noise that Mom hears. She runs out and sees what you've done. She grounds you big time.^"; StartDaemon(Grounded_State); } else { print "You can't throw the rock at ",(the) second, ".^"; rtrue; } ], w_to Town; Object Town "Town" with description "You've gone as far into town as you're allowed to. The Hardware Store is on the north side of the street.", name "street" "road" "path", n_to Store, e_to Street, has scenery light; Object Porch "Porch" with description "The porch leads north through the front door to the foyer or south to the street. There is a door mat in front of the door.", name "porch", before [; StartDaemon(Mystery_Man); inside = false; ], n_to Front_Door, nw_to Front_Window, s_to Street, has scenery; Object -> DoorMat "door mat" with seekey false, description "The doormat says ~Welcome~.", name "mat" "doormat", before [; move door_key to Porch; Push, Lift, LookUnder: self.seekey = true; "You see a key."; ], after [; Take: move door_key to Porch; if (noun == door_key) { if (self.seekey == true) { move door_key to player; "You take the door key."; } "You can't see any key. Maybe you need some prescription glasses."; } "Taking the doormat will do you no good. Mom will be upset since she wants everyone to wipe their feet on the doormat before entering."; ]; Object Store "Store" with visit false, description "You are at the Town Hardware Store. They sell all sorts of tools.", name "store" "hardware", before [; Store.visit = true; ], door_to Store, open_to Store, s_to Town, has light; Object -> tools "tools" with description "A full set of tools.", name "tools" "tool" , article "some", before [; Store.visit = true; Buy, Purchase: if (money in player) { if (noun == tools) { move tools to player; totalmoney = totalmoney - 30; score = score + 20; "Your purchase the tools."; } "Why would you want to buy that?"; } "You have no money to purchase anything."; Take: "You must buy them. Taking without paying for is called stealing. Mom wouldn't like that."; ]; Object -> bottle "bottle" with drinking false, description "It is a magic bottle that says ~For Life, Health, and Happiness~", name "magic" "bottle" "potion", before [; Take: if ((self in Mystery_Man) || (Mystery_Man.hasbottle == true)) "The man warns you that you should pay before taking."; "You can't see any bottle."; Give: if ((bottle in player) && (noun == bottle) && (second == Dad)) { move bottle to Dad; "You give the bottle to your Dad."; } if ((bottle in player) && (noun == bottle) && (second == Mom)) { move bottle to Mom; "You give the bottle to your Mom who wants to know where it came from."; } if ((bottle in player) && (noun == bottle) && (second == Mystery_Man)) { if (self.drinking == true) "The man states, ~I see you've drunken the magic potion. You should feel better soon.~"; "Keep the bottle. You many need it."; } if ((noun == bottle) && (second == Sister) && (bottle in player)) { "Your sister doesn't need it."; } "You don't have a bottle."; Buy, Purchase: if ((totalmoney > 5) && ((self in Mystery_Man) || (second == Mystery_Man))) { totalmoney = totalmoney - 5; time_alive = time_alive + 100; score = score + 10; move bottle to player; "You purchase the magic bottle."; } print "You don't have enough money to buy the bottle."; if (self in player) "You open the magic bottle and drink the potion. You added another month to your life."; Open: time_alive = time_alive + 100; self.drinking = true; "You open the bottle and drink the foaming liquid. It's a magic potion. You added another month to your life."; Drop, Break, Throw: if (self.drinking == false) { remove self; score = score - 10; "You drop the bottle. Foaming liquid comes out."; } remove self; "You drop the bottle."; ], has container openable; !------------------------------------------------------------------ ! Inside and global daemon objects !------------------------------------------------------------------ Object Sister "Sister" with lured false, article "your", ossified false, time_ossified 20, description "Your little sister Susy is an irritating brat who is always trying to get you in trouble with Mom.", name "Suzy" "sister" "sibling" "Sister", before [; Attack, Hit: switch (random(3)) { 1: "Suzy hits back and hurts you."; 2: move Sister to Kids_Room; Closet.blocked = false; StopDaemon(Sister); "Suzy starts crying and goes to her room."; 3: move player to Kids_Room; StartDaemon(Grounded_State); "Mom hears the fighting, runs upstairs and grabs you. She sends you to your room where you are grounded for an hour."; } ], daemon [ t; move Sister to Upper_Hallway; if ((inside == true) && (self.ossified == false) && (grounded == false)) { switch (random(20)) { 1: move Sister to Upper_Hallway; 3: move Sister to Kitchen; 4: "Suzy says, ~Mom, Lymon is being a nuisance.~"; 5: "Susy says, ~Mom, Lymon won't clean his room.~"; 6: "Susy says, ~Mom, Lymon is pretending he's Snark."; } if (self.ossified == true) { t = --(self.time_ossified); if ((Mom.ossified == false) && (inside == true) && (grounded == false)) { switch (random(5)) { 2: grounded = true; StartDaemon(Grounded_State); "Mom grounds you for ossifying Suzy."; 4: "Mom yells at you for ossifying Suzy (even though its temporary)."; } } if (t == 0) { self.ossified == false; if (inside == true) { "Suzy becomes unossified."; } "Suzy becomes unossified."; } } if ((Grounded_State.ground == true) && (self.ossified == false)) "Suzy sings, ~Lymon is grounded. Haaa Haaaa Haaaa~."; if (player in Upper_Hallway) move Sister to Upper_Hallway; } ], has animate; Object Mom "Mom" with ossified false, time_clean 30, time_ossified 20, description "Mom is always cooking or cleaning in the Kitchen. She is very protective of you and makes sure you stay out of trouble.", name "mom" "mother", article "your", life [; Ossify: if (noun == Mom) { if ((ossifier in player) && (Mom.ossified == false) && (player in location) && (self in location)) { self.ossified = true; "You ossify your mother and she turns to stone. You're lucky it's temporary!"; } if (ossifier notin player) "You can't ossify anything. You don't have an ossifier."; } Take, Grab: if (ducttape in Mom) { if ((Mom.ossified == true) && (second == Mom) && (noun == ducttape)) { move ducttape to player; "You take the ducttape away from your ossified Mom."; } } ], daemon [ t; move self to Kitchen; if ((inside == true) && (self.ossified == false) && (player.location == self.location) && (grounded == false)) { switch (random(10)) { 1: move self to Kitchen; 3: move self to Kitchen; 5: flag = true; "Mom says, ~Lymon, please clean your room.~"; 8: "Mom says, ~Lymon, don't forget to do your homework.~"; 10:"Mom says, ~Lymon, don't forget to take out the garbage."; } } if (self.ossified == true) { t = --(self.time_ossified); if (t == 0) { self.ossified = false; if ((inside == true) && (grounded == false)) { StartDaemon(Grounded_State); "Mom becomes unossified and grounds you for your behavior."; } "Mom becomes unossified."; } } if (flag == true) { t = --(self.time_clean); if ((t == 0) && (clean_room == false) && (inside == true)) { StartDaemon(Grounded_State); "Mom has grounded you for not cleaning your room"; } } ], has animate; Object Dad "Dad" with ossified false, taped false, time_clean 20, time_ossified 10, time_to_leave 6, warning false, name "Dad" "dad" "father", initial "Dad is always reading, inventing, and doing experiments in the basement. He is a scientist by profession and was recently nominated for a Nobel Prize in Physics.", describe "Dad is middle-aged, hard-working, and usually in the basement with his lab coat on.", before [; Ossify: if (noun == Dad) { if ((ossifier in player) && (self.ossified == false)) { self.ossified = true; "You ossify your Dad and he turns to stone. But only for a few seconds!"; } if (ossifier notin player) "You can't ossify anything. You don't have an ossifier."; } Tape: if ((ducttape in player) && (self.ossified == true)) { self.taped = true; StartDaemon(Evil_Robot); "^You duct tape Dad's mouth, hands, and feet while he is ossified."; } if ((Dad.taped == true) && (ducttape in player)) "You already taped your Dad."; Hit, Attack: StartDaemon(Grounded_State); "Not a good idea to hit the head of the household. You've been grounded."; ], daemon [ t; move self to Basement; if (player in Basement) { move self to Basement; if (Dad.taped == false) { StartDaemon(Action_Basement); if ((self.ossified == false) && (self.taped == false)) { switch (random(10)) { 1:"Dad says, ~Lymon, please go upstairs. You know you are not supposed to be in the basement.~"; 3: "Dad says, ~Lymon, it is very dangerous down here, please go upstairs now.~"; 5: "Dad warns, ~Lymon, I'm going to ground you if you don't leave now.~"; 6: if (self.warning == true) "Dad says, ~Lymon, don't you ever listen. Leave NOW!!!"; } t = --(self.time_to_leave); if (t == 0) { if (self.warning == true) !{ ! print "Dad grabs your arm and drags you up to the Kitchen warning you never ! to go down the basement again. Next time you will be grounded."; ! PlayerTo(Kitchen); !} !else { print "Dad warned you once and grounds you big time for disobeying his orders not to come down into the basement."; StartDaemon(Grounded_State); } } } } } if (self.ossified == true) { t = --(self.time_ossified); if (t == 0) { self.ossified = false; if (self.taped == false) { StartDaemon(Grounded_State); "Dad becomes unossified. He grounds you for using the ossifier on him."; } else { "Your Dad becomes unossified and struggles to become unfree from the duct tape, but cannot--the tape is really strong."; } } } if (flag == true) { t = --(self.time_clean); if ((t == 0) && (clean_room == false) && (inside == true)) { print "Dad has grounded you for not cleaning your room"; StartDaemon(Grounded_State); } } if ((inside == true) && (self.ossified == false) && (grounded == false)) { switch (random(10)) { 3: move self to Basement; 5: "Dad says, ~Lymon, did you study for your Astonomy test?.~"; 8: if (clean_room == false) { flag = true; "Dad says, ~Lymon, don't forget to clean your room.~"; } 10: "Dad says, ~Lymon, be sure to brush your teeth after you eat."; } } ], has animate; Object Grounded_State "Grounded_State" with name "grounded state", time_remaining 10, ground false, daemon [ t; grounded = true; move player to Kids_Room; if (self.time_remaining == 0) { StopDaemon(self); rtrue; } t = --(self.time_remaining); self.ground = true; if (t > 0) { if (noun == e_obj) { print "Your grounded. You can't leave until time is up."; } if (t == 9) { print "You decide to take a nap to pass the time while you are grounded.^"; "ZZZZZZZ....One sheep, two sheep, three sheep....."; } if (t == 5) print "..and the Cow Jumped Over the Moon......ZZZZZZ."; } if (t == 3) print "^Getting grounded isn't so fun."; if (t==0) { grounded = false; self.ground = false; StopDaemon(Grounded_State); print "Your no longer grounded so you decide to go to the Kitchen to apologize to Mom for fighting with Suzy."; PlayerTo(Kitchen); } ]; Object Action_Basement "Action_Basement" with amount 5, name "action", daemon [ t; t = --(self.amount); if (t == 0) { if (Dad.ossified == false) { if (grounded == false) { StopDaemon(Action_Basement); print "Dad's grabs your arm and drags you upstairs to the Kitchen warning you not to come into the basement."; PlayerTo(Kitchen); } } } ]; Object Evil_Robot "robot" with name "machine" "robot", time_remain 10, description "There is a metallic robot that looks like C3P-O.", before [; Hit, Attack: deadflag=1; "You are attacked by the robot which sends electrical shocks into your body. It starts rambling about Alpha-One Star and the Droids to be decimated."; Approach: "The robot says, ~Red Alert! and warns you to back off."; Give: if (noun ~= money) "The robot warns you to stay away from him."; else if (money in player) { remove money; move money to Evil_Robot; "The robot takes all your money."; } Ossify: "You try to ossify the robot, but to no avail. The ossifier does not work on metal objects."; Receive: remove noun; "The robot uses its electrical rod to the ", (the) noun, " and has a devious laugh."; ], daemon [ x; x = --(self.time_remain); if ((x == 8) && (player in Basement)) { "The robot warns you to leave the basement or he will electrocute you."; } if ((x == 4) && (player in Basement)) print "The robot rambles about killing the Droids of Alpha-Star..."; if (x == 0) { if ((win_flag == false) && (player in Basement)) { switch (random(2)) { 1: deadflag = 1; "The robot wasn't joking. He moves towards you an electrocutes you with a hidden lightning rod."; 2: remove Evil_Robot; StopDaemon(Evil_Robot); print "^Just when the robot is about to electocute you, the old mysterious man appears in a large ball of smoke out of thin air. He says a magical spell and turns the robot into a heap of scrap metal that melts. May the force be with you, Lymom."; print "^In the blink of an eye, he man disappears."; } } else StopDaemon(Evil_Robot); } ], has animate; Object Mystery_Man "Mystery_Man" with speaking false, hasbottle true, initial "The mysterious man is old and draped in a hooded cloak. He seems to have a bottle.", description "You see a mysterious, but wise-looking old man holding a bottle.", name "wise" "old" "man", life [; move bottle to Mystery_Man; TalkTo, SpeakTo, Approach: self.speaking = true; if (self.hasbottle == true) "The old wise asks says that he will give you the bottle for a $10."; "A young fellow like you should trust your instincts and follow a good moral life."; Buy, Purchase: if ((noun == bottle) && (totalmoney > 5) && (money in player) && (self.hasbottle == true)) { totalmoney = totalmoney - 5; time_alive = time_alive + 100; score = score + 10; self.hasbottle = false; move bottle to player; "You purchase the magic bottle."; } "You don't have enough money to buy the bottle."; Give, Offer: if ((noun == money) && (money in player) & (totalmoney > 10) && (self.hasbottle == true)) { totalmoney = totalmoney - 10; score = score + 10; time_alive = time_alive + 100; self.hasbottle = false; move bottle to player; StopDaemon(Mystery_Man); "You purchase the bottle. The man tells you that life is filled with hope."; } if (totalmoney < 10) "You don't have enough money to buy the bottle."; if ((self.hasbottle == true) && (noun ~= money)) "The old man believes in a life not based on worldly possessions and declines the gift."; else if (self.hasbottle == false) "The man already sold you the bottle."; Hit, Attack, Ossify: deadflag = 1; "Pooooffff!!!!....Unbeknownst to you, the old man is a wizard and turns you into a snail."; ], daemon [; move bottle to Mystery_Man; ! if ((action == ##Give) || (action == ##Buy)) ! StopDaemon(Mystery_Man); switch(random(5)) { 1:if ((money notin player) && (Store.visit == true)) { print "The mysterious man suddenly appears in front of you warns you of the danger that lurks in the street. He recites a mystical chant and POOOF!!!-- in an instant you find yourself back in your own safe bedroom back at home."; PlayerTo(Kids_Room); } 2: if ((money notin player) && (Store.visit == false) && (player in Street)) { print "The mysterious man suddenly appears in front of you and warns that danger is always near and to get home as soon as possible."; } 3: move self to Town; } ], has animate; Object Total_Life "Total Life" with name "lifetime" "life", daemon [ t; t = --time_alive; if (t==0) { deadflag = 1; StopDaemon(self); "Your rare medical disease has killed you. But you are now in heaven."; } else if (t % 50 == 0) { print "Don't forget that you only have ", (t % 400)/100, " months left to live."; } else if (t == 30) { "You are running out of time to save your life. You need to get to a schmengulator before it is to late!!!."; } ]; ! ---------------------------------------------------------------------------- ! ! Functions ! ! ---------------------------------------------------------------------------- [ OfferSub; if ((noun == Mystery_Man) || (second == Mystery_Man)) "The old man believes in a life not based on worldly possessions and declines the gift."; "You offer the", (name) noun, "."; ]; [ OssifySub; if ((ossifier in player) && (Dad.ossified == false) && (noun == Dad) && (Dad in Basement)) { Dad.ossified = true; StartDaemon(Evil_Robot); "You ossify your Dad and he turns to stone. But only for a few seconds!"; } if ((ossifier in player) && (Mom.ossified == false) && (noun == Mom)) { Mom.ossified = true; "You ossify your mother and she turns to stone. Your lucky its temporary."; } if ((ossifier in player) && (Mom.ossified == true) && (noun == Mom)) "Mom is already ossified. You are in big trouble already."; if ((ossifier in player) && (Sister.ossified == true) && (noun == Sister)) "Suzy is already ossified. Boy you are acting cruel."; if ((ossifier in player) && (Sister.ossified == false) && (noun == Sister)) { Sister.ossified = true; "You ossify your Sister and she turns to stone. Mom could ground you for this big time."; } if ((ossifier in player) && (noun == Mystery_Man)) { deadflag = 1; "You try to ossify the man, but to no avail. The man is a wizard and in an instant turns you to an ant."; } if ((ossifier in player) && (noun == Evil_Robot)) { print "You try to ossify the robot, but to no avail. The ossifier does not work on metal objects."; } if (ossifier notin player) "You can't ossify anything. You don't have an ossifier.";]; [ TakeOffSub; "You take off ", (name) noun, "."; ]; [ GrabSub; if (DoorMat.seekey == true) { move door_key to player; "You take the door key."; } else if (noun == door_key) "You can't see any key. Maybe you need some prescription glasses."; "You grab the", (name) noun, "."; ]; [ CountSub; if (noun has multitude) "There are a multitude."; "I see one (1) ", (name) noun, "."; ]; [ LiftSub; "You lift", (name) noun, "."; ]; [ ReachSub; if ((noun == candy) && (candy notin player)) move candy to player; "You reach for ", (name) noun, "."; ]; [ ThrowSub; if ((rock in player) && (Front_Window.taped == true)) { move Rock to Foyer; print "You throw the rock at the duct taped window and it breaks silently."; rtrue; } if ((rock in player) && (Front_Window.taped == false)) { move Mom to Foyer; move rock to Foyer; inside = true; StartDaemon(Grounded_State); "You throw the rock at the window. The rock lands in the Foyer. Mom hears the large crash of glass, runs to the Foyer, and sees what you have done. She grounds you big time."; } else { move Mom to Foyer; move rock to Foyer; inside = true; StartDaemon(Grounded_State); "You throw the rock at the window. The rock lands in the Foyer. Mom hears the large crash of glass, runs to the Foyer, and sees what you have done. She grounds you big time."; ! print "You can't throw the rock at ",(the) second, ".^"; ! rtrue; } ]; [ DoofingleSub; "You doofingle", (the) noun, "."; ]; [ PurchaseSub; if (money notin player) "You cannot purchase anything without money."; if ((noun == bottle) && (totalmoney > 5) && (money in player)) { totalmoney = totalmoney - 5; time_alive = time_alive + 100; move bottle to player; "You purchase the magic bottle."; } "You purchase", (name) noun, "."; ]; [ HitSub; if (noun == Sister) "Your sister hits you back. Oouch!!!."; "You hit", (name) noun, "."; ]; [ ReleaseSub; "You can't release ", (the) noun, "."; ]; [ TapeSub; if ((ducttape in player) && (Dad.ossified == true) && (Dad.taped == false) && (noun == Dad)) { Dad.taped = true; StartDaemon(Evil_Robot); "You duct tape Dad's mouth, hands, and feet while he is ossified."; } if ((Dad.taped == true) && (ducttape in player)) "You already taped your Dad."; if ((ducttape in player) && (Dad.ossified == false) && (noun == Dad)) { switch (random(3)) { 1: move ducttape to Parents_BedRoom; 2: move ducttape to Den; 3: move ducttape to Closet; } "You try taping Dad, but he grab it away from you."; } if ((ducttape in player) && (Mom.ossified == false) && (noun == Mom)) { switch (random(3)) { 1: move ducttape to Parents_BedRoom; 2: move ducttape to Basement; 3: move ducttape to Closet; } "You try taping Mom, but she grab it away from you."; } if ((ducttape in player) && (Sister.ossified == false) && (noun == Sister)) { "You try duct taping Suzy, but she runs away before you can tape her"; } if ((ducttape in player) && (player in Porch) && (inside == false)) { Front_Window.taped = true; "You duct tape the window frame."; } if (ducttape in player) "You tape your", (name) noun, "."; "Hey dummy--you don't have any tape to tape anything with."; ]; [ UseSub; "You use", (the) noun, "."; ]; [ LookOutSub; "You look out", (the) noun,"."; ]; [ TalkToSub; if (Mystery_Man.speaking == true) "The old wise asks says that he will sell you a magic bottle for a $5."; "You talk to ", noun, "."; ]; [ SpeakToSub; if (Mystery_Man.speaking == true) "The old wise asks says that he will sell you a magic bottle for a $5."; "You speak to ", noun, "."; ]; [ CleanUpSub; if (inside == true) { move player to Kids_Room; clean_room = true; "You go to your room and clean your room like a good boy. Mom is proud."; } else "How can you clean your room? You are not at home."; ]; [ CleanSub; if (inside == true) { move player to Kids_Room; clean_room = true; "You go to your room and clean your room like a good boy. Mom is proud."; } else "How can you clean your room? You are not at home."; ]; [ BreakSub; if ((noun == Front_Window) && (rock in player) && (taped == true)) { move Rock to Foyer; print "You throw the rock at the duct taped window and it breaks silently."; rtrue; } if ((noun == Front_Window) && (second == rock) && (rock in player) && (Front_Window.taped == false)) { move Mom to Foyer; move rock to Foyer; inside = true; StartDaemon(Grounded_State); "You throw the rock at the window. The rock lands in the Foyer. Mom hears the large crash of glass, runs to the Foyer, and sees what you have done. She grounds you big time."; } else { print "You can't throw the rock at ",(the) second, ".^"; rtrue; } ]; [ SmashSub; if ((noun == Front_Window) && (rock in player) && (Front_Window.taped == true)) { move Rock to Foyer; print "You throw the rock at the duct taped window and it breaks silently."; rtrue; } if ((noun == Front_Window) && (second == rock) && (rock in player) && (Front_Window.taped == false)) { move Mom to Foyer; move rock to Foyer; inside = true; StartDaemon(Grounded_State); "You throw the rock at the window. The rock lands in the Foyer. Mom hears the large crash of glass, runs to the Foyer, and sees what you have done. She grounds you big time."; } else { print "You can't throw the rock at ",(the) second, ".^"; rtrue; } ]; [ ApproachSub; if (noun == Mystery_Man) "You approach the mysterious man cautiously"; "You approach ", (the) noun, "."; ]; [ ReadSub; if (noun == Manual) manual.read = true; ]; ! ---------------------------------------------------------------------------- ! Grammar ! ! The grammar section includes the file "Grammar" and will later include ! extensions to the standard grammar library. ! ! ---------------------------------------------------------------------------- Include "Grammar"; verb "lift" * noun -> Lift; verb "doofingle" * noun -> Doofingle; verb "ossify" * noun -> Ossify; verb "takeoff" * noun -> TakeOff; verb "grab" * noun -> Grab; verb "tape" * noun -> Tape; verb "use" * noun -> Use; verb "lookout" * noun -> LookOut; verb "talk to" * noun -> TalkTo; verb "speak to" * noun -> SpeakTo; verb "cleanup" * noun -> CleanUp; verb "approach" * noun -> Approach; #IFDEF TEST_VERSION; Verb "xdeterm" * -> Xdeterm; #ENDIF; ! ----------------------------------------------------------------------------