/* use the HTML status line and prompts */
#define USE_HTML_STATUS
#define USE_HTML_PROMPT
/* include the standard TADS libraries */
#include <adv.t>
#include
<std02.t>
/* at game startup, turn on HTML mode */
replace commonInit: function
{
/* display the special code sequence to turn on HTML recognition */
"\H+";
}
/*ALL OF MY COMENTS APPEAR
IN CAPITAL LETTERS LIKE THIS. THE PROGRAM IS FAIRLY WELL COMMENTED...I HAVE
BASICALLY EXPLAINED ALMOST EVERY FUNCTION, SCRIPT, AND METHOD AND ASSUMED THAT
IF YOU'RE GOING TO BOTHER READING THIS YOU ALREADY KNOW WHAT THE BASIC
PROPERTIES LIKE SDESC AND LDESC MEAN (I.E. COMMENTING THEM WOULD BE A WASTE
OF TIME). THERE ARE SEVERAL PLACES THAT COULD BE CODED DIFFERENTLY (AND MUCH
MORE SIMPLY) BUT SINCE THIS WAS MY FIRST GAME I WAS LEARNING AS I WENT AND USUALLY
DIDN'T BOTHER GOING BACK TO FIX THINGS IF THEY WORKED (UNLESS IT WAS REALLY
UGLY LIKE SOME OF THE ORIGINAL CODE FOR THE MARBLE TABLE AND IT'S ENVIRONS
IN THE MASTER BEDROOM). FEEL FREE TO EMAIL ME WITH QUESTIONS: erthwin at cox
dot net OR COMMENTS. IF YOU CAN'T GET THE GAME TO COMPILE SEE THE COMMENTS
I MADE NEAR THE END OF THE CODE ABOVE THE ALANNA2 ACTOR OBJECT*/
startroom: room
sdesc = "Entry Way"
ldesc = "You are standing in what seems to be the entry way of a large house. Behind you is an iron door and ahead of you to the north lies the other end of this expansive room.\n "
north = NorthEnd
south = IronDoor
out = IronDoor
;
IronDoor: doorway
location = startroom
noun = 'door' 'irondoor'
adjective = 'iron'
sdesc = "iron door"
ldesc = "A massive iron door."
isopen = nil
verDoOpen( actor ) = {}
doOpen( actor ) =
//DON'T WANT THE PLAYER OPENING THIS ONE, IT'S A BOUNDARY
{
"You push against the door with all your might but it doesn\'t move an inch.\n";
return nil;
}
doordest =
//THERE'S NOTHING ON THE OTHER SIDE
{
"The iron door doesn\'t budge.\n";
return nil;
}
;
/*THIS SECTION IS FOR COMMANDS THAT WORK ANYWHERE IN THE GAME*/
To
view this code click here.
/*END OF SECTION FOR COMMANDS THAT WORK ANYWHERE IN THE GAME*/
NorthEnd: room
sdesc = "North End of Entry Way"
ldesc = "At this end of the room a hallway branches off to the east and west. The eastern side goes only a few feet before running into a door. There is a bronze placard on the wall. \n"
south = startroom
east = LockedDoor
west = BayHall
;
Placard: readable, fixeditem
//GOOD OLD STEPHEN CRANE...
location = NorthEnd
noun = 'placard' 'sign' 'bronzeplacard'
adjective = 'bronze'
sdesc = "bronze placard"
ldesc = "\tA man said to the universe:\n
\t\"Sir, I exist!\"\n
\t\"However,\" replied the universe,\n
\t\"The fact has not created in me\n
\tA sense of obligation.\"\n
\t\t\t\t\t--S.C.\n"
;
LockedDoor: lockableDoorway
location = NorthEnd
noun = 'door'
adjective = 'east' 'eastern'
sdesc = "door"
doordest = Study
mykey = StudyKey
otherside = LockedDoor2
;
Study: darkroom
sdesc = "The Study"
ldesc =
//LDESC SHOULD REFLECT THE OPEN/CLOSED STATE OF THE BOOKCASE
{
if (BookCase.isopen)
"This room has a wood floor and three large leather chairs arranged around an intricately engraved coffee table. The floor is covered with a thick rug and a dim lamp in the corner gives the room an eerie glow. To the north is a hallway that used to be concealed by the large bookcase which now protrudes out into the room. There is also a doorway in the northeastern corner of the room and a hallway leading west.\n";
else
{
if ( not self.score )
//+10 POINTS THE FIRST TIME THE PLAYER GETS IN THE STUDY
{
incscore( 10 );
self.score := true;
}
"You have entered a room with wood floors and three large leather chairs arranged around an intricately engraved coffee table. The floor is covered with a thick rug and a dim lamp in the corner gives the room an eerie glow. A large bookcase covers most of the northern wall except for a small doorway in the northeastern corner of the room and the hallway leads back west.\n ";
}
}
west = LockedDoor2
ne = StudyDoor
north =
//IS THE BOOKCASE OPEN?
{
if (BookCase.isopen)
return (BookCase);
else
"You can\'t go that way.\n";
}
;
LockedDoor2: lockableDoorway
location = Study
noun = 'door'
adjective = 'west' 'western'
sdesc = "west door"
doordest = NorthEnd
mykey = StudyKey
otherside = LockedDoor
;
BookCase: doorway
location = Study
noun = 'bookcase' 'bookshelf' 'case' 'shelf'
adjective = 'book' 'large'
sdesc = "bookcase"
ldesc =
//LDESC SHOULD REFLECT OPEN/CLOSED STATE OF THE BOOKCASE
{
if (BookCase.isopen)
"The bookcase has swung open revealing a hallway to the north.\n";//MENTION OPEN / CLOSED STATE
"Books line the shelves in no apparent order, some of them are so old the bindings are falling apart while others look brand new. Titles include \"Heart of Darkness\", \"The Circular Staircase\", and even a Bible.\n";
}
doordest = HallsEnd3
verDoOpen( actor ) = {}
doOpen( actor ) =
//YOU CAN'T JUST WALK UP TO A BOOKCASE AND EXPECT TO OPEN IT!
{
if (BookCase.isopen)
"The bookcase is already open.\n";
else
"And just how pray tell do you expect to open a bookcase?\n";
return nil;
}
verDoClose( actor ) = {}
doClose( actor ) =
{
if (BookCase.notclosed)
//THE RESULTS OF NOT KNOWING WHAT I WAS DOING, IT WORKS THOUGH SO I LEFT IT
{
BibleKey.moveInto( Study );
OpenKey.moveInto( nil );
Study.lightsOn := nil;
pass doClose;
}
else
//IF THE BOOKCASE HAS NEVER BEEN OPENED WE DON'T WANT TO GIVE AWAY THE FACT THAT IT CAN BE
"I don't know how to close the bookcase.\n";
}
isopen = nil
noAutoOpen = true
;
BibleKey: fixeditem
location = Study
noun = 'bible'
sdesc = "Bible"
ldesc = "It looks like an old family Bible."
verDoRead( actor ) = {}
doRead( actor ) = ( self.doTake( actor ) )
verDoPull( actor ) = {}
doPull( actor ) = ( self.doTake( actor ) )
verDoTake( actor ) = {}
doTake( actor ) =
{
"As you pull the Bible out of the shelf you hear a soft click and the Bible quickly slides back into place on the shelf. A moment later the entire bookcase swings open revealing a hallway to the north.\n";
BookCase.isopen := true;
BookCase.notclosed := true;
self.moveInto( nil );
OpenKey.moveInto( Study );
//CHANGE PLACES WITH THE OTHER BIBLE
Study.lightsOn := true;
//OPENING THE BOOKCASE LETS LIGHT FROM THE HALL COME IN...SEE LAMP FOR DETAILS
}
;
/*SINCE LEAVING THE ORIGINAL BIBLE IN THE ROOM WHEN THE BOOKASE IS OPEN RESULTS IN SOME WEIRD THINGS HAPPENING I'VE MOVED THE ORIGINAL ONE TO NIL AND BRING THIS ONE (OPENKEY) INTO STUDY SO IT LOOKS LIKE THE BIBLE IS STILL ON THE BOOKCASE EVEN THOUGH IT IS TWO SEPARATE OBJECTS*/KE THE BIBLE IS STILL ON THE BOOKCASE EVEN THOUGH IT IS TWO SEPARATE OBJECTS*/
OpenKey: fixeditem
noun = 'bible'
sdesc = "Bible"
ldesc = "It looks like an old family Bible."
verDoRead( actor ) = {}
doRead( actor ) = ( self.doTake( actor ) )
verDoPull( actor ) = {}
doPull( actor ) = ( self.doTake( actor ) )
verDoTake( actor ) = {}
doTake( actor ) =
//WHAT DOES IT LOOK LIKE WHEN YOU MOVE THE LATCH OF AN OPEN DOOR?
{
"Pulling on the Bible while the bookcase is open allows you to see the latching mechanism move up and down but has no other obvious effects...you can\'t take it if that\'s what you\'re getting at; its attached.\n";
}
;
StairKey: fixeditem
location = Study
noun = 'staircase' 'circularstaircase'
adjective = 'circular'
sdesc = "\"The Circular Staircase\""
ldesc = "You see the words, \"Rinehart, Mary Roberts - 1908\" presumably the author and publication date.\n"
verDoRead( actor ) = {}
doRead( actor ) = ( self.doTake( actor ) )
verDoPull( actor ) = {}
doPull( actor ) = ( self.doTake( actor ) )
verDoTake( actor ) = {}
doTake( actor ) = //MOVE THE STAIRS UP
{
if ( not self.score )
//+10 POINTS FOR COMPLETION OF THE STAIRS THE FIRST TIME
{
incscore( 10 );
self.score := true;
}
if (BookCase.isopen)
//CAN THE PLAYER SEE THE STAIRS WHILE THIS IS HAPPENING?
"There is a soft click as you try to take the book and it slides back into place, at the north end of the hallway the spiral staircase begins to move upward as steps come up through the floor. Each new step is accompanied by a loud thunk and finally as the stairway is completed there is the clang of the top step meeting the floor above and latching in place.\n";
else
"There is a soft click as you try to take the book and it slides back into place, in the distance somewhere you here a series of thunking noises followed by a metallic clang.\n";
StairWell.isfull := true;
self.moveInto( nil );
StairKey2.moveInto( Study );
//CHANGE PLACES WITH IDENTICAL "STAIRS DOWN" BOOK
}
;
StairKey2: fixeditem
noun = 'staircase' 'circularstaircase'
adjective = 'circular'
sdesc = "\"The Circular Staircase\""
ldesc = "You see the words, \"Rinehart, Mary Roberts - 1908\" presumably the author and publication date.\n"
verDoRead( actor ) = {}
doRead( actor ) = ( self.doTake( actor ) )
verDoPull( actor ) = {}
doPull( actor ) = ( self.doTake( actor ) )
verDoTake( actor ) = {}
doTake( actor ) =
//MOVE THE STAIRS BACK DOWN
{
if (BookCase.isopen)
//CAN THE PLAYER SEE THE STAIRS WHILE THIS IS HAPPENING?
"There is a soft click as you try to take the book and it slides back into place, you watch in amazement as half of the spiral staircase disappears into the floor with a rapid succession of thunking noises before coming to a halt with a hydraulic hiss.\n";
else
"There is a soft click as you try to take the book and it slides back into place, somewhere in the distance you here a rapid succession of thunks followed by the hiss of released pressure.\n";
StairWell.isfull := nil;
self.moveInto( nil );
StairKey.moveInto( Study );
//CHANGE PLACES WITH IDENTICAL "STAIRS UP" BOOK
}
;
DreamLight: fixeditem
location = Study
noun = 'darkness' 'heartofdarkness'
adjective = 'heart'
sdesc = "\"Heart of Darkness\""
ldesc = "You see the words, \"Conrad, Joseph - 1902\" presumably the author and publication date.\n"
verDoRead( actor ) = {}
doRead( actor ) = ( self.doTake( actor ) )
verDoPull( actor ) = {}
doPull( actor ) = ( self.doTake( actor ) )
verDoTake( actor ) = {}
doTake( actor ) =
{
if ( not self.score )
//+10 POINTS FOR LIGHTING THE DREAMROOM THE FIRST TIME
{
incscore( 10 );
self.score := true;
}
"There is a soft click as you try to take the book, accompanied by the soft hum of electricity, and it slides back into place.\n";
DreamRoom.lightsOn := true;
self.moveInto( nil );
DreamDark.moveInto( Study );
}
;
DreamDark: fixeditem
noun = 'darkness' 'heartofdarkness'
adjective = 'heart'
sdesc = "\"Heart of Darkness\""
ldesc = "You see the words, \"Conrad, Joseph - 1902\" presumably the author and publication date.\n"
verDoRead( actor ) = {}
doRead( actor ) = ( self.doTake( actor ) )
verDoPull( actor ) = {}
doPull( actor ) = ( self.doTake( actor ) )
verDoTake( actor ) = {}
doTake( actor ) =
{
"There is a soft click as you try to take the book and it slides back into place. The electric hum stops. \n";
DreamRoom.lightsOn := nil;
self.moveInto( nil );
DreamLight.moveInto( Study );
}
;
CoffeeTable: fixeditem
location = Study
noun = 'table' 'engravedtable' 'coffeetable'
adjective = 'coffee'
sdesc = "coffee table"
ldesc = "The engravings on the table swirl around each other so that each engraving seems to flow into the next. "
;
Engravings: decoration
location = Study
noun = 'engraving' 'engravings' 'carving'
sdesc = "engravings"
ldesc = "The engravings show a progression of images centered around a non-descript figure of a person. The person enters the top of a large box and then the engraved box swirls into a pattern of stars and waves which swirl back into a box on the other side where the person is seen coming out of the bottom of the box.\n"
;
Pattern: decoration
location = Study
noun = 'pattern'
sdesc = "pattern"
ldesc = "Maybe pattern isn\'t quite the right word for what you see on the table, there isn\'t really any distiguishable order to it.\n"
;
Person: decoration
location = Study
noun = 'person'
sdesc = "person"
ldesc = "Like I said to begin with: non-descript. There is a head, a torso, two arms and two legs but nothing to set the engraving apart from any other person with those same characteristics.\n"
;
Rug: fixeditem
location = Study
noun = 'rug' 'carpet'
adjective = 'thick'
sdesc = "thick rug"
ldesc = "The rug is apparently made out of bear skins or some other similar animal, it is very soft."
verDoLookunder( actor ) = {}
doLookunder( actor ) =
//IF YOU BUILD IT THEY WILL SEARCH...
{
"You lift up a corner of the rug but see nothing of interest.\n";
}
verDoSearch( actor ) = {}
doSearch( actor ) =
//SOME SEARCH MORE DILIGENTLY THAN OTHERS...
{
"You search diligently through the thick fur and to your utter amazement find absolutley nothing of interest.\n";
}
;
Lamp: lightsource, fixeditem
location = Study
noun = 'lamp' 'light'
adjective = 'dim' 'corner' 'eerie'
sdesc = "dim lamp"
ldesc = "A victorian style lamp, probably best to leave it alone. "
islit = true
verDoTurnoff( actor ) = {}
doTurnoff( actor ) =
//IF THE BOOKCASE IS OPEN LIGHT FROM THE HALLWAY LIGHTS THE ROOM
{
if ( BookCase.isopen )
{
if ( self.islit )
"The room is now pitch black, well ok, actually it isn\'t...it\'s just a little dimmer, but it would be pitch black if the bookcase weren\'t open.\n", islit := nil;
else
//SINCE THE PLAYER CAN SEE THEY MIGHT TRY TURNING THE LAMP OFF TWICE IN A ROW
"The lamp is already off.";
}
else
//SINCE THE PLAYER CAN'T SEE NOW, THERE IS NO DANGER OF THEM TRYING TO TURN THE LAMP OFF TWICE
"The lamp is now off.", islit := nil;
}
verDoTurnon( actor ) = {}
doTurnon( actor ) =
//CAN'T TURN A LAMP ON IF IT'S ALREADY ON
{
if ( self.islit )
"The lamp is already on.";
else
"The lamp is now on.\n", islit := true;
}
;
StudyChair: chairitem
location = Study
noun = 'chair' 'chairs'
adjective = 'large' 'leather'
sdesc = "leather chair"
ldesc = "A wide leather chair just like you would expect to find in a study.\n"
;
StudyDoor: doorway
location = Study
noun = 'door' 'doorway'
adjective = 'small' 'north'
sdesc = "small door"
doordest = BathRoom2
otherside = StudyDoor2
;
/*THIS IS THE STUDY BATHROOM - NOT TO BE CONFUSED WITH THE HALLWAY2 BATHROOM*/
To
view this code click here.
/*THIS IS THE STUDY BATHROOM - NOT TO BE CONFUSED WITH THE HALLWAY2 BATHROOM*/
BayHall: room
sdesc = "Bay Window"
ldesc = "The hallway turns toward the north here and the corner has been widened to accomodate a large bay window overlooking a clearing outside.\n"
east = NorthEnd
north = HallWay
;
Parchment: readable
location = BayHall
noun = 'paper' 'parchmentpaper' 'crumpledparchmentpaper' 'crumpledparchment' 'crumpledpaper'
adjective = 'piece' 'crumpled' 'parchment'
sdesc = "piece of parchment paper"
ldesc = "The parchment paper is slightly crumpled and has apparently been written on.\n"
readdesc = "\tA breeze through the air in a night full of stars,\n
\tCaptured perhaps in a light colored jar\n
\tWould be just the cure for a mind full of dreams\n
\tThat run rampant through corridors and burst at the seams.\n "
verIoBreakWith( actor ) = {}
ioBreakWith(actor, dobj) =
{
dobj.doBreakWith(actor, self);
}
verIoAttackWith( actor ) = {}
ioAttackWith(actor, dobj) =
{
dobj.doAttackWith(actor, self);
}
issmall = true
;
BayWindow: seethruItem, fixeditem
location = BayHall
noun = 'window' 'glass' 'baywindow'
adjective = 'bay' 'large'
sdesc = "window"
ldesc = (self.thrudesc)
thrudesc =
//GIVES A DESCRIPTION OF THE CLEARING AND ITS CONTENTS
{
"Outside you see a clearing amid pine trees that sway back and forth in the wind. At the center of the clearing is a marble pillar with <<listcont( Pillar )>> sitting on top of it. ";
if ( itemcnt( Clearing.contents ) <> 0 )
"You also see <<listcont( Clearing )>> in the clearing.\n";
}
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
{
if( dobj = ButterKnife )
/*ALLOWING THIS GLASS TO BREAK CAUSES TOO MANY PROBLEMS, BUT A REASON MUST BE GIVEN*/
{
"Gripping the handle of the butter knife firmly you slam its point into the bay window but the thick glass refuses to break and the knife slips backwards through your hand falling to the floor. Luckily for you butter knives are rather dull and your hand is still intact.\n";
dobj.moveInto( Me.location );
}
if( dobj.isgem or dobj.issmall)
//SMALL OBJECTS JUST BOUNCE OFF
{
"You throw <<dobj.thedesc>> against the glass but it bounces off harmlessly.\n";
dobj.moveInto( Me.location );
}
if( dobj = Mask )
//THE MASK IS A BIT ODD...
{
"It\'s doubtful that the delicate mask would survive such an ordeal but you decide to give it a shot anyway. Strangely the mask seems to know what you\'re thinking and as soon as you try to use it to break the glass it slips out of your hand.\n";
Mask.moveInto( Me.location );
}
if ( dobj = Bonsai )
{
"The bonsai is much too heavy, if you tried to smash it through the window all you would be likely to do is drop the massive tree on your foot.\n";
}
if ( dobj = ClearJar or dobj = BlackJar )
{
"Considering the thickness of <<self.thedesc>> it probably wouldn\'t be a good idea to try and break it with <<dobj.thedesc>>. \^<<dobj.thedesc>> is likely to shatter on impact which would make a mess of your hands, since there are no band-aids around let\'s not try it, eh?\n";
}
if ( dobj = Candle )
//THIS IS STRETCHING IT A BIT BUT I REALLY DON'T WANT THIS WINDOW BREAKING
{
"As you bring <<dobj.thedesc>> up to break the window it suddenly feels very heavy in your hands, so heavy in fact that you are forced to drop it before you can even bring it within a foot of the window. \n";
Candle.moveInto( Me.location );
}
}
;
WindowJar1: floatingItem, distantItem
location =
{
if ( ClearJar.location = Pillar )
return( BayHall );
}
noun = 'jar' 'clearjar'
adjective = 'glass'
sdesc = "clear jar"
ldesc = "The clear jar is sitting on top of the marble pedestal. It looks like the type of jar used for canning fruit, really I don't see why it should be on a pedestal at all.\n"
;
WindowJar2: floatingItem, distantItem
location =
{
if ( BlackJar.location = Pillar )
return( BayHall );
}
noun = 'jar' 'blackjar'
adjective = 'glass'
sdesc = "black jar"
ldesc = "The black jar is sitting on top of the marble pedestal, it looks like the type of jar used for canning fruit, really I don't see why it should be on a pedestal at all.\n"
;
WindowPed: distantItem
location = BayHall
noun = 'pedestal' 'pillar'
adjective = 'marble' 'corinthian'
sdesc = "marble pedestal"
ldesc = "It\'s a Corinthian style pillar about four feet tall with a square, flat top on which the glass jar is sitting.\n"
;
WClearing: decoration
location = BayWindow
noun = 'clearing' 'tree' 'trees'
adjective = 'pine'
sdesc = "clearing"
ldesc = "The clearing is scattered with pine needles from the thick pine trees that surround it.\n"
;
HallWay: room
sdesc = "Hallway"
ldesc = "You are in a hallway that runs north and south. To the south is the bay window and the hallway continues to the north. Thick red carpet lines the floor and tall pillars stretch up to the twenty foot ceiling along either side of the hall.\n"
south = BayHall
north = HallsEnd
;
Carpet: decoration
location = HallWay
noun = 'carpet' 'rug'
adjective = 'thick' 'red'
sdesc = "thick red carpet"
ldesc = "It's thick and red...what else is there to say?"
;
Pillars: decoration
location = HallWay
noun = 'pillars' 'pillar'
adjective = 'tall'
sdesc = "pillars"
ldesc = "The pillars are about a foot wide, square, and set into the wall, like the wall they are white."
isThem = true
;
HallsEnd: room
sdesc = "Hallway"
ldesc = "You are standing at the end of a hallway that continues to the south. A pair of french doors lead into a glass room to the west and a solid double door leads north.\n"
south = HallWay
north = NHallDoor
west = WHallDoor
;
Carpet2: decoration
location = HallsEnd
noun = 'carpet' 'rug'
adjective = 'thick' 'red'
sdesc = "thick red carpet"
ldesc = "It's thick and red...what else is there to say?"
;
Pillars2: decoration
location = HallsEnd
noun = 'pillars' 'pillar'
adjective = 'tall'
sdesc = "pillars"
ldesc = "The pillars are about a foot wide, square, and set into the wall, like the wall they are white."
isThem = true
;
NHallDoor: doorway
location = HallsEnd
noun = 'door' 'doorway' 'doors'
adjective = 'north' 'double' 'solid'
sdesc = "north door"
doordest = LivingRoom
isopen = nil
otherside = DenDoor
;
GlassPanes: decoration, seethruItem
location = HallsEnd
noun = 'panes' 'pane'
adjective = 'glass'
sdesc = "glass panes"
ldesc = "The individual glass panes are six by eight inch rectangles set into the french doors.\n"
thrudesc -> WHallDoor
;
WHallDoor: lockableDoorway, seethruItem
location = HallsEnd
noun = 'door' 'doorway' 'doors' 'frenchdoor' 'frenchdoors'
adjective = 'west' 'double' 'french' 'pair' 'glass'
sdesc = "french door"
doordest = GlassRoom
isopen = nil
otherside = GlassDoor
isThem = true
thrudesc =
{
"You see a glass room full of plants on the other side of the french doors. ";
if ( itemcnt( GlassRoom. contents ) <> 0 )
"You also see <<listcont( GlassRoom )>>.\n";
}
ldesc = "It\'s a set of french doors with a dozen or so individual glass panes<<self.isbroken ? ", one of which is broken." : ".">> The door is <<self.isopen ? "open" : "closed">><<self.islocked ? " and locked." : ".">>\n"
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
/*BREAKING THE GLASS DOOR IS A REASONABLE (ALTHOUGH NOT PREFERRED) SOLUTION TO THE PUZZLE AND SINCE I HATE PUZZLES THAT REQUIRE THE PLAYER TO READ THE AUTHORS MIND I HAD TO INCLUDE IT AS A POSSIBILITY...AS IT TURNS OUT AFTER IFCOMP2001 I REALISED THAT THIS IS THE SOLUTION ALMOST EVERY PLAYER USES*/
{
if( not self.isbroken )
{
if( dobj = ButterKnife )
//ONE OF THE FEW OBJECTS THAT CAN BREAK THE GLASS
{
"Gripping the handle of the butter knife firmly you slam its point into the glass pane next to the doorknob. The glass shatters leaving a sizeable hole in the french door.\n";
self.isbroken := true;
self.otherside.isbroken := true;
}
if( dobj.isgem or dobj.issmall)
//SMALL OBJECTS JUST BOUNCE OFF
{
"You throw <<dobj.thedesc>> against the glass but it bounces off harmlessly.\n";
dobj.moveInto( Me.location );
}
if( dobj = Bonsai )
/*MUCH TOO BIG, ALTHOUGH I DON'T SEE WHY ANYONE WOULD TRY ANYWAY CONSIDERING ITS STARTING LOCATION (THE OTHER SIDE OF THE DOOR)*/
{
"Each of the individual glass panes that make up the french door are smaller than the bonsai tree which makes breaking any of them with the bonsai impossible.\n";
}
if( dobj = Mask )
//THE MASK IS A BIT ODD...
{
"It\'s doubtful that the delicate mask would survive such an ordeal but you decide to give it a shot anyway. Strangely the mask seems to know what you\'re thinking and as soon as you try to use it to break the glass it slips out of your hand.\n";
Mask.moveInto( Me.location );
}
if( dobj = BlackJar or dobj = ClearJar )
//JARS BREAK THE GLASS BUT THERE IS A SLIGHT CONSEQUENCE
{
"You throw <<dobj.thedesc>> through the glass pane nearest the doorknob shattering the glass and leaving a sizeable hole in the french door. As <<dobj.thedesc>> lands on the other side of the door it shatters into hundreds of tiny pieces.\b";
self.isbroken := true;
self.otherside.isbroken := true;
dobj.moveInto( GlassRoom );
warp ();
//THE WARP FUNCTION IS DESCRIBED IN STD02.T
}
if ( dobj = Candle )
{
"Gripping the base of <<dobj.thedesc>> you swing it into the glass pane nearest the doorknob of <<self.thedesc>>. The glass shatters leaving a sizeable hole in the french door.\n";
self.isbroken := true;
self.otherside.isbroken := true;
}
}
else
//DOOR IS ALREADY BROKEN
"You already broke a hole in the glass there\'s no need to do any more damage.\n";
}
verDoOpenWith( actor, dobj ) = {}
doOpenWith( actor, dobj ) =
//THE LOCK IS JAMMED BUT THE BUTTERKNIFE CAN BE USED TO PRY THE DOOR OPEN
{
if ( not self.isopen )
//MAKE SURE THE DOOR ISN'T ALREADY OPEN
{
if ( dobj = ButterKnife )
//OPEN DOOR WITH KNIFE
{
"You slide the butter knife in between the two doors and manage to pop the lock open.\n",
self.isopen := true;
GlassDoor.isopen := true;
}
else
//NOTHING ELSE WORKS
"You can\'t open the french doors with <<dobj.thedesc>>.\n";
}
else
//AN APPROPRIATE MESSAGE INCASE THE DOOR IS ALREADY OPEN
"\^<<self.thedesc>> is already open.\n";
}
verDoUnlock( actor ) = {}
doUnlock( actor ) =
{
if ( not self.islocked )
//CAN'T UNLOCK A DOOR IF ITS NOT LOCKED TO BEGIN WITH
"It\'s not locked!\n";
else
{
if ( not self.isopen and not self.isbroken )
//THE LOCK IS ON THE OTHER SIDE OF THE DOOR
"You can't reach the lock from this side of the glass.\n";
else if ( self.isopen )
//IF THE DOOR IS OPEN THE LOCK CAN BE REACHED
"Now that the door is opened it unlocks easily.\n", self.islocked := nil;
else if ( self.isbroken )
//IF THE DOOR IS BROKEN THE LOCK CAN BE REACHED
{
"You reach through the hole in the door and unlock it from the otherside.\n";
self.islocked := nil;
}
}
}
verDoLock( actor ) = {}
doLock( actor ) =
//ALMOST EXACTLY LIKE THE UNLOCK CODE WITH A FEW WORDS CHANGED
{
if ( self.islocked )
"\^<<self.thedesc>> is already locked.\n";
else
{
if ( not self.isopen and not self.isbroken )
"You can't reach the lock from this side of the glass.\n";
else if ( self.isopen )
"Now that the door is opened it unlocks easily.\n", self.islocked := nil;
else if ( self.isbroken )
{
"You reach through the hole in the door and unlock it from the otherside.\n";
self.islocked := nil;
}
}
}
verDoUnlockWith ( actor, iobj ) = {}
doUnlockWith ( actor, iobj ) =
{
if ( not self.isopen )
{
if ( iobj = ButterKnife or iobj = StudyKey )
{
if ( iobj = ButterKnife )
//THE ONLY OBJECT THAT WILL UNLOCK THE DOOR
{
"You slide the butter knife in between the two doors and manage to pop the lock open.\n",
self.isopen := true;
GlassDoor.isopen := true;
}
if ( iobj = StudyKey )
//THE ELSE RESPONSE FELT TOO MUCH LIKE A PARSER FOR THIS OBJECT
"The key doesn't seem to fit the lock.\n";
}
else
"You can\'t unlock the french doors with <<iobj.thedesc>>.\n";
}
else
return doUnlock;
}
;
GlassRoom: room
sdesc = "Glass Room"
//LDESC SHOULD REFLECT THE OPEN/CLOSED STATE OF THE PANEL
ldesc =
{
if ( not self.score )
//+10 POINTS FOR GETTING IN THE GLASS ROOM THE FIRST TIME
{
incscore( 10 );
self.score := true;
}
"This room is made up almost entirely of glass window panes; only the floor and east wall are not. All around the room are various exotic plants sitting on slatted wooden tables. <<(SPanel.location = GlassRoom) ? "One of the panels on the southern side of the room seems to be open." : "A movement on the southern wall catches your attention for an instant but when you look again things seem perfectly normal.">> The doorway leads back east.\n";
}
east = GlassDoor
south =
//HAS THE PLAYER FOUND THE OPEN PANEL?
{
if ( SPanel.location = self )
return SPanel;
else
{
"You can't go that way.\n";
return nil;
}
}
;
SlatTable: surface, fixeditem
location = GlassRoom
noun = 'table' 'tables'
adjective = 'slatted' 'wooden' 'wood'
sdesc = "slatted wooden tables"
ldesc = "The tables are all around the room covered in plants. They sit about two feet off the ground and are made up of a series of wooden slats about three inches wide with gaps between them.\n"
verIoPutOn( actor ) = {}
ioPutOn( actor, dobj ) =
//SOUNDS BETTER THAN A STANDARD PARSER RESPONSE
{
"The tables are already covered in plants.";
return nil;
}
;
ExoticPlants: fixeditem
location = SlatTable
noun = 'plant' 'plants'
adjective = 'exotic'
sdesc = "exotic plants"
ldesc = "The plants range from green and white striped ivy to bushier plants with leaves almost as large as you. They are all massed together in a profusion of green shades and hues that makes it hard to distinguish one plant from another.\n"
;
Ivy: fixeditem
//THIS IS ONLY HERE BECAUSE I MENTIONED IVY IN THE EXOTICPLANTS LDESC
location = SlatTable
noun = 'ivy'
adjective = 'striped'
sdesc = "ivy"
ldesc = (ExoticPlants.ldesc)
//NOT REALLY A SEPARATE ITEM AS FAR AS THE PLAYER IS CONCERNED
;
Bonsai: qcontainer
location = GlassRoom
noun = 'tree' 'bonsaitree'
adjective = 'bonsai' 'weeping'
sdesc = "bonsai tree"
ldesc = "The bonsai is a weeping willow and judging from the size close to a hundred years old. A snail is stuck to the side of its trunk.\n"
verIoPutIn( actor ) = {}
ioPutIn( actor, dobj ) =
/*IT'S A CONTAINER SO IT CAN HOLD THE SNAIL...I DON'T REALLY WANT IT ACTING LIKE A CONTAINER THOUGH*/
{
"You can\'t put anything into the bonsai tree.\n";
return nil;
}
verDoTake( actor ) = {}
doTake( actor ) =
{
if ( itemcnt( Me.contents ) = 0 )
pass doTake;
else
{
"The large size of the bonsai tree combined with its rather odd shape prevent you from carrying anything else at the same time you carry it. If you would like to take the bonsai you'll have to drop what you\'re carrying.\n";
return nil;
}
}
bulk = 10
;
Snail: decoration
location = Bonsai
noun = 'snail'
sdesc = "snail"
ldesc = "On closer inspection you notice that the word \"Home\" has been written on the snail\'s shell."
verDoTake( actor ) = {}
doTake( actor ) =
//I DIDN'T LIKE THE STANDARD PARSER RESPONSE IN THIS CASE
{
"The snail is stuck to the trunk of the bonsai tree.\n";
}
verDoBreak( actor ) = {}
doBreak( actor ) =
{
"Oh come on! Leave the poor thing alone, there is no need to go around breaking everything you see and breaking the snail certainly won\'t help anything.\n";
}
;
GlassPanes2: decoration, seethruItem
location = GlassRoom
noun = 'panes' 'pane'
adjective = 'glass'
sdesc = "glass panes"
ldesc = "The individual glass panes are six by eight inch rectangles set into the french doors.\n"
thrudesc -> GlassDoor
;
GlassDoor: lockableDoorway, seethruItem
location = GlassRoom
noun = 'door' 'doorway' 'doors'
adjective = 'east' 'double' 'french' 'pair' 'glass'
sdesc = "french door"
doordest = HallsEnd
otherside = WHallDoor
isThem = true
thrudesc =
//A DESCRIPTION OF THE HALLWAY AND ITS CONTENTS
{
"Looking through the french doors you can see into the hallway. ";
if ( itemcnt( HallsEnd ) <> 0 )
"In the hallway is <<listcont( HallsEnd )>>.\n";
}
ldesc = "It\'s a set of french doors with a dozen or so individual glass panes<<self.isbroken ? ", one of which is broken." : ".">> The door is <<self.isopen ? "open" : "closed">><<self.islocked ? " and locked." : ".">>\n"
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
{
if ( self.isbroken )
{
if( dobj = BlackJar or dobj = ClearJar )
//THESE OBJECTS LAND ON THE OTHER SIDE WHEN USED TO BREAK DOOR
{
"You throw <<dobj.thedesc>> through the glass pane nearest the doorknob shattering the glass and leaving a sizeable hole in the french door. As <<dobj.thedesc>> lands on the other side of the door it shatters into hundreds of tiny pieces.\b";
self.isbroken := true;
self.otherside.isbroken := true;
dobj.moveInto( HallsEnd );
warp ();
}
else
//EVERYTHING ELSE ACTS JUST LIKE IT DID ON THE OTHER SIDE OF THE DOOR...NO NEED TO WRITE IT TWICE
( WHallDoor.doBreakWith( actor, dobj ) );
}
else
//DOOR IS ALREADY BROKEN
"You already broke a hole in the glass there\'s no need to do any more damage.\n";
}
;
class glasswall: seethruItem, fixeditem
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
{
"With the plants between you and the wall it\'s impossible to get close enough to break the glass.\n";
}
thrudesc = ( self.ldesc )
;
NorthWall: glasswall
location = GlassRoom
noun = 'wall' 'window'
adjective = 'north' 'glass' 'panes'
sdesc = "north wall"
ldesc =
{
"Through the north wall you can see a cliff in the distance. ";
if( itemcnt(CliffEdge2.contents) <> 0 )
"You also notice <<listcont(CliffEdge2)>> near the cliff.\n";
}
;
DistCliff: distantItem
location = GlassRoom
noun = 'cliff'
sdesc = "cliff"
ldesc = "You can tell that it is indeed a cliff but from this distance but more detail is impossible.\n"
;
WestWall: glasswall
location = GlassRoom
noun = 'wall' 'window'
adjective = 'west' 'glass' 'panes'
sdesc = "west wall"
ldesc =
{
"Looking through the west wall you see a few pine trees and beyond them a high-reaching stone wall. ";
if ( itemcnt( ThinPines.contents ) <> 0 )
"Among the pines you see <<listcont( ThinPines )>>.\n";
}
;
DistWall: distantItem
location = GlassRoom
noun = 'wall'
adjective = 'high' 'high-reaching' 'reaching' 'stone'
sdesc = "stone wall"
ldesc = "It\'s about twenty feet high and made of large stones stacked on top of each other.\n"
;
SouthWall: glasswall
location = GlassRoom
noun = 'wall' 'window'
adjective = 'south' 'glass' 'panes'
sdesc = "south wall"
ldesc =
//MAKE THE PLAYER EXAMINE THE WALL BEFORE THEY CAN GO THROUGH IT
{
if ( not self.score )
//+15 POINTS FOR FINDING THE PANEL THE FIRST TIME
{
incscore( 15 );
self.score := true;
}
"South of the glass room seems to be nothing but pine trees. As you look through the wall you notice that one of the panels is open. ";
SPanel.location := GlassRoom;
if (itemcnt( Outside.contents ) <> 0 )
"You also notice <<listcont( Outside )>> lying under the pine trees.\n";
}
;
DistPines: distantItem
location = GlassRoom
noun = 'tree' 'trees'
adjective = 'pine'
sdesc = "pine trees"
ldesc = "They look like ordinary pine trees; lots of them.\n"
isThem = true
;
Ceiling: seethruItem, fixeditem
location = GlassRoom
noun = 'ceiling' 'roof' 'top' 'up'
adjective = 'glass' 'panes'
sdesc = "ceiling"
thrudesc = ( self.ldesc )
ldesc = "The milky way stretches across the sky above you; with so many stars visible it\'s hard to recognize any constellations at all.\n"
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
{
"The ceiling is rather high, you certainly can\'t just reach up and break it.\n";
}
;
GlassConst: distantItem
location = GlassRoom
noun = 'constellation' 'constellations'
sdesc = "constellations"
ldesc = "There are too many stars visible to make out individual constellations.\n"
isThem = true
;
GlassStars: distantItem
location = GlassRoom
noun = 'star' 'stars'
sdesc = "stars"
ldesc = "Beautiful aren\'t they?\n"
isThem = true
;
GlassMilk: distantItem
location = GlassRoom
noun = 'way' 'milkyway'
adjective = 'milky'
sdesc = "milky way"
ldesc = "It stretches across the sky like a giant dust cloud.\n"
;
SPanel: doorway, seethruItem
noun = 'panel'
sdesc = "panel"
doordest = Outside
otherside = NPanel
thrudesc = ( SouthWall.ldesc )
//LOOKING THROUGH A PANEL IN THE WALL IS THE SAME AS LOOKING THROUGH THE WALL
isopen = true
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
{
if ( dobj = Bonsai )
"The bonsai is much too heavy, if you tried to smash it through the panel all you would be likely to do is drop the massive tree on your foot.\n";
else
{
if ( self.isopen )
{
"You throw <<dobj.thedesc>> at the open panel, it misses and lands outside.\n";
dobj.moveInto( Outside );
}
else
{
"You throw <<dobj.thedesc>> at the panel but instead of breaking when it is hit the panel swings open and <<dobj.thedesc>> lands outside.\n";
dobj.moveInto( Outside );
}
}
}
;
/*THIS SECTION IS FOR THE AREA OUTSIDE THE GLASSROOM*/
To
view this code click here.
/*END OF SECTION FOR THE AREA OUTSIDE THE GLASSROOM*/
LivingRoom: room
sdesc = "Living Room"
ldesc = "The living room is an octagon shaped room at the northwest corner of the house. Recessed lighting gives a warm even glow to the room which is furnished with two long white couches, a matching overstuffed chair, several tables and book stands all in the victorian style. Heavy drapes frame a sliding glass door to the north that opens on to a balcony and a hallway leads east. There is a pair of cedar doors on the southeastern wall appearing impossibly heavy and there is also a less impressive doorway leading south.\n"
south = DenDoor
north = Drapes
out = SlidingDoor
east = HallWay2
se = CedarDoor
enterRoom(actor) =
//GET THE OPEN DOOR SCRIPT READY
{
notify (self, &script, 0);
pass enterRoom;
}
leaveRoom(actor) =
//LET THE OPEN DOOR SCRIPT RELAX
{
unnotify(self, &script);
pass leaveRoom;
}
script =
//AN OPEN DOOR TO THE OUTSIDE WORLD HAS AN EFFECT ON THE ROOM'S STATE
{
if ( SlidingDoor.isopen )
switch(rand(4))
{
case 1:
"\n\tYou can hear the distant sound of running water coming through the open door. ";
break;
case 2:
"\n\tOutside, pine trees rustle in the wind. ";
break;
case 3:
"\n\tA breeze blows in through the open door. ";
break;
case 4:
"\n\tThe red drapes rustle in the breeze. ";
break;
}
}
;
DenDoor: doorway
location = LivingRoom
noun = 'door' 'doorway' 'doors'
adjective = 'south' 'double' 'large'
sdesc = "south door"
doordest = HallsEnd
otherside = NHallDoor
;
Drapes: doorway
location = LivingRoom
noun = 'drapes' 'curtains' 'drape'
adjective = 'heavy' 'deep' 'red'
sdesc = "drapes"
ldesc = "Thick red velvet drapes, inlaid with patterns from top to bottom. The drapes are <<self.isopen ? "open." : "closed.">>\n"
doordest = SlidingDoor
isopen = true
isThem = true
;
DrapePattern: decoration
location = LivingRoom
noun = 'pattern' 'patterns'
adjective = 'inlaid'
sdesc = "patterns on the drapes"
ldesc = "The patterns on the drapes show a person disappearing through a swirling vortex in the corner of a featureless room.\n"
isThem = true
;
DrapePerson: decoration
location = LivingRoom
noun = 'person'
sdesc = "person"
ldesc = "Non-descript.\n"
;
SlidingDoor: doorway, seethruItem
location = LivingRoom
noun = 'door' 'doorway'
adjective = 'sliding' 'glass' 'north'
sdesc = "sliding glass door"
thrudesc =
//LIGHTS REFLECT OFF GLASS DOORS BUT ONLY WHEN THE DOOR IS CLOSED...WHAT DOES THE PLAYER SEE?
{
if ( Drapes.isopen )
{
if (self.isopen)
{
"With the door open you can see out onto the balcony but there isn't enough light to see what lies beyond from here. ";
if ( itemcnt( Balcony.contents ) <> 0 )
"There is <<listcont( Balcony )>> on the balcony.\n";
}
else
"The lights in the living room reflect off the glass and prevent you from seeing out into the darkness beyond.\n";
}
else
"You can\'t look through <<self.thedesc>> with the drapes closed!\n";
}
isopen = nil
noAutoOpen = true
verDoOpen( actor ) = {}
doOpen( actor ) =
//SLIDING DOORS OPEN DIFFERENTLY THAN OTHER DOORS
{
if ( Drapes.isopen )
{
"The door slides open smoothly.\n";
LivingRoom.iswindy := true;
pass doOpen;
}
else
"You\'ll have to open the drapes first.\n";
}
verDoClose( actor ) = {}
doClose( actor ) =
//SLIDING DOORS CLOSE DIFFERENTLY THAN OTHER DOORS
{
if ( Drapes.isopen )
{
"The door slides closed with a soft \"click.\"\n";
LivingRoom.iswindy := nil;
pass doClose;
}
else
"You\'ll have to open the drapes first.\n";
}
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) =
{
if ( Drapes.isopen )
{
if( dobj = ButterKnife )
//THIS GLASS WON'T BREAK, SLIDING GLASS DOORS ARE GENERALLY THICK
{
"Gripping the handle of the butter knife firmly you slam its point into the sliding glass door but the thick glass refuses to break and the knife slips backwards through your hand falling to the floor. Luckily for you butter knives are rather dull and your hand is still intact.\n";
dobj.moveInto( Me.location );
}
if( dobj.isgem or dobj.issmall)
//SMALL OBJECTS JUST BOUNCE OFF
{
"You throw <<dobj.thedesc>> against the glass but it bounces off harmlessly.\n";
dobj.moveInto( Me.location );
}
if( dobj = Mask )
//THE MASK IS A BIT ODD...
{
"It\'s doubtful that the delicate mask would survive such an ordeal but you decide to give it a shot anyway. Strangely the mask seems to know what you\'re thinking and as soon as you try to use it to break the glass it slips out of your hand.\n";
Mask.moveInto( Me.location );
}
if ( dobj = Bonsai )
{
"The bonsai is much too heavy, if you tried to smash it through <<self.thedesc>> all you would be likely to do is drop the massive tree on your foot.\n";
}
if ( dobj = ClearJar or dobj = BlackJar )
{
"Considering the thickness of <<self.thedesc>> it probably wouldn\'t be a good idea to try and break it with <<dobj.thedesc>>. \^<<dobj.thedesc>> is likely to shatter on impact which would make a mess of your hands, since there are no band-aids around let\'s not try it, eh?\n";
}
if ( dobj = Candle )
//CONSISTENCY WILL MAKE THE BAYWINDOW DOBREAKWITH SOUND MORE REASONABLE
{
"As you bring <<dobj.thedesc>> up to break <<self.thedesc>> it suddenly feels very heavy in your hands, so heavy in fact that you are forced to drop it before you can even bring it within a foot of <<self.thedesc>>.\n";
Candle.moveInto( Me.location );
}
}
else
"You\'ll have to open the drapes first.\n";
}
doordest = Balcony
otherside = SlidingDoor2
;
CedarDoor: doorway
location = LivingRoom
noun = 'door' 'doors' 'doorway'
adjective = 'giant' 'cedar' 'southeast' 'heavy'
sdesc = "giant cedar door"
isopen = nil
verDoOpen( actor ) = {}
doOpen( acotr ) =
//LDESC SAYS "IMPOSSIBLY HEAVY" SOME MENTION MUST BE MADE OF WEIGHT WHEN OPENING
{
"Despite its heavy appearance the door opens easily.\n";
pass doOpen;
}
doordest = NwEnd
otherside = CedarDoor2
;
WhiteCouch: chairitem, beditem
location = LivingRoom
noun = 'couch' 'sofa' 'couches'
adjective = 'long' 'white'
sdesc = "couch"
ldesc = "The cushions are quite thick and undoubtedly soft. The bright white color is completely spotless.\n"
;
MatchChair: chairitem
location = LivingRoom
noun = 'chair'
adjective = 'white' 'matching'
sdesc = "chair"
ldesc = "Just like the two long couches the chair has thick cushions of a bright white fabric.\n"
;
Cushions: fixeditem
location = LivingRoom
noun = 'cushion' 'cushions'
adjective = 'soft' 'thick'
sdesc = "cushions"
ldesc = "Thick, soft, and white; they are also quite firmly attached, you won\'t be able to move them.\n"
verDoTake( actor ) = {}
doTake( actor ) =
{
"They\'re attached, you can\'t take them.\n";
}
verDoLookunder( actor ) = {}
doLookunder( actor ) =
//BETTER THAN STANDARD FIND NOTHING MESSAGE
{
"You find nothing of interest...not even a piece of lint.\n";
}
verDoSearch( actor ) = {}
doSearch( actor ) =
//SAME AS LOOK UNDER
{
"You find nothing of interest...not even a piece of lint.\n";
}
isThem = true
;
Fabric: decoration
location = LivingRoom
noun = 'fabric'
adjective = 'bright' 'white'
sdesc = "fabric"
ldesc = "My you are thorough aren\'t you? There\'s nothing more to be said about the fabric other than it being white.\n"
;
Recessed: decoration
location = LivingRoom
noun = 'lighting' 'light' 'lights'
adjective = 'recessed'
sdesc = "recessed lights"
ldesc = "Distributed across the ceiling recessed lights give a warm even glow to the room.\n"
isThem = true
;
LivTables: fixeditem
location = LivingRoom
noun = 'table' 'tables'
adjective = 'victorian' 'style' 'mahogany'
sdesc = "tables"
ldesc = "With one at each end of the two couches and another beside the chair there is a total of five matching victorian style tables, all made of mahogany and covered with various trinkets.\n"
verDoPutOn( actor ) = {}
doPutOn( actor ) =
{
"The tables are covered in trinkets, there is no room for anything else.\n";
}
isThem = true
;
Trinkets: decoration
location = LivingRoom
noun = 'trinkets'
sdesc = "trinkets"
ldesc = "The trinkets range in size and shape and cover nearly every country in the world in their origin; everything from the occasional greco-roman piece to a few oriental curiosities.\n"
isThem = true
;
LivStands: fixeditem, surface
location = LivingRoom
noun = 'stand' 'stands' 'bookstands' 'bookstand'
adjective = 'book' 'victorian' 'style' 'mahogany'
sdesc = "book stands"
ldesc = "Three of the eight walls in this room have small bookstands in front of them, all identical and also matching the tables; victorian style and made of mahogany. The book stands must have fallen into disuse some time ago as all of the books on them are covered in a thick layer of dust making them indistiguishable one from another.\n"
isThem = true
verDoDust( actor ) = {}
doDust( actor ) = ( self.doClean( actor ) )
verDoClean( actor ) = {}
doClean( actor ) =
{
"You try to clean the dust off of the books but all you manage to do is smear it around.\n";
}
;
StandBooks: decoration
location = LivingRoom
noun = 'books' 'book'
sdesc = "dust covered books"
ldesc = "The books are covered in a thick layer of dust making it impossible to examine them individually.\n"
verDoTake( actor ) = {}
doTake( actor ) =
{
"The books are all covered in dust and you can\'t tell them apart, if you can\'t distinguish between them you can\'t expect me to be able to figure out which one you mean when you say \"get book\" and you certainly can\'t expect me to get all of them, you couldn\'t possibly carry such a load!\n";
}
isThem = true
verDoDust -> LivStands
doDust -> LivStands
verDoClean -> LivStands
doClean -> LivStands
;
Balcony: outdoors
sdesc = "Balcony"
ldesc = "From out on the balcony the stars provide enough light to see at least some detail of the surrounding area. This side of the house is built next to a rather large cliff over which the balcony hangs. You can vaguely make out the sound of running water coming from somewhere far below.\n"
south = SlidingDoor2
in = SlidingDoor2
enterRoom( actor ) =
{
self.isentered := true;
Me.seencliff := true;
//MODIFY LDESC OF GUEST BEDROOM
Me.iswarned := true;
//NOTIFY JUMPVERB THAT JUMP HAS AN EFFECT HERE
pass enterRoom;
}
leaveRoom( actor ) =
{
self.isentered := nil;
Me.iswarned := nil;
//LET JUMPVERB RELAX
pass leaveRoom;
}
;
BalCliff: fixeditem
location = Balcony
noun = 'cliff'
adjective = 'edge' 'large'
sdesc = "cliff"
ldesc = "The sheer face of the cliff drops for a considerable distance before disappearing into murky darkness, if it were daytime you might be able to see to the bottom but you just can\'t make it out in this dim light.\n"
;
SlidingDoor2: doorway, seethruItem
location = Balcony
noun = 'door' 'doorway'
adjective = 'sliding' 'glass' 'south'
sdesc = "sliding glass door"
thrudesc =
//WHAT'S ON THE OTHER SIDE?
{
"Not suprisingly you see the living room, white couches, matching chair...big cedar doorway, everything you saw when you were on the other side of the door. ";
if ( itemcnt( LivingRoom.contents ) <> 0 )
"You also see <<listcont( LivingRoom )>>.\n";
}
isopen = nil
noAutoOpen = true
verDoOpen( actor ) = {}
doOpen( actor ) =
//SLIDING DOORS OPEN DIFFERENTLY THAN OTHER DOORS
{
"The door slides open smoothly.\n";
pass doOpen;
}
verDoClose( actor ) = {}
doClose( actor ) =
//SLIDING DOORS CLOSE DIFFERENTLY THAN OTHER DOORS
{
"The door slides closed with a soft \"click.\"\n";
pass doClose;
}
doordest = LivingRoom
otherside = SlidingDoor
verDoAttackWith( actor, dobj ) = {}
doAttackWith( actor, dobj ) = ( self.doBreakWith(actor, dobj) )
verDoBreakWith( actor, dobj ) = {}
doBreakWith( actor, dobj ) = ( SlidingDoor.doBreakWith( actor, dobj ) )
;
HallWay2: room
sdesc = "Hallway"
ldesc = "This hallway seems a bit longer than the other hall and not quite as wide. There is a small doorway to the north and the hall continues east. West leads back to the living room.\n"
west = LivingRoom
north = SmallDoor
east = MidHall2
;
SmallDoor: doorway
location = HallWay2
noun = 'door' 'doorway'
adjective = 'small' 'north'
sdesc = "small door"
doordest = BathRoom
otherside = SmallDoor2
;
/*THIS IS THE HALLWAY2 BATHROOM - NOT TO BE CONFUSED WITH THE STUDY BATHROOM*/
To
view this code click here.
/*THIS IS THE HALLWAY2 BATHROOM - NOT TO BE CONFUSED WITH THE STUDY BATHROOM*/
MidHall2: room
sdesc = "Middle of Hallway"
ldesc = "You\'re standing at the middle of the hallway which continues to the east and west. There is a door to the north.\n"
west = HallWay2
east = EndHall2
north = KitchenDoor
;
KitchenDoor: doorway
location = MidHall2
noun = 'door' 'doorway'
adjective = 'north'
sdesc = "door"
doordest = Kitchen
otherside = KitchenDoor2
isopen = nil
;
Kitchen: room
sdesc = "Kitchen"
ldesc = "Everything in the kitchen has been done in stainless steel: the floor, the counters, even the refrigerator and stove. There is a door to the south and a swinging door to the east.\n"
south = KitchenDoor2
east = SwingingDoor
;
ButterKnife: keyItem
/*THE FACT THAT THIS IS A KEYITEM CAUSES PROBLEMS WITH THE STOVE CODE...NAMELY THE KNIFE WON'T GET HOT. THERE IS PROBABLY A FIX FOR THIS THAT WOULDN'T BE TOO HARD TO IMPLEMENT BUT SINCE IT DOESN'T AFFECT GAMEPLAY GREATLY AND I WOULD LIKE TO MOVE ON TO CODING MY NEXT GAME I'VE LEFT THIS PROBLEM ALONE.*/
location = Counter
noun = 'knife'
adjective = 'butter'
sdesc = "knife"
ldesc = "It looks like a butter knife.\n"
verIoOpenWith( actor ) = {}
ioOpenWith( actor, dobj ) =
{
dobj.doOpenWith( actor, self );
}
;
Stove: fixeditem, openable
location = Kitchen
noun = 'stove' 'oven'
sdesc = "stove"
ldesc = "An oversized stove like you might expect to find in a bakery. The stove is <<self.isopen? "open." : "closed.">>\n"
isopen = nil
maxbulk = 9
//PREVENTS COOKING THE BONSAI TREE
verGrab( obj ) =
//CHECKS EACH ITEM TO SEE IF THEY'RE HOT
{
if ( obj.ishot )
"\^<<obj.thedesc>> is too hot to touch right now, you\'ll have to wait for it to cool down.\n";
}
verDoTurnon( actor ) =
{
if ( self.isopen )
"You should close the stove before you turn it on.\n";
if ( self.ison )
"The stove is already on.\n";
}
doTurnon( actor ) =
{
"You turn the stove on.\n";
unnotify (self, &script);
self.scriptNum := 0;
self.ison := true;
if ( TapWater.isIn( self ) and ClearJar.isopen )
{
TapWater.moveInto( nil );
Steam.moveInto( self );
}
if ( RealWater.isIn( self ) and ClearJar.isopen )
{
RealWater.moveInto( GardenPool );
Steam.moveInto( self );
}
self.tmpList := self.contents;
//CREATE A LIST OF EVERYTHING IN THE OVEN
self.tmpObj := car(tmpList);
//TAKE THE FIRST OBJECT FROM THE LIST AND RUN CODE
while ( tmpObj <> nil )
//KEEP RUNNING THIS CODE UNTIL THERE ARE NO OBJECTS LEFT
{
if ( tmpObj = RolledPaper or tmpObj = Parchment )
/*BURN UP PAPER OBJECTS; NOTICE THAT THE FINAL NOTE ABOUT THE SNAIL ISN'T INCLUDED...THIS WAS AN OVERSIGHT ON MY PART BUT AS OF THE TIME OF THIS TYPING IT HASN'T BEEN REPORTED TO ME SO I DON'T THINK ANYONE NOTICED.*/
{
tmpObj.moveInto( nil );
Ashes.moveInto( self );
}
if ( tmpObj <> Ashes )
//DON'T SET THE ASHES TO ISHOT
tmpObj.ishot := true;
//SET THE ISHOT PROPERTY TO TRUE FOR THE FIRST OBJECT IN THE LIST
tmpList := cdr(tmpList);
//REMOVE THE FIRST OBJECT FROM THE LIST AND REWRITE THE LIST
tmpObj := car(tmpList);
//TAKE THE FIRST OBJECT FROM THE NEW LIST AND RUN CODE AGAIN
}
}
verDoTurnoff( actor ) =
{
if ( not self.ison )
"The stove is already off.\n";
}
doTurnoff( actor ) =
{
"You turn the stove off.\n";
self.ison := nil;
if ( itemcnt( self.contents ) <> 0 )
notify (self, &script, 0);
if ( TapIce.isIn( self ) )
//NOT DONE IN TURNON BECAUSE WATER WOULD BE TURNED INTO STEAM
{
TapIce.moveInto( nil );
TapWater.moveInto( ClearJar );
}
if ( RealIce.isIn( self ) )
//NOT DONE IN TURNON BECAUSE WATER WOULD BE TURNED INTO STEAM
{
RealIce.moveInto( nil );
RealWater.moveInto( ClearJar );
}
}
verDoOpen( actor ) =
{
if ( self.isopen )
"\^<<self.thedesc>> is already open.\n";
if ( self.ison )
"You should turn the stove off before you open it.\n";
}
doOpen( actor ) =
{
if ( Steam.location = self )
//IF THE WATER EVAPORATED
{
"Steam billows out of the stove and quickly evaporates.\n";
Steam.moveInto( nil );
}
pass doOpen;
}
scriptNum = 0
script =
{
self.scriptNum++;
switch( self.scriptNum )
{
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
//EXACTLY THE SAME AS SIMILAR CODE ABOVE BUT CHANGING ISHOT TO NIL FOR EACH ITEM
{
self.tmpList := self.contents;
self.tmpObj := car(tmpList);
while ( tmpObj <> nil )
{
tmpObj.ishot := nil;
tmpList := cdr(tmpList);
tmpObj := car(tmpList);
}
unnotify (self, &script);
self.scriptNum := 0;
}
}
}
;
Steam: item
noun = 'steam'
sdesc = "steam"
ldesc = "steam"
;
Ashes: item
noun = 'ashes' 'ash'
sdesc = "pile of ashes"
ldesc = "A pile of ashes is all that remains of the paper.\n"
verDoTake( actor ) = {}
doTake( actor ) =
{
"As you reach out to take the pile of ashes it crumbles into nothingness and disappears.\n";
self.moveInto( nil );
}
;
Sink: fixeditem, qcontainer
location = Kitchen
noun = 'sink' 'faucet'
sdesc = "sink"
ldesc = "The sink looks like two large square holes about a foot deep set into the counter. <<self.ison ? "Water flows out of the faucet and down into the drain below." : "">>\n"
verDoTurnon( actor ) =
{
if ( self.ison )
"The faucet is already on.\n";
}
doTurnon( actor ) =
{
"Water begins to flow out of the faucet.\n";
FakeWater.moveInto( self );
self.ison := true;
}
verDoTurnoff( actor ) =
{
if ( not self.ison )
"It\'s not on!\n";
}
doTurnoff( actor ) =
{
"The water stops flowing out of the faucet.\n";
FakeWater.moveInto( nil );
self.ison := nil;
}
verIoPourIn( actor ) = {}
ioPourIn( actor, dobj ) =
{
if ( dobj = TapWater )
{
"You pour the water down the drain.\n";
dobj.moveInto( nil );
}
if ( dobj = RealWater )
{
"You pour the water down the drain.\n";
dobj.moveInto( GardenPool );
}
}
;
FakeWater: fixeditem
noun = 'water'
adjective = 'tap' 'flowing'
sdesc = "flowing water"
adesc = "water"
ldesc = "The water flows out of the faucet and down the drain below.\n"
doDrop -> TapWater
verDoDrink( actor ) = {}
doDrink( actor ) =
{
"You drink the tap water; cold and refreshing.\n";
}
verDoEat( actor ) = {}
doEat( actor ) =
{
"I\'m going to go ahead and assume you meant drink.\b";
self.doDrink( actor );
}
doTake -> TapWater
doPour ->TapWater
;
compoundWord 'water' 'in' 'waterin'
;
compoundWord 'waterin' 'the' 'waterinthe'
;
//ALLOWS "X WATER IN THE JAR" NECESSARY TO DIFERENTIATE BETWEEN THIS AND FLOWING WATER
compoundWord 'waterinthe' 'jar' 'waterinthejar'
;
//"ALLOWS "X WATER IN JAR" A RESONABLE VARIATION OF THE ABOVE COMMAND
compoundWord 'waterin' 'jar' 'waterinjar'
;
TapWater: fooditem
noun = 'water' 'waterinthejar' 'waterinjar'
adjective = 'tap' 'jar'
sdesc = "water in the jar"
adesc = "water"
ldesc = "It looks like water; clear, liquid...you get the idea.\n"
verDoDrink( actor ) = {}
doDrink( actor ) =
{
"You drink the tap water; cold and refreshing.\n";
self.moveInto( nil );
}
verDoEat( actor ) = {}
doEat( actor ) =
{
"I\'m going to go ahead and assume you meant drink.\b";
self.doDrink( actor );
}
verDoTake( actor ) =
{
if ( not Me.isCarrying( ClearJar ) )
//DOES THE PLAYER HAVE A CONTAINER?
"You\'ll need a container to put the water in.\n";
return nil;
}
doTake( actor ) =
{
if ( itemcnt ( ClearJar.contents ) = 0 )
//MAKE SURE THE JAR IS EMPTY
{
if ( ClearJar.isopen )
//MUST ALSO BE AN OPEN JAR
{
"You fill the clear jar with water.\n";
self.moveInto( ClearJar );
}
else
"You\'ll have to open the jar first.\n";
}
else
"The jar already contains << listcont( ClearJar.contents )>>.\n";
}
verDoPour( actor ) = {}
doPour( actor ) = ( self.doDrop( actor ) )
verDoDrop( actor ) = {}
doDrop( actor ) =
{
if ( self.location <> ClearJar )
//CAN'T DROP SOMETHING THAT ISN'T HELD TO BEGIN WITH
"You\'re not carrying the water.\n";
else
{
if ( Me.location.iswindy and Me.location <> LivingRoom )
//MAKE SURE THE PLAYER IS OUTSIDE
{
if ( Me.iswarned )
//SPECIAL CASE IF THE CLIFF IS NEAR BY
"You pour the water out over the edge of the cliff.\n";
else
"You pour the water out over the ground.\n";
self.moveInto( nil );
}
else
//THIS PREVENTS THE PLAYER FROM FILING THE HOUSE WITH WATER WHICH COULD CAUSE ALL SORTS OF PROBLEMS
"If you want to get rid of the water take it outside and pour it out, or pour it down a drain somewhere, but don\'t just dump it all over the floor!\n";
}
}
verDoPourIn( actor, iobj ) = {}
doPourIn(actor, iobj) =
{
iobj.ioPourIn(actor, self);
}
;
Counter: decoration, surface
location = Kitchen
noun = 'counter' 'counters'
sdesc = "counter"
ldesc = "A stainless steel strip all the way around the room broken only by the sink and stove, the counter is about three feet wide and just over waist high.\n"
;
Refrigerator: openable, decoration
location = Kitchen
noun = 'fridge' 'refrigerator'
sdesc = "refrigerator"
isopen = nil
verIoPutIn( actor ) =
{
if ( not self.isopen )
"The refrigerator is closed.\n";
}
ioPutIn( actor, dobj ) =
{
notify( self, &script, 0);
pass ioPutIn;
}
Grab( obj ) =
//NOTIFY THE PLAYER THAT THE WATER HAS FROZEN
{
unnotify( self, &script);
if ( obj = ClearJar and RealIce.location = ClearJar)
"The refrigerator must be colder than it looks, the water in the clear jar has frozen solid!\n";
if ( obj = ClearJar and TapIce.location = ClearJar)
"The refrigerator must be colder than it looks, the water in the clear jar has frozen solid!\n";
}
scriptNum = 0
script =
{
self.scriptNum++;
switch( self.scriptNum )
{
case 1:
break;
case 2:
if( RealWater.isIn( self ) )
//FREEZE WATER
{
RealWater.moveInto( GardenPool );
RealIce.moveInto( ClearJar );
}
if( TapWater.isIn( self ) )
//FREEZE WATER
{
TapWater.moveInto( nil );
TapIce.moveInto( ClearJar );
}
unnotify( self, &script);
scriptNum := 0;
}
}
;
RealIce: item
noun = 'ice' 'water'
adjective = 'frozen' 'solid' 'block'
sdesc = "ice"
adesc = "ice"
ldesc = "The water has frozen into a solid block of ice.\n"
verDoTake( actor ) =
{
"The water has frozen into the shape of the clear jar, it will be impossible to get it out until it melts.\n";
}
;
TapIce: item
noun = 'ice' 'water'
adjective = 'frozen' 'solid' 'block'
sdesc = "ice"
adesc = "ice"
ldesc = "The water has frozen into a solid block of ice.\n"
verDoTake( actor ) =
{
"The water has frozen into the shape of the clear jar, it will be impossible to get it out until it melts.\n";
}
;
KitchenDoor2: doorway
location = Kitchen
noun = 'door' 'doorway'
adjective = 'south' 'hall'
sdesc = "south door"
doordest = MidHall2
otherside = KitchenDoor
isopen = nil
;
SwingingDoor: doorway
location = Kitchen
noun = 'door' 'doorway'
adjective = 'swinging' 'east'
sdesc = "swinging door"
ldesc = "The swinging door is closed.\n"
isopen = true
//GAME THINKS IT'S OPEN PLAYER THINKS IT'S CLOSED, EVERYTHING WORKS GREAT
doordest =
//SOME MENTION MUST BE MADE OF THE FACT THAT THE PLAYER IS MOVING THROUGH A CLOSED DOOR!
{
"The door swings open easily allowing you to enter the dining room and then swings shut behind you.\b";
return( DiningRoom );
}
verDoOpen( actor ) = {}
doOpen( actor ) =
//SWINGING DOORS CAN'T BE LEFT OPEN
{
"You push the door and it swings back and forth for a moment before returning to the closed position.\n";
return nil;
}
verDoClose( actor ) = {}
doClose( actor ) =
/*THE GAME HAS TO THINK THE DOOR IS OPEN EVEN WHEN THE PLAYER THINKS IT'S CLOSED SO THAT THE PLAYER CAN PASS THROUGH*/
{
"The door is already closed.\n";
return nil;
}
otherside = SwingingDoor2
;
EndHall2: room
sdesc = "End of Hall"
ldesc = "The hallway ends here, continuing back to the west. There is an opening to the east that leads to a stairwell and a doorway north.\n"
west = MidHall2
north = DiningDoor
east = StairWell
;
DiningDoor: doorway
location = EndHall2
noun = 'door' 'doorway'
adjective = 'north'
sdesc = "north door"
doordest = DiningRoom
isopen = nil
otherside = DiningDoor2
;
DiningRoom: room
sdesc = "Dining Room"
ldesc = "There is a long table here with high backed chairs at either end and more normal sized matching chairs along both sides. Doors lead west and south.\n"
west = SwingingDoor2
south = EndHall2
;
SwingingDoor2: doorway
location = DiningRoom
noun = 'door' 'doorway'
adjective = 'swinging' 'west'
sdesc = "swinging door"
ldesc = "The swinging door is closed.\n"
isopen = true
//GAME THINKS IT'S OPEN PLAYER THINKS IT'S CLOSED, EVERYTHING WORKS GREAT
doordest =
//SOME MENTION MUST BE MADE OF THE FACT THAT THE PLAYER IS MOVING THROUGH A CLOSED DOOR!
{
"The door swings open easily allowing you to enter the kitchen and then swings shut behind you.\b";
return( Kitchen );
}
verDoOpen( actor ) = {}
doOpen( actor ) =
//SWINGING DOORS CAN'T BE LEFT OPEN
{
"You push the door and it swings back and forth for a moment before returning to the closed position.\n";
return nil;
}
verDoClose( actor ) = {}
doClose( actor ) =
/*THE GAME HAS TO THINK THE DOOR IS OPEN EVEN WHEN THE PLAYER THINKS IT'S CLOSED SO THAT THE PLAYER CAN PASS THROUGH*/
{
"The door is already closed.\n";
return nil;
}
otherside = SwingingDoor
;
DinTable: fixeditem, surface
location = DiningRoom
noun = 'table'
adjective = 'long' 'mahogany'
sdesc = "table"
ldesc = "It is a very thick rectangular table with minimal embelishment, if it weren't for the highly polished mahogany surface it would almost be out of place in this house.\n"
;
HighBacked: chairitem
location = DiningRoom
noun = 'chair' 'chairs'
adjective = 'high' 'backed'
sdesc = "high backed chairs"
ldesc = "There are two high backed chairs, one at each end of the table, complete with elaborate wooden scroll work and soft red cushions.\n"
reachable = ( self.location.contents )
isThem = true
;
NormChairs: chairitem
location = DiningRoom
noun = 'chair' 'chairs'
adjective = 'normal' 'sized' 'matching'
sdesc = "matching chairs"
ldesc = "There are three matching chairs along each of the two long sides of the table. They are very much like a shorter version of the high backed chairs without the scroll work.\n"
reachable = ( self.location.contents )
isThem = true
;
Candle: item
location = DinTable
noun = 'holder'
adjective = 'candle' 'silver'
sdesc = "silver candle holder"
ldesc =
//LDESC DIFFERENT IF CANLDE IS ON TABLE
{
if ( self.location = DinTable )
"The silver candle holder is positioned as the table\'s center piece.\n";
else
"A large silver candle holder with room for four candles. However, there are currently no candles in it. \n";
}
;
DiningDoor2: doorway
location = DiningRoom
noun = 'door' 'doorway'
adjective = 'south'
sdesc = "south door"
doordest = EndHall2
isopen = nil
otherside = DiningDoor
;
StairWell: room
sdesc = "Stairwell"
//LDESC SHOULD REFLECT THE COMPLETE/INCOMPLETE STATE OF THE STAIRCASE
ldesc = "This is a large open room with a winding spiral staircase stretching upward. The staircase is actually designed as a series of interconnected metal platforms which would give a person the feeling of floating in air rather than climbing a traditional staircase. The architecture is quite impressive, even to your untrained eye<< self.isfull ? "." : ", except for one detail: the staircase only goes halfway up to the next floor, stopping in mid air for no apparent reason.">> There are hallways to the west and south.\n"
west = EndHall2
south = HallWay3
up =
//IS THE STAIRCASE COMPLETE?
{
if ( self.isfull )
return ( StairWell2 );
else
return ( HalfStair );
}
;
Stairs1: fixeditem, surface
location = StairWell
noun = 'staircase' 'stairs' 'case' 'steps' 'platform' 'platforms' 'stairway' 'stairwell'
adjective = 'stair' 'winding' 'spiral' 'metal' 'interconnected'
sdesc = "spiral staircase"
ldesc = "The staircase is a series of wide metal platforms connectied by a pole on each end that runs the entire length of the stairs through the platforms. The two poles are almost completely hidden by the overlaps of the platforms and this combined with the space left between each section of metal makes the staircase appear to hover in place rather than actually being attached to anything.\n"
;
HalfStair: room
sdesc = "Incomplete Staircase"
ldesc = "You get the strage feeling that you\'re part of a surrealistic painting from up here...perhaps you should be. Staircases that stop halfway to their destination are not generally common occurences, it occurs to you that the builder might have been attempting to make a statement of some sort. Something about the futility of it all, or that enigmatic quality of life....or maybe he just ran out of money...\n"
down = StairWell
enterRoom( actor ) =
//NOTIFY JUMPVERB THAT PLAYER JUMPING WILL HAVE AN EFFECT
{
Me.iswarned := true;
pass enterRoom;
}
leaveRoom( actor ) =
//LET JUMPVERB RELAX
{
Me.iswarned := nil;
pass leaveRoom;
}
;
Stairs2: fixeditem, surface
location = HalfStair
noun = 'staircase' 'stairs' 'case' 'steps' 'platform' 'platforms'
adjective = 'stair' 'winding' 'spiral' 'metal' 'interconnected'
sdesc = "spiral staircase"
ldesc = "The staircase is a series of wide metal platforms connectied by a pole on each end that runs the entire length of the stairs through the platforms. The two poles are almost completely hidden by the overlaps of the platforms and this combined with the space left between each section of metal makes the staircase appear to hover in place rather than actually being attached to anything.\n"
;
/*THIS SECTION FOR ROOMS UPSTAIRS*/
To
view this code click here.
/*END OF SECTION FOR ROOMS UPSTAIRS*/
HallWay3: room
sdesc = "Hallway"
ldesc = "You are in a hallway that runs north and south. Thick red carpet lines the floor and tall pillars stretch up to the twenty foot ceiling along either side of the hall. A stairwell is to the north and a door is on the eastern wall.\n"
north = StairWell
south = HallsEnd3
east = PorchDoor
;
PorchDoor: doorway
location = HallWay3
noun = 'door' 'doorway'
adjective = 'east' 'eastern'
sdesc = "east door"
doordest = StonePorch
isopen = nil
isLocked = true
otherside = PorchDoor2
;
Carpet3: decoration
location = HallWay3
noun = 'carpet' 'rug'
adjective = 'thick' 'red'
sdesc = "thick red carpet"
ldesc = "It's thick and red...what else is there to say?"
;
Pillars3: decoration
location = HallWay3
noun = 'pillars' 'pillar'
adjective = 'tall'
sdesc = "pillars"
ldesc = "The pillars are about a foot wide, square, and set into the wall, like the wall they are white."
isThem = true
;
StonePorch: outdoors
sdesc = "Stone Porch"
ldesc = "You are on a stone porch. Three sides are walled in by the outside of the house while on the east side three long steps lead down into an enormous garden. A doorway leads back into the house to the west.\n"
west = HallWay3
east = GardenOne
down = GardenOne
;
PorchDoor2: doorway
location = StonePorch
noun = 'door' 'doorway'
adjective = 'west' 'western'
sdesc = "west door"
doordest = HallWay3
isopen = nil
otherside = PorchDoor
isLocked = true
;
StoneSteps: decoration, surface
location = StonePorch
noun = 'steps' 'step'
adjective = 'three' 'long' 'stone'
sdesc = "stone steps"
ldesc = "Three long stone steps lead down into the garden.\n"
isThem = true
;
PorchBrick: fixeditem
location = StonePorch
noun = 'wall'
adjective = 'brick'
sdesc = "brick wall"
ldesc = "All brick walls look pretty much alike, these are no exception.\n"
;
/*THIS SECTION IS FOR THE EASTERN GARDEN*/
To
view this code click here.
/*END OF SECTION FOR THE EASTERN GARDEN*/
HallsEnd3: room
sdesc = "Hall\'s End"
//LDESC REFLECTS OPEN/CLOSED STATE OF SECRET WALL (THE OTHER SIDE OF THE STUDY BOOKCASE)
ldesc = "The hall ends here<<BookCase.isopen ? " (or it would anyway if there weren't a giant gaping hole to the south where a wall used to be) " :"">>, continuing back to the north. There are two giant cedar doors on the western wall and a modest table sits in the corner.\n"
north = HallWay3
west = CedarDoor3
south =
//IS THE SECRET WALL OPEN OR CLOSED?
{
if ( BookCase.isopen )
return ( Study );
else
{
"You can\'t go that way.\n";
return ( nil );
}
}
;
Carpet4: decoration
location = HallsEnd3
noun = 'carpet' 'rug'
adjective = 'thick' 'red'
sdesc = "thick red carpet"
ldesc = "It's thick and red...what else is there to say?"
;
Pillars4: decoration
location = HallsEnd3
noun = 'pillars' 'pillar'
adjective = 'tall'
sdesc = "pillars"
ldesc = "The pillars are about a foot wide, square, and set into the wall, like the wall they are white."
isThem = true
;
CedarDoor3: doorway
location = HallsEnd3
noun = 'door' 'doors' 'doorway'
adjective = 'giant' 'cedar' 'west' 'heavy'
sdesc = "giant cedar door"
isopen = nil
verDoOpen( actor ) = {}
doOpen( actor ) =
//SINCE IT WAS DESCRIBED AS GIANT SOME MENTION SHOULD BE MADE OF WEIGHT WHEN OPENING
{
"Despite its heavy appearance the door opens easily.\n";
pass doOpen;
}
doordest = SeEnd
otherside = CedarDoor4
;
HallTable: fixeditem, surface
location = HallsEnd3
noun = 'table'
adjective = 'modest'
sdesc = "table"
ldesc =
//DESCRIBE THE TABLE WITH REFRENCE TO THE DRAWER AND THE THINGS ON THE TABLE
{
"A tall slender table made of mahogany, it has a small drawer with a brass handle. The drawer is <<Drawer.isopen ? "open." : "closed.">> ";
if ( itemcnt(self.contents) != 0 )
"On the table you can see <<listcont(self)>>. ";
}
;
Drawer: openable, fixeditem
location = HallsEnd3
noun = 'drawer'
adjective = 'small'
sdesc = "small drawer"
ldesc =
//WHAT'S IN THE DRAWER?
{
"The drawer is<<self.isopen ? " open." : " closed.">> ";
if (self.isopen && itemcnt(self.contents) != 0)
"Inside the drawer you can see <<listcont(self)>>. ";
}
isopen = nil
;
Handle: decoration
location = HallsEnd3
noun = 'handle'
adjective = 'brass'
sdesc = "brass handle"
ldesc = "There isn't an awful lot one can say about a brass handle, the name sort of says it all.\n"
verDoPull( actor ) = {}
doPull( actor ) =
//PULLING THE HANDLE SHOULD HAVE THE SAME EFFECT AS OPENING THE DRAWER
{
Drawer.doOpen( actor);
}
;
StudyKey: keyItem
location = Drawer
noun = 'key'
sdesc = "key"
issmall = true
verDoTake( actor ) =
{
inherited.verDoTake( actor );
}
doTake( actor ) =
{
if ( not self.score )
//+5 POINTS FOR GETTING THE KEY
{
incscore( 5 );
self.score := true;
}
pass doTake;
}
;
/*THIS SECTION IS FOR THE LIBRARY*/
To
view this code click here.
/*END OF SECTION FOR THE LIBRARY*/
/*THIS SECTION IS FOR THE AREA UNDER THE LIBRARY ( ENDGAME )*/
To
view this code click here.
/*THIS SECTION IS FOR THE AREA UNDER THE LIBRARY ( ENDGAME )*/
/*THIS SECTION IS FOR LIBRARY NPC SCRIPTING ( ALANNA )*/
To
view this code click here.
/*END OF SECTION FOR LIBRARY NPC SCRIPTING ( ALANNA )*/
/*THE FOLLOWING IS CODE I DIDN'T WRITE ( MOSTLY ), IT COMES DIRECTLY FROM A FILE CALLED PLURALS.T AND DEALS WITH SINGULAR PLURALS AND A FEW OTHER THINGS, THE UNNECESSARY PORTIONS WERE DELETED AND SOME OTHER PORTIONS HAVE BEEN MODIFIED TO SUIT MY NEEDS, MY MODIFICATIONS HAVE BEEN NOTED*/ OTHER PORTIONS HAVE BEEN MODIFIED TO SUIT MY NEEDS, MY MODIFICATIONS HAVE BEEN NOTED*/
To
view this code click here.
//END OF PLURALS.T