! School Days Interactive Game ! Copyright (C) 2000 Andrew MacKinnon Constant SUNRISE 360; ! i.e. 6 am Constant SUNSET 1260; ! i.e. 9 pm Constant MAX_CARRIED 10; Constant MAX_LOONIES 10; Constant MAX_QUARTERS 10; Constant MAX_LEAVES 20; Constant WHERE_WORD=1; Constant WHY_WORD=2; Constant WHEN_WORD=3; Constant WHO_WORD=4; Constant WHAT_WORD=5; Constant HOW_WORD=6; Release 3; ! release three Serial "092800"; Global day_state = 1; Global question_word; Global dyear = 2000; Global dmo = 6; Global dday = 17; Global old_time; Global assumed_key; !Abbreviate ". "; !Abbreviate ", "; !Abbreviate "------"; !Abbreviate " the "; !Abbreviate "The"; !Abbreviate "You "; !Abbreviate "'t "; !Abbreviate "ing "; !Abbreviate "ther"; !Abbreviate "----+"; !Abbreviate "is "; !Abbreviate "and "; !Abbreviate "'s "; !Abbreviate "I'm not "; !Abbreviate "asketball"; !Abbreviate "you "; !Abbreviate "to "; !Abbreviate "e s"; !Abbreviate "ticket gates"; !Abbreviate "e o"; !Abbreviate "e c"; !Abbreviate "^ "; !Abbreviate "e l"; !Abbreviate "tion"; !Abbreviate "~I "; !Abbreviate "e b"; !Abbreviate "hat "; !Abbreviate "s a"; !Abbreviate " th"; !Abbreviate " ca"; !Abbreviate " to"; !Abbreviate " you"; !Abbreviate " down"; !Abbreviate " no"; !Abbreviate "ing."; !Abbreviate " ha"; !Abbreviate "ere"; !Abbreviate " it"; !Abbreviate " st"; !Abbreviate " wo"; !Abbreviate " co"; !Abbreviate " light"; !Abbreviate "You'"; !Abbreviate " un"; !Abbreviate " of"; !Abbreviate " play"; !Abbreviate " la"; !Abbreviate " ba"; !Abbreviate "Spadina"; !Abbreviate " sh"; !Abbreviate " go"; !Abbreviate " so"; !Abbreviate "lock"; !Abbreviate " object"; !Abbreviate " gam"; !Abbreviate " ho"; !Abbreviate " pa"; !Abbreviate " tra"; !Abbreviate " mo"; !Abbreviate " open"; !Abbreviate "Simon Crew"; !Abbreviate " subway"; !Abbreviate " fr"; Constant Story "SCHOOLDAYS"; Constant Headline "^An Interactive Story^ Copyright (c) 2000 by Andrew MacKinnon.^"; Replace DrawStatusLine; Replace SingSub; Replace PrintCommand; Replace ScoreSub; Replace FullScoreSub; Include "Parser"; Attribute outdoors; Attribute electric; Attribute plugged; Attribute outlets; Attribute cookable; Property weight; Object knapsack "knapsack" with name "bag" "sack" "knapsack" "dark" "blue" "jaguar" "zipper", description "A knapsack to keep all your school work in. It is dark blue and is made by Jaguar.", describe [; print "^A knapsack lies here. "; if (self has open) {print "It is opened"; if (child(self)==0) "."; else {print ", containing "; WriteListFrom(child(self), ENGLISH_BIT+FULLINV_BIT); "."; } } else {"It is zipped shut."; } ], before [; Receive: if (noun==waterbottle && waterbottle has open && child(waterbottle)~= nothing) {"You don't want to make a mess of the knapsack, right?";} ], weight 3, has openable container clothing open; Class Beverage with list_together "drinks"; Beverage -> waterbottle "waterbottle" with parse_name [i w z; w=NextWord(); while (w=='bottle' or 'waterbottle' or 'drink' or 'of' or 'water' or 'jump' or 'rope' or 'for' or 'heart') {if (w=='bottle' or 'waterbottle') z=1; w=NextWord(); i++;} if (z==1) return i; else return 0; ], description "This water bottle came from Jump Rope for Heart by donating to the Heart and Stroke Foundation.", weight 2, thirsty 1, invent [; if (inventory_stage==2) {if (the_water in self) {print " (full of water";} else {print " (empty";} if (self has open) {print " and open)";} else {print " but closed)";} rtrue; } ], before [; Fill: if (self hasnt open) "Bottle's not open."; if (self notin player) {print "(taking the waterbottle)^"; keep_silent=1; ; keep_silent=0;} if (the_water notin location && location~=bathroom_yours && spilt_water notin location) "I see no water here."; if (spilt_water in location && the_water notin location && location~=bathroom_yours) "You can't fill a waterbottle using spilt water."; move the_water to self; "You fill the waterbottle."; Empty, EmptyT: if (child(self)==the_water) {remove the_water; move spilt_water to location; print "You make a mess of "; if (second==0) "the floor."; else print_ret (the) second, "."; } Receive: if (noun~=the_water) "The bottle is intended only for liquids."; Squeeze: if (self hasnt open) "There is no way for air to escape."; if (the_water in self) {remove the_water; move spilt_water to location; "Water spurts out and makes a mess.";} else "You squeeze the bottle, and it fills up with air quickly."; ], has container openable transparent; Object -> form "school permission form" with name "form" "newsletter" "letter" "school" "permission" "news", weight 1, description "The form reads: ^ Rosedale High School ^ 2240 Yonge St. (two blocks south of Rosedale subway station) ^ ^ An opportunity for boys and girls to take piano lessons after school. The ^ cost of this program is $30. Mondays 3:30pm to 4:30pm. ^ ^ Signature: _____________________________ ^ ^(you have no interest in piano lessons)", before [; Sign: "You have no interest in piano lessons."; ]; Constant SACK_OBJECT knapsack; Object LibraryMessages with before [; Attack: if (noun has animate) {if (noun==player) {if (verb_word=='kill' or 'murder') "Don't even think about suicide."; else "You don't need any injuries!"; } else {if (verb_word=='kill' or 'murder') {"If you go and murder, you'll end up in jail.";} else {"You dare not attack ", (the) noun, "!";} } } else {if (noun in compass) {"Hitting ", (the) noun, " would achieve nothing.";} else {"There's enough vandalism in this world already.";} } Buy: if (noun has animate) "Slavery is a thing of the past."; if (location==convienience_store or travel_agency) print_ret (cthatorthose) noun, " is not one of the items on sale."; else "Nothing is on sale."; Yes: "Yes to yourself?"; No: "No to yourself?"; Enter: if (lm_n==4) {print "You can only get "; if (noun has supporter) print "onto"; else print "into"; " something freestanding."; } Sing: "You can't really sing very well."; ]; Include "VerbLib"; Include "NPC_Engine"; Class Room class NPC_Room; [ IsLeapYear year; if (year%4==0 && (year%100~=0 || year%400==0)) rtrue; rfalse; ]; [ TimePasses f; if (old_time>the_time) {AdvanceDay(dyear,dmo,dday);} old_time=the_time; if (the_time >= SUNRISE && the_time < SUNSET) f=1; if (day_state == f) rfalse; if (day_state==2) { day_state = f; return; } day_state = f; if (location hasnt outdoors) return; if (f==1) "^The sun rises, illuminating the city."; "^As the sun sets, the city is dark and the streetlights turn on."; ]; [ AdvanceDay day month year len; dday++; switch(month) {1: len=31; 2: if (IsLeapYear(year)==1) {len=29;} else {len=28;} 3: len=31; 4: len=30; 5: len=31; 6: len=30; 7: len=31; 8: len=31; 9: len=30; 10: len=31; 11: len=30; 12: len=31; } if (day>len) {day=1; month++; if (month==13) {month=1; year++;} } ]; ! Verb routines [ PlainSub; pretty_flag=0; print (string) Story; print_ret " is now set to ~plain~ printing mode."; ]; [ PrettySub; pretty_flag=1; print (string) Story; print_ret " is now set to ~pretty~ printing mode."; ]; [ FlushSub; "You cannot flush ", (the) noun, "."; ]; [ ShakeSub; "You hear nothing unusual."; ]; [ SingSub; switch(random(5)) {1: "You sing a few little notes to yourself, ~La la la laa~."; 2: "You hum a beat to yourself."; 3: "La, la, la, you sing."; 4: "Maybe you acted before, but you're not quite in the tune singing."; 5: "You can sing a little bit, but all that comes out of the mouth is gabble."; } ]; [ ScoreSub; "There is no score in this game."; ]; [ FullScoreSub; "There is no score in this game."; ]; [ FeedSub; "You can't feed that."; ]; [ DanceSub; if (noun==0 or player) {if (TestScope(cd_player)==0 || cd_player hasnt on) "You can hardly dance without music."; if (child(cd_player)==bach_cd) "Bach's music isn't suitable for dancing."; if (child(cd_player)==rap_cd) "You go into a bunch of funky moves with the cool rap music."; } print_ret (The) noun, " doesn't wish to dance with you."; ]; [ PeeSub; if (noun==0) {if (toilet notin location) "What toilet?"; <>; } "That would be pointless."; ]; [ WashSub; if (noun~=your_hands or player or 0) "Don't need to."; if (noun~=0) <>; if (sink notin location && player notin shower_stalls) "What sink?"; if (player in shower_stalls) {if (knob.water_on==0) "The water isn't on."; "You wash yourself in the shower water."; } <>; ]; [ WashInSub; if (noun~=your_hands or player or 0) "You achieve nothing."; if (second~=0) <>; "Pointless!"; ]; [ PlugInSub; if (ObjectIsUntouchable(noun)) return; if (noun in player) "Can't plug in things you're holding."; if (noun has electric) {if (location has outlets) {if (noun hasnt plugged) {give noun plugged; if (AfterRoutines~=1) print "You plug in ", (the) noun, ".^";} else {"Already plugged in.";} } else {"You cannot find an outlet!";} } else "You cannot plug in ", (the) noun, "."; ]; [ UnPlugSub; if (ObjectIsUntouchable(noun)) return; if (noun has electric) {if (noun has plugged) {give noun ~plugged; if (AfterRoutines~=1) "You unplug ", (the) noun, ".";} else {"Already unplugged.";}} else "You cannot unplug ", (the) noun, "."; ]; [ CookSub; if (ObjectIsUntouchable(noun)) return; if (noun has edible) {if (noun has cookable) {if (noun hasnt general) {if (parent(noun)==stove) { if (AfterRoutines~=1) {print "You cook ", (the) noun, ".^";} give noun general;} else {"You cannot cook things that aren't on a stove.";} } else {print "You have already cooked ", (the) noun, ".^";} } else {print "You cannot cook ", (the) noun, ".^";} } else {print "You cannot cook ", (the) noun, " because it is not food.^";} ]; [ HereSub; "That is a command for dogs."; ]; [ SignSub; print_ret "There is no place to sign ", (thatorthose) noun, "."; ]; [ UntieSub; if (ObjectIsUntouchable(noun)) return; if (noun==dog) {if (noun.tied==true) {noun.tied=false; if (AfterRoutines~=1) {"You untie the dog.";}} else {"The dog is already untied.";} } else {print_ret (The) noun, "isn't tied up.";} ]; [ DescendSub; "I don't think much is to be achieved by that."; ]; [ ShootBallSub; if (basketball_net in location) <>; "Net? What net?"; ]; [ DunkSub; if (basketball in player) <>; "Dunk? With no basketball?"; ]; [ DunkWithSub; if (knob.showered==false) "It is too hot and sticky to play basketball."; if (basketball notin player) "Don't have a basketball."; if (basketball_net notin location) "No net!"; if (simon_crew.dunk_knowledge==0) "Don't know how to dunk."; if (random(100)<=simon_crew.dunk_knowledge) {switch(random(4)) {1: print "You slam dunk the basketball right in!"; 2: print "Swish! You slam the basketball right in!"; 3: print "You dunk the ball in the net!"; 4: print "Slam DUNK!"; } if (parent(simon_crew)==location && simon_crew in gym) {print " ~Good work dunking!~ shouts Simon."; if (pacers_ticket hasnt general) {give pacers_ticket general; print " He gives you some kind of ticket."; move pacers_ticket to location; keep_silent=1; ; keep_silent=0; } ""; } else {"";}} else switch(random(4)) {1: print "You try to slam dunk, but fail."; 2: print "The ball pops out of the net."; 3: print "You try to dunk but the ball bounces away."; 4: print "You don't manage to slam dunk it."; } if (parent(simon_crew)==location && simon_crew in gym) {" ~Try again!~";} ]; [ DribbleSub; "Dribble? With that?"; ]; [ UnlockCombinationSub; print_ret (thatorthose) noun, " doesn't have a combination lock."; ]; [ DressSub x t z; objectloop(x has clothing && x hasnt worn && TestScope(x)==1 && ObjectIsUntouchable(x)==0 && x notin shoes) {if (x notin player) {if (t==0) {print "(taking the clothes)^"; t=1;} keep_silent=1; ; keep_silent=0; } z=1; ; } if (z==0) "There are no clothes available here."; ]; [ UnDressSub x z; if (location~=dressing_room or bathroom_yours or your_room) "Not here."; objectloop(x in player && x has worn && x has clothing) {z=1; ; if (x==shoes || x==left_shoe || x==right_shoe) give x ~worn; } if (z==0) "You're wearing nothing."; ]; [ DrySub; if (noun~=player) print_ret (cthatorthose) noun, " isn't wet."; if (knob.dry==true) "You're already dry!"; if (towel notin player) {if (towel in location) {print "(taking the towel)^"; keep_silent=1; ; keep_silent=0;} else {"There is no towel available.";} } knob.dry=true; if (AfterRoutines()~=1) "You dry yourself."; ]; [ QuestionSub; "Don't ask the game any questions. Ask the characters!"; ]; [ QuestionDoSub; "Don't ask the game any questions. Ask the characters!"; ]; [ DoQuestions character; switch(verb_word) {'what', 'what^s': question_word=WHAT_WORD; 'when', 'when^s': question_word=WHEN_WORD; 'why', 'why^s': question_word=WHY_WORD; 'who', 'who^s': question_word=WHO_WORD; 'where','where^s': question_word=WHERE_WORD; 'how', 'how^s': question_word=HOW_WORD; } if (second==0) <>; else <>; ]; [ SitDownSub; "There's nothing suitable to sit down on."; ]; [ PlayCDSub; if (~~(noun ofclass CompactDisc)) "You can only play CDs."; if (noun notin cd_player) "You must have the CD in the CD player."; if (cd_player has open) {print "(closing the CD player)^"; keep_silent=1; ; keep_silent=0; } <>; ]; [ KnockSub; "There is no reply."; ]; [ GoTo2Sub; "Driving to a location requires that you be behind the wheel of a vehicle."; ]; [ SetToTopicSub; "No, you can't set that to anything."; ]; [ ArrestSub; print "That "; if (noun has female) print "woman"; else print "man"; " is obeying the law."; ]; [ DialPhoneSub; "You can't see a phone anywhere."; ]; [ ReplaceSub; if (noun~=receiver) "That doesn't need to be replaced."; if (receiver notin player) "You don't have the receiver."; <>; ]; [ HangUpSub; if (receiver notin player) {if (location~=Queen_streetlevel) "You have no phone."; "You don't have the receiver."; } <>; ]; [ PourSub; if (ObjectIsUntouchable(noun)==1) rtrue; if (ObjectIsUntouchable(second)==1) rtrue; if (second==0 || (second==shovel && shovel has general) || (second==mud && mud hasnt general)) second=d_obj; if (noun~=the_water or gatorade or coke or pepsi) "What? ", (The) noun," isn't a liquid!"; if (noun notin player or waterbottle) "You don't have ", (the) noun, "."; if (((noun hasnt open && noun~=the_water) || (noun==the_water && parent(noun) hasnt open)) && parent(noun)~=player) "You really need to have ", (the) parent(noun), " open to pour it."; if (second==d_obj) {switch(noun) {the_water: remove the_water; if (location~=Backyard) move spilt_water to location; else {if (shovel in mud) give shovel ~general; if (mud hasnt general) print "The mud soaks up with water, freeing the shovel.^"; else print "You just make a wet mess beneath you with the water."; give mud general; rtrue;} coke: coke.emptied=1; pepsi: pepsi.emptied=1; gatorade: gatorade.emptied=1; } "You just make a wet mess beneath you with ", (the) noun, "."; } "That would just make a wet mess of ", (the) second, "."; ]; [ FlipSwitchSub; if (noun hasnt switchable) "Flipping a switch? That isn't any switch."; if (noun has on) <>; else <>; ]; Statusline time; ! Some classes Class SomeClothing has clothing; Class Chair with react_before [; SitDown: <>; ], has supporter static enterable; Class Table has supporter static; Class Lamp with before [; Take: if (self has plugged) {print "(unplugging ", (the) noun, ")^"; ;} Unplug: if (self has on) {give self ~on; give self ~light; print "When you unplug ", (the) noun, " a spark jumps and ", (the) noun, " turns out. "; rtrue;} ], after [; SwitchOn: if (self has plugged) {give self light;} else {give self ~on; print_ret (The) noun, " won't turn on because it is not plugged in.";} SwitchOff: give self ~light; ], has switchable electric; Class Electrical with before [; Take: if (self has plugged) {print "(unplugging ", (the) noun, ")^"; ;} Unplug: if (self has on) {give self ~on; print "When you unplug ", (the) noun, " a spark jumps and ", (the) noun, " turns off. "; rtrue;} ], after [; SwitchOn: if (self has plugged) ; else {give self ~on; print_ret (The) noun, " won't turn on because it is not plugged in.";} SwitchOff: give self ~light; ], has switchable electric; Class Coin with list_together "coins"; Class Loonie(MAX_LOONIES) class Coin, with name "loonie" "loonies//p" "dollar" "money" "coin" "coins//p" "1" "one", description [; print "A Canadian loonie, dated ", random(50)+1950, " has a loon on one side and a picture of Queen Elizabeth II on the other side.^"; ], weight 1, short_name "loonie", plural "loonies"; Class Quarter(MAX_QUARTERS) class Coin, with name "quarter" "cents" "cent" "piece" "coin" "coins//p" "quarters//p" "25" "twenty-five" "twenty" "five", weight 1, description "The quarter has a picture of a beaver on it.", short_name "quarter", plural "quarters"; Class TenDollarBill(20) with name "ten" "dollar" "dollars//p" "bill" "bills//p" "10" "ten-dollar", weight 1, description "The bill says, $10 CANADA.", short_name "ten dollar bill", plural "ten dollar bills"; Class Token with name "token" "tokens//p" "subway", description "A Toronto subway token.", weight 1, short_name "subway token", plural "subway tokens"; Class Sock class SomeClothing, with list_together "pairs of socks", before [i; Smell: "Smells a bit ~sockish~."; Wear: objectloop(i) {if (i has worn && i ofclass Sock) "You can't wear two pairs of socks at the same time."; if (i has worn && i==Shoes or left_shoe or right_shoe) "You can't put on socks when you have your shoes on."; } ], weight 2; Class RedSock class Sock with name "socks" "pairs//p" "pair" "of" "red", short_name "red pair of socks", plural "red pairs of socks"; Class WhiteSock class Sock with name "socks" "pairs//p" "pair" "of" "white", short_name "white pair of socks", plural "white pairs of socks"; Class GreySock class Sock with name "socks" "pairs//p" "pair" "of" "gray" "grey", short_name "grey pair of socks", plural "grey pairs of socks"; Class Underwear class SomeClothing, with list_together "pairs of underwear", before [i; Wear: objectloop(i) {if (i has worn) {if (i ofclass Underwear && i in player) {"You can't wear two pairs of underwear at the same time."; } } if (shorts has worn) "First you will have to take off the shorts."; if (jeans has worn || jeans2 has worn) "First you will have to take off the jeans."; if (clothes has worn) "First you will have to take off the corduroy trousers."; } Disrobe: if (location~=dressing_room or bathroom_yours or your_room) "Not here."; if (jeans has worn || jeans2 has worn) "First you will have to take off the jeans."; if (shorts has worn) "First you will have to take off the shorts."; if (clothes has worn) "First you will have to take off the corduroys."; ], weight 2; Class GreyUnderwear class Underwear with name "grey" "gray" "underwear" "pairs//p" "pair" "of" "underpants", short_name "grey pair of underwear", plural "grey pairs of underwear"; Class WhiteUnderwear class Underwear with name "white" "underwear" "pairs//p" "pair" "of" "underpants", short_name "white pair of underwear", plural "white pairs of underwear"; Class Key with list_together "keys", weight 2; Class CompactDisc with name "disc" "cd" "compact"; ! Objects not placed in beginning Object the_water "water", with name "water" "h2o" "liquid" "bottled", article "some", short_name "water", description "Water, H2O, an odorless tasteless liquid...", weight 5, before [; Drink: if (ObjectIsUntouchable(self)==1) rtrue; remove the_water; waterbottle.thirsty=0; "You drink the water. Thirst-quenching!"; Take, Remove: if (waterbottle in player) <>; "You have nothing to carry the water."; Taste: "Refreshing!"; EmptyT: "You can't do that."; ]; Object pacers_ticket "Pacers ticket" with name "pacer" "pacers" "to" "indiana" "game" "ticket" "tickets//p", weight 1, description "The Pacers ticket is for front-row seats at the Conseco Fieldhouse for the NBA Finals. These are for tomorrow, and you have to get to Indiana in time, by airplane, which means buying tickets."; Object airline_ticket "airline ticket" with name "airline" "airplane" "ticket" "tickets//p", weight 1, description "The ticket is from Toronto airport to Indiana airport."; Object Pennyjar "Mason jar" with name "jar" "glass" "mason", description "It is an ordinary glass jar embossed with the word ~Mason~.", weight 4, has openable container transparent; Class Screw with short_name "screw", plural "screws", with parse_name [w i; w=NextWord(); while (w=='screw' or 'screws' or 'standard' or 'sized' or 'ordinary' or 'phillips' or 'philips' or 'philip' or 'phillip' or 'fasteners' or 'fastener') {i++; if (w=='screws' or 'fasteners') parser_action=##PluralFound; w=NextWord(); } return i; ], name "screw", description "A standard sized Phillips screw. Somehow, some of the screws don't look right. You want to see whether anything else is lurking in them.", weight 1, before [; Search: <>; ]; Screw -> "screw"; Screw -> "screw"; Screw -> "screw"; Screw -> "screw"; Key -> nail "nail" with parse_name [w i; w=NextWord(); while (w=='nail' or 'nails' or 'standard' or 'sized' or 'fastener' or 'fasteners') {i++; if (w=='nails' or 'fasteners') parser_action=##PluralFound; w=NextWord(); } return i; ], weight 1, description "A standard sized nail reminds you of when you did woodworking in school."; Object roll "roll" with name "roll", description "A roll for keeping money.", weight 1, has open container; ! One subway token Token -> subway_token "subway token"; Object ttcmap "TTC subway system map" with name "map" "ttc" "subway" "system", weight 2, description [; font off; print " +Rosedale ^ | ^ | ^ | ^ +Spadina | ^ | | ^ @@92__ | ^ @@92 | ^ | | ^ | | ^ @@92_.__/ ^ Union ^"; font on; "P.S. The token machines at the Spadina subway station are broken down. Spadina station enterance south of Bloor. Bring your own tokens."; ]; Key front_door_key "blue key" with name "key" "blue", weight 1, description "A normal blue house key."; Object sign "crossing guard's stop sign" with name "sign" "crossing" "guard^s" "stop", weight 5, description "The sign says, ~STOP~."; Object spilt_water "water spill" with name "water" "spill" "spilt" "spilled", description "Water is spilled on the floor here.", describe "^Some water has been spilled here.", before [; Take: "You can't get the water in any way."; Drink: "It is probably dirty."; Rub: if (paper_towel notin player) "You have nothing which to wipe up the spill."; if (paper_towel has general) "The paper towel is already used."; give paper_towel general; remove self; "You wipe up the spill with the paper towel."; EmptyT: "You can't do that."; ]; ! ------------------Bedroom------------------------ Room Your_room "Bedroom" with name "awkward" "corner" "enterance" "entrance" "room", with description "This bedroom is a medium-sized room, with an ugly flower wallpaper. A dresser sits in an awkward corner. An entrance to a small bathroom is to the west while the door to the main corridor to the east. A cheap window sits at one side. A trapdoor in the ceiling seems to lead up to an attic, although high up.", w_to Bathroom_yours, e_to Privacy_Door, out_to Privacy_Door, before [; Examine: if (noun==d_obj) "Beige carpet."; Go: if (noun==u_obj) {if (player notin ladder) "Can't get up the trapdoor."; if (Trapdoor hasnt open) "You can't, since the trapdoor is in the way."; PlayerTo(Attic_SW); rtrue; } if (noun==e_obj) {if ((shirt hasnt worn && lsshirt hasnt worn) || (jeans hasnt worn && jeans2 hasnt worn && shorts hasnt worn && clothes hasnt worn)) "Get some clothes on!"; } ], u_to [; if (player notin ladder) "Can't get up the trapdoor."; return Trapdoor; ], has light outdoors outlets; Object -> carpet "carpet" with name "beige" "cream" "carpet" "rug", description "The carpet certainly needs redoing.", before [; Take, Pull: "Maybe the carpet needs redoing, but it's still better carpet than subfloor."; Push, Tie: "The carpet is already in place."; Turn: "Impossible."; Rub: "Maybe the carpet needs cleaning, but you can't do it yourself. Why bother?"; Smell: "Dirty."; ], has scenery static; Object -> cheap_window "cheap window" with name "cheap" "window" "pane" "fred" "fred^s" "freddie^s" "freddie" "hardware" "store" "shop", description "Looks like a cheap job from Freddie's Hardware Store.", before [; Open: "The window won't budge."; Close: "It's shut as it is."; Search: "You see the backyard and the roofs of other houses."; Enter: "Even if the window would open, it would be no use. And the window will never open."; ], has static scenery; Object -> bdrm_wall "wall" with name 'wall', description "The walls are covered with flowered wallpaper.", before [; Take: "You can't take a wall without serious renovation."; ], has scenery transparent; Object -> -> ugly_flower_wallpaper "flower wallpaper" with parse_name [i n w; w=NextWord(); while (w=='ugly' or 'flower' or 'wall' or 'paper' or 'wallpaper' or 'peeling' or 'old' or 'flowery') {if (w=='wallpaper' or 'paper') n=1; w=NextWord(); i++; } if (n==1) return i; else return 0; ], description "Ugly flower wallpaper. It's peeling too.", before [; Take, Pull, Push, Turn, Remove: "Better hire a professional to take it down."; ], has static scenery; Object -> clock "wall clock" with name "clock" "face" "clockface" "clock-face" "wall" "analog", with parse_name [w i p; w=NextWord(); while(w=='clock' or 'face' or 'clockface' or 'clock-face' or 'wall' or 'analog') {i++; if (w~='wall') p=1; w=NextWord(); } if (p==1) return i; ], description [; rfalse; ], before [; Listen: "Tick, tick, tick."; Take: "Too high up to take down."; Pull, Push: "Surely you're joking."; Turn: "The clock is too high to take down. Besides, turning the clock would only make the 12 where it doesn't belong."; Set, SetTo, SetToTopic: "The clock is displaying the correct time."; ], react_before [; Listen: if (noun==0) "The clock ticks, ticks, ticks."; ], each_turn [; if (action==##Examine && noun==self) "According to the clock, it is ", the_time/60, ":", (the_time%60)/10, the_time%10, "."; ], has static; Object -> top_of_dresser "dresser" with name "double" "dresser" "chest" "of" "drawers" "mahogany", before [; Take: "That is part of the dresser."; ], has static supporter scenery; Object -> dresser "double dresser" with name "double" "dresser" "chest" "of" "drawers" "mahogany", add_to_scope top_of_dresser, description [; print "This double dresser made of mahogany has six drawers, three on the left and three on the right. The drawers are labeled: 1,2,3,4,5,6. "; <>; ], describe [; print "^A mahogany double dresser sits here. "; <>; ], before [x n; Push, Pull, Turn, Take: "The double dresser is far too heavy to move."; Open: "You should open the drawers individually."; Receive: if (receive_action==##PutOn) <>; "The dresser can't contain things."; Search: if (children(top_of_dresser)~=0) {print "On top"; WriteListFrom(child(top_of_dresser), ISARE_BIT+ENGLISH_BIT+PARTINV_BIT); print ". "; } if (children(self)~=0) {objectloop (x ofclass Drawer) {give x ~workflag;} objectloop (x ofclass Drawer && x has open) {give x workflag; n++;} print "In the dresser, "; if (n==0) {"there are no open drawers.";} else {WriteListFrom(child(self), ENGLISH_BIT+WORKFLAG_BIT);} if (n==1) {" is open.";} else {" are open.";} } PushDir: "Far too heavy."; ], capacity 6, has static open transparent container; Class Drawer with description [; print "The drawer is labeled number ", self.number, "."; if (self has open) {print " It is open."; if (child(self)~=0) {print " In it is "; WriteListFrom(child(self),ENGLISH_BIT+RECURSE_BIT); print "."; } } else print " It is closed."; ""; ], before [; Take: "Leave the drawer where it belongs."; Attack: "Hitting the drawer will do no good."; ], short_name [; if (action==##Search && noun ofclass Drawer && child(self)==0) print "Drawer "; else print "drawer "; print self.number; rtrue; ], has static container openable proper; Drawer -> -> drawer1 "drawer 1" with name "top" "left" "drawer" "first" "1" "one", number 1; RedSock -> -> -> rs1 "red sock"; WhiteSock -> -> -> ws1 "white sock"; WhiteSock -> -> -> ws2 "white sock"; WhiteSock -> -> -> ws3 "white sock"; WhiteSock -> -> -> ws4 "white sock"; GreySock -> -> -> gs1 "grey sock"; GreySock -> -> -> gs2 "grey sock"; GreySock -> -> -> gs3 "grey sock"; GreySock -> -> -> gs4 "grey sock"; ! list_together codes: 1-shirts 2-pants,shorts 3-baseball caps Drawer -> -> drawer2 "drawer 2" with name "middle" "left" "drawer" "second" "2" "two", number 2; SomeClothing -> -> -> shirt "blue short-sleeved shirt" with name "shirt" "shirts//p" "short" "sleeved" "blue", description "A blue short-sleeved shirt.", before [i; Wear: if (lsshirt has worn) "You can't wear two shirts at the same time."; Disrobe: if (location~=dressing_room or bathroom_yours or your_room) "Not here."; ], list_together 1, weight 4; SomeClothing -> -> -> lsshirt "yellow long-sleeved shirt" with name "shirt" "shirts//p" "long" "sleeved" "long-sleeved" "yellow", description "A yellow long-sleeved shirt.", before [i; Wear: if (shirt has worn) "You can't wear two shirts at the same time."; Disrobe: if (location~=dressing_room or bathroom_yours or your_room) "Not here."; ], list_together 1, weight 5; Drawer -> -> drawer3 "drawer 3" with name "bottom" "left" "drawer" "third" "3" "three", number 3; Class BlueJeans class SomeClothing, with name "pair" "pairs//p" "of" "blue" "jeans" "denim" "pants" "trousers", short_name "pair of blue jeans", plural "pairs of blue jeans", description "Size 12 blue jeans from Lands End", before [j; Wear: if (self==jeans) j=jeans2; else j=jeans; if (j has worn) "You can't wear two pairs of pants at the same time."; if (shorts has worn) "You can't wear pants and shorts at the same time."; if (clothes has worn) "You can't wear corduroy trousers and jeans at the same time."; Disrobe: if (location~=dressing_room or bathroom_yours or your_room) "Not here."; ], list_together 2, weight 7, has clothing; BlueJeans -> -> -> jeans "pair of blue jeans"; BlueJeans -> -> -> jeans2 "pair of blue jeans"; Drawer -> -> drawer4 "drawer 4" with name "top" "right" "drawer" "fourth" "forth" "4" "four", number 4; SomeClothing -> -> -> shorts "pair of shorts" with name "shorts" "tan" "short" "pair" "of", description "Some tan shorts bought at the GAP.", before [; Wear: if (jeans has worn || jeans2 has worn) "You can't wear shorts and jeans at the same time."; if (clothes has worn) "You can't wear corduroy trousers and shorts at the same time."; Disrobe: if (location~=dressing_room or bathroom_yours or your_room) "Not here."; ], list_together 2, weight 4; Drawer -> -> drawer5 "drawer 5" with name "middle" "right" "drawer" "fifth" "5" "five", number 5; SomeClothing -> -> -> bbcap "baseball cap" with name "baseball" "Lakers" "cap" "hat", description "A baseball cap bought in Los Angeles bearing the L.A. Lakers logo.", weight 3, list_together 3; Drawer -> -> drawer6 "drawer 6" with name "bottom" "right" "drawer" "sixth" "6" "six", number 6; WhiteUnderwear -> -> -> wu1 "white underwear"; WhiteUnderwear -> -> -> wu2 "white underwear"; WhiteUnderwear -> -> -> wu3 "white underwear"; WhiteUnderwear -> -> -> wu4 "white underwear"; WhiteUnderwear -> -> -> wu5 "white underwear"; GreyUnderwear -> -> -> gu1 "grey underwear"; GreyUnderwear -> -> -> gu2 "grey underwear"; GreyUnderwear -> -> -> gu3 "grey underwear"; Object -> shoes "Nike running shoes" with article "a pair of", name "nike" "running" "shoes" "pair" "of" "sneakers" "trainers" "joggers" "nikes", description "A pair of Nike basketball shoes.", daemon [; if (parent(right_shoe) ~= parent(left_shoe)) return; if ((left_shoe has worn && right_shoe hasnt worn) || (left_shoe hasnt worn && right_shoe has worn)) return; if (left_shoe has worn) give shoes worn; else give shoes ~worn; move shoes to parent(right_shoe); give shoes ~general; move right_shoe to shoes; move left_shoe to shoes; give right_shoe ~worn; give left_shoe ~worn; StopDaemon(self); ], invent [; if (self has worn && inventory_stage==2) {print " (on your feet)"; rtrue;} ], weight 12, has clothing transparent pluralname; Class Shoe with name "nike" "running" "shoe", before [; if (self notin shoes) rfalse; move left_shoe to parent(shoes); move right_shoe to parent(shoes); if (shoes has worn) {give left_shoe worn; give right_shoe worn; } give shoes general; remove shoes; StartDaemon(shoes); ], invent [; if (self has worn && inventory_stage==2) {print " (on your ", (string) self.pair_side, " foot)"; rtrue;} ], weight 6, has clothing; Shoe -> -> left_shoe "left Nike running shoe" with description "A left Nike running shoe.", name "left", pair_side "left"; Shoe -> -> right_shoe "right Nike running shoe" with description "A right Nike running shoe.", name "right", pair_side "right"; Table -> bedside_table "night-table" with parse_name [w i a; w=NextWord(); while(w=='bedside' or 'bed' or 'side' or 'table' or 'night-table' or 'cherry' or 'wood' or 'wooden' or 'lamp' or 'night') {if (w=='table' or 'night-table') a=1; w=NextWord(); i++; } if (a==1) return i; return 0; ], description "A night table carefully made out of cherry wood sits by the bed.", before [; Take: "The table is awfully heavy, and this isn't yours."; Push, Pull, Turn: "It is fine as it is."; ], has supporter; Object -> -> air_freshener "air freshener" with name "air" "freshener" "morning" "breeze" "sneeze" "fresh" "air-freshener", article "an", description "One of those awful air fresheners. This one claims to have a ~Morning Breeze~ scent, but it makes you sneeze.", weight 2, before [; Smell: "The smell of the air freshener makes you sneeze."; ], react_before [; Smell: if (noun==0) <>; ]; Lamp -> -> bedside_lamp "lamp" with name "lamp" "light" "bedside", weight 30, before [; Examine: print "A rustic old lamp, made in the 1940's, still works. "; if (self has plugged) print "It is currently plugged in, "; else print "It is currently unplugged, "; if (self has on) print "and on, light diffusing through its brown shade.^"; else print "and off.^"; rtrue; ]; Object -> bed_frame "bed frame" with parse_name [i w p; w=NextWord(); while (w=='bed' or 'cheap' or 'frame') {i++; if (w=='frame') p=1; w=NextWord();} if (p==1) return i; return 0; ], description "A cheap bed frame.", before [; Take: "Too heavy."; Push, Pull: <>; Turn: <>; PushDir: <>; LookUnder: <>; ], has scenery; Chair -> bed "bed" with name 'bed' 'cheap' 'sears', description "A cheap bed bought at Sears long ago, sitting on a cheap bed frame. It rolls on castors.", before [; LookUnder: if (knapsack hasnt general) {print "You find a Mason jar and knapsack under the bed. You take them.^"; move Pennyjar to location; move knapsack to location; keep_silent=1; ; ; keep_silent=0;} else rfalse; give knapsack general; return; Push, Pull: if (player in self) "Get off the bed first."; if (knapsack has general) "You push the bed around. You move it back to its original location."; move knapsack to location; move Pennyjar to location; give knapsack general; "As you push the bed around, a knapsack and jar drag out from underneath it. You move it to back where it was."; Turn: "You turn the bed around, but you don't see much difference in its placement."; Take: "Way too heavy."; PushDir: "The bed won't go through any doorway here. Just push it around the room."; ]; Object -> -> sheets "sheets" with name "lime" "green" "seventies" "sheets" "bedding", description "The lime green sheets on the bed are sure a revival of the seventies.", weight 7, has enterable pluralname; !----------------------------Southwest end of Attic-------------------------- Object Trapdoor "trapdoor" with name "trap" "door" "trapdoor" "opening" "attic", when_open [; if (location==Attic_SW) "Light shines in through the trapdoor."; "The trapdoor is open up to the attic."; ], when_closed [; if (location==Attic_SW) "The trapdoor is shut, blocking the way down."; "The trapdoor is closed, blocking the way into the attic."; ], door_to [; if (location==Attic_SW) return Your_room; return Attic_SW; ], door_dir [; if (location==Attic_SW) return d_to; return u_to; ], before [; Examine, Search: ; default: if (player in bed) "You'll need something a bit higher to reach the trapdoor than the bed. Like a ladder, maybe."; if (player notin ladder && location~=Attic_SW) "Can't reach the trapdoor!"; ], after [; Open: give attic_sw light; give attic_ne light; Close: if (trapdoor2 hasnt open) {give attic_sw ~light; give attic_ne light;} ], found_in Attic_SW Your_room, has door openable; Room Attic_SW "Southwest end of Attic" with description "The attic seems quite large although relatively deserted. A bedroom is below the attic opening. Boxes block the way in all directions but northeast.", d_to Trapdoor, ne_to Attic_NE, w_to "Solid wall.", sw_to "Solid wall.", se_to "There's just way too many boxes there.", nw_to "Solid wall.", e_to "Don't want to move all those boxes.", n_to "Moving all those boxes would do no good, there's nothing interesting back there.", s_to "What a waste of time moving those boxes!", u_to "You can't fly!", in_to "How do you go in?", out_to "How do you go out?", has light; !----------------------------Northeast end of Attic-------------------------- Object Trapdoor2 "trapdoor" with name "trap" "door" "trapdoor" "opening" "attic", when_open [; if (location==Attic_NE) "Light shines in through the trapdoor."; "The trapdoor is open up to the attic."; ], when_closed [; if (location==Attic_SW) "The trapdoor is shut, blocking the way down."; "The trapdoor is shut, blocking progress up."; ], door_to [; if (location==Attic_NE) return Master_bedroom; return Attic_NE; ], door_dir [; if (location==Attic_NE) return d_to; return u_to; ], before [; Examine, Search: ; default: if (player in master_bed) "The bed won't help."; if (player notin ladder && location~=Attic_NE) "Can't reach the trapdoor!"; ], after [; Open: give attic_sw light; give attic_ne light; Close: if (trapdoor hasnt open) {give attic_ne ~light; give attic_sw ~light;} ], found_in Attic_NE Master_bedroom, has door openable open; Room Attic_NE "Northeast end of Attic" with description "This attic is fairly large although relatively deserted. A bedroom is below the attic opening. Boxes, which line the place, obstruct travel in all directions except southwest.", d_to Trapdoor2, sw_to Attic_SW, ne_to "Solid wall.", se_to "Just a wall.", w_to "Don't want to move all those boxes.", nw_to "Moving all those boxes would do no good, there's nothing interesting back there.", s_to "What a waste of time moving those boxes!", n_to "Stupid boxes. Why, there's nothing around here but them.", u_to "You can't fly!", in_to "How do you go in?", out_to "How do you go out?", has light; !-------------------------------Your Bathroom------------------------------- Object paper_towel "paper towel" with name "paper" "towel", description [; if (self has general) "The paper towel is used."; "The paper towel can wipe up messes."; ]; Room Bathroom_yours "Bathroom" with name "blue" "paint", with description "This is a bare-bones two-piece bathroom. The wall is painted blue. A pendant hangs from the ceiling, with a switch to turn it on on the wall.", e_to Your_room, before [; Examine: if (noun==d_obj) "Ceramic tile."; ], has light outdoors outlets; Object -> paper_towels "roll of paper towels" with name "paper" "towel" "towels" "roll" "of", description "The roll of paper towels is quite thick.", has transparent; Object -> -> dpaper_towel "paper towel" with name "paper" "towel", before [; Take, Remove: if (paper_towel in player) "You already have that."; if (paper_towel notin nothing) "You can't get a paper towel off the roll!"; move paper_towel to player; "You rip a paper towel off the roll."; ], description "The paper towel can wipe up messes."; Object -> garbage_can "garbage can" with name "garbage" "trash" "can" "bin", description "The trash can is full of trash.", before [; Smell: "Stinks. Maybe that's what those stupid air fresheners are for, but it is better to clean disgusting smells."; ], has container open; Object -> ceramic_tile "ceramic tile" with name "ceramic" "marble" "granite" "tile" "blue", description "The ceramic tile is blue.", before [; Rub: if (verb_word=='scratch') "The ceramic tile is unscratchable."; "The ceramic tile is clean enough."; Take, Pull, Push, Turn: "The tile is attached to the floor. Well, you don't want to lift it."; Attack: "The tile is virtually indestructable."; ], has scenery static; Object -> bathroom_blue_paint "blue paint" with name "blue" "paint", description "The walls are painted blue.", has static scenery; Object -> your_bathroom_light "light" with name "light" "pendant" "switch" "cheap" "beaver" "lumber" "crummy" "crappy", description "This is an cheap pendant light bought at Beaver Lumber.", before [; Take, Pull, Push, Turn: "You don't want to screw up the electrical wiring now."; ], after [; SwitchOn: give self light; SwitchOff: give self ~light; ], has static scenery switchable on light; Object -> toilet "toilet" with name "toilet", description [; if (self has general) "This toilet is full of yellow urine."; "This toilet has a clean clear bowl."; ], before [; Flush: give toilet ~general; "The toilet flushes down in just a minute."; Pee: give toilet general; "You pee into the toilet."; Smell: if (self has general) "P.U! It stinks."; ], describe "^A toilet is mounted in one corner here.", has static enterable supporter; Object -> sink "sink" with name "sink" "lavatory" "lav" "pedestal", description "A pedestal sink with a hot and cold tap.", before [; WashIn: "You wash your hands clean as clean can be."; Take: "Don't want to screw up everything around here."; PutOn: "The sink won't easily hold things. It's a pedestal sink."; ], describe "^A pedestal sink sits in one corner here.", has static; Object -> taps "taps" with name "hot" "cold" "tap" "taps" "faucet", description "The taps are mounted on the sink.", before [; Take: "The taps are working fine. It's not like they are rusty or anything."; Turn, Pull, Push: "You turn the tap, and water comes out. Reassured, you turn it off."; ], has static scenery; !----------------------------------West Corridor----------------------------------- Room West_Corridor "West Corridor" with description "This hall, painted grey-blue, leads down to a bend. Doors lead west to a bedroom and north to a closet. To the east is a continuation of the hall. To the south is an empty room.", w_to Privacy_Door, n_to Closet, e_to South_Corridor, s_to Study, in_to Privacy_Door, cant_go "The hall continues to the east. A bedroom is to the north and the closet is to the north.", before [; Examine: if (noun==d_obj) "Beige carpet."; ], has light outdoors outlets; Object Privacy_Door "bedroom door" with description [; if (location==West_Corridor) "A normal wood door with a privacy lock on it. There is a push button on this side."; "A wood door with a privacy lock. There is a nail hole on this side."; ], when_open [; if (location==West_Corridor) "The door leading to the bedroom stands open."; "The door leading to the hallway is open."; ], when_closed [; if (location==West_Corridor) "The door to the bedroom is shut."; "The door to the hallway is currently closed."; ], name "door" "privacy" "lock" "bedroom" "to" "the" "hallway" "corridor" "hall", door_to [; if (location==West_Corridor) return Your_room; return West_Corridor; ], door_dir [; if (location==West_Corridor) return w_to; return e_to; ], with_key nail, found_in Your_room West_Corridor, before [; Pull: if (location==your_room) <>; else <>; Push: if (location==west_corridor) <>; else <>; Turn: if (self has open) <>; else <>; Take: "Leave the hinges intact."; Search: "You can't see through the nail hole."; ], daemon [; if (location==West_Corridor) {remove doorknob_bedroom; move doorknob to self;} if (location==Your_room) {remove doorknob; move doorknob_bedroom to self;} ], has static door openable lockable locked transparent; Object -> doorknob "doorknob" with parse_name [w i p; w=NextWord(); while (w=='door' or 'knob' or 'doorknob' or 'handle') {i++; if (w=='knob' or 'doorknob' or 'handle') p=1; w=NextWord();} if (p==1) return i; return 0; ], description "The doorknob is attached to the door.", before [; Turn: if (privacy_door hasnt locked) "You turn the knob. It doesn't unlock or anything."; give privacy_door ~locked; "You turn the knob, unlocking the door."; Pull, Push: "Impossible."; ], has transparent; Object -> -> pd_lock_button "button" with name "button" "push" "lock", description [; print "The button locks the door, and it is "; if (privacy_door has locked) "depressed."; "out."; ], before [; Turn: "Impossible."; Pull: "Can't happen."; Push: if (privacy_door has locked) "It's already pushed in."; if (privacy_door has open) "No point locking an open door."; give privacy_door locked; "You push in the button, locking the door."; ], has static; Object -> doorknob_bedroom "doorknob" with parse_name [w i p; w=NextWord(); while (w=='door' or 'knob' or 'doorknob' or 'handle') {i++; if (w=='knob' or 'doorknob' or 'handle') p=1; w=NextWord();} if (p==1) return i; return 0; ], description "The doorknob is attached to the door.", before [; Take: "That seems to be a part of the bedroom door."; Turn: if (privacy_door hasnt locked) "You turn the knob. It moves."; "You try to turn the knob, but it won't bulge."; Pull, Push: "Impossible."; Receive: if (noun==nail) <>; if (noun ofclass Screw) "Screws won't fit."; "That won't fit."; ], has transparent static scenery; Object -> -> nail_hole "nail hole" with parse_name [w i p; w=NextWord(); while (w=='nail' or 'hole' or 'lock' or 'opening') {i++; if (w=='hole' or 'lock' or 'opening') p=1; w=NextWord();} if (p==1) return i; return 0; ], description "There is a nail hole on this side of the door.", before [; Receive: if (noun==nail) <>; if (noun ofclass Screw) "Screws won't fit."; "That won't fit."; Search: "You can't see through the nail hole."; ], has scenery; !-----------------------------------Closet--------------------------------------- Room Closet "Closet" with description "A small linen closet, about three feet by three feet. The bedding touches you and you have claustrophobia.", s_to West_Corridor, before [; Examine: if (noun==d_obj) "Beige carpet."; ], has light; Object -> Bedding "bedding" with name "bedding" "sheets" "blankets" "linen" "linens", article "some", description "Just the usual sheets and blankets those kidnappers had for years.", before [; Examine, Search: if (self hasnt general) {print "You find a map of the TTC subway system, and take it.^"; move ttcmap to location; keep_silent=1; ; keep_silent=0;} else rfalse; give self general; return; Take: "There's just too much."; ]; !------------------------------Abandoned Study------------------------------------- Room Study "Abandoned Study" with description "This area, about eleven feet square, used to be a study, but it is now just a corner that is used as storage. The kidnapper doesn't need a study; he just commits many crimes. You wonder what all is here. There are no windows to be seen.", n_to West_Corridor, before [; Examine: if (noun==d_obj) "Hardwood."; ], has light outlets; Object -> boxes "boxes" with name "storage" "packing" "moving" "u-haul" "boxes" "big" "large", description "Who knows what is in those U-Haul moving boxes?", describe "^A bunch of large moving boxes reside here.", before [; Take, Pull, Push, Turn, PushDir: "Too much boring stuff to bother hauling."; ], has container; Object -> ladder "ladder" with name "tall" "step" "ladder" "stepladder" "step-ladder", description "A step-ladder that is tall enough to climb from one story to the next.", describe [; if (self hasnt moved) "^A step ladder in two parts sits here on its side."; if (self in South_Corridor && location==South_Corridor) "^A step ladder goes down to the kitchen below."; if (self in South_Corridor && location==kitchen) "^A step ladder goes up to the hall above."; ], before [; Take: if (self in South_Corridor) {if (location==kitchen) "You still want a way upstairs, right?"; } Climb: if (self in South_Corridor) {if (location==kitchen) <>; else "You're at the top of the ladder.";} if (player notin self) <>; else <>; Descend: if (self in South_Corridor) {if (location==South_Corridor) <>; else "You're at the bottom of the ladder.";} if (player in self) <>; else "You're not on the ladder."; ], weight 40, after [; Drop: if (location==South_Corridor) {"You rest the ladder on the floor below.";} ], has enterable transparent supporter; !-----------------------------South Corridor------------------------------ Object blue_paint "grey blue paint" with name "paint" "grey" "gray" "grey-blue" "gray-blue" "blue", description "It's an okay shade of grey blue.", before [; Take, Pull: "The paint isn't chipping."; Push, Turn: "Surely you're joking."; ], found_in south_corridor west_corridor, has scenery static; Room South_Corridor "Corridor by Top of Stairs" with description "This section of the hall, painted grey-blue, lies around the south of the house, around a large window. There should be stairs leading down to the first story, but there's just a hole to the floor below, a passage west to the western part of the hallway, and a passage east to a sitting area. You never know when they'll install a new staircase...", w_to West_Corridor, e_to Sitting_room, before [; Examine: if (noun==d_obj) "Beige carpet."; ], d_to [; if (ladder in location) {print "You descend the ladder to the floor below.^"; return kitchen;} else rfalse; ], cant_go [; if (noun==d_obj) "The stairs aren't intact."; print "The corridor continues to the west and the sitting room is to the east. The kitchen is at the bottom of the "; if (ladder in self) "ladder."; else "hole without stairs."; ], has light outdoors outlets; Object -> large_window "large window" with name "large" "big" "nice" "window" "glass" "pane" "okay" "ok" "decent" "good" "quality", description "The large window looks nice. Maybe the house uses crummy windows for the back and decent ones for the front and downstairs.", before [; Pull: <>; Push: <>; Take: "Don't want to dismantle the window."; Turn: "Surely you're joking."; Examine: print (string) self.description; if (self has open) " It is opened."; " It is shut."; Enter: if (self hasnt open) "It is closed so that is no use."; if (self has open) "That would result in serious injury or death."; ], has static scenery openable; Object -> stairs_hole "staircase hole" with parse_name [i p w; w=NextWord(); while (w=='stair' or 'stairs' or 'staircase' or 'case' or 'step' or 'steps' or 'hole' or 'opening') {i++; if (w=='hole' or 'opening') p=1; w=NextWord();} if (p==1) return i; else return 0; ], before [; Take, Turn, Pull, Push: "Surely you're joking."; Enter: <>; Receive: if (noun==ladder && ladder notin South_Corridor) <>; ], description [; if (ladder in South_Corridor) {print "The stairs are missing, with just this hole left, but the ladder goes "; if (location==South_Corridor) "down."; else "up."; } "The stairs are missing, and there is no way to go up or down."; ], found_in South_Corridor Kitchen, has scenery static; Object -> stairs "stairs" with name "stairs" "stair" "staircase" "case" "step" "steps", before [; "There are no stairs, as far as you can tell."; ], has scenery; !--------------------------------Sitting Room------------------------------------ Room Sitting_room "Sitting Room" with description "A small sitting room lies here outside the master bedroom. A passage leads west to the hall and north to the master bedroom.", w_to South_Corridor, n_to Master_bedroom, before [; Examine: if (noun==d_obj) "Beige carpet."; ], has light outdoors outlets; Chair -> Sofa "white sofa" with name "white" "sofa" "couch" "chair", description "A small white sofa, with arms.", before [; Take: "Too heavy."; Push, Pull: if (player in self) "Get off it first."; "You push the sofa around."; Turn: if (player in self) "Get off it first."; "You turn the sofa around."; PushDir: AllowPushDir(); rtrue; ]; !--------------------------------Master Bedroom--------------------------------- Room Master_bedroom "Master Bedroom" with name "corner" "dark" "green" "paint", with description "This is your parent's room. It is painted dark green. A bed sits in one corner of the room. A wardrobe sits in the other. The only way to go is back south to the sitting area.", s_to Sitting_room, before [; Examine: if (noun==d_obj) "Hardwood."; Go: if (noun==u_obj) {if (player notin ladder) "Can't get up the trapdoor."; if (Trapdoor2 hasnt open) "You can't, since the trapdoor is in the way."; PlayerTo(Attic_NE); rtrue; } ], in_to [; <>; ], has light outdoors outlets; Chair -> master_bed "bed" with name "bed", description "This bed is covered with nice blue sheets. The bed seems to have a beech wood frame.", before [; Take: "Too heavy!"; Push, Pull, Turn, PushDir: "It won't roll."; ]; Object -> -> Bob "Bob McEwen" with name "Bob" "McEwen" "kidnapper" "abusive" "man", description "This is an abusive man. He has thick eyebrows, and he smokes. If you wake him, he'll attack and kill you!", describe "Bob, an abusive killer, sleeps here.", life [; WakeOther: print "^As you wake Bob, he rouses to his feet. He kicks you and locks you in the bedroom, again.^"; give privacy_door ~open locked; remove nail; move ladder to your_room; PlayerTo(your_room); rtrue; Ask, Answer, Tell: "He's sleeping! DON'T WAKE HIM!"; ], orders [; "Better leave Bob here sleeping or he'll attack!"; ], before [; Smell: "Seems like Bob never washes."; ], weight 1964, has animate male proper; Object -> wardrobe "wardrobe" with name "wardrobe" "closet", description "A wardrobe made of birch is quite large.", inside_description "Inside the wardrobe it is snug, and you feel piles of clothes.", before [; Take: "It isn't portable."; ], has enterable container openable static; Object -> -> clothes "corduroy trousers" with name "corduroy" "pants" "pair" "of" "trousers" "pairs//p" "corduroys", description "Some giant trousers.", before [; Examine, Search: if (roll hasnt general) {move roll to location; keep_silent=1; ; keep_silent=0; print "You find a roll of subway tokens in the pocket of the trousers.^";} else rfalse; give roll general; return; Wear: if (jeans has worn || jeans2 has worn) "Take off the jeans first."; if (shorts has worn) "Take off the shorts first."; Disrobe: if (location~=dressing_room or bathroom_yours or your_room) "Not here."; ], weight 8, has pluralname clothing container open; !----------------------------Kitchen------------------------------------ Room kitchen "Kitchen" with description "This old kitchen has just been refurbished recently. The cupboards and drawers are made of maple, and the countertop is blue. Up the stairs is a hallway and the front hall is to the south.", u_to [; if (ladder in South_Corridor) {print "You climb the ladder up to the hall.^"; return South_Corridor;} else rfalse; ], s_to front_hall, after [; Look: if (ladder in South_Corridor) "^A step ladder leads up to a hall above."; ], before [; Examine: if (noun==d_obj) "Blue ceramic tile."; ], cant_go [; if (noun==u_obj) "The stairs aren't intact."; if (ladder in South_Corridor) "You can go up the ladder or south to the front hall."; else "You can go south to the front hall. There are no stairs leading up."; ], has light outdoors outlets; Object -> cupboard "cupboard" with name "cupboards" "cabinet" "cabinets" "cupboard", description "This cupboard, made of maple, is of a nice style.", has static openable container; Object -> -> dog_food "Iams dog food" with parse_name [i w p; w=NextWord(); while (w=='dog' or 'iams' or 'food') {i++; if (w=='food') p=1; w=NextWord();} if (p==1) return i; return 0; ], article "some", before [; Eat: "The dog food is for dogs, not people."; ], weight 4, description "A bag of Iams dog food for puppies."; Object -> kitchen_drawer "drawer" with name "drawer" "drawers", description "This drawer, made of maple like the cupboards, is quite large.", before [; Pull: <>; Push: <>; Turn: "Impossible."; Take: "Leave the drawer where it is."; ], has openable container static; Object -> countertop "countertop" with name "countertop" "counter" "top" "green" "laminate", description "The counter is a green laminate counter.", has static scenery supporter; Object -> fridge "refrigerator" with name "fridge" "refrigerator", cubic_feet, description [; print "The fridge is a Maytag fridge that claims to have ", fridge.cubic_feet, " cubic feet of space in it.^"; ], before [; Pull, Push, Turn, Take: "Too heavy to move!"; ], has container static openable; Object -> -> Beef "beef" ! the beef, gets given general when cooked with parse_name [i w j; if (self has general) j='cooked'; else j='raw'; w=NextWord(); while (w==j or 'beef') {w=NextWord(); i++;} return i; ], short_name [; if (self hasnt general) print "raw beef"; else print "cooked beef"; rtrue; ], article "some", description [; if (self hasnt general) "Red blood flows out of the raw beef."; else "You sniff the cooked beef. It smells good."; ], before [; Eat: if (self hasnt general) "You dare not eat raw beef!"; Smell: if (self hasnt general) "Yuck! It smells awful."; else "Mmm. It smells good."; Touch: if (self hasnt general) "You really want to get food poisoning?"; else "Okay, it's cooked all right."; Taste: if (self hasnt general) "You really want to get food poisoning?"; else <>; ], weight 5, has edible cookable; Object -> Stove "stove" with name "stove" "oven" "range" "electric", description "This stove has an oven attached for cooking food.", after [; SwitchOn: if (child(self) has cookable) <>; ], before [; Take, Pull, Push, Turn: "The stove is too heavy to move!"; Touch: if (self has on) "I'm not touching that! Too hot."; ], capacity 1, has supporter switchable static; !----------------------------Front Hall----------------------------------- Object front_hall "Front Hall" with description "The front hall is unusual because the stairs do not start here. Instead, the stairs seem to start in the kitchen to the north. A front door leads outside behind you, to the south. A staircase leads down to a dark basement, and a passage leads west into the living room.", n_to kitchen, s_to Front_Door, w_to Living_Room, d_to Basement, out_to Front_Door, before [; Examine: if (noun==d_obj) "Blue ceramic tile."; ], has outdoors light outlets; NPC_Engine -> dog "Freckles the dog" with name "dog" "Freckles" "golden" "retriever", description [; print "This golden retriever came from the Humaine Society, a society that breeds and sells dogs. Her name is Freckles and she barks a lot. "; if (self.tied==true) print "The dog is tied up."; ""; ], describe [; print "^A dog is "; if (self.tied==true) "tied up and barking here."; "sitting here."; ], tied true, life [; Give: if (noun==dog_food) {give self general; remove dog_food; "The dog eats the dog food fast. She seems much more obedient.";} else {"Woof! The dog won't take that.";} WakeOther: "The dog is already awake."; Answer: "Woof!"; Tell: "Woof!"; Ask: "Woof!"; ], orders [; NotUnderstood: "Woof!"; Search: if (self has general && self.tied==false) {if (noun==hole) {give hole general; if (hole has general) {move front_door_key to location; print "The dog finds a key in the hole.^"; rtrue;} } else {"The dog shrugs and says woof!";} } else {if (self.tied==true) "The dog is tied up."; else "The dog doesn't hear you.";} Here: if (self.tied==false) {if (self has general) { if (dog notin location) {NPC_Move(dog,location); "The dog comes to where you are.";} else {"The dog is already here.";} } else {"The dog doesn't hear you.";}} else "The dog is tied up."; default: "Woof!"; ], before [; ThrownAt: if (noun==dog_food) {give self general; remove dog_food; "The dog eats the dog food fast. She seems much more obedient.";} else {print "The dog doesn't go after ", (the) noun, ".^"; move noun to parent(dog); rtrue;} Ask, Answer, Tell, Examine: ; Touch: if (dog in location) "The dog enjoys you petting her."; else "The dog is in another room."; Feed: if (IndirectlyContains(player,dog_food)==0) "You have no dog food."; <>; default: if (dog in location) ; else "You can't do things with the dog when she is another room."; ], daemon [; if (random(3)==2) rfalse; if (TestScope(dog)~=1) rfalse; switch(random(4)) {1: print "^The dog barks loudly, woof woof!^"; 2: print "^Freckles pants and pants.^"; 3: print "^The dog is sleepy and curls up.^"; 4: print "^The cute dog makes a quiet bark.^"; } ], weight 124, has female proper; Object -> hole "hole in wall" with name "hole" "in" "wall", description "A hole, about six inches wide, in the wall. You can see nothing in it but a dog could.", before [; Search: "You can't see inside the hole."; Turn, Pull, Push, Take: "It is in the wall!"; ], has static; !------------------------------Basement--------------------------------------- Room Basement "Basement" with description "This basement has a high ceiling. Studs are visible in the ceiling, which is about eight feet high. Electrical wires, plumbing pipes, and heating ducts run through the ceiling. Stairs lead back up to the front hall. The basement continues to the west.", u_to Front_Hall, w_to Basement_West, after [; Look: if (self has light) "Light shines in from a dance light up the stairs."; ], before [; Examine: if (noun==u_obj) "The ceiling is made of wooden studs with plumbing pipes, heating ducts and electrical wires fed through them."; if (noun==d_obj) "Concrete."; ]; Class CeilingS with before [; Take, Pull, Push, Turn: "But it's in the ceiling and fixed there!"; ], has scenery; Class PlumbingPipes class CeilingS, with parse_name [w i p; w=NextWord(); if (w=='hot' or 'cold' or 'water' or 'plumbing' or 'pipes') {i++; if (w=='pipes' or 'plumbing') p=1; w=NextWord(); } if (p==1) return i; return 0; ], description "The plumbing pipes stretch across the basement and go through holes in the studs."; CeilingS -> electrical_wires "electrical wires" with name "electrical" "wires" "wire" "wiring" "electric" "copper", description "The electrical wires stretch across the basement and disappear through holes in the subfloor.", has scenery; PlumbingPipes -> plumbing_pipes "plumbing pipes"; CeilingS -> heating_ducts "heating ducts" with name "heating" "heat" "hot" "duct" "ducts", description "The heating ducts go over to the furnace and heat the house.", has static scenery; CeilingS -> studs "studs" with name "wooden" "wood" "studs" "boards", description "Two by sixes stretch the whole house and support the floor above. Plywood subfloor rests above the studs.", has static scenery; CeilingS -> plywood_subfloor "plywood subfloor" with name "plywood" "wood" "subfloor", description "The plywood subfloor rests above the studs.", has static scenery; Object -> cord_on_ceiling "hanging cord" with name "cord" "chain" "hanging" "dangling", description "The cord is dangling from the ceiling.", describe "^You bump your head on the cord attached to the ceiling, for the umpteenth time.", before [; Pull: if (bare_light_bulb has light) {give bare_light_bulb ~light; give Basement_West ~light; "Click! A bare light bulb turns out.";} else {give bare_light_bulb light; give Basement_West light; "Click! The light bulb turns on.";} Push: "Can't push a cord!"; Turn: "Surely you're joking."; Take: "The cord is attached to the ceiling."; ], has static; Object -> bare_light_bulb "bare light bulb" with name "bare" "light" "bulb", description [; if (self has light) "The bare light bulb is providing light. You can make out that it is a 60 watt bulb."; else "You can just barely make out the bare light bulb."; ], describe [; if (self has light) "^A bare light bulb is on the ceiling, lit up."; else "^A bare light bulb is on the ceiling, dark."; ], before [; SwitchOn: if (self hasnt light) <>; else "Light already on."; SwitchOff: if (self has light) <>; else "Light already off."; Turn, Take: "The lightbulb is working."; Pull, Push: "Surely you're joking."; ], has static; !-----------------------------Basement West---------------------------------------- Room Basement_West "Basement West" with description "This end of the basement is full of studs again. There are electrical wires, plumbing pipes and heating ducts in the studs above you. The ceiling is eight feet high. The basement continues to the east.", before [; Examine: if (noun==u_obj) "The ceiling is made of wooden studs with plumbing pipes, heating ducts and electrical wires fed through them."; if (noun==d_obj) "Concrete."; ], after [; Look: if (bare_light_bulb has light) "Light comes in from the bare light bulb to the east."; ], e_to Basement; CeilingS -> electrical_wires2 "electrical wires" with name "electrical" "wires" "wire" "wiring" "electric" "copper", description "Electrical wires stretch across the basement and disappear through holes in the subfloor.", before [; LetGo: if (player notin stool) "Can't reach it!"; Receive: if (player notin stool) "Can't reach it!"; move noun to location; print_ret (The) noun, " falls off the wires."; Examine: self.description(); if (wire_note in self) " There is a note on the wire."; rtrue; ], describe [; <>; ], has supporter; CeilingS -> -> wire_note "note" with name "crumpled" "note", description "The crumpled note reads: ^ ^Kitchen Entry Code (Rosedale High): 2456.", weight 2, before [; Examine: if (self in electrical_wires2) "Can't read it on the wires."; ]; PlumbingPipes -> plumbing_pipes2 "plumbing pipes"; CeilingS -> heating_ducts2 "heating ducts" with name "heating" "heat" "hot" "duct" "ducts", description "The heating ducts go over to the furnace and heat the house.", has static scenery; CeilingS -> studs2 "studs" with name "wooden" "wood" "studs" "boards", description "Two by sixes stretch the whole house and support the floor above. Plywood subfloor rests above the studs.", has static scenery; CeilingS -> plywood_subfloor2 "plywood subfloor" with name "plywood" "wood" "subfloor", description "The plywood subfloor rests above the studs.", has static scenery; Object -> stool "stool" with name "dusty" "kitchen" "stool" "bench", description [; print "The white kitchen stool is a few feet tall and dusty"; if (self hasnt general) {print ", but one leg "; if (broken_leg notin player or location) "is missing."; else "has broken off."; } else ". One leg has been glued on but it is sturdy."; ], short_name [; if (self has general) {if (action==##Inv or ##InvTall or ##InvWide) {print "stool with a glued-on broken leg"; rtrue;} else {print "stool"; rtrue;} } else {print "stool missing one leg"; rtrue;} ], before [; Tie: if (self has general) "The missing leg is already attached."; if (broken_leg notin player or location) "The missing leg is nowhere to be found."; if (glue notin player) "You have no glue to fasten the leg with."; remove broken_leg; give self general; "You glue the missing leg to the stool."; Enter: if (self hasnt general) "Can't stand on a stool with one leg missing."; ], weight 24, has enterable supporter; Key -> padlock_key "shed key" with parse_name [w i p; w=NextWord(); while(w=='pad' or 'lock' or 'padlock' or 'shed' or 'key') {i++; if (w=='key') p=1; w=NextWord();} if (p==1) return i; return 0; ], weight 2, description "The key has the label SHED attached."; !-----------------------------Living Room------------------------------------- Object breeze "breeze" with name "breeze" "wind", before [; Examine: "The breeze blows around things."; Touch: "The wind blows at your skin and blows your hair."; Take: "You can feel it, but it is the air."; ], has scenery; Class TVshow with before [; Take, Pull, Push, Remove, Turn: "It is just a TV show. You can't take TV shows."; Listen: <>; Taste: "You can't taste TV!"; Smell: "You can't smell TV!"; Touch: "You can't touch TV!"; Eat: "You can't eat TV!"; Drink: "You can't drink TV!"; ], found_in [; if (self notin nothing) {if (TestScope(television)==1) rtrue; } rfalse; ], has scenery; TVshow baseball_game "baseball game" with name "baseball" "game" "match", teamA "Philadelphia", teamB "Atlanta", description [l; print "This is the ", (string) self.teamA, " vs. ", (string) self.teamB, " baseball game. "; print "It is in the "; if (self.up_to_bat==2) print "bottom"; else print "top"; print " of the "; print (ordinal) self.inning; print " and the score is "; if (self.scoreAself.scoreB) l=0; switch(l) {2: print self.scoreB, "-", self.scoreA, " for ", (string) self.teamA; 1: print "tied at ", self.scoreA; 0: print self.scoreA, "-", self.scoreB, " for ", (string) self.teamB; } "."; ], daemon [t s l a gw; self.itime++; self.gc=0; if ((self.up_to_bat==1 && random(8)==1) || (self.up_to_bat==2 && random(13)==1)) {t=self.up_to_bat; if (random(51)<=50) s=1; else s=4; if (t==1) self.scoreA=self.scoreA+s; else self.scoreB=self.scoreB+s; if (self.up_to_bat==2 && self.inning>=9 && (self.scoreB>self.scoreA || self.scoreA>self.scoreB)) gw=1; } if (self.itime>=5 || gw==1) {self.up_to_bat++; if (self.up_to_bat==3) {self.up_to_bat=1; self.inning++;} if (self.inning==9 && self.up_to_bat==2 && self.scoreB>self.scoreA) self.inning=10; self.itime=0; if (self.inning>=10) {if (self.scoreA==self.scoreB) jump notwon; self.inning=0; if (action==##Examine && noun==self) { print "^The game is over, with a final score of "; if (self.scoreAself.scoreB) l=0; switch(l) {2: print self.scoreB, "-", self.scoreA, " for ", (string) self.teamA; 1: print "a ", self.scoreA, " tie"; 0: print self.scoreA, "-", self.scoreB, " for ", (string) self.teamB; } print ".^";} self.gc=1; if (random(2)==1) a=1; else a=0; if (a==1) {.nlstart; self.teamA=random("Atlanta", "New York", "Florida", "Montreal", "Philadelphia", "St. Louis", "Cincinatti", "Pittsburg", "Milwalkee", "Chicago", "Houston", "Arizona", "Colorado", "Los Angeles", "San Fransico", "San Diego"); self.teamB=random("Atlanta", "New York", "Florida", "Montreal", "Philadelphia", "St. Louis", "Cincinatti", "Pittsburg", "Milwalkee", "Chicago", "Houston", "Arizona", "Colorado", "Los Angeles", "San Fransico", "San Diego"); if (self.teamA==self.teamB) jump nlstart; } if (a==0) {.alstart; self.teamA=random("Toronto", "New York", "Boston", "Baltimore", "Tampa Bay", "Chicago", "Cleavland", "Kansas City", "Detroit", "Minnesota", "Seattle", "Oakland", "Anaheim", "Texas"); self.teamB=random("Toronto", "New York", "Boston", "Baltimore", "Tampa Bay", "Chicago", "Cleavland", "Kansas City", "Detroit", "Minnesota", "Seattle", "Oakland", "Anaheim", "Texas"); if (self.teamA==self.teamB) jump alstart; } if (action==##Examine && noun==self) print "The ", (string) self.teamA, " vs. ", (string) self.teamB, " baseball game comes on.^"; self.scoreA=0; self.scoreB=0; self.itime=0; self.inning=1; self.up_to_bat=1; } .notwon; if (action==##Examine && noun==self && self.gc==0) {print "^It is now the "; if (self.up_to_bat==1) print "top"; else print "bottom"; print " of the ", (ordinal) self.inning, ".^"; } } if (TestScope(self)==0) rfalse; if (action~=##Examine || noun~=self) rfalse; ], up_to_bat 1, gc 0, itime 0, inning 1, scoreA 0, scoreB 0; TVshow basketball_game "basketball game" with parse_name [w i a; w=NextWord(); while (w=='basketball' or 'game') {i++; if (w=='game') a=1; w=NextWord();} if (a==1) return i; return 0; ], teamA "Pacers", teamB "Lakers", status 1, description [l; print "This is the ", (string) self.teamA, " vs. ", (string) self.teamB, " basketball game. "; print "It is in the "; if (self.tquarter<=4) print (ordinal) self.tquarter, " quarter"; if (self.tquarter>4) print (ordinal) self.tquarter-4, " overtime period"; print " and the score is "; if (self.scoreAself.scoreB) l=0; switch(l) {2: print self.scoreB, "-", self.scoreA, " for ", (string) self.teamA; 1: print "tied at ", self.scoreA; 0: print self.scoreA, "-", self.scoreB, " for ", (string) self.teamB; } print ". "; l=self.itime*30; print "There is ", l/60, ":", (l%60)/10, l%10; " time on the clock."; ], daemon [t s l; self.itime--; self.gc=0; s=random(0,0,0,0,1,1,1,1,1,2,2); t=random(0,0,0,0,1,1,1,1,1,2,2); self.scoreA=self.scoreA+s; self.scoreB=self.scoreB+t; if (self.itime==0) {self.tquarter++; if (self.tquarter<=4) self.itime=24; else self.itime=10; if (self.tquarter>4) {if (self.scoreA==self.scoreB) jump notwon; if (action==##Examine && noun==self) { print "^The game is over, with a final score of "; if (self.scoreAself.scoreB) l=0; switch(l) {2: print self.scoreB, "-", self.scoreA, " for ", (string) self.teamA; 1: print "a ", self.scoreA, " tie"; 0: print self.scoreA, "-", self.scoreB, " for ", (string) self.teamB; } print ".^Paid programming comes on.^"; } self.gc=1; self.status=0; remove self; move infomercial_tv to location; StopDaemon(self); } .notwon; if (action==##Examine && noun==self && self.gc==0) {if (self.tquarter<=4) {print "^It is now the "; print (ordinal) self.tquarter, " quarter.^";} if (self.tquarter>4) {print "^It is now the ", (ordinal) self.tquarter-4, " overtime period.^";} } } if (TestScope(self)==0) rfalse; if (action~=##Examine || noun~=self) rfalse; ], gc 0, itime 24, tquarter 1, scoreA 0, scoreB 0; TVshow global_news "Global news" with name "global" "news" "cast" "newscast" "broadcast" "morning" "early" "show" "global^s", description [; switch(random(10)) {1: "The Global newscast is showing something about the law."; 2: "The Global newscast is talking about health."; 3: "The Global news is showing a police report."; 4: "The early morning news is showing a flood."; 5: "The morning newscast is talking about Blue Jays baseball."; 6: "The news is hung up with a weather report, 26 degrees and sunny today."; 7: "The newscast is showing the birth of babies."; 8: "Global's news is talking about construction in the Greater Toronto Area."; 9: "The major money indeces are being shown on the news."; 10: "Sports scores are being shown on the newscast, mainly of baseball."; } ]; TVshow weather_forecast "weather forecast" with name "weather" "forecast" "weather" "man" "person" "woman" "lady" "weatherman" "weatherperson" "weatherwoman", before [; Ask, Answer, Tell: "Why, do you think you can talk to an actor in a TV?"; ], orders [; "Why, do you think you can talk to an actor in a TV?"; ], description "The weather forecast is 26 degrees for today, sunny.", has animate neuter; TVshow friends_tv "Friends" with name "friends" "comedy" "funny" "show" "teen" "teenage" "teenaged" "teenager" "teenagers", description "You can't understand the jokes."; TVshow arthur_tv "Arthur" with name "arthur" "kids" "childrens" "kid^s" "children^s" "show", description "Arthur is way way too young for me."; TVshow infomercial_tv "infomercial" with name "info" "mercial" "infomercial" "commercial" "ad" "advertisement" "paid" "programming" "taebo" "fitness" "exercise" "program", description "They just want you to buy this stupid Taebo fitness program."; Room Living_Room "Living Room" with description "This living room is painted a nice yellow colour. An oriental rug sits here on the floor. A double-hung window is beside the blue sofa. The hall is to the east.", e_to Front_Hall, before [; Examine: if (noun==d_obj) "Maple hardwood."; ], has light outdoors outlets; Lamp -> living_room_lamp "floor lamp" with name "floor" "lamp" "light" "formal", description "The formal lamp sits on the floor.", before [; Examine: print (string) self.description, " It is "; if (self has plugged) print "plugged"; else print "unplugged"; print ", and switched "; if (self has on) print "on"; else print "off"; print "."; ""; Take, Push, Pull, Turn: "Too heavy!"; ], weight 60; Object -> double_hung_window "double hung window" with name "double" "hung" "window" "double-hung" "large" "big", description [; if (self has open) {print "The double-hung window stands open."; if (location==living_room) " A breeze blows through it."; } else print "The double-hung window is closed."; " It is quite large and it can be opened."; ], describe [; if (self has open) {if (location==living_room) "^The double-hung window stands open, a breeze blowing through it."; else "^The double-hung window stands open."; } else "^The double-hung window is shut."; ], before [; Attack: if (self hasnt open) "You never have the temper to break the glass."; else "Are you crazy? The window is already open!"; Search: "It is sunny outside."; Enter: if (self hasnt open) "The window isn't open!"; if (player in Backyard) {PlayerTo(Living_room); "You land on the hardwood.";} if (player notin window_sill) "You aren't on the window sill."; PlayerTo(Backyard); "You land on the grass."; Pull: "Pull? Surely you're joking."; Push: if (self has open) <>; else <>; Turn: "Turn? Surely you're joking."; Take: "Wrecking the window would do no good."; ], after [; Open: move breeze to living_room; Close: remove breeze; ], found_in Living_Room Backyard, has openable static enterable; Object -> window_sill "window sill" with parse_name [ w i p; w=NextWord(); while (w=='window' or 'sill' or 'ledge') {i++; if (w=='sill' or 'ledge') p=1; w=NextWord();} if (p==1) return i; return 0; ], description "White window sill.", before [; Climb: <>; Descend: <>; Enter: if (player notin stool) "Can't climb the window from the floor!"; ], has enterable static supporter; Chair -> living_room_sofa "blue sofa" with name "blue" "sofa" "couch", description "The blue sofa is a nice sofa to sit on. It is quite large and pushed against one wall. The sofa is on a frame with castors.", before [; Take: "It is far too heavy!"; Push: if (player in self) "Get off the sofa first."; "You push the sofa."; PushDir: if (player in self) "But you're on the sofa!"; AllowPushDir(); rtrue; Pull: "Better push than pull."; ], after [; PushDir: "It is heavy but you manage to push it on the castors."; ], has ~static; Object -> cabinet "built-in cabinet", with name "built-in" "built" "in" "cabinet" "cupboard", description [; print "The cabinet is built in to the wall. There is a space for a TV and a cupboard in the cabinet. "; if (self has open) "It is currently open."; else "It is currently closed."; ], before [; Take: "It is in the wall."; Pull: if (self hasnt open) <>; else "The cabinet door swings out but it is already open."; Push: if (self has open) <>; else "The cabinet door swings out and it is currently closed."; ], has openable container static; Lamp -> -> dance_light "dance light" with name "dance" "funky" "light" "dancing" "robotic" "knob" "handle", description [; print "The dance light has an on-off switch on it. On the back is a knob for turning the aim of the light and a handle to pull or push turning the rotation of the light on and off. "; if (self.handle_on==true) print "The handle is pulled out. "; else print "The handle is pushed in. "; if (self.knob_up==true) print "The knob is turned upward. "; else print "The knob is turned downward. "; if (self in player) "You are holding the dance light. It is unplugged and off."; if (self has plugged) print "The dance light is plugged in. "; else print "The dance light isn't plugged in. "; if (self hasnt on) print "The dance light is on the floor, off."; else {if (self.handle_on==true) {print "The dance light sits here, rotating."; rtrue;} else {if (self.knob_up) {print "The light shines upward."; rtrue;} else {print "The light shines downward"; if (self in Front_Hall) print " into the basement"; print "."; rtrue;} } } ], handle_on true, knob_up true, describe [; print "^"; if (self hasnt on) "The light sits here on the floor, off."; else {if (self.handle_on==true) "The light sits here, rotating."; else {if (self.knob_up==true) "The light shines upward."; else {print "The light shines downward"; if (self in Front_hall) ", into the basement."; ".";}} } ], before [; Examine: self.description(); ""; Push: if (self.handle_on==false) "The handle is already pushed in."; self.handle_on=false; print "You push the handle.^"; if (self has on && self.knob_up==false && self in Front_Hall) {give Basement light; "The basement illuminates up with light!";} rtrue; Pull: if (self.handle_on==true) "The handle is already pulled out."; self.handle_on=true; print "You pull the handle.^"; if (self has on && self.knob_up==false && self in Front_Hall) {give Basement ~light; "The light rotates again and makes the basement dark.";} rtrue; Turn: if (self.knob_up==true) {self.knob_up=false; print "You turn the knob downwards.^"; if (self has on && self.handle_on==false && self in Front_Hall) {give Basement light; "The basement illuminates up with light!";} } else {self.knob_up=true; print "You turn the knob upwards.^"; if (self has on && self.handle_on==false && self in Front_Hall) {give Basement ~light; "The light shines upwards and makes the basement dark."; } } rtrue; ], after [; Take: if (self has on && self.handle_on==false && self.knob_up==false && self in Front_Hall) {give Basement ~light; "The beam of light goes out of sight as you take the light.";} SwitchOn: if (self.handle_on==false && self.knob_up==false && self in Front_Hall) {give Basement light; "The beam of light illuminates the basement!";} SwitchOff: if (self.handle_on==false && self.knob_up==false && self in Front_Hall) {give Basement ~light; "The basement is once again dark as the light turns off.";} ], weight 50; Object -> -> broken_leg "broken leg" with name "broken" "missing" "leg", description "The broken leg seems to be part of a stool.", before [; Tie: if (stool notin player or location) "The stool is nowhere to be found."; if (glue notin player) "You have no glue to fasten the leg with."; remove self; give stool general; "You glue the missing leg to the stool."; ]; Object -> -> glue "bottle of Super Glue" with name "bottle" "of" "strong" "super" "glue" "crazy" "super-glue" "crazy-glue", description "The bottle of Super Glue says that the glue dries in one minute.", before [; Open: "I'll open it when I need to."; Close: "It is already closed."; ]; Electrical -> television "Panasonic television" with name "television" "tv" "panasonic", number 4, source 0, after [; SwitchOn: give self light; if (self.number==6) move baseball_game to location; if (self.number==5 && basketball_game.status==1) move basketball_game to location; if (self.number==5 && basketball_game.status==0) move infomercial_tv to location; if (self.number==1) move global_news to location; if (self.number==2) move weather_forecast to location; if (self.number==3) move friends_tv to location; if (self.number==4) move arthur_tv to location; print "You turn the television on. "; self.source=1; <>; SwitchOff: give self ~light; remove baseball_game; PushDir: if (self has plugged) ; ], before [w; Examine: if (self.source==0) {print "The Panasonic television is "; if (self has plugged) print "plugged in. "; else print "not plugged in. "; } if (self has on) {if (self.source==0) print "It is showing "; else print "The Panasonic television is now showing "; switch(self.number) {1: print "the Global news."; 2: print "the weather forecast. The weatherman says it will be sunny with a temperature of 26 degrees Celsius this afternoon."; 3: print "Friends."; 4: print "Arthur."; 5: if (basketball_game.status==1) print "the Pacers vs. Lakers basketball game."; else print "an infomercial."; 6: print "the "; print (string) baseball_game.teamA; print " vs. "; print (string) baseball_game.teamB; print " baseball game."; } if (self.source~=2) " It is tuned to channel ", (number) self.number, "."; ""; } else {self.source=0; "It is currently off.";} self.source=0; rtrue; SetTo: if (self hasnt on) "The controls don't work when the TV is off."; w=second; if (w<=6 && w > 0) {self.number=second; print "You set the TV to channel ", w, ". "; self.source=2; if (self.number~=6) remove baseball_game; if (self.number~=5) {remove basketball_game; remove infomercial_tv;} if (self.number~=1) remove global_news; if (self.number~=2) remove weather_forecast; if (self.number~=3) remove friends_tv; if (self.number~=4) remove arthur_tv; if (self.number==6) move baseball_game to location; if (self.number==5 && basketball_game.status==1) {move basketball_game to location; remove infomercial_tv;} if (self.number==5 && basketball_game.status==0) {move infomercial_tv to location; remove basketball_game;} if (self.number==1) move global_news to location; if (self.number==2) move weather_forecast to location; if (self.number==3) move friends_tv to location; if (self.number==4) move arthur_tv to location; <>;} else "The TV can be set to channels from one to six only."; SetToTopic: wn=consult_from; .settotopicjump; w=TryNumber(wn); if (w==-1000) {wn++; jump settotopicjump;} <>; Turn: if (self hasnt on) "The controls don't work when the TV is off."; self.number++; if (self.number>6) self.number=1; self.source=1; if (self.number~=6) remove baseball_game; if (self.number~=5) {remove basketball_game; remove infomercial_tv;} if (self.number~=1) remove global_news; if (self.number~=2) remove weather_forecast; if (self.number~=3) remove friends_tv; if (self.number~=4) remove arthur_tv; if (self.number==6) move baseball_game to location; if (self.number==5 && basketball_game.status==1) {move basketball_game to location; remove infomercial_tv;} if (self.number==5 && basketball_game.status==0) {move infomercial_tv to location; remove basketball_game;} if (self.number==1) move global_news to location; if (self.number==2) move weather_forecast to location; if (self.number==3) move friends_tv to location; if (self.number==4) move arthur_tv to location; <>; Rub: "You'd hardly call the TV dirty."; PushDir: AllowPushDir(); if (self hasnt plugged) {; ;} rtrue; ], describe [; print "^"; <>; ], weight 100, has switchable electric; !----------------------------The Back Yard------------------------------------ Room Backyard "Backyard" with description "This large backyard has many trees, lots of grass, and lots of shade. A patio is in one shady corner of the yard. The windows are close to the ground, and the first floor is quite low relative to the ground. In an oddly shaped corner, a window to the living room leads east. A shed lies to the north end of the yard, protected by a padlock.", u_to [; <>; ], n_to shed_door, before [; Examine: if (noun==d_obj) "Grass."; if (noun==u_obj) "Blue sky."; ], has light outdoors outlets; Lamp -> garden_light_circuit "garden light circuit" with name "noma" "garden" "light" "lights" "circuit" "long" "cord" "of", description "The circuit of Noma garden lights is long, extending around the perimeter of the garden and around the patio. The cord has a plug at the end.", describe [; print "^"; <>; ], before [; Examine: print (string) self.description; if (self has plugged) print " It is plugged in, "; else print " It is unplugged, "; if (self has plugged) "and on."; else "and off."; Take: "Taking the cord of garden lights would ruin the lawn!"; ]; Object -> lawn "lawn" with name "lawn" "grass", description "Nice and green.", before [; Enter: "You stand on the lawn."; ], has enterable scenery supporter; Object -> patio "patio" with name "patio" "deck" "paving" "stone" "stones", description "The patio is made of paving stones.", before [; Enter: "You stand on the patio."; ], has enterable scenery supporter; Object -> mud "mud" with name "mud" "dirt" "sand" "earth" "dried" "wetted", description [; if (self has general) {print "Some dry mud has been wetted again here."; if (shovel in self) " A shovel is stuck in the mud."; "";} "Mud is piled here, and a shovel is stuck in it."; ], before [; Take, Pull, Push, Turn: "There's way too much mud there, and you don't want to get your clothes dirty."; Receive: if (self hasnt general) "The mud is too hard!"; "Not now, it'll dry up."; ], describe [; if (self has general) "Wetted mud sits here."; "Dried-up mud is here, and a shovel is stuck in it."; ], has static container open; Object -> -> shovel "shovel" with name "shovel" "spade" "garden" "long" "large" "big", description "This long shovel looks like it will remove loose objects.", weight 15, before [; Take: if (self has general) "You can't get the shovel because of dried mud here."; Pull: <>; Push, Turn: if (self has general) "Dried mud prevents you from moving the shovel."; "Very useful."; ], has general; Object -> oak_trees "oak trees" with name "oak" "tree" "trees", description "The oak trees are really tall. Old Christmas lights still rest on them, despite the fact that it is June. Leaves are scattered all over the tree.", before [; Climb: "Those trees are unclimable."; Descend: "You're already at the bottom of the trees."; Push, Pull, Turn, Take: "It is attached to the ground!"; ], react_after [; Drop: "A leaf flutters as you drop ", (the) noun, "."; ], describe "^The oak trees stand here.", each_turn [; if (random(4)==1) {switch(random(3)) {1: "The oak trees sway in the wind."; 2: "The leaves of the trees flutter slightly from the wind."; 3: "The trees sway momentarily from a gust of wind."; } } ], has static; Class Leaf(MAX_LEAVES) with name "leaf" "leaves//p", short_name "leaf", plural "leaves", parse_name [; if (parser_action==##TheSame) {if (parser_one ofclass Leaf && parser_two ofclass Leaf) return -1; return -2; } return -1; ], description "The leaf is large and green.", before [; Drop: if (location==Backyard) {remove self; "The leaf falls back and you can't see it anymore.";} ]; Object -> bunch_of_leaves "bunch of leaves" with name "bunch" "pile" "of" "leaves", description "The leaves are scattered among the grass.", describe "^Leaves are scattered among the grass.", before [; Search: <>; ], has scenery; Object -> dummy_leaf "leaf" with name "leaf", before [i; Take: i=Leaf.create(); if (i==0) "Looking in the grass, you can't find any more leaves."; PronounNotice(i); move i to location; keep_silent=1; ; keep_silent=0; print "Looking in the grass, you find a leaf."; if (i in player) " You pick it up."; else ""; ], has scenery; Object -> xmas_lights "old Christmas lights" with parse_name [w i p c; w=NextWord(); while (w=='old' or 'christmas' or 'xmas' or 'light' or 'lights') {i++; if (w=='light' or 'lights') p=1; if (w=='christmas' or 'xmas') c=1; w=NextWord();} if (p==1 && c==1) return i; return 0; ], description "The Christmas lights hang in the tree, with no power source.", before [; Take, Remove: "Better hire a forklift to take those down."; ], has scenery; Object -> shed_door "shed door" with description "The wrecky old shed door is protected by a padlock. The shed is old and jam-packed with junk.", when_open [; if (location==Backyard) "The door leading into the shed is open."; "The door leading out of the shed is open."; ], when_closed [; if (location==Backyard) "The door to the shed is shut."; "The door out of the shed is shut."; ], name "shed" "door" "old" "pad" "lock" "padlock", door_to [; if (location==Backyard) return Inside_Shed; return Backyard; ], door_dir [; if (location==Backyard) return n_to; return s_to; ], with_key padlock_key, found_in Backyard Inside_Shed, before [; Take: "Don't mess with the hinges."; Pull, Push: if (self has open) <>; else <>; Turn: if (self has open) <>; else <>; ], has static door openable lockable locked; !--------------------------Inside the Shed------------------------------------ Room Inside_Shed "Inside the Shed" with description "In the shed here is a heap of junk. The shed is only slightly illuminated by the light outside. You have claustrophobia in here. To the south is the backyard.", s_to shed_door, has light; Object -> periodic_table "periodic table" with name "periodic" "atom" "chemistry" "chemical" "table", description "The periodic table has entries for the standard elements.", before [w x y; Consult: wn=consult_from; w=NextWord(); x=NextWord(); if (w=='element' or 'atom') {w=x; x=NextWord();} wn=wn-2; y=TryNumber(wn); if (w=='hydrogen' or #n$h || y==1) "1 - Hydrogen H (gas) ^Atomic Weight: 1.00794 ^Melting point: -259.34 C ^Boiling point: -252.88 C"; if (w=='helium' or 'he' || y==2) "2 - Helium He (gas) ^Atomic Weight: 4.002602 ^Melting point: -272.375 C ^Boiling point: -268.928 C"; if (w=='lithium' or 'li' || y==3) "3 - Lithium Li (solid) ^Atomic Weight: 6.941 ^Melting point: 180.6 C ^Boiling point: 1342 C"; if (w=='beryllium' or 'be' || y==4) "4 - Beryllium Be (solid) ^Atomic weight: 9.012182 ^Melting point: 1289 C ^Boiling point: 2472 C"; if (w=='boron' or #n$b || y==5) "5 - Boron B (solid) ^Atomic weight: 10.811 ^Melting point: 2092 C ^Boiling point: 4002 C"; if (w=='carbon' or #n$c || y==6) "6 - Carbon C (solid) ^Atomic weight: 12.011 ^Melting point: 3826 C ^Boiling point: 3827 C"; if (w=='nitrogen' or #n$n || y==7) "7 - Nitrogen N (gas) ^Atomic weight: 14.00674 ^Melting point: -210.0042 C ^Boiling point: -195.80 C"; if (w=='oxygen' or #n$o || y==8) "8 - Oxygen O (gas) ^Atomic weight: 15.9994 ^Melting point: -218.789 C ^Boiling point: -182.97 C"; if (w=='fluorine' or #n$f || y==9) "9 - Fluorine F (gas) ^Atomic weight: 18.9984032 ^Melting point: -219.67 C ^Boiling point: -188.20 C"; if (w=='neon' or 'ne' || y==10) "10 - Neon Ne (gas) ^Atomic weight: 20.1797 ^Melting point: -248.567 C ^Boiling point: -246.054 C"; if (w=='sodium' or 'na' || y==11) "11 - Sodium Na (solid) ^Atomic weight: 22.989768 ^Melting point: 97.8 C ^Boiling point: 883 C"; ], weight 2; Object -> cashbox "cashbox" with name "cash" "box" "cashbox", description [; if (self has open) "The cashbox is open. It contains slots for each type of coin."; else "The metal cashbox is closed."; ], after [; LetGo: "You take ", (the) noun, " out of the cashbox."; Take: "The cashbox is a little heavy, but you take it."; ], weight 14, has container openable; CompactDisc -> rap_cd "Rap CD" with name "rap" "will" "smith", description "The CD contains some of Will Smith's rap music. Simon Crew likes this.", has; Object -> mastercard "Mastercard" with name "mastercard" "master" "credit" "card", description "The card has a credit card number and expiry date on it (none of your business.) It is a Mastercard and it belongs to Jamie Mourning (you)."; Object -> passport "Canadian passport" with name "pass" "port" "passport" "id" "identification" "canadian" "canada" "your", description "The passport is Canadian and it belongs to you.", before [w x y z; Open, Close: "It isn't that thick a book."; Consult: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); switch(w) {'name': "The name is Jamie Mourning."; 'birthday', 'birthdate', 'birth': "The birthday is March 5, 1985."; 'birthplace', 'place': "You were born in Toronto, Ontario, Canada."; 'photograph': "The photograph looks crummy, but it satisfied the government agency which produces passports."; 'expiry': "The expiry date is June 30, 2002."; } ]; !--------------------------Outside Front Door--------------------------------- Room outside_house "Outside the Front Door" with name "infill" "semi" "detached" "semi-detached" "house" "front" "lawn" "lowther" "street" "st", with description "This is a small city front lawn, about all you get in the Annex area of Toronto. It is in front of a small residental street, Lowther Street. The house has a small frontage and is an infill, semi-detached house. You can go north into the house, or west or east on Lowther Street.", n_to Front_Door, w_to Lowther_Spadina, in_to Front_Door, e_to "You don't need to go east on Lowther St.", has outdoors light; Object -> streetlight "streetlight" with name "street" "light" "streetlight", describe [; if (location==outside_house or lowther_spadina or bloor_spadina_north or bloor_spadina_south or rosedale_streetlevel) "^A streetlight sticks out of the ground here."; rtrue; ], description "Just your usual Toronto streetlight.", before [; Take, Push, Pull, Turn: "The streetlight is stuck in the ground."; ], found_in [; if (location==outside_house or lowther_spadina or bloor_spadina_north or bloor_spadina_south or rosedale_streetlevel) rtrue; ], has light static; Room Front_Door "door" with description "A solid front door, painted white.", when_open [; if (location==outside_house) "The door leading to the house stands open."; "The door leading out of the house is open."; ], when_closed [; if (location==outside_house) "The door to the house is shut."; "The door out of the house is currently closed."; ], name "door" "front" "white", door_to [; if (location==outside_house) return front_hall; return outside_house; ], door_dir [; if (location==outside_house) return n_to; return s_to; ], with_key front_door_key, found_in outside_house front_hall, before [; Take: "The hinges aren't broken or anything."; Push, Pull, Turn: if (self has open) <>; else <>; Open, Close, Unlock, Lock: if (waterbottle.thirsty==1) "Too thirsty to do much. Need water."; ], has static door openable lockable locked; !--------------------------Corner of Spadina and Lowther-------------------------- Room Lowther_Spadina "Corner of Lowther and Spadina" with description "The corner of a major street, Spadina Ave., and a residental street, Lowther Street. A street sign sticks out of the ground. A block of concrete in the sidewalk is quite loose, and it looks like it would come out easily with the help of a shovel. To the south is the corner of Bloor and Spadina, and you can see a traffic light there. To the east is the front of your house.", e_to outside_house, s_to Bloor_Spadina_North, n_to "Never mind trying to follow Spadina. You don't need to.", w_to "There is nothing but houses on that side of the street.", has outdoors light; Object -> street_sign "street sign" with name 'street' 'sign', description "A street sign with the words ~SPADINA AVE~ and ~LOWTHER ST~ on it.", has static scenery; Object -> block_of_concrete "loose block of concrete from a sidewalk" with name "loose" "block" "of" "concrete" "from" "a" "sidewalk", description "A block of concrete from a sidewalk.", before [; Dig: if (shovel notin player) "You have nothing to dig with."; give self general; print "You dig underneath the block of concrete"; if (sign has general) print ", but find nothing."; else print ", revealing a crossing guard's stop sign.^"; <>; LookUnder: if (self hasnt general) "You can't manage to lift the block."; if (sign hasnt general) {give sign general; move sign to location; keep_silent=1; ; keep_silent=0; "You pick up the crossing guard sign."; } else rfalse; Take, Push, Pull, Turn: if (self hasnt general) "You can't manage lifting the block with your bare hands."; ], weight 60; !---------------------Corner of Bloor and Spadina: North Side--------------------- Room Bloor_Spadina_North "Corner of Bloor and Spadina: North Side" with description "This is the corner of Bloor and Spadina. Cars pass along Bloor Street at a steady pace and you can hear the constant honking of car horns. You can cross the street to the south, or go north to the corner of Lowther and Spadina.", n_to Lowther_Spadina, s_to [; if (traffic_light has general || sign in player) {if (traffic_light has general) print "You cross the street.^"; else {print "You cross the street just as the traffic light comes back on.^"; give traffic_light general;} return Bloor_Spadina_South;} else "The traffic is way too busy to cross with that light not working."; ], w_to "There is nothing but shops and houses to the west on this street.", e_to "There is nothing but shops and houses to the west on this street.", has outdoors light; Object -> traffic_light "traffic light" with name "traffic" "light", description [; print "Looks like any other"; if (self has general) "."; else ", but it is not working."; ], describe [; if (self has general) "^A traffic light is here."; else "^The traffic light is not working."; ], found_in Bloor_Spadina_North Bloor_Spadina_South, has static; Object -> cars "cars" with name "cars" "trucks" "taxis" "minivans" "suvs" "autos" "automobiles" "vehicles", description "Not a pretty sight.", found_in Bloor_Spadina_North Bloor_Spadina_South, before [; Listen: "Beep! Beep! Car horns sound."; ], react_before [; Listen: if (noun==0) <>; ], has scenery; !---------------------Corner of Bloor and Spadina: South Side--------------------- Room Bloor_Spadina_South "Corner of Bloor and Spadina: South Side" with description "This is the corner of Bloor and Spadina. Cars pass along Bloor Street at a steady pace and you can hear the constant honking of car horns. You can cross the street to the north or go down the staircase to the subway station.", n_to Bloor_Spadina_North, w_to "There is nothing but shops and houses to the west on this street.", e_to "There is nothing but shops and houses to the west on this street.", s_to "You see a lot of clothing stores and tourist shops, but nothing useful.", d_to Spadina_Subway_OTG, has outdoors light; !-------------------Spadina Subway Station, outside ticket gates------------------ Room Spadina_Subway_OTG "Spadina Subway Station, outside ticket gates", with description "You are outside the ticket gates of the Spadina subway station. Steps lead up to the street level and the ticket gates are to the east.", u_to Bloor_Spadina_South, e_to [; if (ObjectOfClassIn(Token, player)==1) {remove SomethingClassIn(Token, player); print "You enter the ticket gates, dropping a token into the slot.^"; return Spadina_Subway_ITG;} else {"You don't have a token to spare.";} ], has light; Object -> ticket_gates "ticket gates" with name "ticket" "gates" "turnstiles" "slot" "gate", description "Turnstiles with a slot to put a token into.", before [; Receive: if (noun ofclass Token) <>; else "That won't fit."; JumpOver: if (location==Spadina_Subway_OTG) {"You must pay to ride the subway.";} else {"Pointless.";} Enter: if (location==Spadina_Subway_OTG) <>; else <>; ], found_in spadina_subway_otg spadina_subway_itg, has pluralname static; !-------------------Spadina Subway Station, inside ticket gates------------------- Room Spadina_Subway_ITG "Spadina Subway Station, inside ticket gates" with description "This is the Spadina subway station, inside the ticket gates. You can go down to the platform or west back out of the ticket gates.", w_to Spadina_Subway_OTG, d_to Spadina_Subway_Platform, has light; !--------------------------Spadina Subway Station, platform----------------------- Room Spadina_Subway_Platform "Spadina Subway Station, platform" with name "platform" "sign" "signs" "brown" "tile" "mosaic" "stairs" "steps" "staircase", with description "Here is the platform of the Spadina subway station. Stairs lead up to above the platform. There is a brown tile mosaic on the walls. Signs on the walls say ~Spadina~ everywhere. You are on the Yonge-University subway line.", u_to Spadina_Subway_ITG, station_name "Spadina", cant_go "There is no way to go except up.", has light; !--------------------------Union Subway Station, platform----------------------- Room Union_Subway_Platform "Union Subway Station, platform" with name "platform" "ads" "ad" "advertisement" "stairs" "escalator" "steps" "staircase", with description "This is the platform of the Union subway station. An escalator leads up to above the platform. There are advertisements for among other things, ~METROPASS FOR LESS ($81/month)~ and the station looks like a public washroom. The station has very narrow platforms.", cant_go "There is no way to go except up.", u_to Union_Subway_ITG, station_name "Union", has light; !-------------------Union Subway Station, outside ticket gates------------------ Room Union_Subway_OTG "Union Subway Station, outside ticket gates", with description "You are outside the ticket gates of the Union subway station. Steps lead up to the street level and the ticket gates are to the east.", u_to Front_Street, e_to [; if (ObjectOfClassIn(Token, player)==1) {remove SomethingClassIn(Token, player); print "You enter the ticket gates, dropping a token into the slot.^"; return Union_Subway_ITG;} else {"You don't have a token to spare.";} ], has light; Object -> ticket_gates3 "ticket gates" with name "ticket" "gates" "turnstiles" "slot" "gate", description "Turnstiles with a slot to put a token into.", before [; Receive: if (noun ofclass Token) <>; else "That won't fit."; JumpOver: if (location==Union_Subway_OTG) {"You must pay to ride the subway.";} else {"Pointless.";} Enter: if (location==Union_Subway_OTG) <>; else <>; ], found_in union_subway_otg union_subway_itg, has pluralname static; !-------------------Union Subway Station, inside ticket gates------------------- Room Union_Subway_ITG "Union Subway Station, inside ticket gates" with description "This is the Union subway station, inside the ticket gates. You can go down to the platform or west back out of the ticket gates.", w_to Union_Subway_OTG, d_to Union_Subway_Platform, has light; !----------------------------Front Street--------------------------------------- Room Front_Street "Front Street" with description "This is Front Street. The street continues east and west. The train station stands behind you and the CN tower and Skydome stand south of the train tracks. The subway station is down the steps. Skyscrapers line the streets.", d_to Union_Subway_OTG, e_to "You don't want to get lost on Front Street.", w_to "You don't want to get lost on Front Street.", s_to "There's nothing interesting in the train station.", n_to "You don't need to go into the buildings that line the street.", has light; Class SkylineScenery with before [; Take, Pull, Push, Turn, Remove: "You can hardly move things in the distance, duh."; Touch: "You can hardly touch things in the distance, duh."; ], has static scenery; Object -> union_steps "stairs" with name "stairs" "stair" "steps" "case" "staircase" "steps" "escalator", found_in Front_Street Union_Subway_OTG, description [; if (location==Front_Street) "Steps lead down into the subway station."; if (location==Union_Subway_OTG) "Steps lead up to the street level."; ], has static scenery; SkylineScenery -> cn_tower "CN Tower" with name "cn" "canadian" "national" "communication" "tower" "observation" "level" "deck" "broadcast", description "Well, the CN tower is really tall, with the observation deck and communication broadcasters."; SkylineScenery -> union_station "Union Station" with name "union" "station" "train" "railway", description "Not a very nice train station.", has proper; SkyLineScenery -> train_tracks "train tracks" with name "train" "tracks" "rails" "rail" "track" "railway" "ugly", description "The train tracks don't look nice at all."; SkyLineScenery -> the_road "road" with name "street" "road" "streets" "front", description "The street looks okay."; SkyLineScenery -> sky_dome "skydome" with name "sky" "dome" "skydome" "stadium" "baseball" "blue" "jays" "jay", description "That is where the Blue Jays play."; SkyLineScenery -> office_towers "office towers" with name "office" "offices" "tower" "towers" "sky" "scrapers" "skyscrapers" "buildings", description "Buildings of banks and companies stand here."; SkyLineScenery -> side_walk "sidewalk" with name "side" "walk" "sidewalk" "walks" "sidewalks" "path" "walkway", description "Sidewalks line both sides of the street."; SkyLineScenery -> ticker_board "ticker board" with name "stock" "market" "ticker" "board" "index", description [; self.print_stock(dow,dow_start,"DOW 30: "); self.print_stock(tse,tse_start,"TSE 300: "); ], print_stock [stock start message t s diff; if (self.stock>self.start) t=1; else t=0; if (self.stock==self.start) t=2; print (string) message; if (pretty_flag) {if (t==1) @set_colour 4 1; else @set_colour 3 1; if (t==2) @set_colour 1 1; } if (self.stock>=10000) {s=0; jump safe;} if (self.stock>=1000) {s=1; jump safe;} if (self.stock>=100) {s=2; jump safe;} if (self.stock>=10) {s=3; jump safe;} s=4; .safe; if (s>0) spaces s; print self.stock; print " "; diff=self.start-self.stock; if (diff<0) diff=-diff; if (diff>=10000) {s=0; jump safe2;} if (diff>=1000) {s=1; jump safe2;} if (diff>=100) {s=2; jump safe2;} if (diff>=10) {s=3; jump safe2;} s=4; .safe2; if (t==2) {print " unch"; jump nodiff;} spaces s; if (t==1) print "+"; else print "-"; print diff; .nodiff; if (pretty_flag) @set_colour 1 1; new_line; ], daemon [; self.dow=self.dow+(random(26))-13; self.tse=self.tse+(random(26))-13; ], dow 10954, dow_start 10954, tse 9913, tse_start 9913, describe "A ticker board is near a bank here, displaying stock prices.", has ~scenery; Object -> taxi "taxi" with name "taxi" "vehicle" "car" "cab" "white" "sign" "royal" "door", description "The taxi is parked here. It is a large white vehicle. A sign on the top says, ROYAL TAXI.", inside_description "Inside the taxi is a steering wheel and a dashboard. The seats are leather and the taxi is well maintained.", react_before [; Go: if (noun==in_obj) <>; ], before [; Attack: "Damaging a car is uncalled for."; Take, Pull, Push, Turn: "The car is too heavy to move."; ], ! each_turn ! [; if (player in outside_airport) {remove self; "^The taxi drives away.";} ! ], describe [; print "A taxi sits parked here. "; if (taxi_driver.sleeping==1) "A taxi driver is taking a nap in the car."; else "A taxi driver is waiting in the car."; ], has enterable transparent locked openable container static; Object -> -> taxi_driver "taxi driver" with parse_name [ w j i; if (self.sleeping==1) j='sleeping'; else j=-1; w=NextWord(); while (w==j or 'taxi') {i++; w=NextWord();} if (w=='driver' or 'cabbie') return i+1; return 0; ], react_before [; Knock: if (noun~=taxi) rfalse; if (airline_ticket notin player) "You don't want to wake up this taxi driver until you know where you're going and you have tickets to go there."; if (pacers_ticket notin player) "What are you supposed to do in Indiana?"; if (self.sleeping==1) {self.sleeping=0; give taxi ~locked; "The taxi driver wakes up, startled. He reaches out and unlocks the door."; } else "~What, do you think I'm asleep?~ says the taxi driver."; Listen: if (noun==0) <>; ], short_name [; if (self.sleeping==1) {print "sleeping taxi driver"; rtrue;} else {print "taxi driver"; rtrue;} ], description [; if (self.sleeping==1) "The taxi driver lies here, sleeping."; else "The taxi driver sits here, waiting."; ], life [w x y z; Ask: if (self.sleeping==1) "The driver just snores."; wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); if (w=='toronto' or 'city' or 'streets' or 'street') {if (x=='raptor' or 'raptors') "~They were out first round.~"; "~Lots of streets around here.~";} if (w=='blue' && x=='jay' or 'jays') "~Yup, I'm watchin' 'em alright.~"; if ((w=='los' && x=='angeles' && y=='laker' or 'lakers') || (w=='laker' or 'lakers')) "~Them Lakers are okay, but 'em Pacers rule more.~"; if (w=='indiana' && x=='pacers' or 'pacer' || w=='pacers' or 'pacer') "~Pacers rule, oh yah!~"; "~Don't know.~"; Answer: if (self.sleeping==1) "The driver just snores."; wn=consult_from; w=NextWord(); if (w=='hi' or 'hallo' or 'hello') "~Hi!~ says the driver, sleepily."; "~Don't know.~"; Tell: if (self.sleeping==1) "The driver just snores."; "~Not interested.~"; Show, Give: if (noun==pacers_ticket) "~Seeing a Pacers game, huh? I like 'em since the Raptors are out.~"; if (noun==airline_ticket) "~Going to Indiana? Cool.~"; if (noun ofclass Quarter or Loonie) "~You'll need more money than that.~"; if (noun ofclass TenDollarBill) "~Ten bucks is the cost to go to the airport.~"; "~What on earth is that?~"; WakeOther: if (self.sleeping==0) "He's awake!"; "You yell and shout, but he doesn't hear you."; ], orders [; if (self.sleeping==1) "The driver just snores."; Question: return DoQuestions(self); GoTo2: if (taxi has open) "~Close the door, then we won't get any accidents.~"; wn=consult_from; switch(NextWord()) {'toronto': if (NextWord()=='airport') {self.airport_code(); rtrue;} "~Why, there must be a thousand streets in this town. And, I have no idea which one you're talking about.~"; 'pearson', 'airport': self.airport_code(); rtrue; default: "~Sorry, I don't know where that is.~"; } ], airport_code [i; if (MoneyInPlayer()==0) "~Why, you don't have a cent!~"; if (ObjectOfClassIn(TenDollarBill, Player)==0) "~Why, you don't have enough money!~"; remove SomethingClassIn(TenDollarBill, Player); deadflag=2; "You have just completed the first part of SCHOOLDAYS. Please mail all bug reports to ."; !move taxi to Outside_Airport; !print "The taxi drives you away along some streets, and you end up at the ! airport. You pay the driver.^"; !PlayerTo(taxi); !for(i=1:i<29:i++) InformLibrary.End_Turn_Sequence(); ], before [; Listen: if (self.sleeping==1) "Snore, snooze, he's just sleeping."; "He's awake, but a bit drowsy."; ], sleeping 1, has animate; Token -> ->; Token -> ->; Token -> ->; !----------------------------Outside Pearson Airport---------------------------- ! !Room Outside_Airport "Outside Pearson Airport" ! with description "This airport is big. You are at the area near the airport ! parking lot. Runways stretch in many directions. Airplanes ! take off all around you and many airplanes are parked outside ! the terminal. The main enterance is to the north.", ! cant_go "Either you run into the parking lot or areas where pedestrians aren't ! allowed. You can only go north inside.", ! n_to ! [; print "You enter through the automatic doors. You can't stand the air ! conditioning in here.^"; return airport_lobby; ! ], ! has light; ! !Object -> automatic_doors "automatic doors" ! with name "auto" "automatic" "door" "doors" "enterance", ! description ! [; print "The automatic doors open and close automatically. They are currently "; ! if (random(3)==1) "open."; else "closed."; ! ], ! before ! [; Take, Pull, Push, Turn: "You'd have to dismantle the door to do that."; ! Open, Close: "It'll open and close automatically."; ! Enter: if (location==airport_lobby) <>; else <>; ! ], ! found_in outside_airport airport_lobby, ! has static pluralname; !--------------------------Airport Lobby---------------------------------------- !Room Airport_Lobby "Airport Lobby" ! with description "This lobby stretches to the west, and the main exit is to the ! south. To the west are the counters where you get boarding ! passes from.", ! s_to ! [; print "You exit through the automatic doors. You escape from the over ! air-conditioned lobby.^"; return outside_airport; ! ], ! w_to Airport_BPA, ! each_turn ! [; if (self.entered_time==-1) {self.entered_time=the_time; ! self.flight_time=the_time+120; ! self.flight_day=dday; ! if (self.flight_time<120) self.flight_tommorow=1;} ! ], ! entered_time -1, ! flight_time -1, ! flight_tommorow 0, ! flight_day -1, ! has light; ! !Object -> flight_board "flight board" ! with name "flight" "departure" "arrival" "board" "clock", ! description ! [; print "Time: "; style bold; self.print_24time(the_time); style roman; ! new_line; new_line; ! style underline; print "Departures"; style roman; ! new_line; new_line; ! print "TO INDIANAPOLIS: "; self.print_24time(airport_lobby.flight_time); ! new_line; ! print "TO MONTREAL: "; self.print_24time(airport_lobby.flight_time+31); ! new_line; ! print "TO VANCOUVER: "; self.print_24time(airport_lobby.flight_time-65); ! new_line; ! print "TO LOS ANGELES: "; self.print_24time(airport_lobby.flight_time+54); ! new_line; ! rtrue; ! ], ! print_24time ! [time; time=time%1440; ! print time/600, (time/60)%600, ":", (time/10)%6, time%10; ! ], ! has static; ! !--------------------------Airport Boarding Pass Area--------------------------- ! !Room Airport_BPA "Airport Boarding Pass Area" ! with description "Here is the area that you get boarding passes. You can go east ! to the lobby, north to the boutique, and west to the security ! check.", ! e_to Airport_Lobby, ! has light; ! !--------------------------Queen Subway Station, platform----------------------- Room Queen_Subway_Platform "Queen Subway Station, platform" with name "platform" "ads" "ad" "advertisement" "stairs" "escalator" "steps" "staircase", with description "This is the platform of the Queen subway station. Stairs lead to above the platform. There are advertisements for among other things, ~METROPASS FOR LESS ($81/month)~. The station needs renovation.", u_to Queen_Subway_ITG, cant_go "There is no way to go except up.", station_name "Queen", has light; !-------------------Queen Subway Station, inside ticket gates------------------- Room Queen_Subway_ITG "Queen Subway Station, inside ticket gates" with description "This is the Queen subway station, inside the ticket gates. You can go down to the platform or west out of the ticket gates.", w_to Queen_Subway_OTG, d_to Queen_Subway_Platform, has light; !-------------------Queen Subway Station, outside ticket gates------------------ Room Queen_Subway_OTG "Queen Subway Station, outside ticket gates", with description "You are outside the ticket gates of the Queen subway station. Steps lead up to the street level and the ticket gates are to the east.", u_to Queen_Streetlevel, e_to [; if (ObjectOfClassIn(Token, player)==1) {remove SomethingClassIn(Token, player); print "You enter the ticket gates, dropping a token into the slot.^"; return Queen_Subway_ITG;} else {"You don't have a token to spare.";} ], has light; Object -> ticket_gates4 "ticket gates" with name "ticket" "gates" "turnstiles" "slot" "gate", description "Turnstiles with a slot to put a token into.", before [; Receive: if (noun ofclass Token) <>; else "That won't fit."; JumpOver: if (location==Queen_Subway_OTG) {"You must pay to ride the subway.";} else {"Pointless.";} Enter: if (location==Queen_Subway_OTG) <>; else <>; ], found_in queen_subway_otg queen_subway_itg, has pluralname static; !---------------------------Corner of Queen and Yonge------------------------------ Room Queen_Streetlevel "Corner of Queen and Yonge" with name "queen" "street" "road" "st" "stairs" "steps" "staircase" "yonge" "corner" "intersection" "junction" "traffic" "light", description "This is the corner of Queen and Yonge. A sign for a travel agency is prominently visible to the east, while a subway station is down the stairs. You can go all directions here.", d_to Queen_Subway_OTG, e_to Travel_Agency, w_to "You'd rather not get lost on Queen Street W.", n_to "You'd rather not go far on Yonge Street.", s_to "You'd rather not go far on Yonge Street.", cant_go "This is a junction of an east-west street and a north-south street. The subway station lies down the stairs.", has outdoors light; Object -> travel_sign "sign" with name "sign" "for" "travel" "agency", description "The old sign says, ~TRAVEL AGENCY~", has scenery static; Object -> phone "phone" with name "phone" "telephone" "cradle", description "The phone will take local calls.", before [; Take: <>; Remove: <>; PutOn: if (noun==self) <>; Insert: if (noun==self) <>; Receive: if (receive_action==##Insert) <>; ], after [; Receive: receiver.connect=NOBODY_C; "You hang up."; ], has static supporter; Constant NOBODY_C 0; Constant POLICE_C 1; Object -> -> receiver "receiver" with parse_name [w i; w=NextWord(); while (w=='phone' or 'telephone') {i++; w=NextWord();} if (w=='receiver' or 'reciever') return i+1; return 0; ], description "The receiver is attached to the phone.", connect NOBODY_C, react_before [i j; Go: if (self in player) {print "(replacing the receiver)^"; keep_silent=1; ; keep_silent=0;} DialPhone: if (self notin player) "You don't have the phone."; if (dialled_number->0==3 ! 6-1-1 Repair Service && dialled_number->1==6 && dialled_number->2==1 && dialled_number->3==1) "~Phone broken down?~"; if (dialled_number->0==3 ! 4-1-1 Directory Service && dialled_number->1==4 && dialled_number->2==1 && dialled_number->3==1) "~Sorry, directory service is not available.~"; if (dialled_number->0==3 ! 9-1-1 Emergency && dialled_number->1==9 && dialled_number->2==1 && dialled_number->3==1) {if (policeman in Police_Station) {print "~Hello, Emergency Service. Constable Shultz here.~^"; self.connect=POLICE_C; rtrue;} else "You realize that you have already called the emergency service.";} if (dialled_number->0==1 ! 0 (Operator) && dialled_number->1==0) "You chat with the operator for the while, then hang up."; ! must be 7 numbers (local) or 11 numbers (long distance) ! except for 0, 911, 611, 411 if (dialled_number->0<7 || (dialled_number->1==1 && dialled_number->0<11)) "You don't dial enough numbers."; if (dialled_number->0>7 && dialled_number->1~=1) print "You dial too many digits (these are ignored).^"; if (dialled_number->0>11 && dialled_number->1==1) print "You dial too many digits (these are ignored).^"; ! 1-800, 1-888, 1-877- numbers (toll-free) if (dialled_number->0>=11 && dialled_number->1==1 && ((dialled_number->2==8 && dialled_number->3==0 && dialled_number->4==0) || (dialled_number->2==8 && dialled_number->3==8 && dialled_number->4==8) || (dialled_number->2==8 && dialled_number->3==7 && dialled_number->4==7))) "You get a business from the toll-free number."; ! 1-900, 1-977- numbers (business charge numbers) if (dialled_number->0>=11 && dialled_number->1==1 && ((dialled_number->2==9 && dialled_number->3==0 && dialled_number->4==0) || (dialled_number->2==9 && dialled_number->3==7 && dialled_number->4==6))) "You don't like the idea of calling 900 numbers."; ! no long distance allowed here if (dialled_number->0>=11 && dialled_number->1==1) "You can't do long distance from here."; ! 427-3000 Police Station if (dialled_number->0==7 && dialled_number->1==4 && dialled_number->2==2 && dialled_number->3==7 && dialled_number->4==3 && dialled_number->5==0 && dialled_number->6==0 && dialled_number->7==0) {if (policeman in Police_Station) {print "~Hello, Police Service. Constable Shultz here.~^"; self.connect=POLICE_C; rtrue;} else "You reach the police station's answering machine.";} ! 427-4000 Fire Station if (dialled_number->0==7 && dialled_number->1==4 && dialled_number->2==2 && dialled_number->3==7 && dialled_number->4==4 && dialled_number->5==0 && dialled_number->6==0 && dialled_number->7==0) "~Where's the fire?~"; ! 428-5000 Ambulance Service if (dialled_number->0==7 && dialled_number->1==4 && dialled_number->2==2 && dialled_number->3==8 && dialled_number->4==5 && dialled_number->5==0 && dialled_number->6==0 && dialled_number->7==0) "~Who's hurt?~"; ! 2-4-1 Pizzeria (634-0241) if (dialled_number->0==7 && dialled_number->1==6 && dialled_number->2==3 && dialled_number->3==4 && dialled_number->4==0 && dialled_number->5==2 && dialled_number->6==4 && dialled_number->7==1) "~Hello, this is 241 pizza here. What size of pizza do you want?~ You hang up upon hearing someone from a pizzeria."; if (random(4)==1) "Oops, you just got an answering machine."; if (random(20)==1) "You get a busy signal. Try again."; for (i=1:i<=dialled_number->0:i++) {j=j+(dialled_number->i*i); } print "You call "; switch(j%22) {0: print "Frank Wallace"; 1: print "Joe Scott"; 2: print "Vince Carter"; 3: print "The Border 102.7 106.7"; 4: print "Frank the Mover"; 5: print "Casey's Interior Decorating"; 6: print "Jill Sally"; 7: print "Tracy Carmichael"; 8: print "Amey's Taxi Services"; 9: print "James Reid Funeral Homes"; 10: print "Chalmers Church"; 11: if (j%3==0) print "Quinn's"; if (j%3==1) print "Joe's"; if (j%3==2) print "Frank's"; print " Sports Equipment"; 12: print "Herbal Essences"; 13: print "Laura Ramsay"; 14: print "Kelly Zhats"; 15: print "Toronto Photography"; 16: print "Sam the Record Man"; 17: print "Indigo Books"; 18: print "Simon Lorne"; 19: print "Allison Watson"; 20: print "Reggie Miller"; 21: print "Two For One Pizza"; } " and then hang up."; ], daemon [; dialled_number->0=0; dialled_number->1=0; dialled_number->2=0; dialled_number->3=0; dialled_number->4=0; dialled_number->5=0; dialled_number->6=0; dialled_number->7=0; dialled_number->8=0; dialled_number->9=0; dialled_number->10=0; dialled_number->11=0; dialled_number->12=0; dialled_number->13=0; ]; Object -> telephone_directory "telephone directory" with parse_name [w i; w=NextWord(); while (w=='telephone' or 'phone') {i++; w=NextWord();} if (w=='directory' or 'book') return i+1; return 0; ], description "The phone book has entries on everyone's phone numbers.", before [w x; Open, Close: "Don't bother."; Consult: wn=consult_from; w=NextWord(); x=NextWord(); switch(w) {'police': "Police: 427-3000"; 'fire', 'firefighter', 'firemen': "Fire: 427-4000"; 'ambulance': "Ambulance: 428-5000"; 'emergency', 'emergencies', '911': "Emergencies: 9-1-1"; 'pizza', '241', 'two', 'pizzeria': "Pizzerias: Two For One Pizza 634-0-241"; 'funeral', 'funerals', 'death': "Funeral Homes: Bill's Funeral Home and Cemetary 985-5543"; 'cemetary', 'cemetaries': "Cemetaries: Bill's Funeral Home and Cemetary 985-5543"; 'service', 'terms', 'term': "Legal stuff. The terms of service? Dull."; 'long': "Just stuff about rates."; 'local': "Just lists of numbers that are considered local."; 'calls', 'call', 'calling': "SmartTouch services, and other boring stuff."; 'smart', 'touch', 'smarttouch': "They cost a lot."; } "You find no entry in the phone directory."; ]; !----------------------------------the policeman----------------------------------- Object police_car "police car" with name "police" "car" "automobile" "auto" "vehicle", description "The police car reads ~TORONTO POLICE 9-1-1~.", before [; Take: "You can't push it, let alone lift it up."; Pull, Push, Turn, PushDir: "Too heavy."; ], describe "^A police car is parked here, closed and locked, no one inside it.", has static container locked transparent; Room Police_Station "Police Station" with description "I am in a police station, working here. The place is wrecky old and has chipping paint. We need a new police station.", has light; Object -> policeman "policeman" with name "police" "man" "policeman" "officer" "constable" "shultz" "cop", description "The policeman is wearing a uniform and a Toronto Blue Jays baseball cap. His name tag says, ~CONSTABLE SHULTZ~.", life [w x y z; Ask: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); .policestart; switch(w) {'the', 'that', #n$a, 'this', 'an', 'some': w=x; x=y; y=z; z=NextWord(); jump policestart; 'blue': if (x=='jay' or 'jays') "~Favourite team.~"; 'maple': if (x=='leafs') "~Don't like hockey.~"; 'baseball': "~I love baseball.~"; 'base': if (x=='ball') "~I love baseball.~"; 'police', 'cop', 'cops': if (x=='station') "~We need a new police station.~"; "~I do like working at the police a lot.~"; 'hockey': "~Don't like hockey.~"; 'basketball': "~Like hoops, not just baseball. Lakers rule.~"; 'laker', 'lakers': "~Cheerin' for 'em in the NBA finals.~"; 'pacer', 'pacers': "~Lakers are better.~"; 'los': if (x=='angeles' && y=='laker' or 'lakers') "~Like 'em Lakers a fair amount.~"; 'indiana': if (x=='pacer' or 'pacers') "~Those Lakers rule more. Got better chances.~"; 'hoops': "~Hoops is cool just like 'em baseball.~"; 'football': "~Kinda rough.~"; 'toronto': "~Gotta keep this city clean and nice.~"; default: "~Don't know.~"; } Tell: wn=consult_from; w=NextWord(); x=NextWord(); .startfrompolicescratch; switch(w) {'the', 'that', #n$a, 'this', 'an', 'some': w=x; x=NextWord(); jump startfrompolicescratch; 'travel': if (x=='agency') "~What about a travel agency?~"; "~What about travel?~"; 'robber', 'thief', 'burglar': if (self in location) "~I'm already here.~"; if (robber notin travel_agency) "~He's taken care of.~"; if (travel_agency hasnt visited) "~What thief?~ you think."; print "You explain in depth to the policeman about the thief. ~Oh dear! A thief? I'll be at the travel agency in six minutes. Stay where you are.~ The policeman gets off the phone.^"; StartTimer(self, 3); receiver.connect=NOBODY_C; remove self; rtrue; 'murderer': "~What murderer?~ you think."; 'killer': "~What killer?~ you think."; 'kidnapper': "~What kidnapper?~ you think."; 'criminal': "~What criminal?~ you think."; 'high', 'secondary', 'elementary', 'public': "~Good thing you like school.~"; 'catholic': "You don't go to catholic school."; default: "~I don't understand,~ replies the policeman."; } Give: if (noun ofclass TenDollarBill) "~But that's the reward for a job well done!~"; if (noun ofclass Loonie or Quarter) "~I don't need small change. I'm paid well.~"; "~No thanks.~"; Show: if (noun ofclass TenDollarBill or Loonie or Quarter) "~Real money.~"; "~For I have no interest in ", (the) noun, ".~"; ], time_left, time_out [; move self to Travel_Agency; move police_car to queen_streetlevel; if (player in Travel_Agency) "~Hi. I can see what you're talking about, this thief!~ says the policeman."; if (player in Queen_Streetlevel) "~I can see the thief from here!~ says the policeman. The policeman walks to the east. You can't see him anymore."; ], orders [i j; Question: return DoQuestions(self); Arrest: if (self in Police_station) "I'll need to come out to do that."; if (noun~=robber) {print "That "; if (noun has female) print "woman"; else print (string) random("man", "guy"); print (string) random(" isn't", " is not"); print_ret " commiting any crime.";} remove robber; move self to police_station; remove police_car; print "The policeman quickly takes away the thief. He hands you twenty dollars.^"; keep_silent=1; for (i=1:i<=2:i++) {j=TenDollarBill.create(); move j to location; give j workflag; ;} keep_silent=0; "The policeman leaves. His police car drives away."; Eat: if (noun==coke or pepsi or gatorade or the_water) "~I'm not thirsty.~"; if (noun hasnt edible) "~What-that isn't food!~"; "~I'm not hungry.~"; Drink: if (noun has edible) "~I'm not hungry.~"; if (noun~=coke or pepsi or gatorade or the_water) "~What-that isn't a drink!~"; "~I'm not thirsty.~"; Look: if (parent(self)==Police_Station) print_ret (string) parent(self).description; default: "~I'd rather do my work.~"; ], has animate transparent; Object -> -> baseball_cap "baseball cap" with name "toronto" "blue" "jay" "jays" "baseball" "cap" "hat", description "The baseball cap bears the Toronto Blue Jays logo."; Object -> -> name_tag "name tag" with name "name" "tag" "pin", description "The name tag bears Constable Shultz's name."; Object -> -> uniform "uniform" with name "toronto" "police" "uniform" "shirt", description "The uniform says, ~Toronto Police~.", article "a"; !----------------------------------The Travel Agency------------------------------- Room Travel_Agency "Travel Agency" with description "The inside of this travel agency is small. There is a little sticker on the window that says, ~Credit cards accepted: VISA, MASTERCARD.~ The street lies to the west.", w_to Queen_Streetlevel, cant_go "The only way to go is west to the street.", has light; Object -> visa_mastercard "sticker" with name "sticker", description "The sticker says, ~Accepts VISA and MASTERCARD.~", before [; Take, Pull: "You don't want to peel the sticker off the window."; Push: "The sticker is already on the window."; Turn: "The sticker is stuck on."; ], has static scenery; Token -> "subway token"; Object -> travel_agent "travel agent" with name "travel" "agent" "man" "male", description "The male travel agent is standing here.", describe "A male travel agent stands here.", react_after [; Go: if (robber in travel_agency) print "~WHAT? STUPID THIEF! Anyways, HI.~"; print "~Hello. Where are you going to?~^"; ], life [w x y z; Answer: if (robber in parent(self)) "~Like I can hardly handle the thief, let alone customers.~"; wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); .wordgobble; if (w==#n$i or 'am' or 'heading' or 'going' or 'for' or 'to' or 'the' or #n$a or 'some' or 'towards' or 'i^m' or 'want' or 'go' or 'travel' or 'an' or 'ticket' or 'need') {w=x; x=y; y=z; z=NextWord(); jump wordgobble;} switch(w) {'indiana', 'indianapolis': self.indiana=1; "~Going to Indiana. Show me your credit card then.~"; 'toronto': "~Can't you use public transport to get around Toronto?~"; default: "~Never heard of the place.~"; } Ask: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); .gobble2; switch(w) {'the', #n$a, 'an', 'some': w=x; x=y; y=z; z=NextWord(); jump gobble2; 'travel': switch(x) {'agency': "~Working here for five years, why?~"; default: "~Don't travel much.~";} 'air', 'airplane', 'airplanes', 'airline', 'airlines': "~We can book airplanes here.~"; 'train', 'trains': "~We can book trains here.~"; 'hotel', 'hotels': "~We can book hotels here.~"; 'inn', 'inns': "~We can book inns here.~"; 'lodge', 'lodges': "~We can book lodges here.~"; 'resort', 'resorts': "~We can book resorts here.~"; 'vacation', 'vacations', 'holidays', 'holiday': "~We can book vacations and holidays here.~"; 'bus', 'buses': "~Just go to the local bus station to get bus tickets.~"; 'ticket', 'tickets': "~We sell airline and train tickets and book hotels.~"; 'restaurant', 'restaurants': "~Hey. Just go to restaurants when you get elsewhere.~"; 'profit', 'profits', 'loss', 'losses', 'pay', 'salary', 'salaries', 'income', 'revenue', 'tax', 'taxes': "~That's none of your beeswax!~"; 'job', 'career': "~Been working here for five years.~"; 'credit': switch(x) {'card', 'cards': "~We take Visa and Mastercard.~"; 'history': "~We're a pretty stable business.~"; } 'master', 'card', 'cards', 'mastercard': "~We accept Mastercard.~"; 'visa': "~We accept Visa.~"; 'american': switch(x) {'express': "~We don't take American Express.~";} 'diners', 'diner^s': switch(x) {'club': "~We don't take Diner's Club.~";} 'cirrus': "~We don't take cirrus.~"; 'check', 'checks', 'cheque', 'cheques': "~We'll accept cheques.~"; 'cash', 'bill', 'bills', 'coin', 'coins': "~We don't accept cash.~"; 'basketball', 'hockey', 'football', 'soccer', 'nhl', 'tennis', 'volleyball', 'golf', 'nba', 'nfl', 'pga', 'wimbeldon', 'fifa', 'mls': "~I'm not very interested in most sports except baseball.~"; 'baseball', 'mlb': "~I love baseball.~"; 'blue': if (x=='jays' or 'jay') "~Doing good.~"; 'childhood', 'child', 'youth': "~I got too involved with police then.~"; 'police', 'cop', 'cops': "~Stupid police! Got me into too much trouble.~"; 'thief', 'burglar', 'robber': if (robber in location) "~This thief is causing loads of trouble.~"; else "~The thief is taken care of.~"; } "~I'm busy. Don't bother me.~"; Tell: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); .redofromscratch; switch(w) {'police', 'cop', 'cops': "~What? I don't want some stupid police arresting me.~ The travel agent shudders as he says that."; } "~I'm not interested.~"; Show, Give: if (robber in parent(self)) "~Not until the thief is gone.~"; if (noun==mastercard) {if (self.indiana==0) "~Where do you want to go?~ asks the man."; print "The man takes your credit card. He charges $500 on your credit card (you're not in debt or anything) and he hands you the ticket to Indiana. "; move airline_ticket to location; keep_silent=1; ; keep_silent=0; } if (noun ofclass Quarter or Loonie) "~You'll need more money than that,~ replies the agent."; if (noun ofclass TenDollarBill) "~We don't accept cash here. Cheques, money orders, Visas or Mastercards only.~"; Attack: "The guy looks harmless to me."; ], orders [; Question: return DoQuestions(self); GoTo2: "~Don't want to go anywhere.~"; Give: "~Ain't giving you anything.~"; Attack: if (noun in player) "~I'm not going to get in trouble from police for vandalism.~"; "~I'm not going to be the slightest bit bad. I've had enough police in my childhood.~"; Take: if (noun in player) "~I've had enough trouble with police. I don't want to steal.~"; "~Surely you're joking.~"; Kiss: if (verb_word=='hug') "~Stupid grandmothers! I'm not hugging anyone, thank you.~"; else "~Kissing? Gross!~"; Eat: if (noun hasnt edible) "~Don't tell me to eat what isn't edible.~"; "~I'm not hungry.~"; Drink: if (noun~=the_water or gatorade or coke or pepsi) "~Why, I'm not going to drink something that you can't drink!~"; print "~Why, I had something to drink "; print (string) random("ten minutes ago", "five minutes ago", "a couple of minutes ago", "a minute ago", "recently"); ", and I'm not thirsty.~"; ], indiana 0, has animate; Object -> robber "robber", with name "robber" "thief" "man" "burglar", description "This man doesn't look too good. He is shouting, ~GIMME ALL YOUR MONEY!~ to the agent. He is holding a gun.", describe "A thief is standing here. He is shouting, ~GIMME ALL YOUR MONEY!~ to the travel agent. He is holding a gun.", before [; Listen: switch(random(4)) {1: "~GIMME ALL YOUR MONEY!~"; 2: "~GIVE ME ALL YA MONEY OR I'LL SHOOT!~"; 3: "~GIVE ALL YOUR MONEY TO ME NOW!~"; 4: "~GIMME ALL THE MONEY TO ME!~"; } Push, Pull, Turn, Take: "~GET OUT OF HERE PERSON!~ shouts the thief."; Arrest: "I'd leave the police to arrest this guy."; ], life [; Ask: "The thief just ignores you."; Tell: "The thief doesn't want your information."; Answer: "The thief just ignores you."; Attack: "Call the police!"; ], orders [; Question: return DoQuestions(self); default: "The thief just ignores you."; ], has animate transparent; !--------------------------Rosedale Subway Station, platform----------------------- Room Rosedale_Subway_Platform "Rosedale Subway Station, platform" with name "platform" "art" "of" "roses" "stairs" "steps" "stair" "step" "escalator" "staircase" "ad" "ads" "advertisement", with description "This is the platform of the Rosedale subway station. Stairs lead to below the platform. There are advertisements for among other things, ~METROPASS FOR LESS ($81/month)~ and there is art on the walls of roses. This station has been newly renovated. This station is above ground.", d_to Rosedale_Subway_ITG, cant_go "There is no way to go except down.", station_name "Rosedale", has light; !-------------------Rosedale Subway Station, inside ticket gates------------------- Room Rosedale_Subway_ITG "Rosedale Subway Station, inside ticket gates" with description "This is the Rosedale subway station, inside the ticket gates. You can go up to the platform or west out of the ticket gates.", w_to Rosedale_Subway_OTG, u_to Rosedale_Subway_Platform, has light; !-------------------Rosedale Subway Station, outside ticket gates------------------ Room Rosedale_Subway_OTG "Rosedale Subway Station, outside ticket gates", with description "You are outside the ticket gates of the Rosedale subway station. Steps lead up to the street level and the ticket gates are to the east.", u_to Rosedale_Streetlevel, e_to [; if (ObjectOfClassIn(Token, player)==1) {remove SomethingClassIn(Token, player); print "You enter the ticket gates, dropping a token into the slot.^"; return Rosedale_Subway_ITG;} else {"You don't have a token to spare.";} ], has light; Object -> ticket_gates2 "ticket gates" with name "ticket" "gates" "turnstiles" "slot" "gate", description "Turnstiles with a slot to put a token into.", before [; Receive: if (noun ofclass Token) <>; else "That won't fit."; JumpOver: if (location==Rosedale_Subway_OTG) {"You must pay to ride the subway.";} else {"Pointless.";} Enter: if (location==Rosedale_Subway_OTG) <>; else <>; ], found_in rosedale_subway_otg rosedale_subway_itg, has pluralname static; !---------------------------Rosedale Subway street-level-------------------------- Room Rosedale_Streetlevel "Street Level outside Rosedale Subway" with name "big" "large" "hill" "condos" "condominiums" "apartments", with description "An enterance to the Rosedale subway is down some steps. Cars pass along Yonge Street, and new condominiums are being built. To the east is a large hill and the subway tracks lie there, above ground. Two blocks south is Rosedale High School.", d_to Rosedale_Subway_OTG, s_to Outside_Rosedale_High, n_to [; "You don't want to get lost on Yonge Street?"; ], has outdoors light; Object -> subway_sign "TTC Subway sign" with name "prominent" "ttc" "toronto" "transit" "commision" "subway" "sign" "rosedale" "station", description "The sign says, ~TTC SUBWAY~.", before [; Take, Pull, Push, Turn: "It is fixed in the ground."; ], has static; !-------------------------------Outside Rosedale High----------------------------- Room Outside_Rosedale_High "Outside Rosedale High School" with description "The yard of Rosedale High school directly faces Yonge Street, and it has a large schoolyard. To the north is the Rosedale subway station, and to the south is more of Yonge Street. To the southeast is a convienience store. To the east is the school building.", n_to Rosedale_Streetlevel, s_to [; "You don't think you're going to walk all that way?"; ], w_to [; "There is no traffic light to cross at."; ], u_to Tree_House, se_to Convienience_Store, e_to School_Corridor, has outdoors light; Object -> large_light "large powerful light" with name "big" "large" "powerful" "stadium" "light", description "A large stadium light is standing here.", before [; Take, Pull, Push, Turn: "It is attached to the ground."; ], has static light; Object -> frank "Frank Wallace" with name "frank" "wallace" "best" "friend" "pal" "boy" "man" "student", description [; print "Your best friend, Frank, likes playing basketball."; if (self hasnt general) print " He wants a soft drink."; if (child(self)==0) rtrue; else {print " He is holding "; WriteListFrom(child(self),FULLINV_BIT+ENGLISH_BIT+RECURSE_BIT); print ".^"; rtrue;} ], describe [; print "^Frank Wallace is standing here"; if (self has general) print "."; else print ", asking for a soft drink. (Frank is fussy about brands of pop.)"; if (child(self)==0) rtrue; else {print " He is holding "; WriteListFrom(child(self),FULLINV_BIT+ENGLISH_BIT+RECURSE_BIT); print ".^"; rtrue;} ], life [w x y z; Attack: "No way! He is your friend."; Kiss: "You don't want to kiss this guy. Basketball dudes don't kiss!"; WakeOther: "He isn't asleep."; Ask: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); if (w=='the' or #n$a or 'your' or 'my' or 'an' or 'this' or 'that' or 'some') {w=x; x=y; y=z; z=0;} if (w=='basketball' && x=='game' or 'games' || w=='game' or 'games') {switch(question_word) {WHEN_WORD: "~The game is tonight at 7:00.~"; WHERE_WORD: "~The game is at Downsview Stadium.~"; WHAT_WORD: "~The game determines whether we are in the championships.~"; default: "~We have a game to play tonight.~"; } } if ((w=='high' or 'secondary' && x=='school') || w=='school') "~I like high school okay.~"; if (w=='elementary' or 'public' && x=='school') "~I didn't like elementary school very much.~"; if (w=='toronto' && x==0 && y==0) "~Toronto's a nice place to live.~"; if (w=='los' && x=='angeles' && y==0) "~Los Angeles. Great city.~"; if (w=='canada' or 'canadian') "~Canada. Great country.~"; if (w=='us' or 'usa' || (w=='united' && x=='states') || (w=='united' && x=='states' && y=='america') || (w=='united' && x=='states' && y=='of' && z=='america')) "~The United States is an OK country.~"; if (w=='dog' or 'dogs' or 'puppy' or 'puppies') "~Woof! Dogs are certainly nice pets.~"; if (w=='cat' or 'cats' or 'kitten' or 'kittens' or 'kitty' or 'kitties' || (w=='kitty' && x=='cats' or 'cat')) "~Meow! I think I prefer dogs over cats.~"; if (w=='pet' or 'pets') "~I like dogs. Cute little dogs.~"; if (w=='basketball' or 'hoops') {switch(random(3)) {1: "~Oh yes, hoops is a really cool sport. Oh yah!~"; 2: "~You haven't seen it all until you see Vince Carter dunk!~"; 3: "~Basketball rules. Oh yah!~"; }} if ((w=='vince' && x=='carter') || (w=='vince' && x~='carter') || (w=='carter')) {switch(random(2)) {1: "~Vince Carter's the man, he dunks!~"; 2: "~I'd really like to see Vince live at a game sometime!~"; } } if (w=='dunk' or 'dunks' or 'dunking' || (w=='slam' && x=='dunk' or 'dunks' or 'dunking')) {switch(random(3)) {1: "~The slam dunk is really cool!~"; 2: "~Vince Carter's got the greatest slam dunks!~"; 3: "~Those slam dunks are coming right out of Vince Carter!~"; } } if ((w=='toronto' && x=='raptors') || w=='raptors') {switch(random(4)) {1: "~The Raptors are a cool team with Vince power!~"; 2: "~I'd really want to see a Raptors game live.~"; 3: "~Vince Carter's got the dunks and the star power!~"; 4: "~Tracy McGrady's got the defence!~"; } } if ((w=='los' && x=='angeles' && y=='lakers') || w=='lakers') {switch(random(3)) {1: "~They're quite a good team. Hope they win the playoff series!~"; 2: "~Shaquille O'Neal's got the power!~"; 3: "~Kobe's got the cool moves!~"; } } if ((w=='portland' && x=='trail' && y=='blazers') || (w=='trail' && x=='blazers') || (w=='blazers')) "~The Portland Trail Blazers. Maybe Scottie Pippen is good, and they're 3-3 on the series against the Lakers. The Indiana Pacers are in the NBA finals.~"; if ((w=='scottie' && x=='pippen') || w=='scottie' or 'pippen') "~He's fairly good with those Trail Blazers.~"; if ((w=='indiana' && x=='pacers') || w=='pacers') "~Those Pacers are doing well! They're in the NBA finals!~"; if ((w=='new' && x=='york' && y=='knicks' or 'knickerbockers') || (w=='knicks' or 'knickerbockers')) "~Beaten by the cool Pacers to the NBA finals.~"; if ((w=='nba' && x=='finals') || (w=='national' && x=='basketball' && y=='association' && z=='finals')) "~The NBA finals is the best you can get!~"; if ((w=='nba' && x=='playoffs') || (w=='national' && x=='basketball' && y=='association' && z=='playoffs')) "~The NBA playoffs are to determine which of the top 16 teams is the winner through series of games.~"; if ((w=='tracy' && x=='mcgrady') || w=='tracy' or 'mcgrady') "~He's cool with those Raptors. Too bad he wants to change teams.~"; if ((w=='shaq' or 'shaquille' && x=='o^neal' or 'oneal') || w=='shaq' or 'shaquille' or 'o^neal' or 'oneal') "~Oh yes, Shaquille O'Neal. He's a cool player, and he's got moves.~"; if ((w=='kobe' && x=='bryant') || w=='kobe' or 'bryant') "~Certainly cool moves.~"; if (w=='wins' or 'win' or 'won') "~You certainly need wins to do well.~"; if (w=='lose' or 'loss' or 'losses') "~Not a good thing, but you will always lose some games.~"; if ((w=='cool' or 'border' or 'pop' && x=='music') || w=='music') "~Music is cool, especially Border music.~"; if (w=='nba' || (w=='national' && x=='basketball' && y=='association')) "~The NBA is a sweet league!~"; if ((w=='michael' && x=='jordan') || w=='michael' or 'jordan') "~He was the best basketball player of all time!~"; if (w=='smoking' or 'cigarettes' or 'cigarette' or 'cig' or 'cigs') "~No way! Smoking is such a dumb idea.~"; if ((w=='coca-cola' or 'coca' or 'cola' or 'coke') || (w=='coca' && x=='cola')) "~Coca-cola is a great soft drink.~"; if (w=='pepsi' or 'pepsi-cola' || (w=='pepsi' && x=='cola')) "~Oh, Pepsi. Coke's much better.~"; if ((w=='soft' && x=='drink' or 'drinks') || w=='drinks' or 'drink' or 'pop' or 'soda') {print "~I much prefer Coca-Cola to Pepsi."; if (self hasnt general) print " And I want a Coke!"; "~";} if (w=='hockey' or 'puck' or 'pucks' or 'nhl' || (w=='national' && x=='hockey' && y=='league')) "~Hockey's too violent for me.~"; if (w=='football' or 'footballs' or 'nfl' || (w=='national' && x=='football' && y=='league')) "~Football's awfully rough for me.~"; if (w=='baseball' or 'baseballs' or 'mlb' || (w=='national' or 'american' && x=='league' && y=='baseball') || (w=='national' or 'american' && x=='baseball' && y=='league') || (w=='major' && x=='league' && y=='baseball')) "~Baseball's pretty boring.~"; if (w=='teacher' or 'teachers') "~Most of our teachers are okay, except the history teacher.~"; if (w=='phone' && x=='number' or 'numbers') "~I'm not telling you my phone number.~"; if (w=='trees' or 'tree' || x=='tree' or 'trees') "~We need to conserve trees. That's what Earth day is about!~"; if (w=='favourite' or 'favorite' && x==0) "~Favourite what?~"; if (w=='favourite' or 'favorite' && x=='sport' or 'sports') "~Basketball, obviously!~"; if (w=='favourite' or 'favorite' && x=='color' or 'colors' or 'colours' or 'colour') "~Orange, I'd think. Color of basketballs.~"; if (w=='church') "~My parents made me go to church every Sunday since I was six. I don't like it at all.~"; if (w=='sunday' or 'sunday') "~Church day. I don't really like church.~"; if (w=='god') "~Don't believe in it.~"; if (w=='christmas' or 'xmas' || (w=='december' && x=='25' or 'twenty-five' or 'twenty-fifth') || (w=='december' && x=='twenty' && y=='five' or 'fifth') || (w=='twenty-fifth' or '25' or 'twenty-five' && x=='of' && y=='december') || (w=='twenty' && x=='five' or 'fifth' && y=='of' && z=='december')) {switch(random(2)) {1: "~Merry Christmas!~"; 2: "~Good time to get presents.~"; } } if (w=='birthday' or 'birth-day' || (w=='birth' && x=='day')) "~My birthday! August 8. Like it lots.~"; if (w=='bus' or 'buses') "~Bus service is good in this city. They even have subways.~"; if (w=='subway' or 'subways' || (w=='subway' && x=='train' or 'trains')) "~Subways. Good method of public transit.~"; if (w=='shot' or 'shoot' or 'shooting') "~Oh yah! Oh yah! Shoot the ball!~"; if (w=='cafeteria' or 'cantine' || (w=='school' && x=='cafeteria' or 'cantine') || (w=='instututional' or 'cafeteria' && x=='food')) "~I don't recommend the food at school.~"; if (w=='earth' && x=='day') "~Earth day celebrates conservation of Earth's resources.~"; if (w=='sprite') "~Made by Coca-cola too. I prefer Coke.~"; if (w=='7-up' or 'seven-up' || (w=='7' or 'seven' && x=='up')) "~Seven Up! That's made by Pepsi. I don't like Pepsi.~"; if (w=='track' or 'field' || (w=='track' && x=='and' && y=='field')) "~Track and field rocks! I won the midget boys 200m last year in grade 8.~"; if (w=='midget') "~Midget means grade seven and eight.~"; if (w=='bantam') "~Bantam means grade five and six.~"; if (w=='atom') "~Atom means grade three and four.~"; if (w=='100' or '100m') "~Good short distance race.~"; if (w=='200' or '200m') "~I won the midget boys 200m last year!~"; if (w=='400' or '400m') "~Getting a little long there. My friend Simon Crew won that last year.~"; if (w=='800' or '800m') "~That is getting pretty long.~"; if (w=='1500' or '1500m') "~Interesting, but too long.~"; if (w=='3000' or '3000m') "~Way too long!~"; if ((w=='midget' && x=='boys' && y=='200' or '200m') || (w=='midget' && x=='200' or '200m')) "~I won the midget boys 200m last year!~"; if (w=='high' && x=='jump' or 'jumping') "~High jump. Interesting.~"; if (w=='long' && x=='jump' or 'jumping') "~Long jump. Sweet. My friend Simon Crew got second place in that last year!~"; if (w=='triple' && x=='jump' or 'jumping') "~Triple jump. Cool, but hard.~"; if (w=='simon' or 'crew' || (w=='simon' && x=='crew')) "~Simon Crew is my friend! He sweeps, runs, jumps, and dunks! Yah! He also plays on my basketball team.~"; if (w=='wine' or 'beer' or 'alchohol' or 'alchoholic') "~I'm not drinking alchohol until I'm nineteen.~"; if (w=='drink' && x=='milk' && y=='love' && z=='life') "~All the 'Drink Milk Love Life' mania is nonsense.~"; if (w=='championship' or 'championships' || (w=='state' && x=='championship' or 'championships')) "~The state championships! We've gotta win this game tonight!~"; switch(w) { 'god': "~Don't believe in it.~"; 'cafeteria': if (x=='eat') "~I tried cafeteria food once and I hated it.~"; if (x=='like') {if (NextWord()=='food') "~I don't like the cafeteria food.~"; "~I don't recommend that you eat at the cafeteria.~"; } 'pork': "~No. Get gas pains if I do.~"; 'chicken', 'beef', 'veal', 'lamb': "~Yes.~"; 'meat', 'poultry': "~I'm not vegetarian.~"; 'corn': if (NextWord()=='chips') "~I certainly like corn chips and Doritos.~"; "~Don't like it.~"; 'peanuts', 'peanut': "~I'm allergic to peanuts!~"; 'almond', 'almonds': "~I'm allergic to almonds!~"; 'walnut', 'walnuts': "~I'm allergic to walnuts!~"; 'nut', 'nuts': "~I'm allergic to nuts!~"; 'rice': "~Eat it every day.~"; 'apples', 'apple': "~Don't like them much.~"; 'oranges', 'orange': "~Good orange citrus fruit.~"; 'grapes', 'grape': "~Mmm.~"; 'pear', 'pears': "~Good fruit.~"; 'strawberries', 'strawberrys', 'strawberry': "~Love strawberries.~"; 'raspberries', 'raspberrys', 'raspberry': "~Don't like raspberries.~"; 'blueberries', 'blueberrys', 'blueberry': "~Love blueberries.~"; 'berries', 'berry', 'berrys': "~I like strawberries and blueberries.~"; 'potato', 'potatoes', 'potatos': if (NextWord()=='chips') "~I don't like potato chips. I prefer corn chips.~"; "~I like potatoes, and I prefer them mashed or scalloped.~"; 'tomato', 'tomatoes': "~Like tomatoes.~"; 'salad': "~I like salad a lot.~"; 'greek': if (NextWord()=='salad') "~I like greek salad a lot!~"; 'caesar': if (NextWord()=='salad') "~I like caesar salad a lot!~"; 'restaurant', 'restaurants': "~I don't eat at restaurants much.~"; 'hot': if (NextWord()=='dogs') "~I don't like hot dogs much.~"; 'hotdogs': "~I don't like hot dogs much.~"; 'hamburger', 'hamburgers', 'burgers': "~I love hamburgers.~"; 'burger': if (NextWord()=='king') "~Burger King serves good food.~"; "~I love hamburgers.~"; 'mcdonalds': "~I like McDonalds fast food.~"; 'cucumber', 'cucumbers': "~I eat lots of cucumber.~"; 'lettuce': "~I eat lots of lettuce.~"; 'home': "~I eat at home most of the time.~"; 'cookies', 'cookie', 'biscuits', 'biscuit': "~Mmm, cookies?~"; 'crackers', 'cracker': "~I like crackers.~"; 'water': "~I drink water, that's for sure.~"; 'milk': "~All that 'Drink Milk, Love Life' mania is stupid!~"; 'juice': "~Prefer water.~"; 'wine', 'beer', 'alchohol', 'alchoholic': "~I'm not drinking alchoholic beverages until I'm 19.~"; 'wendy', 'wendys': "~I don't like Wendy's food.~"; 'cheese': "~I like most kinds of cheese.~"; 'cheddar': "~I like cheddar cheese.~"; 'feta': "~Feta cheese is good on Greek salad.~"; 'parmesan': "~I like Parmesan cheese.~"; 'mozzerala': "~Good on pizza.~"; 'pizza', 'pizzas': "~I like some pizzas. Depends which pizzeria it's from.~"; 'pea', 'peas': "~I do not like green peas.~"; 'celery': "~I like celery okay.~"; 'cucumber', 'cucumbers': "~I like cucumbers okay.~"; 'brocoli', 'broccoli': "~I do not like brocoli.~"; 'cake': "~I don't like cake.~"; 'pie': "~I do like pie.~"; 'fudge': "~One of my classmates always says that. I don't like fudge.~"; } "~I don't know what that is.~"; Answer: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); if (w=='hi' or 'hello' or 'hallo') "~Hello!~"; if (w=='bye' or 'bye-bye') "~You're leaving?~"; if (w=='you' && x=='suck') {remove self; "~What the? I suck? I'm leaving!~ Frank runs away.";} if (w=='you' && x=='are' || w=='you^re') {.youarestart; switch(NextWord()) {'the', #n$a, 'an', 'your', 'some', 'my', 'this', 'that': jump youarestart; 'loser': remove self; "~What the? I am a loser? I'm leaving!~ Frank runs away."; 'cool', 'dude': "~I'm cool! Thanks.~"; 'bully': remove self; "~No, I'M NOT A BULLY!~ Frank runs away."; 'ashold', 'asshold': remove self; "~No!~ Frank runs away."; 'basketball': if (NextWord()=='player' or 'star') "~Yes I am. Got a game tonight.~"; else "~I'm a basketball? Very funny.~"; 'nice': "~Thanks.~"; 'kid': "~I'm getting a little older now.~"; 'adult': "~I haven't reached that stage yet.~"; 'child': "~I don't really like that word now.~"; 'cute': "~Cute? I'm not cute. I'm not a baby.~"; } } "~Don't know.~"; Tell: "~I'm not interested.~"; Give: switch(noun) { coke: print "~Thanks a lot.~^"; move coke to self; give self general; give coke open; rtrue; pepsi: "~I hate Pepsi!~ (you realize you bought Frank Pepsi not Coke.)"; default: "~No thanks.~";} ], warned false, orders [w x; Strong: if (self.warned==false) {self.warned=true; "~Watch the language!~";} else {print "~Hey, you're swearing! I'm leaving!~^"; remove self; rtrue;} Mild: "~Quite.~"; Give: if (noun==basketball) {if (self hasnt general) {"~I'll let you use the basketball once you buy me a soft drink. And make sure you get Coke. No Pepsi.~";} else {print "~Sure. I'm not using it.~ He gives you the ball.^"; move basketball to location; give basketball general; keep_silent=1; ; keep_silent=0; rtrue;} } if (noun==coke) "~I'm drinking it. You gave it to me.~"; "~I'm not giving that to you.~"; Take: print_ret "~I'm not taking ", (thatorthose) noun, "!~"; Drop: if (noun==basketball) "~I don't see the point of dropping the basketball.~"; if (noun==coke) "~I'm drinking it!~"; print "~No way!~"; rtrue; Dunk, DunkWith: "~Are you crazy? I don't know how to dunk! Just watch Vince Carter.~"; Question: return DoQuestions(self); QuestionDo: wn=consult_from; w=NextWord(); x=NextWord(); if (w=='you' && x=='like' or 'eat' or 'drink') {consult_from=consult_from+2; <>;} "Don't know."; ], seenflag, react_after [; Go: if (self.seenflag==0) {print "~Hello! Got a basketball game tonight.~^"; self.seenflag=1;} ], react_before [; Strong: if (self.warned==false) {self.warned=true; "~Watch the language!~";} else {print "~Hey, you're swearing! I'm leaving!~^"; remove self; rtrue;} ], daemon [n; if (self notin location) rtrue; if (coke notin self) jump hoopsbasketball; if (random(4)==1) {n++; switch(random(2)) {1: print "Frank takes a small sip at his soda. "; 2: print "Frank drinks the pop steadily. "; }} .hoopsbasketball; if (basketball notin self) jump personality; if (random(8)==1) {n++; switch(random(2)) {1: print "Frank takes a dribble with the ball. "; 2: print "Frank spins the basketball a little bit. "; }} .personality; if (random(9)==1) {n++; switch(random(3)) {1: print "Frank rubs his head. "; 2: print "Frank sighs. "; 3: print "Frank swallows. "; }} if (random(3)==1 && coke in player) {n++; "~Can I please have that Coca-cola?~";} if (n>0) ""; ], weight 1549, ! he's 154.9 pounds (according to weigh scales) has animate proper transparent; Object -> -> basketball "basketball" with name "spalding" "nba" "basketball" "ball", description "A Spalding NBA basketball.", weight 13, before [; Dribble: "You dribble the basketball a little bit and then catch the ball."; ]; Object -> tree "tree" with name "big" "large" "maple" "tree", description [; print "A large maple tree is here. Atop the tree is a tree house. A ladder leads "; if (location==outside_rosedale_high) print "up"; else print "down"; " to the tree house."; ], describe "^A large maple tree grows large and tall here. It looks pretty sturdy.", found_in Outside_Rosedale_High Tree_House, before [; Climb: if (location==Outside_Rosedale_High) {print "You climb up the tree...^"; PlayerTo(Tree_House); rtrue;} else "You're already at the top of the tree."; Descend: if (location==Tree_House) {print "You climb down the tree...^"; PlayerTo(Outside_Rosedale_High); rtrue;} else "You're already at the bottom of the tree."; Take, Cut: "Yah right, the tree would need giant digging machines, trucks and a chainsaw to cut down, which is all pointless. Besides, the tree is nice here!"; Turn: "It is attached to the ground."; Push, Pull: "The tree doesn't need to be leaned."; ], has static; !-----------------------------------Tree House------------------------------------ Room Tree_House "Tree House" with description "This tree house is relatively large. Kids use this space a lot. Old boards make up the tree house and a ladder leads down to the ground. There are no kids here currently. You can see the high school building from up above here. A stadium light is visible in the distance.", d_to Outside_Rosedale_High, has light outdoors; Object -> distant_stadium_light "distant stadium light" with name "distant" "far" "powerful" "stadium" "light", description "A distant stadium stands in the distance, although it can illuminate up here quite well.", before [; Examine: ; default: "It's only in the distance."; ], has static light scenery; Object -> old_boards "old boards" with name "old" "chipping" "wrecky" "ancient" "boards" "studs" "wood", description "The boards are chipping like crazy here, but they're sturdy enough to hold this place up.", has static scenery; [ WeightOf obj t i; if (obj provides weight) t=obj.weight; else t=10; ! 1 lb if (obj==selfobj) t=1563; ! 156.3 lbs objectloop (i in obj) t=t+WeightOf(i); return t; ]; [ PrintDecimal i; print i/10, ".", i%10; ]; Object -> weigh_scales "weigh scales" with name "weigh" "weight" "scales" "balances" "scale" "meter", description [; print "The weigh scales are intended for standing on and putting objects on. "; if (WeightOf(child(self))==0) "There is nothing on the weigh scales."; else print_ret "The weigh scales say there is ", (printdecimal) WeightOf(self)-self.weight, " lbs of weight on the weigh scales."; ], weight 30, has enterable supporter; !-------------------------------Convienience Store-------------------------------- Room Convienience_Store "Convienience Store" with description "This corner store is small and packed with shelves. A prominent fridge full of Coca-Colas and Pepsis lines one side of the store, although it is behind the counter. A woman is at the cash register selling snacks. To the northwest is the high school.", nw_to Outside_Rosedale_High, has light outlets; Object -> woman "woman" with name "woman" "lady" "girl" "cashier" "clerk", description "The woman is wearing casual clothes. She looks like she could help you.", life [w x y z; Ask: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); if (w=='the' or #n$a or 'your' or 'my' or 'an' or 'this' or 'that' or 'some') {w=x; x=y; y=z; z=0;} if (w=='coke' or 'coca-cola' or 'coca' or 'cola' || (w=='coca' && x=='cola')) "~A can of Coke costs $1.00.~"; if (w=='pepsi' or 'pepsi-cola' || (w=='pepsi' && x=='cola')) "~A can of Pepsi costs $1.00.~"; if ((w=='soft' && x=='drinks' or 'drink') || w=='pop') "~You can buy a Coke or a Pepsi for $1.00.~"; if (w=='cigarettes' or 'cigs') "~No cigarettes for kids under 19!~"; if (w=='candy') "~We don't have any today, I'm sorry.~"; if (w=='gst' || (w=='goods' && x=='and' && y=='services' or 'service' && z=='tax' or 'taxes') || (w=='goods' or 'services' && x=='tax' or 'taxes')) "~GST is 7%, included in all prices.~"; if (w=='pst' || (w=='provincial' && (x=='tax' or 'taxes' || y=='tax' or 'taxes'))) "~PST is 8%, included in all prices.~"; if ((w=='sales' or 'sale' && x=='tax' or 'taxes') || (w=='tax' or 'taxes')) "~GST is 7% and PST is 8% for a total of 15% tax but tax is included in all prices.~"; if (w=='prices' or 'costs' or 'cost' or 'price') "~Coke and Pepsi cost $1.00 per can.~"; if (w=='news' or 'papers' or 'paper' or 'newspapers' || (w=='news' && x=='papers' or 'paper')) "~Go to the newstand for newspapers. We don't sell them.~"; "~I've got no idea.~"; Answer: "~I've got no idea.~"; Tell: "~I'm not interested.~"; ], buyroutine [item; if (MoneyInPlayer()==0) "You have no money."; if (MoneyInPlayer()=item.price) {RemoveMoney(item.price); give noun general; move noun to location; keep_silent=1; ; keep_silent=0; print_ret "You buy ", (the) noun, "."; } rtrue; ], orders [; Give: self.buyroutine(noun); rtrue; Question: return DoQuestions(self); default: "~I sell snacks and do nothing else.~"; ], weight 1229, has animate female; Object -> s_fridge "fridge" with name "cooler" "refrigerator" "chest" "fridge" "rack", description "A large fridge designed for holding cans of pop.", describe [; print "^Behind the counter, there is a refrigerator"; if (child(self)==0) "."; print ", containing "; WriteListFrom(child(self),ENGLISH_BIT+FULLINV_BIT+RECURSE_BIT); "."; ], before [; Open: "Can't reach it!"; Pull, Push, Turn, Take: "Can't reach it, and it is probably too heavy anyways."; ], has static container transparent; Beverage -> -> coke "can of Coca-Cola" with name "soda" "can" "of" "coke" "coca-cola" "coke" "coca" "cola" "soft" "drink" "pop", description [; print "A 355ml can of Coca-Cola. "; if (self hasnt open) "It is closed."; if (self has open && self.emptied==true) "It is open and empty."; if (self has open && self.emptied==false) "It is open and full of pop."; ], invent [; if (inventory_stage==2) {if (self hasnt open && self notin s_fridge) print " (which is closed)"; if (self has open && self notin s_fridge) {if (self.emptied==false) print " (which is open and full of pop)"; else print " (which is open but empty)"; } } ], weight [; if (self.emptied==true) return 2; else return 8; ], emptied false, before [; Examine: ; Open: if (self hasnt general) "Don't touch it until you buy it."; Close: if (self hasnt general) "Don't touch it until you buy it."; if (self has open) "The pop can has been opened."; Drink: if (self hasnt general) "Don't touch it until you buy it."; if (self hasnt open) "The pop can isn't open."; if (self.emptied==true) "The pop can is empty."; self.emptied=true; "You drink the Coca-Cola. Not bad."; Empty: if (self hasnt general) "Don't touch it until you buy it."; if (self hasnt open) "The pop can isn't open."; if (self.emptied==true) "The pop can is empty."; "Emptying the pop can would achieve nothing."; Buy: woman.buyroutine(self); rtrue; Search: if (self has open) {if (self.emptied==true) "The pop can is open and empty."; else "The pop can is open and full of pop."; } else "You can't see inside, since the pop can is closed."; Take: if (self hasnt general) <>; Receive: "The bottle isn't meant to contain things other than pop."; Shake: if (self hasnt general) "You need to buy it first."; "You hear the ~swoosh~ of pop inside."; default: if (self hasnt general) "Don't touch it until you buy it."; ], mname "cans of Coca-Cola", price 100, has openable; Beverage -> -> pepsi "can of Pepsi" with name "can" "of" "pepsi" "pepsi-cola" "cola" "soft" "drink" "pop" "soda", description [; print "A 355ml can of Pepsi. "; if (self hasnt open) "It is closed."; if (self has open && self.emptied==true) "It is open and empty."; if (self has open && self.emptied==false) "It is open and full of pop."; ], invent [; if (inventory_stage==2) {if (self hasnt open && self notin s_fridge) print " (which is closed)"; if (self has open && self notin s_fridge) {if (self.emptied==false) print " (which is open and full of pop)"; else print " (which is open but empty)"; } } ], emptied false, weight [; if (self.emptied==true) return 2; else return 8; ], before [; Examine: ; Open: if (self hasnt general) "Don't touch it until you buy it."; Close: if (self hasnt general) "Don't touch it until you buy it."; if (self has open) "The pop can has been opened."; Drink: if (self hasnt general) "Don't touch it until you buy it."; if (self hasnt open) "The pop can isn't open."; if (self.emptied==true) "The pop can is empty."; self.emptied=true; "You drink the Pepsi. Not bad."; Empty: if (self hasnt general) "Don't touch it until you buy it."; if (self hasnt open) "The pop can isn't open."; if (self.emptied==true) "The pop can is empty."; "Emptying the pop can would achieve nothing."; Search: if (self has open) {if (self.emptied==true) "The pop can is open and empty."; else "The pop can is open and full of pop."; } else "You can't see inside, since the pop can is closed."; Buy: woman.buyroutine(self); rtrue; Take: if (self hasnt general) <>; Receive: "The bottle isn't meant to contain things."; Shake: if (self hasnt general) "You need to buy it first."; "You hear the ~swoosh~ of pop inside."; default: if (self hasnt general) "Don't touch it until you buy it."; ], mname "cans of Pepsi", price 100, has openable; !----------------------------------School Corridor-------------------------------- Room School_Corridor "School Corridor - West End" with description "The hall of the school ends to the west. This is a fairly barebones hallway and lockers stand around here. A classroom is to the south and the gym is to the north. The dressing room is to the northeast. The hall continues to the east.", w_to Outside_Rosedale_High, n_to Gym, ne_to Dressing_Room, e_to School_Corridor_East, s_to Classroom, has light outlets; Object -> lockers "locker", with name "your" "yellow" "locker" "tote", description "Your locker is painted yellow. Can't remember what the combination is. The locker has been vandalised by numerous people.", before [; UnlockCombination: if (second==1232) if (self has locked) {print "You unlock the locker using the combination 1232.^"; give self ~locked; rtrue;} else "The locker is already unlocked."; else "The locker won't open. You've got the wrong combination."; Unlock: "You'd better try combinations. The locker doesn't have a key hole."; Attack: "School property has had too much vandalism already. Just look at this thing!"; ], has static openable lockable locked container; Beverage -> -> gatorade "bottle of Gatorade", with name "bottle" "of" "gatorade", description "This is a bottle of Gatorade.", invent [; if (inventory_stage==2) {if (self hasnt open) print " (which is closed)"; if (self has open) {if (self.emptied==false) print " (which is open and full of Gatorade)"; else print " (which is open but empty)"; } rtrue; } ], weight [; if (self.emptied==true) return 3; else return 13; ], emptied false, before [; Drink: if (self hasnt open) "The bottle isn't open."; if (self.emptied==true) "The bottle is empty."; self.emptied=true; "You drink the Gatorade. Not bad."; Receive: "The bottle isn't meant to contain things."; ], has openable container; Object -> -> cd_player "CD player" with name "player" "cd" "compact" "disc" "boombox" "handle", description [; print "The boombox has a handle for carrying and has a slot for CDs. "; if (self has open) {print "It is opened"; if (child(self)==0) ", and empty."; else {print ", containing "; WriteListFrom(child(self), ENGLISH_BIT); ".";} rtrue; } else {print "It is closed"; if (child(self)==0) ", and empty."; else {print ", containing "; WriteListFrom(child(self), ENGLISH_BIT); ".";} rtrue; } ], before [; Receive: if (~~(noun ofclass CompactDisc)) "Only compact discs will fit."; if (children(self)>=1) "The CD player will only accept one CD at a time."; SwitchOn: if (self has open) "But the CD player is open."; if (child(self)==0) "The CD player is empty."; Examine: self.description(); rtrue; Listen: self.react_before(); rtrue; Open: if (self has on) {keep_silent=1; print "(turning off the CD player)^"; ; keep_silent=0;} ], after [; SwitchOn: print "You turn on the CD player. "; self.just_activated=1; switch(child(self)) {bach_cd: "The CD player plays some of Bach's symphony orchestra."; rap_cd: "The CD player plays some of Will Smith's rap."; } ], just_activated, each_turn [; if (self.just_activated==1) {self.just_activated=0; rfalse;} if (self has on) {switch(child(self)) {bach_cd: "^The CD player is playing Bach's orchestra."; rap_cd: "^The CD player is playing Will Smith's rap."; } } ], react_before [; Listen: if ((noun~=0 || self hasnt on) && noun~=self) rfalse; switch(child(self)) {bach_cd: "Ghastly! Just that dumb classical music."; rap_cd: "Cool! Funky! That rap playing here rules!"; } ], has container openable transparent switchable; CompactDisc -> -> -> bach_cd "Bach CD" with name "bach" "classical" "music" "symphony" "orchestra", description "The CD is of Bach's classical music."; Token -> -> "subway token"; !-------------------------------------Gym----------------------------------------- Room Gym "Gymnasium" with description "This gym is fairly large and has tall ceilings, large and tall enough to play basketball. Two basketball nets are mounted to either end of the gym. A door leads back south to the hallway. You can also go east to the dressing room.", s_to School_Corridor, e_to Dressing_Room, has light outlets; Object -> basketball_net "basketball net", with parse_name [i w; w=NextWord(); while (w=='basketball') {w=NextWord(); i++;} if (w=='net' or 'nets' or 'hoop' or 'rim' or 'backboard' or 'basket') return i+1; return 0; ], before [; ThrownAt: if (noun==basketball) {if (knob.showered==false) "You're too hot and sticky to play basketball."; if (self.inp<350) self.inp=self.inp+3; if (random(1000)<=self.inp) {print "The basketball goes in the net!";} else {print "The basketball bounces off the rim and misses.";} if (random(1000)>500+self.inp) {print " The basketball lands on the floor.^"; move basketball to location; rtrue;} else {" You manage to catch the basketball.";} } ShootBall: if (basketball in player) <>; else "~You have no basketball to shoot.~"; Take: "No vandalism here!"; Pull, Push, Turn: "You are unable to."; ], inp 100, description "NBA-approved basketball net, ten feet high.", has scenery static; !----------------------------------Dressing Room---------------------------------- Object miller_pocket "pocket" with name "pocket", description "The pocket is in the Reggie Miller jersey.", before [; Take: "Better to take the jersey itself."; Receive: <>; Search: <>; LetGo: <>; ], has container scenery open transparent; Room Dressing_Room "Dressing Room" with description "A small space with benches in the middle. Hooks sit on one side and on the other side are some shower stalls. To the west is the gym and to the southwest is the main hallway.", w_to Gym, sw_to School_Corridor, in_to [; <>; ], before [; Go: if (knob.dry==false) "You're not going anywhere until you're dry."; if ((shirt hasnt worn && lsshirt hasnt worn) || (jeans hasnt worn && jeans2 hasnt worn && shorts hasnt worn && clothes hasnt worn)) "Get some clothes on!"; Pull, Push, Turn, Set, SwitchOn, SwitchOff: if (noun==knob or shower_stalls) {rfalse;} else {if (knob.dry==false) "But you're not dry!";} Look, Examine, Search, Exit, Enter, Dry, Inv, InvTall, InvWide: ; Take: if (noun~=towel or shampoo) {if (knob.dry==false) "You're not touching anything 'til you're dry.";} default: if (knob.dry==false) "You're not touching anything until you're dry."; ], has light outlets; Object -> the_bench "bench" with parse_name [w i a j; w=NextWord(); if (self.wet==1) j='wet'; else j=-1; while (w=='bench' or 'benches' or 'seat' or 'seats' or 'chair' or 'chairs' or 'wood' or 'wooden' or j) {i++; if (w=='bench' or 'benches' or 'seat' or 'seats' or 'chair' or 'chairs') a=1; w=NextWord();} if (a==1) return i; else return 0; ], description [; if (self.wet==0) "The bench is made of wood and you could easily sit on it."; if (self.wet==1) "The bench is wooden but it is a bit wet from the shower you had earlier."; ], before [; Take: "That bench is far too heavy for your weak arms."; Pull, Push, PushDir, Turn: "Even on the ground, you can't manage the bench."; LookUnder: "Looks pretty clean to me."; Tie: "What? The bench doesn't need fixing. Leave the school board to that."; Rub: "Wouldn't it be hard to clean the bench? That's what school janitorial staff are for, it's their job."; Dry: if (self.wet==0) "The bench is already dry."; if (towel notin player) "You have nothing to dry the bench with."; if (self.wet==1) "The water is soaked into the wood, and you can't get it out. It'll dry up, surely."; ], wet 0, has enterable scenery supporter; Object -> hooks "hooks" with name "hooks" "racks", description "Some ordinary hooks designed to hold teamwear and the like.", describe [; print "^Some hooks are on one wall."; if (child(self)==0) ""; print " On the hooks"; if (children(self)==1) print " is "; else print " are "; WriteListFrom(child(self), ENGLISH_BIT+RECURSE_BIT); print ".^"; rtrue; ], before [; Receive: if (noun hasnt clothing) {print (cthatorthose) noun, " won't go on the hooks.^"; rtrue;} ], after [; Receive: print "You put ", (the) noun, " on the hooks.^"; rtrue; ], has pluralname supporter; Object -> -> reggie_miller_jersey "Reggie Miller fan jersey" with parse_name [i w; w=NextWord(); while (w=='reggie' or 'miller' or 'fan' or 'pacer' or 'pacers' or 'indiana') {w=NextWord(); i++;} if (w=='jersey' or 'shirt' or 'uniform') return i+1; return 0; ], add_to_scope miller_pocket, description "The jersey says ~Pacers 31~ on the front and ~Miller 31~ on the back. The jersey is from Champions and it has a large number 31. There is a pocket in it. This jersey is yours, and you have no idea why you left it here.", weight 6, has clothing open container; Object -> -> -> pocket_note "slip of paper" with name "slip" "of" "paper", description [; "A slip of paper reads, ~Locker combination: 1232~."; ]; Object -> towel "towel" with name "towel", description "This towel is good for drying yourself off.", weight 12; Object -> shower_stalls "shower stalls" with name "shower" "stall" "showers" "stalls", description "These shower stalls are pretty ordinary.", inside_description "There is a knob at the front that turns from hot to cold.", before [; SwitchOn: <>; SwitchOff: <>; Exit: if (knob.temperature==HOT_STATE && knob.water_on==true) {StopTimer(knob); "You were out of the water in time!";} Enter: knob.entry_seq(); ], describe [; rtrue; ], has enterable static transparent container open; Constant HOT_STATE=0; Constant MEDIUM_STATE=1; Constant COLD_STATE=2; Object -> -> knob "knob" with name "knob" "tap" "handle" "dial" "faucet", description [; print "The knob can be turned from hot to medium to cold to hot and it can be pulled to turn the water on. "; switch(self.temperature) {HOT_STATE: "The knob is set at hot."; MEDIUM_STATE: "The knob is set at medium."; COLD_STATE: "The knob is set at cold."; } ], describe [; switch(self.temperature) {HOT_STATE: "The knob is set at hot."; MEDIUM_STATE: "The knob is set at medium."; COLD_STATE: "The knob is set at cold."; } ], temperature HOT_STATE, water_on false, temp_flag false, time_left, time_out [; deadflag=3; "You get a severe burn and you have to go to the hospital."; ], before [; SwitchOn: <>; SwitchOff: <>; Set: <>; Turn: switch(self.temperature) {HOT_STATE: self.temperature=MEDIUM_STATE; print "You set the knob to a medium temperature."; if (self.water_on==true) {StopTimer(self); " Phew! Water's OK now.";} MEDIUM_STATE: self.temperature=COLD_STATE; print "You set the knob to a cold temperature."; if (self.water_on==true) " Brr! Water's cold now!"; COLD_STATE: self.temperature=HOT_STATE; print "You set the knob to a hot temperature."; if (self.water_on==true) {StartTimer(self, 3); " The water is scalding hot! You could get burned!";} } ""; Push: if (self.water_on==false) "The water is already off."; self.water_on=false; print "You turn the water off."; if (self.temperature==HOT_STATE && player in shower_stalls) StopTimer(self); ""; Pull: if (self.water_on==true) "The water is already on."; self.water_on=true; self.entry_seq(); "You turn the water on."; ], entry_seq [; if (player in shower_stalls) {switch(self.temperature) {HOT_STATE: StartTimer(self,3); "The water is so hot that it will burn you! Turn it down immediately!"; MEDIUM_STATE: "The water's just the right temperature."; COLD_STATE: "Brr! The water's too cold."; } } ], showered false, dry true, daemon [; if (player notin shower_stalls && self.water_on==true && player in Dressing_Room) "The water is running inside the stall."; if (player in shower_stalls && self.water_on==true) {print "The water is running, wetting your body. "; self.dry=false; switch(self.temperature) {HOT_STATE: "Eek! The water is scalding hot! Turn it down!"; MEDIUM_STATE: print "The water's at a just right temperature."; self.showered=true; the_bench.wet=1; ""; COLD_STATE: "Brr! The water's too cold."; } } ], has static; Object -> -> shampoo "shampoo bottle", with name "shampoo" "bottle", weight 8; !----------------------------------The Classroom---------------------------------- Key elevator_key "green key", with parse_name [i w; w=NextWord(); while (w=='green' or 'elevator' or 'lift') {w=NextWord(); i++;} if (w=='key') return i+1; return 0; ], description "A green key has a tag saying, ~ELEVATOR KEY~.", weight 1, before [; Turn: if (self in key_hole) {if (elevator hasnt general) {give elevator general; "You activate the elevator.";} } ]; Room Classroom "Classroom", with description "The classroom has rows of desks and a teacher's desk at one end.", n_to School_Corridor, has light outlets; Object -> teachers_desk "teacher's desk" with name "teachers" "desk" "teacher^s", description "This oak desk is a mess, full of papers.", describe "^The teacher's desk is a large oak desk. It is a giant mess and papers scatter the whole top of the desk.", has static supporter; Object -> -> mess "mess of papers" with name "mess" "of" "papers" "sheets", description "Well, this is a mess!", before [; Examine, Search: if (self hasnt general) {give self general; move elevator_key to location; keep_silent=1; ; keep_silent=0; "You find a key hidden among the papers.";} "You find nothing more hidden among the papers."; Take: "Those papers are too bulky to take."; ]; Object -> students_desk "student's desks" with name "student" "students" "student^s" "desks" "desk", description "These desks are good for writing.", before [; Take: "The desks are too heavy to take."; Enter: "The desks are not for you."; ], has scenery; !---------------------------------School Corridor East---------------------------- Room School_Corridor_East "School Corridor - East End" with name "lockers" "totes" "locker" "tote", with description "The east end of the school hallway is fairly nice. Lockers, which are not yours, line two walls and there is an elevator here. The hallway extends to the west, and the school cafeteria is to the north.", w_to School_Corridor, in_to [; if (elevator in location) <>; ], n_to Cafeteria, has light outlets; Object -> elevator "elevator doors" with name "elevator" "lift" "doors" "floor" "one" "1", description [; print "The elevator doors are made of metal. "; if (elevator_car in location) print "They are currently open."; else print "They are currently closed."; " A button and a key hole are on a panel beside the doors."; ], has static scenery; Object -> panel "panel" with name "panel", description "The panel has a button and a key hole on it.", has static scenery transparent; Object -> button "up button" with name "up" "arrow" "button", description "The button has an up arrow on it.", before [; Push: if (elevator has general) {move elevator_car to location; "An elevator car comes down.";} else {"Nothing happens.";} ], has static; Object -> key_hole "key hole" with parse_name [i w; w=NextWord(); while (w=='key') {w=NextWord(); i++;} if (w=='hole' or 'slot') return i+1; return 0; ], description [; print "A key hole for activating the elevator."; if (elevator_key in self) print " The elevator key is in the hole."; if (elevator has general) " The key hole is turned to ON."; else " The key hole is turned to OFF."; ], before [; Receive: if (noun~=elevator_key) print_ret (cthatorthose) noun, " doesn't fit."; Turn: if (elevator_key in self) <>; "You can't manage turning the key hole. You need a key to do it."; Unlock: if (second==elevator_key) {if (elevator_key notin self) ; ; <>; } ], has open container static; !----------------------------------The Cafeteria---------------------------------- Object Cafeteria "Cafeteria" with description [; print "This cafeteria, "; if (the_time>=700 && the_time <=760) print "which is jam-packed with kids"; else print "which is empty"; ", has been painted recently. New tables, which are blue, line the cafeteria, except for the counter to buy food."; ], s_to School_Corridor_East, has light outlets; Object -> s_s "class schedule" with name 'schedule' 'timetable' 'grid' 'time' 'timetable' 'class' 'school', article [; if (self.seen==0) {print "someone's";} else {self.print_name(); print "'s";} ], number1 0, number2 0, seen 0, describe [; if (self.seen==0) "^Someone's class schedule (you don't know who's) is sitting on the floor here."; else {self.print_name(); "'s class schedule is sitting on the floor here.";} ], description [; self.seen=1; font off; print " School Timetable^"; style bold; print " "; self.print_name(); style roman; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|Time pd. |",(wd) 1,"|",(wd) 2,"|",(wd) 3,"|",(wd) 4,"|",(wd) 5,"|"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|8:30-9:10 | English | Music | History | Music | Math |"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|9:20-10:00 | French | Science |Geography | Math | Health |"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|10:10-10:50| Science | Math | French | Gym | English |"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|11:00-11:40| History | Gym | Science | English |Geography |"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|11:40-12:40|", (PS) 22, (tobold) "LUNCH HOUR", (PS) 22, "|"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|12:40-1:20 |Geography | History | Math | French | French |"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|1:30-2:10 | Gym | English | English | Science | Music |"; print "^+-----------+----------+----------+----------+----------+----------+"; print "^|2:20-2:50 |", (PS) 21, (tobold) "STUDY PERIOD", (PS) 21, "|"; print "^+-----------+------------------------------------------------------+"; new_line; new_line; font on; print "School starts 8:30am, ends 2:50pm. Lunch period from 11:40 to 12:40."; new_line; ], weight 1, print_name [; if (self.number1==0) self.number1=random(20); if (self.number2==0) self.number2=random(30); switch(self.number1) {1: print "Andrew "; 2: print "Ben "; 3: print "Frank "; 4: print "Allison "; 5: print "Sally "; 6: print "Vince "; 7: print "David "; 8: print "Max "; 9: print "Maddie "; 10: print "Allison "; 11: print "Alicia "; 12: print "Sam "; 13: print "Ally "; 14: print "Katie "; 15: print "John "; 16: print "Anthony "; 17: print "Daisy "; 18: print "Frederick "; 19: print "Christopher "; 20: print "James "; } switch(self.number2) {1: print "Quinn"; 2: print "Scott"; 3: print "Smith"; 4: print "Lewis"; 5: print "Mourning"; 6: print "Carter"; 7: print "Benford"; 8: print "Crothers"; 9: print "Wallen"; 10: print "Hilderley"; 11: print "Busse"; 12: print "Bala"; 13: print "White"; 14: print "Black"; 15: print "Maider"; 16: print "Banger"; 17: print "Smith"; 18: print "Billings"; 19: print "Anderson"; 20: print "McCurdy"; 21: print "Wheeler"; 22: print "Crew"; 23: print "Jackson"; 24: print "Bryant"; 25: print "Wallace"; 26: print "Freeman"; 27: print "Williams"; 28: print "MacKinnon"; 29: print "Carmichael"; 30: print "Edwards"; } ]; [ ToBold n; style bold; print (string) n; style roman; ]; [ WD n; switch(n) {0: print (tobold) " Sunday "; 1: print (tobold) " Monday "; 2: print (tobold) " Tuesday "; 3: print (tobold) "Wednesday "; 4: print (tobold) " Thursday "; 5: print (tobold) " Friday "; 6: print (tobold) " Saturday "; } ]; [ PS n; spaces(n); ]; Object -> cafeteria_tables "blue tables" with name "blue" "table" "table" "chair" "chairs" "new", description "These blue tables are relatively close together. They are obviously new. Chairs are attached to them.", has supporter enterable; Object -> food_counter "food counter" with name "food" "counter" "countertop" "serving" "area" "ledges", description "The countertop has ledges on it for putting trays on it.", has supporter; !----------------------------------Upper Hallway---------------------------------- Object Upper_hallway "Second Floor School Hallway" with description "The second and top floor of the school is up here. Lockers line the halls, once again. A pair of elevator doors stands here. A door leads north to a gym viewing area.", in_to [; if (elevator_car in location) <>; ], n_to Viewing_Area, has light outlets; Object -> elevator2 "elevator doors" with name "elevator" "lift" "doors" "floor" "2" "two", description [; print "The elevator doors are made of metal. "; if (elevator_car in location) print "They are currently open."; else print "They are currently closed."; " A button is on a panel beside the elevator."; ]; Object -> panel2 "panel" with name "panel", description "The panel has a button and a key hole on it.", has static scenery transparent; Object -> dbutton "down button" with name "down" "arrow" "button", description "The button has an down arrow on it.", before [; Push: if (elevator has general) {move elevator_car to location; "An elevator car comes up.";} else {"Nothing happens.";} ], has static; !-----------------------------------Gym Viewing Area------------------------------ Object Viewing_Area "Gym Viewing Area" with name "viewing" "area" "gym" "floor", description "This viewing area is above the gym. It slopes down near the gym floor but there is a barrier between this area and the few player and coach rows. The only way to go is back south. The gym is empty now.", s_to Upper_Hallway, cant_go "The only way to go is back south up to the hallway.", has light outlets; Chair -> seats "seats" with name "seat" "chair" "chairs" "seats" "benches" "bench", description "Rows and rows of seats line this viewing area.", describe [; print "^"; <>; ]; Object -> Simon_Crew "Simon Crew" with name "simon" "crew" "boy" "man" "dude" "cool" "friend" "guy" "pal", description "He sweeps, dunks and shoots. He's cool on the basketball team.", describe [; print "Simon Crew is standing here."; if (child(self)~=0) {print " He is carrying "; WriteListFrom(child(self), ENGLISH_BIT); "."; } ""; ], before [; Dance: if (TestScope(cd_player,self)==0 || cd_player hasnt on) "~Dance without music? Huh? Huh?~"; if (child(cd_player)==bach_cd) "~That quote good Bach music you want me to dance to? The school dances have better music than that!~"; "~With me? What dum partner dancing? You dance rap by yourself around friends. It's funky and stuff."; ], life [w x y z; Ask: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); if (w=='the' or #n$a or 'your' or 'my' or 'an' or 'this' or 'that' or 'some') {w=x; x=y; y=z; z=0;} if (w=='basketball' && x=='team') "~The basketball team is very cool!~"; if (w=='basketball' && x=='game' || w=='game') switch(question_word) {WHERE_WORD: "~Downsview Stadium.~"; WHEN_WORD: "~Seven o'clock.~"; WHAT_WORD: "~The game determines whether we're in the championships.~"; } if (w=='championships' or 'championship') "~We need to win this game to get into the championships.~"; if (w=='basketball' or 'basketballs' or 'hoops') switch(random(4)) {1: "~Basketball's a really good sport.~"; 2: "~Yah. Vince Carter's got slam dunks.~"; 3: "~Hoops. Got a game tonight!~"; 4: "~Reggie Miller... Three Pointer... IN!~"; } if (w=='music') "~Music! Sweet! I love music!~"; if (w=='rap') "~Rap music rules!~"; if (w=='will' or 'smith') "~Will Smith rules!~"; if (w=='classical' or 'bach' or 'beethoven' or 'mozart' or 'vivaldi') {self.classical++; "~Classical music sucks!~ Simon snores.";} if (w=='musician') {switch(x) {'will', 'smith': "~Will Smith rules!~"; default: "~I don't know any musician by that name.~"; } } if (w=='vince' or 'carter') "~Vince Carter is the king of the slam dunk!~"; if (w=='shaq' or 'shaquille' or 'o^neal') "~Shaquille O'Neal! He's cool.~"; if ((w=='kobe' or 'bryant' && consult_words==1) || (w=='kobe' && x=='bryant')) {switch(random(4)) {1: "~Kobe Bryant has cool dunks.~"; 2: "~He's one of the best Lakers.~"; 3: "~A nice guy Kobe is.~"; 4: "~Cool stuff.~"; } } if (w=='kobe^s' or 'bryant^s') {switch(x) {'sprained', 'sprain': if (y=='ankle') "~Too bad he got that sprained ankle.~"; 'move', 'moves': "~Kobe's got cool moves.~"; 'dunk', 'dunks': "~Kobe's quite imaginitative with his dunks.~"; } } if (w=='kobe' && x=='bryant^s') {switch(y) {'sprained', 'sprain': if (z=='ankle') "~Too bad he got that sprained ankle.~"; 'move', 'moves': "~Kobe's got cool moves.~"; 'dunk', 'dunks': "~Kobe's quite imaginitative with his dunks.~"; } } if (w=='michael' or 'jordan') "~Michael Jordan is the greatest player of all time!~"; if (w=='scottie' or 'pippen') "~Scottie Pippen's okay for those Portland Trail Blazers.~"; if (w=='reggie' or 'miller') "~Reggie Miller's the big attraction for those Pacers.~"; if (w=='jalen' or 'rose') {switch(random(3)) {1: "~Jalen Rose shoots good three pointers.~"; 2: "~He led the Indiana Pacers into the NBA finals.~"; 3: "~He's a fairly good Pacer.~"; } } if (w=='reggie' or 'miller') {switch(random(3)) {1: "~He's the best Pacer!~"; 2: "~Reggie Miller's the main attraction for the Pacers.~"; 3: "~Helped Pacers win Lakers in game 3 last night!~"; } } if (w=='toronto' && x==0 or 'ontario') "~Toronto, Ontario is a good place to live.~"; if (w=='toronto' && x=='raptors' or 'raptor' || w=='raptors' or 'raptor') "~Those Raptors ain't very good, except for Vince Carter.~"; if ((w=='la' && x=='lakers' or 'laker') || (w=='los' && x=='angeles' && y=='lakers' or 'laker') || (w=='lakers' or 'laker')) {switch(random(8)) {1: "~Lakers rule!~"; 2: "~Shaquille O'Neal's got the moves!~"; 3: "~Kobe Bryant's got the moves!~"; 4: "~See if they beat Indiana in the NBA finals.~"; 5: "~Shaquille O'Neal and Kobe Bryant are the best Lakers players.~"; 6: "~Cool team.~"; 7: "~Certainly they rule, but... I think I prefer the Pacers.~"; 8: "~It's too bad that Kobe Bryant got that sprained ankle.~"; } } if ((w=='indiana' && x=='pacer' or 'pacers') || (w=='pacer' or 'pacers')) {switch(random(10)) {1: "~Reggie Miller's cool with 'em Pacers.~"; 2: "~Cheerin' for the Pacers in the NBA finals.~"; 3: "~Oh yah, oh yah, Pacers rule.~"; 4: "~Reggie Miller and Jalen Rose take up the Pacers to another level!~"; 5: "~Yup, 'em Pacers are a cool team. That's what Indiana's about.~"; 6: "~Wonder if they can beat the Lakers?~"; 7: "~Had the best record in the Eastern Conference.~"; 8: print "~It "; style bold; style underline; print "is"; style roman; " Miller Time! The Pacers rule!~"; 9: "~They won the NBA finals game Wednesday night!~"; 10: "~Series is 3-1 for the Lakers. Pacers won't win the NBA Finals.~"; } } if ((w=='slam' && x=='dunk' or 'dunks' or 'dunking') || (w=='dunk' or 'dunks' or 'dunking')) {switch(random(4)) {1: "~The slam dunk! Very cool! I can do some of those too.~"; 2: "~That's what Vince Carter, Shaquille O'Neal and Kobe Bryant are good at.~"; 3: "~Cool basketball move.~"; 4: "~Want to see my slam dunk down in the gym?~"; } } if (w=='school' || (w=='high' or 'secondary' && x=='school')) "~School's okay, for me. I have an A- average.~"; "~Don't know.~"; Answer: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); if (w=='yes') {self.yes_order(); rtrue;} if (w=='no') {self.no_order(); rtrue;} "~Don't know.~"; Tell: "~I'm not interested.~"; Show: switch(noun) {rap_cd: if (self.rap_played==0) {self.yes_status=2; "~Good. Can you play it?~";} else "~That music is sweet!~"; bach_cd: self.classical++; "~Don't believe that classical music is any good.~"; } Give: switch(noun) {rap_cd: if (self.rap_played==0) {self.yes_status=2; "~Can you play it first?~";} else {move rap_cd to self; self.yes_status=3; "~Thanks for the rap CD. Want to see me slam dunk in the gym?~";} bach_cd: self.classical++; switch(self.classical) {1: "~I don't want that CD.~"; 2: "~Geez, I do not want that CD!~"; 3: "~Come on, I hate classical music!~"; 4: "~I hate classical music!~"; 5: "~I HATE CLASSICAL MUSIC!!!~"; default: "~YUCK! I HATE CLASSICAL MUSIC!!!~"; } basketball: move basketball to self; "~Thanks.~"; default: "~No, thanks.~"; } ], orders [w x y z; Question: return DoQuestions(self); Yes: self.yes_order(); rtrue; No: self.no_order(); rtrue; Strong: switch(verb_word) {'fuck': "~No using the f-word!~"; 'shit': "~Shit! WHAT? What happened?~"; 'sod': "~Unpleasant? I don't think you should be using language. You'd better know what sod means!~"; 'damn': "~Damn! I've got to get you for that nasty language!~"; 'frig': "~You know frig means fuck. And fuck is a bad word!~"; } Mild: switch(verb_word) {'bother': "~No thank you, I don't want to be bothered, or bother anyone else!~"; 'curses': "~Curse what?~"; 'drat': "~Drat? You've got some nasty language there, Jamie!~"; 'darn': "~Darn? You're using nasty language there, Jamie!~"; } Drop: if (noun notin self) "~I don't have ", (thatorthose) noun, "!~"; if (noun==rap_cd) "~I like this music!~"; "~For I don't want to drop ", (thatorthose) noun, "!~"; DunkWith: if (noun~=basketball) "~What?~"; if (self notin gym) "~Yah, really. Need nets to dunk.~"; if (basketball notin self) "~Don't have the ball.~"; self.dunk_knowledge=self.dunk_knowledge+(17+random(6)); if (self.dunk_knowledge>70) self.dunk_knowledge=70; "Simon Crew shows you a bunch of his dunks. He teaches you a lot about how to dunk. He shows you the ins and outs of dunking and you feel much better at dunking. He shouts, ~Try a dunk!~"; Dunk: if (self notin gym) "~Yah, really. Need nets to dunk.~"; if (basketball notin self) "~Don't have the ball.~"; self.dunk_knowledge=self.dunk_knowledge+(17+random(6)); if (self.dunk_knowledge>70) self.dunk_knowledge=70; "Simon Crew shows you a bunch of his dunks. He teaches you a lot about how to dunk. He shows you the ins and outs of dunking and you feel much better at dunking. He shouts, ~Try a dunk!~"; ThrowAt: if (noun~=basketball || second~=basketball_net) "~What?~"; if (self notin gym) "Yah, really. Need nets to shoot.~"; "~I'm not all that good at shooting. I'm better at dunking.~"; ShootBall: if (self notin gym) "~Yah, really. Need nets to dunk.~"; if (basketball notin self) "~Don't have the ball.~"; "~I'm not all that good at shooting. I'm better at dunking.~"; Go: "~Tell me where to go, not which way to go. I know this school by heart.~"; Give: if (noun notin self) "~I don't have ", (thatorthose) noun, "!~"; if (noun==rap_cd) "~I like this music!~"; if (noun==basketball) {move basketball to location; print "~Sure.~ Simon gives you the ball.^"; keep_silent=1; ; keep_silent=0; rtrue;} "~For I don't want to give you ", (thatorthose) noun, "!~"; GoTo2: wn=consult_from; w=NextWord(); x=NextWord(); y=NextWord(); z=NextWord(); if (w=='the') {w=x; x=y; y=z;} if (w=='gym' or 'gymnasium') {self.gym_goto(); rtrue;} if (w=='school') "~We're already in the school.~"; "~Never heard of such a place.~"; Eat: if (noun hasnt edible) "~I'm not going to eat something that's not edible."; "~I'm not really hungry.~"; Drink: if (noun~=gatorade or coke or pepsi) "~For that is not a beverage!~"; "~I'm not really thirsty.~"; QuestionDo: wn=consult_from; w=NextWord(); x=NextWord(); if (w=='you' && x=='like' or 'eat' or 'drink') {consult_from=consult_from+2; <>;} "Don't know."; ], yes_order [; switch(self.yes_status) {0: "~Yes? About what?~"; 1: "~You've got the CD. Can I actually have it?~"; 2: self.yes_status=0; if (cd_player in player) "~I guess you can play it. You have the CD player.~"; "~Yes? You don't have the CD player!~"; 3: self.yes_status=0; self.gym_goto(); } ], gym_goto [; if (rap_cd notin self) "~Play and give me the rap CD first.~"; if (self in gym) "~Oh my god. We're already in the gym.~"; move self to gym; print "You follow Simon Crew downstairs to the gym.^"; PlayerTo(gym); rtrue; ], no_order [; switch(self.yes_status) {0: "~No? About what?~"; 1: self.yes_status=0; "~No? Why not?~"; 2: self.yes_status=0; if (cd_player in player) "~But you've got the CD player!~"; "~I guess you don't have the CD player.~"; 3: "~No? I have a great slam dunk! Say yes, please.~"; } ], each_turn [; if (TestScope(cd_player, self)==1 && cd_player has on) {switch(child(cd_player)) {bach_cd: self.classical++; "~That's all you've got? Who cares about Bach? Play something else.~"; rap_cd: self.rap_played=1; self.yes_status=1; "~Oh yah! Oh yah! This stuff rules! I love Will Smith. Can I have the CD?~"; } } ], react_before [; Strong: switch(verb_word) {'fuck': "~No using the f-word!~"; 'shit': "~Shit! WHAT? What happened?~"; 'sod': "~Unpleasant? I don't think you should be using language. You'd better know what sod means!~"; 'damn': "~Damn! I've got to get you for that nasty language!~"; 'frig': "~You know frig means fuck. And fuck is a bad word!~"; } Mild: switch(verb_word) {'bother': "~No thank you, I don't want to be bothered.~"; 'curses': "~Curse what?~"; 'drat': "~Drat? You've got some nasty language there, Jamie!~"; 'darn': "~Darn? You're using nasty language there, Jamie!~"; } ], dunk_knowledge 0, rap_played 0, yes_status 0, classical 0, has animate proper transparent; !---------------------------------the elevator car-------------------------------- Object elevator_car "elevator car" with name "elevator" "lift" "car" "cab", description "The elevator cab is fairly roomy. There are mirrors on either side of the elevator cab and there is a panel of buttons.", inside_description "Inside the roomy elevator cab, there are two mirrors and a panel of buttons. The buttons are labeled 1 and 2.", describe "^An elevator car rests inside the shaft here.", before [; VagueGo: <>; ], has enterable; Class AButton with name "button", description [; print_ret "This button, labeled ", self.number, ", can be pushed to go to that floor."; ], before [; Push: if (self.destination==parent(elevator_car)) print_ret "You're already at the ", (ordinal) self.number, " floor."; print "You go to the ", (ordinal) self.number, " floor.^"; move elevator_car to self.destination; PlayerTo(elevator_car); rtrue; ], has scenery; [ Ordinal n; print n; switch(n%10) {1: print "st"; 2: print "nd"; 3: print "rd"; 0, 4 to 9: print "th"; } ]; AButton -> button_1 "button 1", with name "1st" "first" "floor" "story" "storey" "1" "one", number 1, destination School_Corridor_East; AButton -> button_2 "button 2", with name "2nd" "second" "floor" "story" "storey" "2" "two", number 2, destination Upper_hallway; !---------------------------------the subway train-------------------------------- Object subway_train "subway train" Rosedale_Subway_Platform with name "subway" "train" "underground" "tube" "tunnel" "car", description "A TTC subway train, with lots of doors.", describe [; print "^A subway train is on its tracks, "; if (self.tofinch==true) "going towards Rosedale."; else "going towards Spadina."; ], cycle 0, tofinch false, stofinch false, daemon [from_to to_to; self.cycle++; from_to=parent(self); if (self.tofinch==true) {switch(from_to) {Spadina_Subway_Platform: to_to=Union_Subway_Platform; union_subway_platform: to_to=queen_subway_platform; queen_subway_platform: to_to=Rosedale_Subway_Platform; self.stofinch=false; } } else {switch(from_to) {Rosedale_Subway_Platform: to_to=queen_Subway_Platform; queen_subway_platform: to_to=union_subway_platform; union_subway_platform: to_to=Spadina_Subway_Platform; self.stofinch=true; } } if (self.cycle==1) {move self to to_to; if (player in subway_train) {print "^The subway takes you to the next station.^"; PlayerTo(subway_train);} self.cycle=0; self.tofinch=self.stofinch; if (player notin self && player in parent(self)) {print "A subway train comes in, "; if (self.tofinch==true) "going towards Rosedale."; else "going towards Spadina.";} if (player in from_to && player notin self) "The subway train leaves.";} ], has enterable transparent light static; !----------------------------the basketball skills daemon------------------------- Object basketball_daemon "(basketball daemon)" with daemon [; if (self.cycle==10) {basketball_net.inp--; self.cycle=0;} if (action~=##ThrowAt || (action==##ThrowAt && noun ~= basketball) || action~=##Dribble || action~=##ShootBall || action~=##Dunk) {self.cycle++;} question_word=0; ], cycle 0; !--------------------------------------------------------------------------------- ! A general light that will be found_in many rooms of the house Class GLight with name "light" "switch", short_name "light", before [; SwitchOn: give self light; SwitchOff: give self ~light; ], has on light switchable static scenery; GLight l1 "kitchen light" kitchen; GLight l2 "west corridor light" West_Corridor; GLight l3 "south corridor light" South_Corridor; GLight l4 "master bedroom light" Master_bedroom; GLight l5 "sitting room light" Sitting_room; GLight l6 "hanging light" front_hall with name "pendant" "hanging", short_name "pendant light"; !------------------------Your hands---------------------------------------------- Object your_hands "your hands" with name "your" "my" "hands" "hand", description "You could manage to use them more than you do."; !------------------------Online Help--------------------------------------------- [ HelpMenu; if (menu_item==0) {item_width=8; item_name="About Schooldays"; return 2;} if (menu_item==1) {item_width=12; item_name="Instructions for playing";} if (menu_item==2) {item_width=8; item_name="Acknoledgements";} ]; [ PlayingInstructionsMenu; if (menu_item==0) {item_width=12; item_name="Instructions for playing"; return 11;} if (menu_item==1) {item_width=5; item_name="Navigation";} if (menu_item==2) {item_width=13; item_name="Taking and dropping objects";} if (menu_item==3) {item_width=6; item_name="Conversation";} if (menu_item==4) {item_width=8; item_name="Food and clothing";} if (menu_item==5) {item_width=13; item_name="Containers and supporters";} if (menu_item==6) {item_width=3; item_name="Doors";} if (menu_item==7) {item_width=5; item_name="Meta verbs";} if (menu_item==8) {item_width=3; item_name="Lamps";} if (menu_item==9) {item_width=7; item_name="Miscellaneous";} if (menu_item==10) {item_width=14; item_name="Examining your surroundings";} if (menu_item==11) {item_width=14; item_name="A sample transcript of play";} ]; [ HelpInfo; if (menu_item==1) {PlayingInstructions(); return 2;} if (menu_item==2) {print "Schooldays is Copyright (c) 2000 Andrew MacKinnon. Please send all bug reports to . ^ ^Redistribution is under the following terms: ^1. All copyright messages from the author must remain attached to this game and may not be modified. ^2. Verbatim copies of source and/or binary versions of the game may be distributed freely. ^3. Modified versions of the game may be distributed, providing that: ^ a) the filename is changed significantly from the original filename to avoid confusion between original and modified versions; ^ b) a notice of the author's about the change must be placed as a comment in the game; and ^4. You may play this game as much as you want. :)^ ^ ^Thanks to my betatesters: ^ ^Ken Finlayson ^"; } ]; [ PlayingInstructionsInfo; if (menu_item==1) {print "To navigate, type a command such as 'go east' or just 'east' to go eastward. There are also the directions west, north, south, ne, nw, se and sw. The directions like 'north' etc. can be abbrieviated to their first letter, e.g. 'n', and directions like 'southeast' can abbrieviated to 'se'. You can also say 'walk east' or 'run east'.^^"; print "Some objects in the game may be enterable. These may be entered by using 'enter thing', and exited by using 'exit' or 'out'.^";} if (menu_item==2) {print "Objects will often be available. You can 'get', 'take', and 'drop' them. These verbs will work with multiple objects. The command 'get coins' will work for all the visible coins. If there are three bronze, two silver, and two gold coins, then: ^ 'take coins' takes all the coins in sight; ^ 'take all the coins but gold' takes the bronze and silver coins; ^ 'drop silver coin' drops a silver coin; ^ 'drop a coin' drops a reasonable coin (the game will let you know which was chosen).^"; } if (menu_item==5) {print "Some containers and things to put objects on will appear in this game. You can use 'put thing in container' to put an object in a container and 'put thing on supporter' to put an object on a supporter. The 'put' verb works on multiple objects. Things that are in open containers you can 'take thing', 'take thing from object' or 'remove thing from object' with them.^"; } if (menu_item==4) {print "Things to eat and drink and clothing will appear in this game. You can 'eat thing', or 'drink thing' to eat or drink something (therefore removing it from the game.) The game will let you know if something is inedible or not suitable to drink.^^"; print "Clothing can be worn and taken off. To wear something, type 'wear thing' and to take it off, type 'disrobe thing' or 'take off thing'. You may also want to wear or disrobe something. These verbs will take multiple objects. You can also use the verbs 'dress' and 'undress' to wear everything in sight or disrobe and drop everything you're wearing, respectively.^"; } if (menu_item==6) {print "Some locked doors and cupboards will appear in the game. To unlock a door, type 'unlock (door or cupboard) with key' or ditto with lock. To open them, once unlocked, say 'open thing' or to close them, say 'close thing. If you only have one key, the game will be able to choose a key for you.^"; } if (menu_item==3) {print "Certain characters will appear in this game. To talk with them, use 'ask about ', 'tell about ', 'say to ', or ', '. ^For example: ^"; font off; print "^ laura, get the watch ^ ask laura about sports ^ laura, what is your favorite color ^ tell laura about cooking ^ say hello to laura ^ laura, hello ^ laura, do you like McDonalds food"; font on; print "^ ^are all valid commands. Note that 'ask cabbie about fares' is identical to 'cabbie, what are the fares' or 'cabbie, how much are the fares', and 'laura, hello' is identical to 'say hello to laura'. You will probably get the best mileage by asking characters about things and using question words, since conversational ability is limited. Do not use question marks or exclamation marks after questions or statements.^"; } if (menu_item==7) {print "'save': ^Saves the current game. Will prompt for filename. ^'restore': ^Restores a saved game. ^'notify on', 'notify off': ^Turns notification of score changes on or off. ^'verbose', 'normal': ^Prints full room descriptions (even if you've been there before, the default) ^'brief': ^Prints full room descriptions if you haven't been there before, and short ones otherwise. ^'superbrief': ^Always prints short room descriptions (even if you haven't been there before) ^'objects': ^Prints the names of all the objects you've handled. ^'places': ^Prints the names of all the places you've visited. ^'restart': ^Restarts your game, discarding any progress you've done in the game. ^'quit': ^Quits the game, discarding any progress you've done in the game. ^'undo': ^Undoes the last action (doesn't work on all interpreters). ^'plain', 'pretty': ^Switches between 'plain' and 'pretty' printing mode. This affects whether ^menus are displayed with reverse effects and scrollable text, or just ^using the 'type a number' scheme."; } if (menu_item==8) {print "Lamps and other electrical devices will appear quite frequently. They can be turned on using 'switch on thing' or 'turn on thing' and turned off using 'switch off thing' or 'turn off thing'.^^"; print "Some lamps are portable, while others have to be plugged in. You can plug them in inside most rooms, although you can't plug them in most places outside or in an area without outlets. You can't hold something plugged in (taking it will unplug it) and you can't plug things in where it is dark.^"; } if (menu_item==9) {print "You can take inventory using the verb 'inventory', 'take inventory' or 'i'. You can display a 'wide' or 'tall' inventory by adding that word the end of 'i' or 'inventory' (but not 'take inventory'). For example:^^"; print "a tall inventory: ^ ^You are carrying: ^ a pair of socks (being worn) ^ a Mason jar (which is open) ^ some bricks of Lego ^ a plate ^ a chicken breast ^ a flashlight (which is open and providing light) ^ a battery ^ ^and a wide inventory: ^ ^You are carrying a pair of socks (being worn), a Mason jar (which is open), inside which are some bricks of Lego, a plate, on which is a chicken breast, a flashlight (which is open and providing light), inside which is a battery.^"; } if (menu_item==10) {print "To print a room description, type 'look'. (This will be done whenever you move.) To examine an object, type 'look at object' or 'examine object'. ('l' is an abbreviation for 'look', 'x' is an abbreviation for 'examine'.) To search an object, type 'search thing', or 'look thing'. To look under an object, type 'look under thing'.^"; } if (menu_item==11) {print "(This transcript is not taken from 'SCHOOLDAYS', but it is like that of ^ an adventure game). ^ ^"; style bold; print "Chalmers Church Church Hall^"; style roman; print "This is the large hall of Chalmers church. Oak benches stand throughout the hall, and there is a large altar in front of you. To the south is the street and to the north is the talking hall.^^"; print "Flowers crowd the altar.^"; print "The minister stands up front, reading a sermon from the Bible.^^"; print ">go south^"; print "But the service isn't over!^ The minister finishes reading the sermon.^^"; print ">examine minister^"; print "The minister is dressed up on the altar. He is a chubby guy.^"; print "The service finishes. All the people stand up and walk to the north.^^"; print ">inventory^"; print "You are carrying: ^ a baseball cap ^ two dollars ^ a Reggie Miller fan jersey (being worn)^^"; print ">go south^^"; style bold; print "Busy Street^"; style roman; print "A street packed with people stands here. Back north is the church. Hurds of people go by, of which none you recognize. You can go east to a park, in which is a basketball court.^^"; print ">search people^"; print "At first you don't notice anyone you recognize. Then you notice a bunch of men dressed in Indiana Pacers jerseys. Although you first think these are just fans, you soon realize that Reggie Miller is in there. These Pacers are attracted by your jersey. You slap the guys high-five.^^"; print ">l at reggie miller^"; print "He's the one with the number 31. He's fairly light-skinned and he shoots good three pointers. He is tall, athletic and thin. He is carrying a basketball.^^"; print ">reggie miller, play some basketball^"; print "The other Pacers join you. One of your friends, Simon Crew, notices these guys and accompanies them. You cross the street to the basketball court.^^"; style bold; print "Basketball Court^"; style roman; print "This new facility was built recently by the City. Two ten-foot glass NBA-approved basketball nets are attached to the ground here. Markings are painted in the pavement.^^"; print "Reggie Miller, Jalen Rose and some other Pacers you recognize stand by the court, around Simon Crew.^^"; print "At one side of the court, a hot dog cart sits, its owner waiting for sales.^^"; print ">ask reggie for basketball^"; print "Reggie Miller hands you the basketball.^^"; print ">throw basketball at net^"; print "The ball goes in the net! Reggie hi-fives me and he shouts, ~Three pointer! Good work!~^^"; print ">look at hot dog cart^"; print "The cart says: ^Hot Dogs: $2.00 ^Coca-Cola: $1.00 ^Hamburgers: $2.50^^"; print ">buy a hot dog^"; print "You buy a hot dog from the hot dog vendor.^^"; print ">eat the hot dog^"; print "You eat the hot dog. Mmm. You dispose of the serviette at a nearby trash can.^^"; print ">simon, dunk^"; print "What must you be thinking? I don't have the ball!^^"; print ">dunk^"; print "Whoa! I guess what Simon taught me at school worked, since the dunk went in!^^"; } ]; [ HelpSub; DoMenu("There is information available on the following: ^ ^ Instructions for playing ^ Acknoledgements", HelpMenu, HelpInfo); ]; Constant H_TOPIC=0; Constant I_TOPIC=1; [ HelpTopicSub w i topickind; wn=consult_from; w=NextWord(); switch(w) {'instruction', 'instructions','play','playing': PlayingInstructions(); 'acknoledgements','copyright','acknologements': i=2; topickind=H_TOPIC; 'navigation', 'movement': i=1; topickind=I_TOPIC; 'taking', 'dropping', 'object', 'manipulation': i=2; topickind=I_TOPIC; 'conversation', 'talking', 'chat', 'talk': i=3; topickind=I_TOPIC; 'food', 'clothing': i=4; topickind=I_TOPIC; 'containers', 'supporters': i=5; topickind=I_TOPIC; 'door', 'doors', 'key', 'keys': i=6; topickind=I_TOPIC; 'meta', 'verbs', 'verb', 'metaverbs', 'metaverb', 'save', 'restore': i=7; topickind=I_TOPIC; 'lamp', 'lamps', 'electric', 'electrical', 'devices': i=8; topickind=I_TOPIC; 'misc', 'miscellaneous', 'inventory', 'inventories': i=9; topickind=I_TOPIC; 'examining', 'examine', 'looking', 'look': i=10;topickind=I_TOPIC; 'sample', 'transcript', 'log': i=11;topickind=I_TOPIC; default: HelpSub(); } menu_item=i; switch(topickind) {I_TOPIC: PlayingInstructionsInfo(); H_TOPIC: HelpInfo(); } ]; [ PlayingInstructions; DoMenu("There is information available on the following: ^ ^ Navigation ^ Taking and dropping objects ^ Conversation ^ Food and clothing ^ Containers and supporters ^ Doors ^ Meta verbs ^ Lamps ^ Miscellaneous ^ Examining your surroundings ^ A sample transcript of play", PlayingInstructionsMenu, PlayingInstructionsInfo); ]; ! Entry points [ Initialise i; lookmode=2; ! verbose mode location=Your_room; SetTime(390,1); ! that is, 6:30am 1min StartDaemon(dog); ! start the dog's daemon StartDaemon(subway_train); ! start moving the subway train StartDaemon(frank); ! start Frank's daemon StartDaemon(basketball_daemon); ! start the basketball daemon StartDaemon(knob); ! react to when the water is on in the shower stall StartDaemon(privacy_door); StartDaemon(baseball_game); StartDaemon(basketball_game); StartDaemon(ticker_board); StartDaemon(receiver); switch(random(9)) {1: move rs1 to player; give rs1 worn; 2 to 5: move ws1 to player; give ws1 worn; 6 to 9: move gs1 to player; give gs1 worn; } switch(random(2)) {1: move shirt to player; give shirt worn; 2: move lsshirt to player; give lsshirt worn; } switch(random(2)) {1: move jeans to player; give jeans worn; 2: move shorts to player; give shorts worn; } switch(random(8)) {1 to 5: move wu1 to player; give wu1 worn; 6 to 8: move gu1 to player; give gu1 worn; } move shoes to player; give shoes worn; fridge.cubic_feet=random(6)+18; i=Loonie.create(); move i to cashbox; i=Loonie.create(); move i to cashbox; TitlePage(); return 2; ]; [ TitlePage width keypress; @erase_window -1; print "^^^"; width=0->33; if (width==0) width=80; font off; style bold; PrintWidth("School Days: Prologue",width,21); new_line; style roman; print "You have recently lived in Toronto but then your parents moved away. You really loved them. But, you were kidnapped and locked in this house. Those kidnappers really should be put in jail.^ ^ Well, you don't want to stay here any longer than you can help. You want to get to school on this Saturday to see your grade nine pals. And last night you were shoved in this house. As you wake up, you realise...^^"; PrintWidth("[Please press any key to begin.]",width,29); font on; do {@read_char 1 0 0 keypress;} until (keypress~=0); @erase_window -1; print "^^^... that you are all alone in a locked bedroom, and you need to find a way out.^"; new_line; print "Schooldays Version ",(0-->1)&$03ff," is Copyright (c) 2000 Andrew MacKinnon.^ New users might want to type 'help'.^"; ]; [ PrintWidth s w l t; t=(w/2)-(l/2); spaces t; print (string) s, "^"; ]; [ PrintCommand from i k l spacing_flag; if (from==0) { i=verb_word; if (LanguageVerb(i) == 0) if (PrintVerb(i) == 0) print (address) i; from++; spacing_flag = true; } for (k=from:kk; if (i == PATTERN_NULL) continue; if (spacing_flag) print (char) ' '; if (i==0) { print (string) THOSET__TX; jump TokenPrinted; } if (i==1) { print (string) THAT__TX; jump TokenPrinted; } if (i>=REPARSE_CODE) {l=No__Dword(i-REPARSE_CODE); if (PrintSpecialWord(l)==0) print (address) l;} else print (the) i; .TokenPrinted; spacing_flag = true; } ]; [ PrintSpecialWord word; if (word=='underneath') {print "underneath"; rtrue;} rfalse; ]; [ ObjectOfClassIn cls obj i x; objectloop(x ofclass cls && x in obj) {i++;} if (i>0) return 1; else return 0; ]; [ CountOfClassIn cls obj i x; objectloop(x ofclass cls && x in obj) {i++;} return i; ]; [ SomethingClassIn cls obj i x; objectloop(x ofclass cls && x in obj) {i=x;} return i; ]; [ MoneyInPlayer i x; objectloop(x ofclass Loonie && x in player) {i=i+100;} objectloop(x ofclass Quarter && x in player) {i=i+25;} objectloop(x ofclass TenDollarBill && x in player) {i=i+1000;} return i; ]; [ MakeChange amount i x; i=amount; while (i/100~=0) {x=Loonie.create(); move x to player; i=i-100;} while (i/25~=0) {x=Quarter.create(); move x to player; i=i-25;} ]; [ RemoveMoney cents i z; if (MoneyInPlayer()33; posa = width-26; posb = width-13; spaces width; @set_cursor 2 1; spaces width; @set_cursor 1 2; print (name) location; @set_cursor 2 2; PrintDate(dyear, dmo, dday); @set_cursor 2 posa; print "Time: "; LanguageTimeOfDay(the_time/60, the_time%60); @set_cursor 1 1; style roman; @set_window 0; ]; [ CalculateDayNumber year month day d; d=31*(month-1)+day; if (month>2) {d=d-(month*4+23)/10; if (IsLeapYear(year)==1) d++; } return d; ]; [ CalculateDayOfWeek year month day c n a b; n=CalculateDayNumber(year,month,day); year--; a=n+(year+(year/4)); c=(year/100)*3; b=0; if (c%4==1) b=1; return (a-(b+c/4))%7; ]; [ PrintDate y m d w; w=CalculateDayOfWeek(y,m,d); switch(w) {0: print "Sunday"; 1: print "Monday"; 2: print "Tuesday"; 3: print "Wednesday"; 4: print "Thursday"; 5: print "Friday"; 6: print "Saturday"; } print ", "; switch(m) {1: print "January"; 2: print "February"; 3: print "March"; 4: print "April"; 5: print "May"; 6: print "June"; 7: print "July"; 8: print "August"; 9: print "September"; 10: print "October"; 11: print "November"; 12: print "December"; } print " ", d, ", ", y; rtrue; ]; [ BeforeParsing i j; for (i=parse->1,j=2:j(j*2-1) = 'hot'; if (NextWord()=='cold' && NextWord()=='and' && NextWord()=='hot' && NextWord()=='tap' or 'taps') parse-->(j*2-1) = 'cold'; } ]; [ ParseNumber buffer length; if (buffer->0=='t' && buffer->1=='w' && buffer->2=='e' && buffer->3=='n' && buffer->4=='t' && buffer->5=='i' && buffer->6=='e' && buffer->7=='t' && buffer->8=='h' && length==9) return 20; if (buffer->0=='n' && buffer->1=='i' && buffer->2=='n' && buffer->3=='e' && buffer->4=='t' && buffer->5=='e' && buffer->6=='e' && buffer->7=='n' && buffer->8=='t' && buffer->9=='h' && length==10) return 19; if (buffer->0=='e' && buffer->1=='i' && buffer->2=='g' && buffer->3=='h' && buffer->4=='t' && buffer->5=='e' && buffer->6=='e' && buffer->7=='n' && buffer->8=='t' && buffer->9=='h' && length==10) return 18; if (buffer->0=='s' && buffer->1=='e' && buffer->2=='v' && buffer->3=='e' && buffer->4=='n' && buffer->5=='t' && buffer->6=='e' && buffer->7=='e' && buffer->8=='n' && buffer->9=='t' && buffer->10=='h' && length==11) return 17; if (buffer->0=='s' && buffer->1=='i' && buffer->2=='x' && buffer->3=='t' && buffer->4=='e' && buffer->5=='e' && buffer->6=='n' && buffer->7=='t' && buffer->8=='h' && length==9) return 16; if (buffer->0=='f' && buffer->1=='i' && buffer->2=='f' && buffer->3=='t' && buffer->4=='e' && buffer->5=='e' && buffer->6=='n' && buffer->7=='t' && buffer->8=='h' && length==9) return 15; if (buffer->0=='f' && buffer->1=='o' && buffer->2=='u' && buffer->3=='r' && buffer->4=='t' && buffer->5=='e' && buffer->6=='e' && buffer->7=='n' && buffer->8=='t' && buffer->9=='h' && length==10) return 14; if (buffer->0=='t' && buffer->1=='h' && buffer->2=='i' && buffer->3=='r' && buffer->4=='t' && buffer->5=='e' && buffer->6=='e' && buffer->7=='n' && buffer->8=='t' && buffer->9=='h' && length==10) return 13; if (buffer->0=='t' && buffer->1=='w' && buffer->2=='e' && buffer->3=='l' && buffer->4=='t' or 'f' && buffer->5=='h' && length==6) return 12; if (buffer->0=='e' && buffer->1=='l' && buffer->2=='e' && buffer->3=='v' && buffer->4=='e' && buffer->5=='n' && buffer->6=='t' && buffer->7=='h' && length==8) return 11; if (buffer->0=='t' && buffer->1=='e' && buffer->2=='n' && buffer->3=='t' && buffer->4=='h' && length==5) return 10; if (buffer->0=='n' && buffer->1=='i' && buffer->2=='n' && buffer->3=='t' && buffer->4=='h' && length==5) return 9; if (buffer->0=='n' && buffer->1=='i' && buffer->2=='n' && buffer->3=='e' && buffer->4=='t' && buffer->5=='h' && length==6) return 9; if (buffer->0=='e' && buffer->1=='i' && buffer->2=='g' && buffer->3=='h' && buffer->4=='t' && buffer->5=='h' && length==6) return 8; if (buffer->0=='s' && buffer->1=='e' && buffer->2=='v' && buffer->3=='e' && buffer->4=='n' && buffer->5=='t' && buffer->6=='h' && length==7) return 7; if (buffer->0=='s' && buffer->1=='i' && buffer->2=='x' && buffer->3=='t' && buffer->4=='h' && length==5) return 6; if (buffer->0=='f' && buffer->1=='i' && buffer->2=='f' && buffer->3=='t' && buffer->4=='h' && length==5) return 5; if (buffer->0=='f' && buffer->1=='o' && buffer->2=='r' && buffer->3=='t' && buffer->4=='h' && length==5) return 4; if (buffer->0=='f' && buffer->1=='o' && buffer->2=='u' && buffer->3=='r' && buffer->4=='t' && buffer->5=='h' && length==6) return 4; if (buffer->0=='t' && buffer->1=='h' && buffer->2=='i' && buffer->3=='r' && buffer->4=='d' && length==5) return 3; if (buffer->0=='s' && buffer->1=='e' && buffer->2=='c' && buffer->3=='o' && buffer->4=='n' && buffer->5=='d' && length==6) return 2; if (buffer->0=='f' && buffer->1=='i' && buffer->2=='r' && buffer->3=='s' && buffer->4=='t' && length==5) return 1; return 0; ]; [ ParserError etype; switch(etype) {ANIMA_PE: "You can only do that to people and animals."; } rfalse; ]; !-----------------------------The verb definitions-------------------------------- Include "Grammar"; Include "npc_wait"; Verb meta "help" "?" "about" * -> Help * "on"/"about"/"for" topic -> HelpTopic * topic -> HelpTopic; Verb meta "pretty" * -> Pretty; Verb meta "plain" * -> Plain; Verb "flush" * noun -> Flush; Verb "pee" * -> Pee * "into"/"in" noun -> Pee; Verb "wash" * -> Wash * noun -> Wash * "in" noun -> WashIn * noun "in" noun -> WashIn; Verb "plug" * noun -> PlugIn * "in" noun -> PlugIn * noun "in" -> PlugIn; Verb "unplug" * noun -> UnPlug; Verb "cook" "fry" "boil" * noun -> Cook; Verb "here" "come" * -> Here; Verb "sign" * noun -> Sign; Verb "untie" * noun -> Untie; Verb "descend" * noun -> Descend; Verb "shoot" * noun -> ShootBall * held "at" noun -> ThrowAt; Verb "dribble" "bounce" * held -> Dribble; Verb "dunk" * -> Dunk * "with" held -> DunkWith; Verb "slam" * "dunk" -> Dunk * "dunk" "with" held -> DunkWith; Verb "dress" * -> Dress; Verb "undress" * -> Undress; Verb "dry" * noun -> Dry; Verb "when" "why" "who" "what" "how" * "is"/"are"/"about"/"do"/"does" topic -> Question * "do" topic "about" topic -> Question * topic "is"/"are"/"about"/"do"/"does" topic -> Question; Verb "what^s" "when^s" "why^s" "who^s" "how^s" * topic -> Question; Verb "do" * topic -> QuestionDo; Verb "tune" * noun -> Turn; Verb "play" * noun -> PlayCD; Verb "knock" "tap" * noun -> Knock * "on"/"at" noun -> Knock; Verb "arrest" * creature -> Arrest; Verb "hang" * "up" -> HangUp; Verb "replace" * noun -> Replace; Verb "pour" "spill" * noun -> Pour * noun "over"/"on"/"in"/"into"/"onto" noun -> Pour; Verb "flip" * switchable -> FlipSwitch * noun -> Turn; Verb "dance" * -> Dance * "with" creature -> Dance; Verb "shake" * noun -> Shake; Verb "ascend" = "climb"; Verb "pet" "stroke" "pat" = "touch"; Verb "scratch" = "rub"; Verb "bite" "chew" = "eat"; Verb "glue" = "tie"; Verb "frig" = "fuck"; Verb "kick" = "hit"; Verb "unzip" = "open"; Verb "zip" = "close"; !-----------------------telephone dialing-------------------------------- Constant MAX_PHONE_LENGTH 30; Array dialled_number string MAX_PHONE_LENGTH; [ PhoneNumber f a l ch pp i; pp=1; if (NextWordStopped()==-1) return 0; do { a=WordAddress(wn-1); l=WordLength(wn-1); for (i=0:ii; if (ch<'0' || ch>'9') { if (ch~='-' or '(' or ')') { f=1; if (i~=0) return -1; } } else { if (pp(pp++)=ch-'0'; } } } until (f==1 || NextWordStopped()==-1); if (pp==1) return -1; dialled_number->0 = pp-1; return 0; ]; Verb "dial" "call" "ring" "phone" * PhoneNumber -> DialPhone; !-------------------------key assumtion---------------------------------- [ DefaultLockSub; print "(with ", (the) assumed_key, ")^"; <>; ]; [ DefaultUnlockSub; print "(with ", (the) assumed_key, ")^"; <>; ]; [ DefaultKeyTest i count; if (noun hasnt lockable) rfalse; objectloop (i in player && i ofclass Key) { count++; assumed_key = i; } if (count==1) rtrue; rfalse; ]; Extend "lock" first * noun = DefaultKeyTest -> DefaultLock; Extend "unlock" first * noun = DefaultKeyTest -> DefaultUnlock; !--------------------------------------------------------------- #IFDEF DEBUG; [ Anything i; if (scope_stage==1) rfalse; if (scope_stage==2) {objectloop (i ofclass Object) PlaceInScope(i); rtrue;} "No such in game."; ]; Verb meta "brighten" "lighten" * scope=Anything -> Brighten; Verb meta "debugsee" * scope=Anything -> Examine; Verb "cdebugsee" * scope=Anything -> Examine; [ BrightenSub; give noun light; "[Brightened.]"; ]; #ENDIF; !--------------------------------------------------------------- Extend "exit" * noun -> GetOff; Extend "unlock" * noun "with" "combination"/"code"/"number" number -> UnlockCombination * noun "with" number -> UnlockCombination; Extend "open" * noun "with" "combination"/"code"/"number" number -> UnlockCombination * noun "with" number -> UnlockCombination; Extend "climb" * "up" noun -> Climb * "down" noun -> Descend; Extend "turn" * noun "to" special -> SetTo; Extend only "look" "l//" * "on" noun -> Search * "underneath"/"beneath" noun -> LookUnder; Extend only "sit" "lie" * "down" -> SitDown * "down" "on"/"onto" noun -> Enter; Extend only "wear" "don" replace * multiheld -> Wear; Extend "put" first * "on" multiheld -> Wear * noun "down"/"up" "in" noun -> Insert * noun "down"/"up" "on" noun -> PutOn * noun "down"/"up" noun -> Insert; Extend "throw" * noun "through" noun -> ThrowAt; Extend "take" first * "off" multiheld -> Disrobe; Extend "take" * "care" "of" creature -> Arrest * "all"/"everything" "from" "under" noun -> LookUnder; Extend "get" * "all"/"everything" "from" "under" noun -> LookUnder; Extend "remove" first * multiheld -> Disrobe; Extend only "shed" "doff" "disrobe" first * multiheld -> Disrobe; Extend only "go" "walk" "run" * "to" topic -> GoTo2; Extend "set" * noun "to" topic -> SetToTopic; Extend only 'feed' first * noun -> Feed; Extend only "normal" replace * -> LMode2; Extend "push" * noun "around" -> Push; Extend "dig" * noun "with" noun -> Dig; Extend "remove" * noun "with" noun -> Dig;