! Joseph Brogowski ! Assignment 2 ! Cis 435 Constant Story "The Testing"; Constant Headline "^An Interactive Fiction Story^ Copyright (c) 2005 by Joseph Brogowski.^"; ! Includes Include "Parser"; Include "VerbLib"; Include "Grammar"; ! Verbs Verb 'pour' * noun -> Pour; ! Verb Subs [ PourSub x; if (FiveGallon in player && ThreeGallon in player) { if (noun == FiveGallon) { x = (3 - ThreeGallon.waterlevel); if (x >= FiveGallon.waterlevel) { ThreeGallon.waterlevel = (ThreeGallon.waterlevel + FiveGallon.waterlevel); FiveGallon.waterlevel = 0; }; if (x < FiveGallon.waterlevel) { FiveGallon.waterlevel = (FiveGallon.waterlevel - x); ThreeGallon.waterlevel = (ThreeGallon.waterlevel + x); }; "You pour what water can fit from the five gallon jug to the three gallon jug"; }; if (noun == ThreeGallon) { x = (5 - FiveGallon.waterlevel); if (x >= ThreeGallon.waterlevel) { FiveGallon.waterlevel = (FiveGallon.waterlevel + ThreeGallon.waterlevel); ThreeGallon.waterlevel = 0; }; if (x < ThreeGallon.waterlevel) { ThreeGallon.waterlevel = (ThreeGallon.waterlevel - x); FiveGallon.waterlevel = (FiveGallon.waterlevel + x); }; "You pour what water can fit from the three gallon jug to the five gallon jug"; }; }; if (AfterRoutines()) return; ]; ! Attributes Attribute blocked; Attribute shocked; Attribute electric; Attribute heavylamp; Attribute wrong; Attribute remembered; Global memories = 0; Global Turnsleft = 36; ! ---------Starting room ! Bedroom ! ---Bed ! -----Head Board ! ---Door ! -----Puzzle Panel ! ---Lights ! ---Dresser ! -----Old Lamp ! ---Chair ! ---Table ! -----Note Object FirstBedroom "Luxurious Bedroom" with name "bedroom", description "The walls are done in rich golden toned wood paneling, with oak hardwood floors. A door to north is framed by a pair of soft lights that provide illumination for the room. A massive bed dominates the east side of the room. On the west side you see a large dresser and a table and chair in the corner", n_to FirstDoor; Object -> Massive_Bed "bed" with name "bed" "massive" "sheets" "silk", description "A massive bed in which you could easily fit four people, with black silk sheets and an ornately carved headboard. It has no legs, but flat wood panels that connect solidly to the floor.", has scenery enterable supporter; Object -> -> Massive_Bed_Headboard "Ornately carved headboard" with name "ornately" "carved" "headboard", before[; examine: if (self hasnt remembered) { give self remembered; memories++; switch(memories) { 1:"As you stare at the carvings you experience a sharp pain behind your eyes and everything seem to recede into the distance. You are suddenly in the middle a classroom listening to the teacher speak. You listen with interest to the point he is making, and make a note. You snap back to the present, and remember that you have been in many such rooms before sometimes as the student sometimes as the teacher.^^You have recovered some of your memories"; 2:"As you stare at the carvings you experience a sudden dizziness and everything seem to recede into the distance. It is a dark and cold night, it has just rained and you are tired. You start walk across the street and suddenly you hear a horn blare, next thing you know you are flying through the air. You hit the ground with a thud and watch as the car speed away. You lie still for a moment and the horrible pain starts to rapidly fade. Then you stand up unharmed and continue on your way. You remember that you are very difficult to kill and have lived for hundreds of years.^^You have recovered more of your memories"; 3:"As you stare at the carvings you experience a sudden lurch and it is as if reality slide away into the distance. You are sitting in a car by the roadside and listening to a meeting conducted by those above. You remember about the people who have put you here and their location.^^You have recovered most of your memories"; 4:"As you stare at the carvings your vision blurs for a moment and suddenly you remember your name, it is like a thunderbolt in your mind and the rest of your memories begin to cascade in. ^^You have recovered all of your memories"; }; }; ], has scenery; object -> FirstDoor "steel door" has scenery door openable lockable locked electric transparent, with name "door" "steel", description "A large door, strangely apparently made entirely of metal. There is no lock, but you see a odd panel with a keypad just to the right of the door.", react_before[; Listen: if (self has electric) "The door hums softly"; if (self hasnt electric && player has shocked) "You listen carefully but hear no humming from the door"; ], before[; Touch, Open, attack: if(player hasnt shocked && self has electric) {give player shocked; "As you reach for the door you hear a odd humming, you grab the door handle. ZZZZZZZT^...^...^...^...^You open your eyes staring at the ceiling and aching all over, you stagger to your feet and glare at the door. There must be some way to turn off the electricity protecting the door.";} if(player has shocked && self has electric) "As you approach the door you once again hear a quiet humming and stop, your not falling for that twice."; ], after[; Open: if(player has shocked && self hasnt electric && self has locked) {give player ~shocked; "As you approach the you listen carefully for a hum, but hear nothing. You reach a tentative hand for the handle and try to turn it, but it won't budge. Damn, you just can't ketch a break";} if(player has shocked && self hasnt electric && self hasnt locked) {give player ~shocked; "As you approach the you listen carefully for a hum, but hear nothing. You reach a tentative hand for the handle and try to turn it, and it opens";} ], door_to SecondRoom, door_dir n_to; object -> -> Puzzle_Panel1 "Puzzle Panel" with name "Panel", description "You see a panel with a screen showing ^'4 * 14 * 11-14 * 31-14 * 13-21-14 * ..?.. * ..?..' ^to the side you see several buttons with text next to them on the screen^First Button - 14-32-12-41 * 23-14-31-13^Second Button - 41-14-32-21 * 24-31-13-22^Third Button - 32-11-23-14 * 23-14-31-13^Fourth Button - 31-13-12-14 * 23-41-12-14^Fifth Button - 23-31-12-14 * 22-23-31-14^", before[; Attack: if (player has heavylamp && FirstDoor has electric){give FirstDoor ~electric; "You take the battered lamp and bash it against the top edge of the panel. The panel pops loose and the wires are exposed. Suddenly your hands dart forward and start to disconnect and reconnect the wires. The panel sputters for a moment then emits a soft buzz. You push the panel back into the wall";}; if (player hasnt heavylamp && FirstDoor has electric) "You smack the panel and it jiggles, hmm maybe if you had something heavy."; ], has scenery transparent; object -> -> -> First_Button "First Button" with name "button" "first", before[; push: if (Puzzle_Panel1 hasnt wrong && FirstDoor has electric){give Puzzle_Panel1 wrong; "The panel beeps contemptuously at you and flashes red, you feel a sick lurch in your stomach as the panels dims. There must be another way to turn off the electricity protecting the door. You smack the panel and it jiggles, hmm maybe if you had something heavy.";}; if (Puzzle_Panel1 has wrong || FirstDoor hasnt electric) "You press the button but nothing happens"; ]; object -> -> -> Second_Button "Second Button" with name "button" "second", before[; push: if (Puzzle_Panel1 hasnt wrong && FirstDoor has electric){give Puzzle_Panel1 wrong; "The panel beeps contemptuously at you and flashes red, you feel a sick lurch in your stomach as the panels dims. There must be another way to turn off the electricity protecting the door. You smack the panel and it jiggles, hmm maybe if you had something heavy.";}; if (Puzzle_Panel1 has wrong || FirstDoor hasnt electric) "You press the button but nothing happens"; ]; object -> -> -> Third_Button "Third Button" with name "button" "Third", before[; push: if (Puzzle_Panel1 hasnt wrong && FirstDoor has electric){give Puzzle_Panel1 wrong; "The panel beeps contemptuously at you and flashes red, you feel a sick lurch in your stomach as the panels dims. There must be another way to turn off the electricity protecting the door. You smack the panel and it jiggles, hmm maybe if you had something heavy.";}; if (Puzzle_Panel1 has wrong || FirstDoor hasnt electric) "You press the button but nothing happens"; ]; object -> -> -> Fourth_Button "Fourth Button" with name "button" "fourth", before[; push: if (Puzzle_Panel1 hasnt wrong && FirstDoor has electric){give FirstDoor ~electric; "The panel give a soft buzz and flashes green";}; if (Puzzle_Panel1 has wrong || FirstDoor hasnt electric) "You press the button but nothing happens"; ]; object -> -> -> Fifth_Button "Fifth Button" with name "button" "fifth", before[; push: if (Puzzle_Panel1 hasnt wrong && FirstDoor has electric){give Puzzle_Panel1 wrong; "The panel beeps contemptuously at you and flashes red, you feel a sick lurch in your stomach as the panels dims. There must be another way to turn off the electricity protecting the door. You smack the panel and it jiggles, hmm maybe if you had something heavy.";}; if (Puzzle_Panel1 has wrong || FirstDoor hasnt electric) "You press the button but nothing happens"; ]; object -> Wall_Lights "Lights" with name "Lights" "light", before[; Pull: if (self hasnt general) {give self general; give FirstDoor ~locked; "As you pull on the lights you feel almost embarrassed it's so cliche, but they slide out and you hear a heavy thunk from in the wall";} Push: if (self has general && FirstDoor has open) "You push but they won't budge, maybe you should close the door first"; if (self has general && FirstDoor hasnt open) {give self ~general; give FirstDoor locked; "As you push on the lights they slide smoothly in and you hear a heavy thunk from in the wall";} Examine: if (self hasnt general) "A pair of lights curve out of the wall. The bases and stems of the lights has a attractive silvery color, as you are examining them you notice slight dents in the wall near them"; if (self has general) "A pair of lights curve out of the wall. The bases and stems of the lights has a attractive silvery color and extended about three inches from the wall"; ], has scenery light; object -> Dresser "dresser" with name "Dresser" "large" "oak" "burnished", description "A large burnished oak dresser", has scenery container openable; object -> -> Old_Lamp "old lamp" with name "Lamp" "Dented" "old" "battered", describe[; if (self hasnt on) "An old battered lamp"; "An old battered lamp is blazing brightly."; ], before[; examine: if (self hasnt on) "A old battered lamp. It is covered in dents, but is heavy and very solidly constructed."; "The old battered lamp is blazing brightly. It is covered in dents, but is heavy and very solidly constructed."; ], after[; take, remove: give player heavylamp; drop: give player ~heavylamp; SwitchOn: give self light; SwitchOff: give self ~light; ], has switchable; object -> Chair "Chair" with name "Chair", description "a chair that is in front of the table, it is bolted to the floor", has scenery enterable; object -> firsttable "small corner table" with name "table" "small" "corner", description "a small corner table, it has been bolted to the floor and looks quite solid", after[; examine: if (crisp_note in firsttable) "on the table rests a crisp note"; ], has scenery supporter; object -> -> crisp_note "crisp note" has concealed, with name "note" "paper" "crisp" "first", describe[;"";], description "The small note says 'Please make yourself comfortable, you will be our guest for the duration of your stay. As you may have noticed your memory is rather shall we say... incomplete. In each of these rooms is a test of sorts, we have a desire to find out what your kind is capable of. You and others of your kind have been recruited to help us in this endeavor. Should you fail these tests you shall be left to die'"; ! ---------------Second Room ! SecondRoom ! ---Door_To_First ! ---SecondDoor ! -----Pedestal ! ---Fireplace ! ---LeatherChair ! ---pool ! -----5GallonJug ! -----3GallonJug ! ---Table ! -----Note Object SecondRoom "Well Appointed Living room" with name "Room" "livingroom" "living", description "The living room is well appointed with a roaring fireplace with a comfortable leather chair to the west. A fountain to the north, and a doors to the east and south", s_to Door_To_First, e_to SecondDoor; object -> Door_To_First "steel door" has scenery door open, with name "door" "steel", description "A large door, strangely apparently made entirely of metal.", before[; close: "You find yourself unable to close the door from this side."; ], door_to FirstBedroom, door_dir s_to; object -> SecondDoor "white door" has scenery door openable locked lockable, with name "door" "east" "white", description "A large white door, strangely apparently made entirely of metal. There appears to be a pedestal just to the right", door_to ThirdRoom, door_dir e_to; object -> Pedestal "a gray pedestal" with name "gray" "pedestal" "stand", description "A waist high pedestal of gray metal.", has scenery supporter; object -> fireplace "roaring fireplace" with name "fire" "fireplace" "roaring" "burning", before[; examine: if(player notin leatherchair && self hasnt remembered) "You watch the play of the fire in the fireplace, and feel tired maybe you should sit down"; if (self hasnt remembered) { give self remembered; memories++; switch(memories) { 1:"As you stare at the flickering flames you experience a sharp pain behind your eyes and everything seem to recede into the distance. You are suddenly in the middle a classroom listening to the teacher speak. You listen with interest to the point he is making, and make a note. You snap back to the present, and remember that you have been in many such rooms before sometimes as the student sometimes as the teacher.^^You have recovered some of your memories"; 2:"As you stare at the flickering flames you experience a sudden dizziness and everything seem to recede into the distance. It is a dark and cold night, it has just rained and you are tired. You start walk across the street and suddenly you hear a horn blare, next thing you know you are flying through the air. You hit the ground with a thud and watch as the car speed away. You lie still for a moment and the horrible pain starts to rapidly fade. Then you stand up unharmed and continue on your way. You remember that you are very difficult to kill and have lived for hundreds of years.^^You have recovered more of your memories"; 3:"As you stare at the flickering flames you experience a sudden lurch and it is as if reality slide away into the distance. You are sitting in a car by the roadside and listening to a meeting conducted by those above. You remember about the people who have put you here and their location.^^You have recovered most of your memories"; 4:"As you stare at the flickering flames your vision blurs for a moment and suddenly you remember your name, it is like a thunderbolt in your mind and the rest of your memories begin to cascade in. ^^You have recovered all of your memories"; }; }; if (self has remembered) "You watch the play of the fire in the fireplace, the flames and shadows dance and flicker"; ], has scenery light; object -> leatherchair "leather chair" with name "leather" "chair" "comfortable", description "a large comfortable looking leather chair, look at it make you want to sit down", has scenery enterable supporter; object -> Fountain "pool of water" with name "fountain" "water", description "A low still basin of water.", has scenery supporter; object -> -> FiveGallon "five gallon jug" with waterlevel, maxwater 5, before[; fill:if (location == SecondRoom){self.waterlevel = 5; "You lean down and fill the jug from the pool";}; empty:if (location == SecondRoom){self.waterlevel = 0; "You lean down and pour out the jug into the pool";}; examine: print "a five gallon water jug with "; print self.waterlevel; " gallons in it"; ], after[; puton: if(FiveGallon in Pedestal && FiveGallon.waterlevel == 4) {give SecondDoor ~locked; "As you place the jug on the pedestal you hear a soft thunk from within the wall.";}; ], name "five" "gallon" "jug"; object -> -> ThreeGallon "three gallon jug" with waterlevel, maxwater 3, before[; fill:if (location == SecondRoom){self.waterlevel = 3; "You lean down and fill the jug from the pool";}; empty:if (location == SecondRoom){self.waterlevel = 0; "You lean down and pour out the jug into the pool";}; examine: print "a three gallon water jug with "; print self.waterlevel; " gallons in it"; ], name "Three" "gallon" "jug"; object -> secondtable "small table" with name "table" "small" , description "a small table, it has been bolted to the floor and looks quite solid", after[; examine: if (wrinkled_note in secondtable) "on the table rests a wrinkled note"; ], has scenery supporter; object -> -> wrinkled_note "wrinkled note" has concealed, with name "note" "paper" "wrinkled" "second", describe[;"";], description "The wrinkled note says 'In order to get passed this room you must place a jug with four gallons in it on the pedestal by the door. In order to do this you my fill and empty the jugs. You may also pour a jug, which will pour water from the selected jug into any space let in the second jug.'"; ! ---------------Third Room ! ThirdRoom ! ---Door_To_Second- ! ---ThirdDoor- ! ---LandscapeCityPainting- ! ---Panel- ! -----Buttons- ! -------Rings- ! ---Table- ! -----Note- Object ThirdRoom "Austere Room" with name "Room" "austere", description "a austere room with white walls only lightened by a painting on the south wall and a light brown carpet. There is a small table in the center of the room, a white door to the west, and a gray door the the north", w_to Door_To_Second, n_to ThirdDoor; object -> Painting "landscape painting" with name "painting" "landscape" "city" "exquisite", before[; examine: if (self hasnt remembered) { give self remembered; memories++; switch(memories) { 1:"As you stare at the painting you experience a sharp pain behind your eyes and everything seem to recede into the distance. You are suddenly in the middle a classroom listening to the teacher speak. You listen with interest to the point he is making, and make a note. You snap back to the present, and remember that you have been in many such rooms before sometimes as the student sometimes as the teacher.^^You have recovered some of your memories"; 2:"As you stare at the painting you experience a sudden dizziness and everything seem to recede into the distance. It is a dark and cold night, it has just rained and you are tired. You start walk across the street and suddenly you hear a horn blare, next thing you know you are flying through the air. You hit the ground with a thud and watch as the car speed away. You lie still for a moment and the horrible pain starts to rapidly fade. Then you stand up unharmed and continue on your way. You remember that you are very difficult to kill and have lived for hundreds of years.^^You have recovered more of your memories"; 3:"As you stare at the painting you experience a sudden lurch and it is as if reality slide away into the distance. You are sitting in a car by the roadside and listening to a meeting conducted by those above. You remember about the people who have put you here and their location.^^You have recovered most of your memories"; 4:"As you stare at the painting your vision blurs for a moment and suddenly you remember your name, it is like a thunderbolt in your mind and the rest of your memories begin to cascade in. ^^You have recovered all of your memories"; }; }; "an exquisite painting of a city at night"; ], has scenery; object -> Door_To_Second "white door" has scenery door open, with name "door" "west" "white", description "A large white door, strangely apparently made entirely of metal.", before[; close: "You find yourself unable to close the door from this side."; ], door_to SecondRoom, door_dir w_to; object -> thirdtable "small table" with name "table" "small" , description "a small table, it has been bolted to the floor and looks quite solid", after[; examine: if (crumbled_note in thirdtable) "on the table rests a crumbled note"; ], has scenery supporter; object -> -> crumbled_note "crumbled note" has concealed, with name "note" "paper" "crumbled" "third", describe[;"";], description "The crumbled note says 'In order to get passed this room you must move the three rings to the right most panel. You may move the highest ring to another panel, you may not move a ring to a panel with a higher level ring already on it'"; object -> Puzzle_Panel2 "puzzle panel" with buttonstate, name "Panel", before [; examine: print "You see a panel with a screen showing three parts with buttons underneth them^^"; print "In the left panel above the left button you have ^"; if (bottom in leftbutton) print "The bottom rung ^"; if (middle in leftbutton) print "The middle rung ^"; if (top in leftbutton) print "The top rung ^"; if (top notin leftbutton && middle notin leftbutton && bottom notin leftbutton) print "nothing^"; print "^In the middle panel above the middle button you have ^"; if (bottom in middlebutton) print "The bottom rung ^"; if (middle in middlebutton) print "The middle rung ^"; if (top in middlebutton) print "The top rung ^"; if (top notin middlebutton && middle notin middlebutton && bottom notin middlebutton) print "nothing^"; print "^In the right panel above the right button you have "; if (bottom in rightbutton) print "The bottom rung ^"; if (middle in rightbutton) print "The middle rung ^"; if (top in rightbutton) print "The top rung ^"; if (top notin rightbutton && middle notin rightbutton && bottom notin rightbutton) print "nothing^"; rtrue; ], has scenery transparent; object -> -> middlebutton "middle button" with name "middle" "button", before[; push: switch(Puzzle_Panel2.buttonstate) { 0:Puzzle_Panel2.buttonstate = 2; "The middle button briefly glows green"; 1:if (top in leftbutton) {move top to middlebutton; Puzzle_Panel2.buttonstate = 0; "You have moved the top rung from the left panel to the middle panel";}; if (middle in leftbutton) {move middle to middlebutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(middle)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the middle rung to a panel already occupied by the top rung, reseting rungs";}; "You have moved the middle rung from the left panel to the middle panel";}; if (bottom in leftbutton) {move bottom to middlebutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(bottom) || middle in parent(bottom)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the bottom rung to a panel already occupied by a higher rung, reseting rungs";}; "You have moved the bottom rung from the left panel to the middle panel";}; rtrue; 2:Puzzle_Panel2.buttonstate =0; "Does nothing"; 3:if (top in rightbutton) {move top to middlebutton; Puzzle_Panel2.buttonstate = 0; "You have moved the top rung from the right panel to the middle panel";}; if (middle in rightbutton) {move middle to middlebutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(middle)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the middle rung to a panel already occupied by the top rung, reseting rungs";}; "You have moved the middle rung from the right panel to the middle panel";}; if (bottom in rightbutton) {move bottom to middlebutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(bottom) || middle in parent(bottom)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the bottom rung to a panel already occupied by a higher rung, reseting rungs";}; "You have moved the bottom rung from the right panel to the middle panel";}; rtrue; }; ]; object -> -> leftbutton "left button" with name "left" "button", before[; push: switch(Puzzle_Panel2.buttonstate) { 0:Puzzle_Panel2.buttonstate = 1; "The left button briefly glows green"; 1:Puzzle_Panel2.buttonstate = 0; "Does nothing"; 2:if (top in middlebutton) {move top to leftbutton; Puzzle_Panel2.buttonstate = 0; "You have moved the top rung from the middle panel to the left panel";}; if (middle in middlebutton) {move middle to leftbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(middle)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the middle rung to a panel already occupied by the top rung, reseting rungs";}; "You have moved the middle rung from the middle panel to the left panel";}; if (bottom in middlebutton) {move bottom to leftbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(bottom) || middle in parent(bottom)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the bottom rung to a panel already occupied by a higher rung, reseting rungs";}; "You have moved the bottom rung from the middle panel to the left panel";}; rtrue; 3:if (top in rightbutton) {move top to leftbutton; Puzzle_Panel2.buttonstate =0; "You have moved the top rung from the right panel to the left panel";}; if (middle in rightbutton) {move middle to leftbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(middle)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the middle rung to a panel already occupied by the top rung, reseting rungs";}; "You have moved the middle rung from the right panel to the left panel";}; if (bottom in rightbutton) {move bottom to leftbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(bottom) || middle in parent(bottom)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the bottom rung to a panel already occupied by a higher rung, reseting rungs";}; "You have moved the bottom rung from the right panel to the left panel";}; rtrue; }; ]; object -> -> -> middle "middle ring"; object -> -> -> top "top ring"; object -> -> -> bottom "bottom ring"; object -> -> rightbutton "right button" with name "right" "button", before[; push: switch(Puzzle_Panel2.buttonstate) { 0:Puzzle_Panel2.buttonstate = 3; "The right button briefly glows green"; 1:if (top in leftbutton) {move top to rightbutton; Puzzle_Panel2.buttonstate =0; if (top in rightbutton && middle in rightbutton && bottom in rightbutton) {give ThirdDoor ~locked; "As you complete the pattern you hear a soft thunk from within the wall.";}; "You have moved the top rung from the left panel to the right panel";}; if (middle in leftbutton) {move middle to rightbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(middle)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the middle rung to a panel already occupied by the top rung, reseting rungs";}; "You have moved the middle rung from the left panel to the right panel";}; if (bottom in leftbutton) {move bottom to rightbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(bottom) || middle in parent(bottom)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the bottom rung to a panel already occupied by a higher rung, reseting rungs";}; "You have moved the bottom rung from the left panel to the right panel";}; rtrue; 2:if (top in middlebutton) {move top to rightbutton; Puzzle_Panel2.buttonstate = 0;if (top in rightbutton && middle in rightbutton && bottom in rightbutton) {give ThirdDoor ~locked; "As you complete the pattern you hear a soft thunk from within the wall.";}; "You have moved the top rung from the middle panel to the right panel";}; if (middle in middlebutton) {move middle to rightbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(middle)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the middle rung to a panel already occupied by the top rung, reseting rungs";}; "You have moved the middle rung from the middle panel to the right panel";}; if (bottom in middlebutton) {move bottom to rightbutton; Puzzle_Panel2.buttonstate = 0;if (top in parent(bottom) || middle in parent(bottom)){move bottom to leftbutton; move middle to leftbutton; move top to leftbutton; "You attempted to move the bottom rung to a panel already occupied by a higher rung, reseting rungs";}; "You have moved the bottom rung from the middle panel to the right panel";}; rtrue; 3:Puzzle_Panel2.buttonstate = 0; "Does nothing"; }; ]; object -> ThirdDoor "gray door" has scenery door openable locked lockable, with name "door" "north" "gray", description "A large gray door, strangely apparently made entirely of metal. There appears to be a panel just to the right", door_to FinalRoom, door_dir n_to; ! ---------------Final Room ! ---Door_To_Third ! ---HolesInCorner ! ---FinalDoor ! ---Mirror ! ---puzzle ! ---Table ! -----Note Object FinalRoom "Pleasant Room" with name "Room" "pleasant", initial [; print "As you enter the room a soft hissing begins."; startdaemon(poison); ], description "A pleasant room with light blue walls, a rich gray carpet and a mirror on one of the walls. To the south is a gray door, to the west is a featureless door. In the center of the room is a small table.", w_to FinalDoor, s_to Door_To_Third, has light; object -> Door_To_Third "gray door" has scenery door open, with name "door" "south" "gray", description "A large gray door, strangely apparently made entirely of metal.", before[; close: "You find yourself unable to close the door from this side."; ], door_to ThirdRoom, door_dir s_to; object -> finaltable "small table" with name "table" "small" , description "a small table, it has been bolted to the floor and looks quite solid", after[; examine: if (rumpled_note in finaltable) "on the table rests a rumpled note"; ], has scenery supporter; object -> -> rumpled_note "rumpled note" has concealed, with name "note" "paper" "rumpled" "fourth", describe[;"";], description "The rumpled note says 'As you may have guessed we have no intention of letting you go, that noise you're hearing is us flooding the compound with a poison we have found to be particularly effective against your kind. Goodbye.'"; object -> se_small_hole "tiny hole in the southeast" with name "hole" "tiny" "south" "east" "southeast" "se" "poison", description "a tiny hole in the wall", react_before[; Listen: if (self hasnt blocked) "a quiet hissing comes from the southeast corner"; ], before[; Receive: if ((noun == rumpled_note || noun == crisp_note || noun == wrinkled_note || noun == crumbled_note) && self hasnt blocked) {remove noun; give self blocked; give self ~open; "You stuff the note into the hole and block it off";}; "Thats to big for the hole"; ], has scenery open container; object -> nw_small_hole "tiny hole in the northwest" with name "hole" "tiny" "north" "west" "northwest" "nw" "poison", description "a tiny hole in the wall", react_before[; Listen: if (self hasnt blocked) "a quiet hissing comes from the northwest corner"; ], before[; Receive: if ((noun == rumpled_note || noun == crisp_note || noun == wrinkled_note || noun == crumbled_note) && self hasnt blocked) {remove noun; give self blocked; give self ~open; "You stuff the note into the hole and block it off";}; "Thats to big for the hole"; ], has scenery open container; object -> ne_small_hole "tiny hole in the northeast" with name "hole" "tiny" "north" "east" "southeast" "ne" "poison", description "a tiny hole in the wall", react_before[; Listen: if (self hasnt blocked) "a quiet hissing comes from the northeast corner"; ], before[; Receive: if ((noun == rumpled_note || noun == crisp_note || noun == wrinkled_note || noun == crumbled_note) && self hasnt blocked) {remove noun; give self blocked; give self ~open; "You stuff the note into the hole and block it off";}; "Thats to big for the hole"; ], has scenery open container; object -> sw_small_hole "tiny hole in the southwest" with name "hole" "tiny" "south" "west" "southwest" "sw" "poison", description "a tiny hole in the wall", react_before[; Listen: if (self hasnt blocked) "a quiet hissing comes from the southwest corner"; ], before[; Receive: if ((noun == rumpled_note || noun == crisp_note || noun == wrinkled_note || noun == crumbled_note) && self hasnt blocked) {remove noun; give self blocked; give self ~open; "You stuff the note into the hole and block it off";}; "Thats to big for the hole"; ], has scenery open container; object -> Mirror "mirror" with name "mirror" "reflection", before[; examine: if (self hasnt remembered) { give self remembered; memories++; switch(memories) { 1:"As you stare at yourself in the mirror you experience a sharp pain behind your eyes and everything seem to recede into the distance. You are suddenly in the middle a classroom listening to the teacher speak. You listen with interest to the point he is making, and make a note. You snap back to the present, and remember that you have been in many such rooms before sometimes as the student sometimes as the teacher.^^You have recovered some of your memories"; 2:"As you stare at yourself in the mirror you experience a sudden dizziness and everything seem to recede into the distance. It is a dark and cold night, it has just rained and you are tired. You start walk across the street and suddenly you hear a horn blare, next thing you know you are flying through the air. You hit the ground with a thud and watch as the car speed away. You lie still for a moment and the horrible pain starts to rapidly fade. Then you stand up unharmed and continue on your way. You remember that you are very difficult to kill and have lived for hundreds of years.^^You have recovered more of your memories"; 3:"As you stare at yourself in the mirror you experience a sudden lurch and it is as if reality slide away into the distance. You are sitting in a car by the roadside and listening to a meeting conducted by those above. You remember about the people who have put you here and their location.^^You have recovered most of your memories"; 4:"As you stare at yourself in the mirror your vision blurs for a moment and suddenly you remember your name, it is like a thunderbolt in your mind and the rest of your memories begin to cascade in. ^^You have recovered all of your memories"; }; }; "You see yourself reflected in the mirror"; ], has scenery; object -> FinalDoor "featureless door" has scenery door openable lockable locked, with name "door" "featureless" "final", description "A large featureless metal door, it has no doorknob or any other visible means of opening it.", before[; Touch, Open: "You run your hands along the door searching for a way to open it but find nothing"; attack: if (sw_small_hole has blocked && se_small_hole has blocked && nw_small_hole has blocked && ne_small_hole has blocked) { switch(memories) { 0:print "You throw yourself at the door, again, and again. Finally the door bursts open and you stagger into a street corner. You don't know what to do now, you don't know who you are. But you do know someone is out to get you, so you decide to lay low for awhile and try to figure things out."; 1:print "You throw yourself at the door, again, and again. Finally the door bursts open and you stagger into a street corner. You don't know who is out to get you but you know you need somewhere to hide. You decide to look for a nearby college you remember attending, someone there will know who you are. Then you'll figure out who did this to you and make them pay"; 2:print "You throw yourself at the door, again, and again. Finally the door bursts open and you stagger into a street corner. You head for one of your more obscure safe houses, in your long life you have learned to plan ahead and have several available all well stocked with everything from weapons to new ID. There you will recuperate and research who did this to you and the rest of your history. They will pay dearly for what they have done."; 3:print "You throw yourself at the door, again, and again. Finally the door bursts open and you stagger into a street corner. You head for one of your more obscure safe houses, in your long life you have learned to plan ahead and have several available all well stocked with everything from weapons to new ID. As you contemplate the fact that they don't realize that you know who they are, you smile. When you have prepared yourself you will show them that you have only one type of enemy: dead ones. "; 4:print "You throw yourself at the door, again, and again. Finally the door bursts open and you stagger into a street corner. You head for one of your more obscure safe houses, in your long life you have learned to plan ahead and have several available all well stocked with everything from weapons to new ID. You must call the others of your kind and inform them of the new threat. You will gather your allies and crush them with a single stroke. As you contemplate the fact that they don't realize that you know who they are, you smile. When you have prepared yourself you will show them that you have only one type of enemy: dead ones."; }; deadflag = 2; }; "Your head spins as you pound on the door, you think you feel it give a little but can't tell with the poison clouding your mind"; ], door_dir w_to; object poison "poison" with daemon [; if (sw_small_hole has blocked && se_small_hole has blocked && nw_small_hole has blocked && ne_small_hole has blocked) {print "The hissing stops and you start to feel better"; StopDaemon(self);}; Turnsleft--; switch(Turnsleft) { 25:"^^You feel a wave of dizziness sweep through you"; 15:"^^Staggering a bit you notice your arm twitching uncontrollably, but you can't feel it"; 5:"^^It is becoming hard to breathe, the strange twitching has spread throughout your body"; 3:"^^You are seeing strange colors, and you feel like you are on fire the pain is immense. You have forgotten about the twitching but it has gotten worse then ever"; 1:"^^You fall to your knees, the pain has stopped. You seem to remember that there is something important you should be doing, but you can't remember what it was"; 0:deadflag = true; print "^^You lie down and slide into the darkness, the end has finally come"; StopDaemon(self); }; ]; ! Initialise [ Initialise; location = FirstBedroom; "^^^As you open your eyes a wave of dizziness and pain strikes you, you close you eyes for a second as the pain clears. You rise up on one arm, and as you start to rise from the bed you are hit by another wave of dizziness and stagger back onto the bed. You groan and lay still for a moment as your head clears. You get up off the bed and look around. You realize with a growing sense of fear you have no idea were or who you are.^^^"; ];