Constant Story "Something About the Bunny"; Constant Headline "^A Happy Special Magic Production for the 1998 mini-comp^ by GLYPH^"; Release 1; !Constant DEBUG; !Constant USE_MODULES; replace DoMenu; replace LowKey_Menu; replace BeforeRoutines; replace BeforeParsing; Include "GParser"; Include "Utility"; Include "DoMenu"; Include "AltMenu"; Include "Hints"; Include "GNPC"; Include "GGrammar"; Include "GNPCmess"; Include "Gbunmess"; Include "GVerbLib"; property wantswill; property DriveLocation; Include "Guncle"; Include "Gcousin"; Include "Gshmitty"; include "Gferdin"; include "Gsister"; include "Gaunt"; Include "Gbuncred"; Include "Gbiff"; [ Anything i; if (scope_stage==1) rfalse; if (scope_stage==2) { objectloop (i ofclass Object) PlaceInScope(i); rtrue; } "Huh?"; ]; [ BeforeParsing flag i; ! hack question and exclamation marks off the end of the input line ! courtesy Dan J Archer while (buffer->(buffer->1+1) == '?' or 33) { buffer->1 = buffer->1 - 1; flag = 1; } ! Blank out hyphens by GLYPH (for phone numbers) for (i = 1 : i <= buffer->1+1 : i++) { if (buffer->i == '-') { buffer->i = 32; flag = 1; } } if (flag == 1) @tokenise buffer parse; ]; [ WaitKey i; do { @read_char 1 0 0 i; } until (i > 0); ]; ! TitlePage routine stolen from the Designer's Guide [ TitlePage i; @erase_window -1; print "^^^^^^^^^^^^^"; i = 0->33; if (i==0) i=80; i=(i-50)/2; style bold; font off; spaces(i); print " Something About the Bunny^^"; style roman; spaces(i); print " (A Happy Special Magic Production)^^"; spaces(i); print " [Please press any key to begin.]^"; font on; box " Jellybeans, jellybeans" "those yummy, chewy, smelly beans." "Some are orange, some are cherry," "I know someone who left them where he" "Couldn't see them, so I ate them." "I got sick and now I hate them."; WaitKey(); @erase_window -1; ]; NPC playerobj "(self object)" with short_name 'you', description [; return L__M(##Miscellany, 19); ], grammar [; return 0; ], life [; Give: move noun to self; rtrue; ], before NULL, after NULL, each_turn NULL, time_out NULL, describe NULL, capacity 100, parse_name 0, orders 0, number 0, wantswill 0, has concealed animate proper transparent; Object trainstation "train station" with description "You're in the middle of a desolate train station.", name 'train' 'station' 'trainstation', drivelocation 0, has static light; Object -> traintracks "train tracks" with description "Old traintracks run east-west.", name 'train' 'tracks' 'traintracks', has static supporter; Object -> -> bunny "bunny" with description "blah blah", name "bunny" "rabbit", after [; Take: if (self hasnt moved && actor == player) { Poetry_warn(); box " Something about the bunny rabbit" "makes me want to reach and grab it." "Pet it, feed it, comb it, dab it," "why has this become a habit?" "" "Fuzzy fur and floppy ears?" "The way he settles all my fears?" "Or how he kind of shyly peers" "through fluffy tufts as supper nears?" "" "Only Mr. Bunny knows" "the way The Way of Nature goes." "He likes to hop and twitch his nose" "and knows just when it's time to doze."; WaitKey(); print "Just as you lift the bunny from the traintracks, a train wooshes by, nearly knocking you over in its wake.^"; biff.brainadd(1,5); move bunny to actor; rtrue; } ]; Object mainstreet "Main Street" with description "You're in the middle of Main Street", name 'main' 'street' 'st', has static light; Object corleonestreet "Corleone Street" with description "You're in the middle of Corleone Street", name 'corleone' 'street' 'st', has static light; Object outsideferdinandos "outside Ferdinando's" with description "Ferdinando's is to the south.", name "outside" "grass" "ground", path 0 0 0 0 0 s_obj, s_to ferdinandos, has light static; Object ferdinandos "Ferdinando's TV Repair" with description "Broken TV innards and blood stains adorn the walls.^ North leads back outside.", name 'ferdinando^s' 'tv' 'repair' 'room' 'floor' 'ground', destination 6, path 0 0 0 0 0 0, drivelocation 0, n_to outsideferdinandos, has light static; Object -> tv "television" with description [; if (location == ferdinandos) "This TV is in much better shape than the ones hanging on the walls."; "It's a TV."; ], name "tv" "television", before [; switchon, switchoff: "The TV is not plugged in."; ], after [; Take: if (self hasnt moved && actor == player) { Poetry_warn(); box " Flip, channel, change, turn," "many different views." "Sit, stare, eyballs burn," "commercials, sitcoms, news."; WaitKey(); } ], has switchable; phone -> with numbera 746, numberb 6862, has static; Object marmosethead "disembodied marmoset head" with description "The fur is sticky and matted, and the eyes are covered in a thick glaze.", before [; search: "How do you search a marmoset head?"; open: if (parent(note)) "The mouth is already open."; move note to actor; PronounNotice(note); "Inside the mouth of the bloody, decomposing head you find a note."; ], name 'marmoset' 'head' 'disembodied' 'bloody' 'mouth' 'jaw'; Object note "note" with description "The note says, ~May you have a broken-down golf cart.~", name 'note'; Class vehicle has enterable; Object Napkin "napkin" with description [; if (self.number > 0) { print "Through crumples and coffee stains you can make out Biff's last will and testament. "; if (self.number > 1) print "There is a logo printed on one side of the napkin. "; if (napkin in player) { print "There is also a list of items to collect:^"; ScavengerList(); } else print "You'll need to be holding the napkin to read it."; } else print "Through crumples and coffee stains you can almost make out some writing on the napkin."; rtrue; ], number 0, capacity 0, before [; open: "That's not quite something you can open."; unfold: if (logo in self) "It's already unfolded."; if (self.number < 2) { self.number = 2; print "As you unfold the napkin, you notice that it was folded the wrong way around. Biff probably did that to make more room for the will, since there's a logo printed on the other side.^"; } else print "You unfold the napkin again."; move logo to self; rtrue; fold: if (logo notin self) "It's already folded."; remove logo; "You fold the napkin back up."; ], name "napkin" "unfolded" "folded" "will", has transparent supporter; Object logo "logo" with description [; if (napkin in player) { "A crudely drawn man with a beer gut and a small head stands with a pool cue in one hand. His other hand holds a frothing mug, and one extended finger points to the words ~Shmitty's Bar~ written accross the top of the napkin.^"; } else "You'll need to be holding the napkin to see the logo clearly."; ], name "logo" "printing", has static scenery; Object diningroom "dining room" with description "This is the dining room. It doubles as a greeting room for guests.^ East leads to a study, south leads outside.", name "dining" "room" "floor" "ground" "home" "house", destination 1, path 0 n_obj s_obj e_obj, drivelocation outside, n_to thedoor1, s_to outside, e_to study, has light static; Object -> thedoor1 "door" with description "It appears to be some sort of door.", name "door" "doorway", door_to kitchen, door_dir n_to, describe [; "^There is ", (glypharticle) self, " to the north."; ], before [; Open: if (thedoor2 hasnt open) give thedoor2 open; return false; Close: if (thedoor1 has open) give thedoor2 ~open; return false; ], has static door openable; Object kitchen "kitchen" with description "The kitchen is very plain.", name "kitchen" "room" "floor" "ground", destination 2, path s_obj 0 s_obj s_obj, s_to thedoor2, has light static; Object -> thedoor2 "door" with description "It appears to be some sort of door.", name "door" "doorway", door_to diningroom, door_dir n_to, describe [; "^There is ", (glypharticle) self, " to the south."; ], before [; Open: if (thedoor2 hasnt open) give thedoor1 open; return false; Close: if (thedoor1 has open) give thedoor1 ~open; return false; ], has static door openable; Object -> jellybeans "jellybeans" with description "blah blah", name "jellybeans" "jelly" "beans", article "some", after [; Take: if (self hasnt moved && actor == player) { Poetry_warn(); box " Jellybeans, jellybeans" "those yummy, chewy, smelly beans." "Some are orange, some are cherry," "I know someone who left them where he" "Couldn't see them, so I ate them." "I got sick and now I hate them."; WaitKey(); } ]; Object -> spoon "spoon" with description "blah blah", name "spoon", after [; Take: if (self hasnt moved && actor == player) { Poetry_warn(); box " A boy in my class would complain" "of having too much mental strain." "He took out a spoon," "and quite very soon," "he had scooped out his entire brain."; WaitKey(); } ]; Object outside "outside" with description "It's a lovely day out. The dining room is to the north.", name "outside" "grass" "ground", destination 3, path n_obj n_obj 0 n_obj, n_to diningroom, has light static; vehicle -> car "car" with description "It looks just exactly like a car.", before [; switchon: "This car is really easy to drive. Just drive to where you want to go."; ], name 'car'; Class copypaper with short_name [ o g; o = self; g = 0; while (o ofclass copypaper) { o = o.copied; g ++; } if (o == 0) print "blank sheet of paper"; else { switch (g) { 1: print "photocopy of "; 2: print "streaky photocopy of "; 3: print "really streaky photocopy of "; 4: print "streaky muddy photocopy"; } if (g < 4) print (a)o; } rtrue; ], name 'sheet' 'paper' 'photocopy' 'copy' 'of' 'the' 'a' 'an' 'copies' 'sheets' 'papers', bonus 'photocopy' 'copy', plural "photocopies", parse_name [ o g w i p; o = self; g = 0; while (o ofclass copypaper) { o = o.copied; g ++; } switch (g) { 1: p = self; 2: p = streakysheet; 3: p = reallystreakysheet; default: p = muddysheet; o = muddysheet; } if (o==0 && g < 4) { o = blanksheet; p = blanksheet; } w = NextWord(); while (WordInPropertyStopped(w,p,name) || WordInPropertyStopped(w,o,name)) { i++; if (WordInPropertyStopped(w,p,bonus)) user_match_bonus ++; if (w == 'copies' or 'sheets' or 'papers') parser_action == ##pluralfound; w = NextWord(); } return i; ], description [o g; o = self; g = 0; while (o ofclass copypaper) { o = o.copied; g ++; } if (o == 0) "It's a blank sheet of paper.^"; print "It's "; switch (g) { 1: print "a photocopy of "; 2: print "a streaky photocopy of "; 3: print "a really streaky photocopy, and you can barely make out "; 4: print "all streaky and muddy, so much so that you can't tell what it's a photocopy of.^"; } if (g < 4) switch (o) { napkin: print "Biff's last will and testament.^"; if (self in player) { print "There is a list of items to collect:^"; ScavengerList(); } else "You'll need to be holding the copy to read it.^"; default: print (a)o,".^"; } ], copied 0; Object blanksheet with name 'photocopy' 'copy' 'blank' 'sheet' 'paper' 'copies' 'sheets' 'papers', bonus 'blank' 'sheet' 'paper'; Object streakysheet with name 'sheet' 'paper' 'streaky' 'photocopy' 'copy' 'of' 'the' 'a' 'an' 'copies' 'sheets' 'papers', bonus 'streaky'; Object reallystreakysheet with name 'sheet' 'paper' 'very' 'really' 'streaky' 'photocopy' 'copy' 'of' 'the' 'a' 'an' 'copies' 'sheets' 'papers', bonus 'really' 'very'; Object muddysheet with name 'sheet' 'paper' 'really' 'very' 'muddy' 'streaky' 'photocopy' 'copy' 'copies' 'sheets' 'papers', bonus 'muddy'; Object papertray; copypaper ->; copypaper ->; copypaper ->; copypaper ->; copypaper ->; copypaper ->; copypaper ->; copypaper ->; copypaper ->; copypaper ->; Object study "study" with description "This is the study, where your uncle does all his plumbing paperwork.^ The dining room is back west.", name "study" "floor" "ground", destination 4, path w_obj w_obj w_obj 0, w_to diningroom, has light static; Object -> copier "photocopier" with description "It's a color photocopier. There is a button on the front of it, and a bin on its side.^", name "copier" "photocopier" "machine" "lid" "of" "the", capacity 1, before [; Open: if (self has transparent) give self ~transparent; give self open; if (actor==player) "You lift the lid of the copier.^"; else if(SameScope(actor,player)) print_ret (The)actor," lifts the lid of the copier.^"; Close: !code here for thick object handling give self ~open; if (actor==player) "You close the lid of the copier.^"; else if(SameScope(actor,player)) print_ret (The)actor," closes the lid of the copier.^"; ], has static openable container supporter; Object -> copybin "bin" with description "It's a narrow bin, meant for receiving finished copies.", name "bin", has static concealed open container; Object -> copybutton "button" with description "It's a little green square button.", name "little" "green" "button", before [ o p; Push: if (actor ~= player && SameScope(actor,player)) print (The)actor," pushes a little green button on the photocopier. "; p = child(papertray); if (p == 0) { emit(self,"A light blinks on the photocopier. ~NO PAPER~^"); rtrue; } o = child(copier); p.copied = o; move p to copybin; emit(copier,"After some internal whirring and humming,"); if (copier has open) emit(copier," and a great sweeping flash of light,"); emit(copier," the photocopier spits a warm piece of paper into its bin.^"); rtrue; ], has static concealed; Object -> desk "desk" with description "It's an oak desk.", name 'desk' 'oak', has static supporter; phone -> -> with numbera 863, numberb 6536, has static; Object -> -> phonebook "phonebook" with name 'phonebook', before [; open,examine: if (actor==player) "The phonebook is full of phone numbers."; consult: wn = consult_from; if (actor==player) switch(objquery()) { shmittys: shmittys.drivelocation = outsideshmittys; "~Shmitty's Bar! Fun for the whole family!~^ 252 Main St. 438-2337"; ferdinando: ferdinandos.drivelocation = outsideferdinandos; "~Ferdinando el Toro, hired gun and t.v. repair~^ 127 Corleone St. 746-6862"; trainstation: trainstation.drivelocation = trainstation; "~Ye Olde desolate train station~^ 300 Main St. 667-4663"; default: "That's not in the phonebook."; } ]; Object outsideshmittys "outside Shmitty's" with description "Shmitty' Bar is to the east.", name "outside" "grass" "ground", path 0 0 0 0 e_obj, e_to shmittys, has light static; Object shmittys "Shmitty's" with description "So this is Shmitty's Bar. West leads back outside.", name 'Shmitty^s' 'shmittys' 'bar' 'room' 'floor' 'ground', destination 5, path 0 0 0 0, drivelocation 0, w_to outsideshmittys, has light static; Object -> bar "bar" with description "It's a bar. Nice, clean and smooth.", name 'bar', has static supporter; Object -> -> orange "orange" with description "It's, uh, orange.", name 'orange', article "an", after [; Take: if (self hasnt moved && actor == player) { Poetry_warn(); box " Justin went to buy an orange." "Justin dropped it on the floor and" "just in case he didn't like tasting it," "Justing decided he didn't mind wasting it."; WaitKey(); } ]; phone -> -> with numbera 438, numberb 2337, has static; Object coprophilia with name 'coprophilia'; [ Poetry_warn; WaitForKey(); @erase_window -1; ]; [ IsWill o g; g = 0; while (o ofclass copypaper) { o = o.copied; g ++; } if (g < 4 && o == napkin) rtrue; rfalse; ]; [ IsTreasure o; if (o == bunny or jellybeans or orange or spoon or tv) rtrue; rfalse; ]; [ ScavengerList; print"^ In order of importance:^^"; print" 1 medium-sized cute little bunny^"; print" 3 jellybeans^"; print" 1 orange^"; print" 1 spoon^"; print" 1 television set^^"; ]; [ Treasurehunt n o; objectloop(o) if (IsTreasure(o)) { if (SameScope(n,o)) { n.Act(##take,o); if (o in n) rtrue; } } switch(random(3)) { 1: self.NPC_wander(); 2: self.NPC_search(); } ]; Verb 'unfold' * multi -> Unfold; Verb 'fold' * multi -> fold; Verb meta 'credits' 'about' * -> Help; Verb 'drive' * 'to' scope=Anything -> DriveTo * scope=Anything -> DriveTo * 'to' number scope=Anything -> DriveNum; [ UnfoldSub; if (actor == player) print_ret (ctheyreorthats) noun, " not something you can unfold.^"; ]; [ FoldSub; if (actor == player) print_ret (ctheyreorthats) noun, " not something you can fold.^"; ]; [ DriveToSub; if (~~(parent(actor) ofclass vehicle)) { if (actor == player) print "You'll need to be in a car, first.^"; rfalse; } if (noun provides DriveLocation) { if (noun.DriveLocation) { if (parent(actor) == noun.DriveLocation) { if (actor == player) "You're already there.^"; rtrue; } if (actor == player) print "After a short drive, you're there.^"; move parent(actor) to noun.DriveLocation; if (actor == player) location = noun.DriveLocation; ; rtrue; } else if (actor == player) "You're not sure where that is."; } else ; ]; [ DriveNumSub; switch(second) { mainstreet: move parent(actor) to second; switch(noun) { 252: ; default: if (actor == player) {location = second;"You arrive safely, but you don't recognize the place.";} } corleonestreet: move parent(actor) to second; switch(noun) { 127: ; default: if (actor == player) {location = second;"You arrive safely, but you don't recognize the place.";} } default: "That's not something you can drive to."; } ]; [ Initialise; player = playerobj; hint_menu = minihints; npcflag = 0; Titlepage(); glyph_look = 1; glyph_adjectives = 1; inventory_style = FULLINV_BIT + ENGLISH_BIT + RECURSE_BIT; location = diningroom; ! location = shmittys; move uncle to diningroom; move cousin to diningroom; move sister to diningroom; move aunt to diningroom; move phil to shmittys; move ferdinando to ferdinandos; startdaemon(uncle); startdaemon(cousin); startdaemon(sister); startdaemon(aunt); startdaemon(phil); startdaemon(biff); startdaemon(ferdinando); print "^^^The mostly-booring family reunion takes an odd twist as your Uncle Ogdajon bursts in though the front doors. Well, he doesn't really burst so much as amble.^^"; ];