Switches xdv5s; Constant Story "It's a Dog's Life"; Constant Headline "^An Interactive Heeling^\ Copyright (c) 1998 by Mr. WiggleButt.^^^^^New players should type ~HELP~^^^"; !---------------------------------- ! ! constants ! !---------------------------------- ! Constant Debug; ! for testing Constant MAX_SCORE = 38; !-------------------------- ! what scores what ! !-------------------------- ! getting mail 1 ! getting pen 5 ! naming dog 10 ! coloring dog 5 ! chase sheep 2 ! get frisbee 2 ! get cookie 2 ! chase squirrel 2 ! poop 1 ! drive car 2 ! key 1 ! break window 3 ! get bottle 1 ! drink beer 1 ! ! total 38 (so far) !---------------------------------- ! ! Included libraries ! !---------------------------------- Include "Parser"; ! Standard parser !------------------------------------------------- ! ! change a few of the standard messages ! !------------------------------------------------- Object LibraryMessages with before [; Mild: "If you're going to swear, use a f***ing swear word."; Strong: "Real ACD owners, don't use such language. (yeah, right)"; ]; Include "VerbLib"; ! Standard Verbs [ PrintRank; print ", earning you the rank of "; if (score >= 34) "Grandmaster ACD Owner!"; if (score >= 28) "Junior ACD Owner."; if (score >= 15) "Seasoned ACD Owner."; if (score >= 8) "Experienced ACD Owner."; "Amateur ACD owner. Perhaps you should consider a different breed, or maybe some nice goldfish."; ]; Include "Grammar"; ! Standard Grammar !------------------------------- ! ! string arrays ! !------------------------------- Array parsed_text_buffer -> 20; !------------------------------- ! ! Globals ! !------------------------------- Global Press_A_Key; Global the_named_word = 0; Global from_char; Global to_char; !------------------------------------------- ! ! Attributes & Properties specific to game ! !------------------------------------------- Attribute foodvalue; Attribute beastie; Attribute Is_liquid; !------------------------------- ! ! New Classes ! !------------------------------- Class AustCatDog with dogname 0 0 0 0 0 0, ! There's room for 12 bytes of text in these 6 entries dogcolor 0 0 0 0 0 0, ! There's room for 12 bytes of text in these 6 entries longdesc 1, description [; if (self.longdesc == 1) { self.longdesc = 0; AcdDesc(); } else if ( ( (self.&dogname)->0) == 0) print "a typical ACD^"; else { if (((self.&dogcolor)->0) == 0) print "An "; else print "A "; self.mycolor(); print " Australian Cattle Dog, named "; self.myname(); print "^"; } ], parse_name [ i j flag; if (parser_action==##TheSame) { for (i=0:i<8:i++) if ((parser_one.&dogname)->i ~= (parser_two.&dogname)->i) return -2; return -1; } for (::i++) { j=NextWord(); flag=0; if (j=='dog' or 'acd' || (j=='blank' && ((self.&dogname)->0) == 0)) flag=1; if (j=='dogs') { flag=1; parser_action=##PluralFound; } if (flag==0 && ((self.&dogname)->0) ~= 0) { wn--; if (TextReader(0)==0) return i; for (j=0: j<8: j++) if ((self.&dogname)->j ~= parsed_text_buffer->j) return i; flag=1; } if (flag==0) return i; } ], baptize [ i; wn = the_named_word; if (TextReader(1)==0) return i; for (i=0: i<12: i++) (self.&dogname)->i = parsed_text_buffer->i; print_ret "OK.^"; ], color [ i; wn = the_named_word; if (TextReader(1)==0) return i; for (i=0: i<12: i++) (self.&dogcolor)->i = parsed_text_buffer->i; print_ret "OK.^"; ], mycolor [i; while (((self.&dogcolor)->i) ~=0) print (char) (self.&dogcolor)->i++; ], myname [i; while (((self.&dogname)->i) ~= 0) print (char) (self.&dogname)->i++; ], orders [; Bark: "Woof! Woof!"; Fuck: self.myname(); " runs over to ", (the) noun, " and after a brief examination, decides that there are more important things to be done"; Growl: "Grrrrrrrrrrrrrr!"; Stay: StopDaemon(self); self.myname(); " lies down"; Come: StartDaemon(self); self.myname(); " comes trotting over to you"; Take: if (noun hasnt animate) if (noun hasnt foodvalue) { self.myname(); " runs over to ", (the) noun, " and grabs it, brings it to you and drops it at your feet"; } else { self.myname(); move noun to trashbin; " grabs the ", (the) noun, " and eats it"; } Chase: if (noun hasnt animate) { self.myname(); print " runs over to ", (the) noun, " and pees on it"; } else { ; rtrue; } ], life [; Give: if (noun has edible) { self.myname(); print "scarfs down ", (the) noun; if (noun has foodvalue) { print "^Woof! Woof! "; } else print "^Woof! "; remove noun; "Woof!^"; } else { move noun to location; "Grrrrrrrrr"; } ], daemon [; move self to location; ], has animate proper beastie; !------------------------------------------------- ! ! Barnyard area ! !------------------------------------------------- Object Barnyard "Barnyard" with name "yard" "barnyard", description "There is a large enclosed barn yard here, to the east is a gate which leads to red barn", s_to Freeblewhizz_003, e_to [;if (player in car) "The car won't fit through the gate"; else if (sheep in self) "The sheep are blocking your path"; else return Barn; ], w_to Pond, has light; !------------------------------------------------- ! ! Sheep ! !------------------------------------------------- Object -> Sheep "a flock of sheep" with name "sheep" "sheepies" "flock", description [;if (self in BarnYard) "A large flock of sheep, about 50 in number, stand here happily grazing on some grass"; else if (self in Barn) "A large flock of sheep, about 50 in number, are here just milling about"; else "How the flock did they get here?"; ], before [; Attack, Chase: if (actor == player) "The sheep move to block the barn door"; if (actor == doggie) { print "In a perfectly executed series of moves, "; doggie.myname(); if (self in barnyard) { move sheep to barn; if (self hasnt general) { score=score+2; give self general; " leaps over the fence and chases the sheep into the barn, comes back to you and spits some wool out from between his teeth. "; } else " leaps over the fence and chases the sheep into the barn, comes back to you after stopping to scarf down some yummy sheep nuggets. "; } move self to barnyard; " chases the sheep out of the barn and into the barnyard"; } ] has animate proper beastie; !------------------------------------------------- ! ! Barn ! !------------------------------------------------- Object Barn "Barn" with name "barn", description "Its your typical red barn. There is a ladder here, which leads up to the hayloft", u_to HayLoft, w_to [; if (sheep in self) "the sheep are blocking your path"; else return BarnYard;], has light; !------------------------------------------------- ! ! hayloft ! !------------------------------------------------- Object HayLoft "Hay Loft" with name "hay loft" "loft", description "a typical hayloft with bales of hay scattered about", d_to Barn has light; !------------------------------------------------- ! ! hay bales in the barn ! !------------------------------------------------- Object -> HayBales "bales of hay" with name "hay" "bales", description "There are several bales of hay lying about. It looks like this might be a good place to hide something, since nobody seems to have been up here for quite some time.", before [; LookUnder, Search: move Cookies to HayLoft; "You poke about the hay bales and find a dog biscuit"; ], has static scenery; !------------------------------------------------- ! ! which for some od reason contain some ! dog treats ! !------------------------------------------------- Object -> -> Cookies "dog biscuit" with name "cookie" "treat" "biscuit", description "yummy doggie treat", foodpoints 10, before [; Eat: "Eeeew Yuck"; Smell: "Mmmmmm, liver."; ], after [; Take: if (self hasnt general) { give self general; score=score+2; } ], has edible foodvalue; !------------------------------------------------- ! ! Pond ! !------------------------------------------------- Object Pond "Pond" with name "pond" "water" "lake", description "You are standing at the edge of a small pond. The light breeze blowing today ripples the surface and makes this a very tranquil area. Towards the center of the pond you can see circular ripples which are being made by some fish feeding near the surface. Nearby you can see some tracks in the mud that were apparently made by the sheep when they come here to drink. There is also some other evidence that the sheep stop by here regularly also (namely sheep poop)", before [;Swim: "It is wiser to heed the sign."; ], e_to BarnYard, n_to has light; !------------------------------------------------- ! ! No Swimming ! ! !------------------------------------------------- Object -> warning_sign "wooden sign" with name "wooden" "sign" "writing" "writings", initial [; "A large wooden sign stands besides the pond of cool water.";], description "The sign reads ~D A N G E R - - - N O S W I M M I N G~.", has static; !------------------------------------------------- ! ! sheep poop ! !------------------------------------------------- Object -> SheepShit "sheep poop", with name "poop" "pellets" "shit" "evidence" "crap", description "Small dark brown and black pellets, some are damp and glossy, while others have been here some time and are dried out by now.", before [; Smell: "Smells like sheep poop, musty and earthy"; Take: if (actor == player ) "Why would you want to do that?"; ], has scenery foodvalue; !------------------------------------------------- ! ! and fishies ! !------------------------------------------------- Object -> fish "fish", with name "fish" "trout" "bass" "shark", description "The fish are cold, slimy and appear to be eating insects at the surface.", has scenery beastie; !------------------------------------------------- ! ! and bugs ! !------------------------------------------------- Object -> bugs "small insects", with name "bugs" "flies" "flys" "fishfood" "mayflies" "insects" "bug" "insect", description "The flies are being eaten by the fish.", has scenery beastie; !------------------------------------------------- ! ! and water ! !------------------------------------------------- Object -> pond_water "water" with name "water" "fluid" "liquid", article "some", description "Crystal clear, probably drinkable.", before [; Drink: "You take a few sips and find the water refreshing."; Take: "The only thing you will get is wet if you don't use a container."; Wet: "A surreal idea."; GetWith: <>; ], has is_liquid scenery; !--------------------------------------------- ! ! Driveway area ! !--------------------------------------------- Object Driveway "Driveway in front of your house" with name "driveway" "drive", description "A long asphalt strip, leading north to Freeblewhizz Road. On the curb near the end of the drive is your mailbox.", n_to Freeblewhizz_001, has light; !------------------------------------------------- ! ! wouldnt be an adventure game without ! a mailbox in the starting location ! !------------------------------------------------- Object -> Mailbox "mailbox" with name "mailbox", description "Your mailbox is a typical rural type mailbox, which surprisingly happens to be located at the end of your driveway. It is green and is attached to a post that is about 4 feet high. ", has static container openable ~open scenery; !------------------------------------------------- ! ! and of course there must be something in it ! !------------------------------------------------- Object -> -> paper "sheet of paper" with name "paper" "mail", description [; print "Congratulations^^You have been chosen as the winner of a fully trained Australian Cattle Dog (you lucky devil). To receive this wonderful prize valued at -50000 dollars (dog, food, vet bills, and assorted damages included, taxes and registration are extra and will be the responsibility of the owner), all you have to do is complete the attached paperwork.^^"; print "^^What would you like your dog's name to be ? "; if (((doggie.&dogname -> 0) == 0)) print "________________"; else doggie.myname(); print "^^What color would you like your dog to be ? "; if (((doggie.&dogcolor -> 0) == 0)) print "________________"; else doggie.mycolor(); "^^^(programmers note)^ Please answer all questions in order, unless you want a dog named ~blue~ who happens to be colored ~Quincy~"; ], after [; Take: if (self hasnt general) { give self general; score=score+1; } ]; !------------------------------------------------- ! ! car swiped from museum of inform ! !------------------------------------------------- Object -> car "~Lectro Car~" with name "car" "CowDog1", description "Among the controls that are positioned around the dashboard is a large red on/off switch. You realize now, that the artificial woodgrain panels look a little cheesy in an electric vehicle, but are glad that you spent the extra money on the optional glovebox and the personalized license tags which read ~COWDOG-1~.", when_on "The red car sits here, its motor still running. Making the pleasing humming sound of a electric vehicle", when_off "A red ~Lectro Car~ is parked here.", before [; PushDir: AllowPushDir(); rtrue; Go: if (Ignition has on) { Achieved(1); print (string) random("^Hummm!^","^Hrumm!^","^Hrummpamm!^"); if (self hasnt general) { score=score+2; give self general; } rtrue; } print "(The ignition is off at the moment.)^"; ], after [; PushDir: "The car rolls very slowly as you push it."; ], has enterable static container open; !------------------------------------------------- ! ! but it has a different starter ! !------------------------------------------------- Object -> -> Ignition "ignition switch" with name "switch" "starter" "ignition", description [; print "The ignition switch is a small red knob. "; ], has switchable ~on scenery; !------------------------------------------------- ! ! and a glove box ! !------------------------------------------------- Object -> -> GloveBox "glove box" with name "glovebox" "compartment" "box" "glove" has container openable ~open scenery static; !------------------------------------------------- ! ! which contains the stylus from balances ! !------------------------------------------------- Object -> -> -> MagicPen "ballpoint pen" with name "pen" "ballpoint" "stylus" "quill" "crayon" "pencil", uses 0, description "This is the pen that your Great Grandfather Charlie gave you. The last time you saw it was when you registered the car. You must have left it here.", before [; WriteOn: if (second in player) { if (second == paper) { if (MagicPen notin player) "It would be awful difficult to do that without something to write with^"; else { switch (self.uses) { 0: doggie.baptize(); score=score+10; 1: doggie.color(); StartDaemon(doggie); move doggie to location; print "^^As soon as you finish writing the word "; doggie.mycolor(); print " on the paper. A white van with the words ~Automatic Canine Delivery Service~ comes to a screeching halt in front of your drive way. As you turn around to see what is happening, the driver leaps out and grabs the paper from your hands. he then proceeds to mumble something about *&&!#$~ noisy cattle dogs and tosses a dog out of the van and speeds off, yelling something finding a new job, where he won't be bitten quite so often^"; move paper to trashbin; score=score+5; default: "Your pen is out of ink.^"; } self.uses++; } } else "Graffiti is punishable by a fine of not less than 30 US dollars and not to exceed 100 US dollars and or confinement in the county pokey for a period of 1 to 20 days"; } else "Writing is a fidgity kind of art, you can't do it unless you are holding a pen and something to write on"; rtrue; ], after [;Take: if (self hasnt general) { give self general; score=score+5; } ]; !------------------------------------------------- ! ! and a key ! !------------------------------------------------- Object -> -> -> MagicKey "small key" with name "key" "small", uses 0, description "The key is small and made of brass, it looks like it might be for a padlock or something.", after [;Take: if (self hasnt general) { give self general; score=score+1; } ]; !------------------------------------------------- ! ! just a dog, see the class for more info ! !------------------------------------------------- Object Doggie "your dog", class AustCatDog, with name "merble", before [; Strong: "Look, I know you probably got this game over the Internet, but this is not the time or place for that sort of thing"; ], has animate proper; !------------------------------------------------- ! ! Freeblewhizz Road ! !------------------------------------------------- Object Freeblewhizz_001 "Freeblewhizz Road", with name "road" "Freeblewhizz", description "This is Freeblewhiz Road, which happens to be the main road in this tiny burgh. The road continues to the north and you can see your driveway back to the south. You have just passed milemarker 001", s_to Driveway, n_to Freeblewhizz_002, has light; !------------------------------------------------- ! ! Freeblewhizz Road ! !------------------------------------------------- Object Freeblewhizz_002 "Junction Freeblewhizz & Whizbang", with name "road" "Freeblewhizz" "Whizbang", description "You just passed milemarker 002 on Freeblewhizz Road. This just happens to be the junction of Freeblewhizz & Whizbang. ", n_to Freeblewhizz_003, s_to Freeblewhizz_001, w_to WhizBang_002, e_to Whizbang_001, has light; !------------------------------------------------- ! ! road sign ! !------------------------------------------------- Object -> wigglesign "Wiggles Sign", with name "sign" "wiggles", with initial "A small white sign almost hidden by some bushes", with description "WiggleButts School for Dogs, ^ 1 mile thataway^ <===", has static; !------------------------------------------------- ! ! Freeblewhizz Road ! !------------------------------------------------- Object Freeblewhizz_003 "Freeblewhizz Road", with name "road" "Freeblewhizz", with description "You just passed milemarker 003, ahead to the north is a barnyard.", with s_to Freeblewhizz_002, with n_to Barnyard, has light; !------------------------------------------------- ! ! Whizbang Road ! !------------------------------------------------- Object Whizbang_001 "Whizbang Road", with name "Whizbang" "road", description "Whizbang Road mile marker 001.", w_to Freeblewhizz_002, e_to Whizbang_000, has light; !------------------------------------------------- ! ! Whizbang Road ! !------------------------------------------------- Object Whizbang_000 "Whizbang Road", with name "Whizbang" "road", description "You are at the very end of Whizbang Road. There is a narrow path off to the south.", w_to Whizbang_001, s_to [;if (player in car) "Unfortunately, you did not get the 4 wheel drive version of the ~Electro Car~, so you will have to get out and walk."; else return path_000;], has light; !------------------------------------------------- ! ! Narrow Path ! !------------------------------------------------- Object Path_000 "Narrow winding path", with name "winding" "path" "narrow", with description "You are walking along a very pleasant path through a wooded area. The path continues to the south, and to the north you can see the end of WhizBang Road", s_to Path_001 has light; !------------------------------------------------- ! ! Narrow Path ! !------------------------------------------------- Object Path_001 "Narrow winding path", with name "winding" "path" "narrow", with description "You are walking along a very pleasant path through a wooded area. The path continues to the south.", n_to Path_000, s_to Path_002, has light; !------------------------------------------------- ! ! Narrow Path ! !------------------------------------------------- Object Path_002 "Narrow winding path", with name "winding" "path" "narrow", with description "You are walking along a very pleasant path through a wooded area. The path comes to a fork here, leading from the north to distinct trails leading southeast and southwest.", n_to Path_001, sw_to Path_003sw, se_to Path_003se, has light; !------------------------------------------------- ! ! Winding Path ! !------------------------------------------------- Object Path_003se "Winding path", with name "winding" "path", description "The path widens a bit here and continues along a northwest / southeast trail.", se_to large_field, nw_to Path_002, has light; !------------------------------------------------- ! ! Winding Path ! !------------------------------------------------- Object Path_003sw "Winding path", with name "winding" "path", description "The path widens a bit here and continues along a northeast / southwest trail.", sw_to large_field, ne_to Path_002, has light; !------------------------------------------------- ! ! Open Field ! !------------------------------------------------- Object large_field "Large Open Field", with name "field", description [; print "You are standing on the edge of a large open field. There are paths leading out of this area to the northwest, northeast and the west."; if (doggie in location) { doggie.myname(); print " runs off and ", (string) random("pees on ", "eats ", "rolls in ", "digs up "), "a lovely bed of wildflowers, before returning to you"; } rtrue; ], nw_to Path_003se, ne_to Path_003sw, w_to Muddy_Ditch, has light; !------------------------------------------------- ! ! Muddy Ditch ! !------------------------------------------------- Object Muddy_Ditch "Muddy Ditch", with name "muddy" "ditch", description [; print "You are standing on the edge of a large muddy ditch. It smells pretty bad here. Far off to the west you can see a wooded area."; if (doggie in location) { doggie.myname(); print " jumps into the ditch and rolls about in the rather smelly mud."; } rtrue; ], before [; Smell: "Mmmmmm, raw sewage."; ], e_to large_field, w_to Wooded_Area, has light; !------------------------------------------------- ! ! Whizbang Road again ! !------------------------------------------------- Object Whizbang_002 "Whizbang Road", with name "Whizbang" "road", description "You are on Whizbang Road, which happens to run east and west through this area. It is a rather plain road covered in asphalt and in an apparent contradiction to it's name, there is absolutely nothing spectacular to look at here, in fact the road is sort of boring. You are currently at mile marker 2", e_to Freeblewhizz_002, w_to Whizbang_003, has light; !------------------------------------------------- ! ! Whizbang Road again ! !------------------------------------------------- Object Whizbang_003 "Whizbang Road", with name "Whizbang" "road", description "You are on Whizbang Road, which happens to run east and west through this area. It is a rather plain road covered in asphalt and there is absolutely nothing spectacular to look at here. Off to the west you can see a small building.", e_to Whizbang_002, w_to Out_Wigglebutts, has light; !------------------------------------------------- ! ! Wigglebutts ! !------------------------------------------------- Object Out_Wigglebutts "Wigglebutt's School for Dogs (outside)", with name "Wigglebutt's" "school", description "At one time this was a center of higher education for dogs, where a puppy could learn the 3 R's (roaming, running and retching). However in recent years the facility has fallen into a state of disrepair, and is currently overgrown with weeds. The front door and window both appear to have been nailed shut. Off to the south you can see a wooded area.", e_to Whizbang_003, s_to Wooded_Area, in_to In_WiggleButts, has light; !------------------------------------------------- ! ! Door ! !------------------------------------------------- !------------------------------------------------- ! ! Window ! !------------------------------------------------- Object -> window "window" with name "window" "windows", before [; Examine, Search: switch(location) { Out_WiggleButts: "Inside you can see some broken appliances."; In_WiggleButts: "Outside you can see some weeds."; } Open: if (window has open) "You already broke it with the frisbee"; "You can't. The window is nailed shut"; Close: if (window has open) "You already broke it with the frisbee, closing it would serve no useful purpose."; "The windows are already sealed tight."; Attack: "With what? Your bare hands?"; ], door_dir [; if (location==In_WiggleButts) return out_to; return in_to; ], door_to [; if (self hasnt open) "The window is nailed shut, you can't go in"; if (location==Out_WiggleButts) return In_WiggleButts; return Out_WiggleButts; ], found_in Out_WiggleButts In_WiggleButts, has scenery openable ~open door; !------------------------------------------------- ! ! Overgrown Weeds ! !------------------------------------------------- Object -> Weeds "Overgrown Weeds", with name "weeds" "bushes" "plants" "grass", before [; LookUnder, Search: move Frisbee to Out_WiggleButts; "You poke about in the high weeds and to your surprise you find a pink frisbee"; ], has static scenery; !------------------------------------------------- ! ! which contain a lost frisbee ! !------------------------------------------------- Object -> -> frisbee "pink frisbee" with name "disk" "toy" "whammo" "frisbee", description "A bright pink frisbee, about 12 inches in diameter.", after [; Take: if (self hasnt general) { give self general; score=score+2; } ], before [; ThrowAt: print "The frisbee sails off into the distance. "; move Frisbee to location; if (second==window) { move frisbee to location; if (window hasnt open) { print "Suprisingly the frisbee smashes into the glass and breaks the window"; give window open; give window enterable; score=score+3; } rtrue; } if (doggie in location) { print " Then "; doggie.myname(); " runs after the flying disk, and after a spectacular leap into the air, catches it and brings it back to you"; } ]; !------------------------------------------------- ! ! Inside of the school ! !------------------------------------------------- Object In_WiggleButts "Wigglebutt's School for Dogs (inside)", with name "Wigglebutt's" "school", description "Wigglebutt's was once a single room schoolhouse for dogs. Most of the room has been trashed by visiting dogs, but for some odd reason, there is a refrigerator against the wall, which appears to be still running (odd, since no one has paid the electric bill for about 3 years).", out_to Out_WiggleButts, has light; !------------------------------------------------- ! ! Icebox ! !------------------------------------------------ Object -> Refrigerator "Refrigerator", with name "refrigerator" "fridge" "icebox", after [; Open: print "You open the refrigerator and to your surprise there is "; if (BeerBottle in self) "a bottle of cold beer in it"; "no beer in it"; ], before [; Push, Pull: "Why would you want to do such a stupid thing ?^"; Look, Examine: "The refrigerator is a large, white side by side model."; ], has container openable static scenery ; !------------------------------------------------- ! ! BeerBottle ! !------------------------------------------------ Object -> -> BeerBottle "Bottle of Beer", with name "bottle" "beer", description [; if (self has Is_Liquid) "An ice cold bottle of beer. It sure would taste good right now"; "An empty bottle of beer"; ], after [; Open, Drink: if (self has Is_Liquid) if (self has open) { give self ~Is_Liquid; score=score+1; "The bottle of beer makes a satisfying ~PHSST!~ sound as you twist off the cap; overcome by thirst, you down the entire bottle in 3 quick gulps."; } else "The bottle is not open"; "The bottle is empty"; Take: if (self hasnt general) { give self general; score=score+1; } ], has openable ~open container transparent Is_Liquid; !------------------------------------------------- ! ! Lost in the woods ! !------------------------------------------------- Object Wooded_Area "Woods", with name "woods" "trees", description "You are in a small wooded area, there are several trees here, mostly oaks, with a few maples. It is fairly quiet here, but you can hear a chattering noise high above in the trees.", e_to Muddy_Ditch, n_to Out_WiggleButts, before [; Listen: if (Squirrel in location) "Squeak, Chatter, Chhhhp"; else { move Squirrel to location; "After listening closely, you notice a small grey animal high in the tree"; } ], has light; !------------------------------------------------- ! ! Some maple trees ! !------------------------------------------------- Object -> MapleTree "maple tree" with name "tree" "maple" "trees", description "The maple trees reach high above you sunlight gently shines through the branches and dapples the ground beneath your feet", before [; Take: "The tree is very large, and you would need a chainsaw or an axe first."; Smell: "It smells like a tree, but vaguely reminds you of waffles."; Climb: "It is a very tall tree, and if you did climb it, you might fall and hurt yourself."; ], has scenery static; !------------------------------------------------- ! ! And since I'm a druid, some oaks also ! !------------------------------------------------- Object -> OakTree "oak tree" with name "tree" "oak" "trees", description "The oak trees reach high above you sunlight gently shines through the branches and dapples the ground beneath your feet. The chattering noise seems to be coming from this tree", before [; Take: "The tree is very large, and you would need a chainsaw or an axe first."; Smell: "It smells like a tree."; Climb: "It is a very tall tree, and if you did climb it, you might fall and hurt yourself."; ], has scenery static; !------------------------------------------------- ! ! Critter which eats acorns ! !------------------------------------------------- Object Squirrel "Squirrel", with name "rodent" "squirrel" "animal" "critter", description "The animal appears to be small and gray. It has 4 feet attached to it's body and a long bushy tail", before [; Attack, Chase: if (actor == player) "The squirrel looks at you and makes a chattering noise."; if (actor == doggie) { print "In a perfectly executed series of moves, "; doggie.myname(); print " runs straight at the squirrel and chases it away.^"; if (self hasnt general) { give self general; score=score+2; } move self to trashbin; } ], has animate beastie; !---------------------------- ! ! Other objects ! !---------------------------- !------------------------------------------------- ! ! The Trash bin, might be used to rescue ! some used objects ! !------------------------------------------------- Object TrashBin "TrashBin", with name "bleeble" "box", description "It is a black box", has container openable ~open; !------------------------------------------------- ! ! Start up area ! !------------------------------------------------- [ Initialise; box "You have been chosen" "to receive a fully trained ACD." " " "Well as fully trained as they get anyway...."; print "^Press a key to continue^"; @read_char 1 Press_A_Key; print "^^^^^^^^^^^"; Location = Driveway; ]; ! -------------------------------------- ! ! Additional routines ! ! -------------------------------------- [XyzzySub; "Wrong game, Bozo. In order for that to work, you need to get advent.z5 from ftp://ftp.gmd.de/if-archive/games/infocom/";]; [WetSub; "You would only get ",(the) noun, " wet";]; [GetWithSub; ; "Frankly, your bare hands will do the job.";]; [BarkSub; if (actor == player) "You aren't a dog";]; [GrowlSub; if (actor == player) "You aren't a dog";]; [ScratchSub; if (actor == player) "You aren't a dog";]; [StaySub; if (actor == Player) "I didn't understand that";]; [ComeSub; if (actor == Player) "I didn't understand that";]; [WriteOnSub;]; [ChaseSub; if (actor == Player) "You chase ", (the) noun, " to no avail";]; [FuckSub; if (actor==player) if(noun has beastie) "Look I know you got this game from the Internet, but beastiality is pretty sick."; else if (noun has animate) { print (the) noun, " is not your type "; rtrue; } else "That made no sense at all"; ]; [HelpSub; print "~It's a Dogs Life~ is a text adventure game. You interact with the game by typing phrases like EXAMINE SHEEP or EAT COOKIE and the game will respond by describing the world around you and the results of your actions.^^"; print "There are certain commands which are common to all adventure games. You move around by giving the compass direction in which you want to go; for example NORTH or SOUTHEAST. All directions can be shortened to one or two letters; in this case N or SE. You can also go UP or DOWN (U or D). In some locations IN or OUT work. You can also ENTER or CLIMB things.^^"; print "When you first enter a location, the game will describe the location to you. After that, it will only tell you the name of the location. You can see the full description at any time by typing LOOK (or L). You can tell the game to always give the full description by entering VERBOSE.^^"; print "You interact with the environment in many ways. You GET items to pick them up and DROP items to put them down. You can also PUT items IN things or GET items FROM others. Fairly complex sentences are possible, for example GET THE HAMMER FROM THE TOOL BOX THEN HIT THE WINDOW WITH THE HAMMER is a valid input (assuming that there happens to be a tool box with a hammer in it nearby).^^"; print "You may encounter people or other creatures while exploring the world of the game. You can ask these people questions by typing ASK person ABOUT topic and tell them things by saying TELL person ABOUT topic. You can also SHOW them things. You can ask them to do things with PERSON, COMMAND. For example, to ask a character named Jack to get the keys type JACK, GET THE KEYS.^^"; print "To look at an item more closely, EXAMINE it. (EXAMINE can be abbreviated as X) To get a list of everything you are carrying type INVENTORY (or I). Some other useful commands you can try are PUSH, SEARCH, SHAKE, THROW, RUB, KICK, CLIMB or READ. A part of any text adventure is learning what words the game knows ~It's a Dogs Life~ knows hundreds of common words (and a few not so common and X-rated ones), so feel free to try anything.^^"; print "~It's a Dogs Life~ is an experiment in programming interactive fiction using the Inform language. It is not a serious game, but one with which to have fun. If you like it (or hate it) or found any bugs in it, please send me some email at druid@@64princeton.crosswinds.net.^^"; print "Much of this game is based around the personality (or should that be ~doginality~) of a typical Australian Cattle Dog. If you would like to learn more about these dogs, please visit the website at http://www.cattledog.com. If after visiting that website, you still want one of these beasties to call your very own, please check out the Bull Run ACD Rescue website at http://www.crosswinds.net/princeton/@@126druid/acdrescue/rescue.html^^"; print "Have Fun !!"; rtrue; ]; !------------------------------------------------- ! ! Copies word "wn" from what the player most recently typed, putting it as ! plain text into parsed_text_buffer, returning false if no such word is there ! !------------------------------------------------- [ TextReader flag point i j len; if (flag==1 && from_char~=to_char) { for (i=from_char, j=0:i<=to_char && j<7:i++) { parsed_text_buffer->j = buffer->i; if (buffer->i ~= ' ' or ',' or '.') j++; } for (:j<8:j++) parsed_text_buffer->j = 0; from_char=0; to_char=0; rtrue; } for (i=0:i<8:i++) parsed_text_buffer->i = 0; if (wn > parse->1) { wn++; rfalse; } i=wn*4+1; j=parse->i; point=j+buffer; len=parse->(i-1); for (i=0:ii = point->i; wn++; rtrue; ]; ! --------------------------------------------------------- ! ! the next 2 routines get data from the pen and ! then when transferred to aucado ! ! -------------------------------------------------------- [ AnyWord; from_char=0; to_char=0; the_named_word=wn++; return MagicPen; ]; [ QuotedText i j f; i = WordAddress(wn++); i=i-buffer; if (buffer->i=='"') { for (j=i+1:j<=(buffer->1)+1:j++) if (buffer->j=='"') f=j; if (f==0) return -1; from_char = i+1; to_char=f-1; if (from_char>to_char) return -1; while (buffer+f > WordAddress(wn)) wn++; wn++; return MagicPen; } return -1; ]; ! -------------------------------------- ! ! Long Description of acd goes here ! ! Lot-o-text swiped from the AKC ! ! -------------------------------------- [AcdDesc; print "^^General Appearance^^ The general appearance is that of a sturdy, compact, symmetrically-built working dog. With the ability and willingness to carry out any task however arduous, its combination of substance, power, balance and hard muscular condition to be such that must convey the impression of a great agility, strength and endurance. Any tendency to grossness or weediness is a serious fault."; print "^^Characteristics^^ The utility purpose is assistance in the control of cattle, in both wide open and confined areas. Ever alert, extremely intelligent, watchful, courageous and trustworthy, with an implicit devotion to duty, making it an ideal dog. Its loyalty and protective instincts make a self-appointed guardian to the stockman, his herd, his property. Whilst suspicious of strangers, must be amenable to handling in the show ring."; print "^^Head^^ The head, in balance with other proportions of the dog, and in keeping with its general conformation, is broad of skull, and only slightly curved between the ears, flattening to a slight but definite stop. The cheeks are muscular, but not coarse nor prominent, the underjaw is strong, deep and well- developed. The foreface is broad and well filled in under the eye, tapering gradually to a medium length, deep and powerful muzzle. The lips are tight and clean. The nose is black irrespective of the color of the dog."; print "^^Teeth^^ The teeth should be sound, strong, and regularly spaced, gripping with a scissors-like action, the lower incisors close behind and just touching the upper. Not to be undershot nor overshot."; print "^^Eyes^^ The eyes should be oval shaped of medium size, neither prominent nor sunken, and must express alertness and intelligence. A warning or suspicious glint is characteristic. Eye color is dark brown."; print "^^Ears^^ The ears should be of moderate size, preferably small rather than large, broad at the base, muscular, pricked and moderately pointed (not spoon nor bat eared). Set wide apart on the skull, inclined outwards, sensitive in their use, and firmly erect when alert. The inside of the ear should be fairly well furnished with hair."; print "^^Neck^^ The neck is of exceptional strength, muscular, and of medium length broadening to blend into the body and free from throatiness."; print "^^Forequarters^^ The shoulders are broad of blade, sloping, muscular and well angulated to the upper arm, and at the point of the withers should not be too closely set. The forelegs have strong round bone, extending to the feet without weakness at the pasterns. The forelegs should be perfectly straight viewed from the front, but the pasterns should show a slight angle with the forearm when regarded from the side."; print "^^Hindquarters^^ The hindquarters are broad, strong and muscular. The rump is rather long and sloping, thighs long, broad and well-developed, with moderate turn to stifle. The hocks are strong and well let down. When viewed from behind, the hind legs, from the hocks to the feet, are straight and placed neither close nor too wide apart."; print "^^Feet^^ The feet should be round and the toes short, strong, well-arched and held together. The pads hard and deep, and the nails must be short and strong. "; print "^^Body^^ The length of the body from the point of the breast bone, in a straight line to the buttocks, is greater than the height at the withers, as 10 is to 9. The topline is level, back strong, with ribs well sprung and ribbed back. (Not barrel ribbed.) The chest is deep and muscular, and moderately broad, loins are broad, deep and muscular with deep flanks strongly coupled between the fore and hindquarters."; print "^^Tail^^ The set on of the tail is low, following the contours of the sloping rump, and at rest should hang in a slight curve of a length to reach approximately to the hock. During movement and/or excitement it may be raised, but under no circumstances should any part of the tail be carried past a vertical line drawn through the root."; print "^^Coat^^ The weather resisting outer coat is moderately short, straight and of medium texture, with short dense undercoat. Behind the quarters the coat is longer, forming a mild breeching. The tail is furnished sufficiently to form a good brush. The head, forelegs, hind legs from hock to ground, are coated with short hair."; print "^^Color (Blue)^^ The color should be blue or blue-mottled with or without other markings. The permissible markings are black, blue or tan markings on the head, evenly distributed for preference. The forelegs tan midway up the legs and extending up the front to the breast and throat, with tan on jaws; the hindquarters tan on inside of hind legs, and inside of thighs, showing down from the front of the stifles and broadening out to the outside of the hind legs from hock to toes. Tan undercoat is permissible on the body providing it does not show through the blue outer coat. Black markings on the body are not desirable."; print "^^Color (Red Speckle)^^ The color should be a good even red speckle all over including the undercoat (not white or cream) with or without darker red markings on the head. Even head markings are desirable. Red markings on the body are permissible but not desirable."; print "^^Size^^ The desirable height at the withers to be within the following dimensions: Dogs 18 to 20 inches. Bitches 17 to 19 inches. Dogs or bitches over or under these specified sizes are undesirable."; print "^^Movement^^ Soundness is of paramount importance. The action is true, free, supple and tireless, the movement of the shoulders and forelegs with the powerful thrust of the hindquarters, in unison. Capability of quick and sudden movement is essential. Stiltiness, loaded or slack shoulders, straight shoulder placement, weakness at elbows, pasterns or feet, straight stifles, cow or bow hocks, must be regarded as serious faults."; ! ------------------------------------ ! ! specifics about this particular dog ! ! ------------------------------------ print "^^This particular dog happens to be "; self.mycolor(); print " and named ~"; self.myname(); "~.^"; ]; ! -------------------------------------- ! ! Additional stuff, verbs and grammar ! ! -------------------------------------- Verb 'bark' 'wuff' 'ruff' 'yell' 'woof' * -> Bark; Verb 'growl' * -> Growl; Verb 'scratch' * -> Scratch * noun -> Scratch * 'at' noun -> Scratch; Verb "write" "scribe" "scrawl" * AnyWord "on" noun -> WriteOn * QuotedText "on" noun -> WriteOn; Verb "stay" * -> Stay; ! stops doggie daemon Verb "come" * -> Come; ! restarts doggie daemon Verb "chase" "herd" * noun -> Chase; Extend only "fuck" replace * -> Strong * noun -> Fuck; Verb meta "help" * -> Help; ! gotta have it Verb "xyzzy" * -> Xyzzy; Verb "plugh" * -> Xyzzy; Verb "y2" * -> Xyzzy; end;