Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Adventureland.inf

Landscape Above Ground (lines 102-438)

102  ScottRoom Lake_Shore "Lakeside"
103    with description "You're on the shore of a lake.",
104         n_to Forest,  s_to Lake_Shore,  w_to Dismal_Swamp,
105         d_to Quicksand,
106         before
107         [;  Swim: "Below you and before the lake is quicksand.";
108         ],
109    has  light;
110  Object -> water "water"
111    with name "water", article "some",
112         before
113         [; Drink: "Boy, that really hit the spot.";
114            Take: if (bottle notin player)
115                      "You have nothing in which to carry the water.";
116                  <<Fill bottle>>;
117            Insert: if (second == bottle) <<Fill bottle>>;
118                      "You have nothing in which to carry the water.";
119            Receive: if (noun == bottle) <<Fill bottle>>;
120                  remove noun; CDefArt(noun); " washes away into the lake.";
121         ],
122    has  scenery;
123  Treasure -> "*GOLDEN FISH*"
124    with name "gold" "golden" "fish",
125         each_turn
126         [;  if (self notin player) rfalse;
127             if (net notin player && random(100) <= 75)
128             {   move self to Lake_Shore;
129                 "^The fish escape back to the lake.";
130             }
131             if ((water_in_the_bottle notin bottle
132                  || bottle notin player) && random(100)<=50)
133             {   remove self; move dead_fish to player;
134                 "^Too dry. Fish die.";
135             }
136         ];
137  Object -> axe "rusty axe (magic word- BUNYON -on it)"
138    with name "rusty" "axe",
139         description "The magic word BUNYON is written on the haft.";
140  Sign -> "NO SWIMMING ALLOWED";
141  Object dead_fish "dead fish"
142    with name "dead" "fish"
143    has  edible;
144   
145  ScottRoom Quicksand "Bog"
146    with description "You're in a quick-sand bog.",
147         before
148         [;  Swim: if (child(player)==nothing)
149                   {   PlayerTo(Lake_Shore); rtrue; }
150                   "Something's too heavy.";
151         ],
152    has  light;
153  Treasure -> ox "*SMALL STATUE OF A BLUE OX*"
154    with name "ox" "blue" "small" "statue";
155   
156  ScottRoom Forest "Forest"
157    with description "You're in a forest.",
158         n_to Forest,  s_to Forest,  e_to Sunny_Meadow,  w_to Forest,
159         u_to trees
160    has  light;
161  Object -> trees "trees"
162    with name "tree" "trees",
163         before
164         [;   Climb: <<Enter self>>;
165         ],
166         door_to Up_Oak, door_dir u_to
167    has  open door static;
168   
169  ScottRoom Up_Oak "Branch"
170    with description "You're in a branch on the top of an old oak tree.^
171                      To the east you see a meadow beyond a lake.",
172         d_to Forest,  
173    has  light;
174   
175  ScottRoom Sunny_Meadow "Meadow"
176    with description "You're in a sunny meadow.",
177         n_to Lake_Shore,  s_to Dismal_Swamp,  e_to Lake_Shore,
178         w_to Forest,
179    has  light;
180  Object -> dragon "sleeping Dragon"
181    with name "dragon" "sleeping" "sleepy",
182         before
183         [;  WakeOther: deadflag=1; "The dragon wakes!";
184         ],
185         life
186         [;  Order, Answer, Ask: "Shh! You don't want to wake the dragon.";
187             Give:    "The dragon is too drowsy to notice.";
188             ThrowAt: if (noun==axe) 
189                      {   move axe to location; "The dragon isn't bothered."; }
190         ],
191         each_turn
192         [;  if (mud in location && random(100)<=50)
193             {   deadflag=1;
194                 "Dragon smells something - awakens - attacks you!";
195             }
196         ],
197    has  animate;
198  Sign -> "IN SOME CASES MUD IS GOOD, IN OTHERS...";
199  Treasure eggs "*DRAGON EGGS* (very rare)"
200    with name "dragon" "eggs" "very" "rare", depositpoints 12;
201  Object gore "smoking hole - pieces of dragon and gore"
202    with name "gore" "hole" "dragon" "smoking"
203    has  static;
204   
205  ScottRoom Hidden_Grove "Grove"
206    with description "You're in a hidden grove.",
207         n_to Forest,  e_to Dismal_Swamp,  w_to Forest,  
208    has  light;
209  Treasure -> "*JEWELLED FRUIT*"
210    with name "jewelled" "jewel" "fruit",
211         after
212         [;  Eat: "Boy that really hit the spot!"; ],
213    has  edible;
214  Sign -> "PAUL'S PLACE";
215   
216  ScottRoom Dismal_Swamp "Dismal Swamp"
217    with description "You're in a dismal swamp.",
218         n_to Sunny_Meadow,  s_to Dismal_Swamp,  e_to Dismal_Swamp,
219         w_to Hidden_Grove,  in_to 0,            u_to cypress_tree
220    has  light;
221  Object -> cypress_tree "cypress tree"
222    with name "cypress" "tree",
223         before
224         [;   Climb: <<Enter self>>;
225              Cut:    if (axe notin player) rfalse;
226                      remove self; move tree_remains to Dismal_Swamp;
227                      Dismal_Swamp.in_to = tree_remains;
228                      Dismal_Swamp.u_to = 0;
229                      print "TIMBER..";
230                      if (keys in Tree_Top)
231                      {   remove keys;
232                          ". Something fell from the treetop and vanished!";
233                      }
234                      ".";
235         ],
236         door_to Tree_Top, door_dir u_to
237    has  open door static;     
238   
239  Object -> mud "evil smelling mud"
240    with name "evil" "smelling" "mud", article "some",
241         after
242         [ f; Take:
243                  if (infected_bites in player) { remove infected_bites; f=1; }
244                  if (chigger_bites in player)  { remove chigger_bites; f=1; }
245                  if (f==1) "Boy that really hit the spot!";
246         ],
247         each_turn
248         [;  if (self notin player) rtrue;
249             if (random(100)<=5 &&
250                 (bottle notin player || water_in_the_bottle notin bottle))
251             {   move self to Dismal_Swamp;
252                 "The mud dried up and fell off.";
253             }
254         ];
255   
256  Object -> gas "swamp gas"
257    with name "swamp" "gas", article "some",
258         before
259         [;  Take:
260                 if (distended_bladder in player) "Bladder full already.";
261                 if (wine_bladder notin player) "You have nothing suitable.";
262                 <<Insert self wine_bladder>>;
263             Insert:
264                 if (second == distended_bladder) "The bladder's full.";
265                 if (second ~= wine_bladder)
266                     "That won't hold gas.";
267                 move distended_bladder to player; remove wine_bladder;
268                 itobj = distended_bladder;
269                 "The bladder distends with swamp gas.";
270         ],
271    has  static;
272  Object -> slime "floating patch of oily slime"
273    with name "patch" "oil" "slime" "oily",
274         before
275         [;  Take: brass_lantern.time_left=125; give brass_lantern general;
276                   remove self; move brass_lantern to player;
277                   "Magic oil attracts magic lamp. Lamp is now full.";
278         ],
279    has  static;
280  Object -> chiggers "chiggers"
281    with name "chiggers", article "a swarm of",
282         daemon
283         [;  if (chigger_bites in player && mud notin player && random(100)<=10)
284             {   remove chigger_bites; move infected_bites to player;
285                 "^Your chigger bites are now infected.";
286             }
287             if (infected_bites in player && random(100)<=8)
288             {   deadflag=1;
289                 "^The bites have rotted your whole body.";
290             }
291             if (infected_bites notin player
292                 && chigger_bites notin player
293                 && slime in location && mud notin player
294                 && random(100)<=5)
295             {   move chigger_bites to player;
296                 "^You're bitten by chiggers.";
297             }
298             if (infected_bites notin player
299                 && chigger_bites notin player
300                 && chiggers in player
301                 && random(100)<=30)
302             {   move chigger_bites to player;
303                 "^You're bitten by chiggers.";
304             }
305         ];
306  Object chigger_bites "chigger bites"
307    with name "chigger" "bites", article "some",
308         before [; "The bites are annoying. Perhaps medicine would help?"; ];
309  Object infected_bites "infected chigger bites"
310    with name "chigger" "bites" "infected", article "some",
311         before [; "The bites are frightening. Get medicine!"; ];
312   
313  Object tree_remains "hollow stump and remains of a felled tree"
314    with name "tree" "stump" "hollow" "remains",
315         door_to Inside_Stump, door_dir in_to
316    has  open door static;
317   
318  ScottRoom Tree_Top "Tree Top"
319    with description "You're in the top of a tall cypress tree.",
320         d_to Dismal_Swamp,  
321    has  light;
322   
323  Object -> "spider web with writing on it"
324    with name "spider" "web" "writing",
325         description "~CHOP IT DOWN!~",
326         before
327         [;  Take: deadflag=1; "You're bitten by a spider.";
328         ];
329  Object -> keys "ring of skeleton keys"
330    with name "keys" "ring" "skeleton" "keyring";
331   
332  ScottRoom Inside_Stump "Inside Stump"
333    with description "You're in a large hollow damp stump in the swamp.",
334         n_to Dismal_Swamp,  s_to Dismal_Swamp,  e_to Dismal_Swamp,
335         w_to Dismal_Swamp,  u_to Dismal_Swamp,  d_to Root_Chamber, 
336    has  light;
337  Sign -> "LEAVE TREASURE HERE - (say 'SCORE')";
338  Object -> bottle "the bottle"
339    with name "bottle" "jar" "flask",
340         short_name
341         [;  if (water_in_the_bottle in self) { print "bottle of water"; rtrue; }
342             if (bees in self) { print "bottle of bees"; rtrue; }
343             print "empty bottle"; rtrue;
344         ],
345         before
346         [ x; LetGo:
347               if (noun in bottle)
348                   "You're holding that already (in the bottle).";
349           Receive:
350               if (noun==water or bees) <<Fill self>>;
351               "That won't go in the bottle.";
352           Fill:
353               if (child(bottle)~=0)
354                 "The bottle is full already.";
355               if (water in location)
356               {   move water_in_the_bottle to bottle;
357                   "The bottle is now full of water.";
358               }
359               if (bees in location)
360               {   move bees to bottle;
361                   "The bottle is now full of bees.";
362               }
363               "There is nothing here with which to fill the bottle.";
364           Empty: if (child(bottle)==0) "The bottle is already empty!";
365               x=child(bottle);
366               remove x;
367               if (x==bees)
368               {   move x to location; "You release the bees.";
369               }
370               "Your bottle is now empty and the ground is now wet.";
371         ],
372    has  container open;
373   
374  Object -> brass_lantern "old fashioned lamp"
375    with name "lamp" "fashioned" "lamp", article "an",
376         power 125,
377         time_left 0,
378         daemon
379         [ t; if (self hasnt on) { StopDaemon(self); rtrue; }
380            t=--(self.power);
381            if (t==0) give self ~on ~light;
382            if (self in player or location)
383            {   if (t==0) "Your lamp has run out of power.";
384                if (t==30) "Your lamp is getting dim.";
385            }
386         ],
387         before
388         [; Examine: print "It is a shiny brass lamp";
389                  if (self hasnt on)
390                      ". It is not currently lit.";
391                  if (self.power < 30)
392                      ", glowing dimly.";
393                  ", glowing brightly.";
394            Burn: <<SwitchOn self>>;
395            Rub:  if (self has on) "No! It's too hot.";
396                  if (self hasnt general) "Nothing happens.";
397                  switch(++genie_gifts)
398                  {   1: move ring to location;
399                         "A glowing genie appears -
400                          drops something - then vanishes.";
401                      2: move bracelet to location;
402                         "A glowing genie appears -
403                          drops something - then vanishes.";
404                      3: if (ring in Inside_Stump)
405                             score=score-ring.depositpoints;
406                         remove ring; move player to Misty_Room;
407                         "A genie appears - says ~boy you're selfish~ - takes 
408                          something - then vanishes!";
409                      4: if (bracelet in Inside_Stump)
410                             score=score-bracelet.depositpoints;
411                         remove bracelet; move player to Misty_Room;
412                         "A genie appears - says ~boy you're selfish~ - takes 
413                          something - then vanishes!";
414                      default: "Nothing happens.";
415                  }
416            SwitchOn: if (self.power <= 0) "It's run out.";
417            Receive, Open:
418                  "You can't put things in the lamp.";
419         ],
420         after
421         [; SwitchOn: give self light; StartDaemon(self);
422                "Flameless lamp now on.";
423            SwitchOff: give self ~light;
424         ],
425    has  switchable;
426   
427  Treasure ring "*DIAMOND RING*"
428    with name "diamond" "ring";
429  Treasure bracelet "*DIAMOND BRACELET*"
430    with name "diamond" "bracelet";
431   
432  Object water_in_the_bottle "bottled water" bottle
433    with name "bottled" "water" "h2o", article "some",
434         before
435         [; Drink:  remove water_in_the_bottle; <<Drink water>>;
436         ],
437         description "It looks like ordinary water to me.";
438   


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.