Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Balances.inf

12. The Footpath and the carpet (lines 1239-1281)

1239  Place Footpath "Gorse Bushes"
1240    with description
1241             "The footpath from the cave mouth runs into dense, impenetrable
1242              gorse bushes.  Perhaps it wasn't so much a footpath as a rill
1243              in the earth where roots wouldn't take; anyway, there's no way
1244              but back south.",
1245         s_to Cave_Mouth;
1246   
1247  Object -> carpet "beautiful red carpet"
1248    with name "beautiful" "magic" "red" "carpet",
1249         initial
1250            "Slung over one of the gorse bushes is a beautiful red carpet.",
1251         description
1252            "This is a carpet of unusual design. It is red, beautifully woven
1253             and bears a pattern of cubes.",
1254         before
1255         [ i;  Receive:
1256                   if (self notin location || self hasnt moved)
1257                       "Not until the carpet's on the ground, you can't.";
1258             Ride: <<Enter self>>;
1259             Enter:
1260                   if (self notin location || self hasnt moved)
1261                       "Not until the carpet's on the ground, you can't.";
1262                   if (location==Balance_Room)
1263                       "Mysteriously, the carpet rucks and pulls until you're
1264                        thrown off.  It settles back on the white floor with a
1265                        contented sigh.";
1266                   if (location==In_Cave)
1267                       "The carpet rises suddenly, crashing into the roof of
1268                        the cave and throwing you back off again.  Painfully.";
1269                   if (location==Bazaar) i=Up_Road; else i=Bazaar;
1270                   print "The carpet rises suddenly into the fluffy white
1271                          clouds, and after a headlong journey deposits you...^";
1272                   move self to i;
1273                   PlayerTo(i,1); move player to self; <<Look>>;
1274             Take: if (player in self) "Not while you're on it!";
1275                   for (i=child(self):i~=0:i=child(self))
1276                   {   move i to location;
1277                       print "(Dislodging ", (the) i, ")^";
1278                   }
1279         ],
1280    has  supporter enterable;
1281   


Last updated 23 June 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.