Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

31. Some entry points (lines 3360-3405)

3360  [ Initialise;
3361      location = At_End_Of_Road;
3362      score = 36;
3363      StartDaemon(dwarf);
3364      StartDaemon(pirate);
3365      StartDaemon(cave_closer);
3366      "^^^^^Welcome to Adventure!^
3367            (Please type HELP for instructions and information.)^^";
3368  ];
3369   
3370  [ PrintRank;
3371      print ", earning you the rank of ";
3372      if (score >= 348) "Grandmaster Adventurer!";
3373      if (score >= 330) "Master, first class.";
3374      if (score >= 300) "Master, second class.";
3375      if (score >= 200) "Junior Master.";
3376      if (score >= 130) "Seasoned Adventurer.";
3377      if (score >= 100) "Experienced Adventurer.";
3378      if (score >= 35)  "Adventurer.";
3379      if (score >= 10)  "Novice.";
3380                        "Amateur.";
3381  ];
3382   
3383  [ DarkToDark;
3384      if (dark_warning == false) {
3385          dark_warning = true;
3386          "It is now pitch dark. If you proceed you will likely fall into a pit.";
3387      }
3388      if (random(4) == 1) {
3389          deadflag = 1;
3390          "You fell into a pit and broke every bone in your body!";
3391      }
3392      rfalse;
3393  ];
3394   
3395  [ UnknownVerb word
3396      obj;
3397      objectloop (obj ofclass Room) {
3398          if (obj has visited && WordInProperty(word, obj, name)) {
3399              verb_wordnum = 0;
3400              return 'go';
3401          }
3402      }
3403      rfalse;
3404  ];
3405   


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.