A Guide to the Mazes of Menace
                               (Guidebook for NetHack)
                                   Eric S. Raymond
                      (Extensively edited and expanded for 3.4)
          1.  Introduction
          Recently, you have begun to find yourself unfulfilled and distant
          in your daily occupation.  Strange dreams of prospecting,  steal-
          ing,  crusading,  and  combat  have haunted you in your sleep for
          many months, but you aren't  sure  of  the  reason.   You  wonder
          whether  you have in fact been having those dreams all your life,
          and somehow managed to forget about them until now.  Some  nights
          you awaken suddenly and cry out, terrified at the vivid recollec-
          tion of the strange and powerful creatures that seem to be  lurk-
          ing  behind  every  corner  of  the dungeon in your dream.  Could
          these details haunting your dreams be real?  As each night  pass-
          es,  you feel the desire to enter the mysterious caverns near the
          ruins grow stronger.  Each morning, however, you quickly put  the
          idea  out  of  your head as you recall the tales of those who en-
          tered the caverns before you and did not return.  Eventually  you
          can  resist  the yearning to seek out the fantastic place in your
          dreams no longer.  After all, when other  adventurers  came  back
          this  way after spending time in the caverns, they usually seemed
          better off than when they passed through the first time.  And who
          was to say that all of those who did not return had not just kept
          going?
               Asking around, you hear about a bauble, called the Amulet of
          Yendor  by  some, which, if you can find it, will bring you great
          wealth.  One legend you were told even mentioned that the one who
          finds  the  amulet  will be granted immortality by the gods.  The
          amulet is rumored to be somewhere beyond the Valley of  Gehennom,
          deep  within  the Mazes of Menace.  Upon hearing the legends, you
          immediately realize that there is some profound and  undiscovered
          reason that you are to descend into the caverns and seek out that
          amulet of which they spoke.  Even if the rumors of  the  amulet's
          powers are untrue, you decide that you should at least be able to
          sell the tales of your adventures to the local  minstrels  for  a
          tidy  sum,  especially if you encounter any of the terrifying and
          magical creatures of your dreams along the way.   You  spend  one
          last  night  fortifying  yourself at the local inn, becoming more
          and more depressed as you watch the odds of  your  success  being
          posted on the inn's walls getting lower and lower.
          NetHack Guidebook                                               1
          NetHack Guidebook                                               2
                 In the morning you awake, collect your belongings, and set
          off for the dungeon.  After several days  of  uneventful  travel,
          you  see the ancient ruins that mark the entrance to the Mazes of
          Menace.  It is late at night, so you make camp  at  the  entrance
          and  spend the night sleeping under the open skies.  In the morn-
          ing, you gather your gear, eat what may be your  last  meal  out-
          side, and enter the dungeon...
          2.  What is going on here?
               You have just begun a game of NetHack.  Your goal is to grab
          as much treasure as you can, retrieve the Amulet of  Yendor,  and
          escape the Mazes of Menace alive.
               Your abilities and strengths for dealing with the hazards of
          adventure will vary with your background and training:
               Archeologists understand dungeons pretty well; this  enables
          them  to  move  quickly  and sneak up on the local nasties.  They
          start equipped with the tools for a proper scientific expedition.
               Barbarians  are  warriors out of the hinterland, hardened to
          battle.   They  begin  their  quests  with  naught  but  uncommon
          strength, a trusty hauberk, and a great two-handed sword.
               Cavemen  and  Cavewomen start with exceptional strength but,
          unfortunately, with neolithic weapons.
               Healers are wise in medicine and apothecary.  They know  the
          herbs  and  simples  that  can restore vitality, ease pain, anes-
          thetize, and neutralize poisons; and with their instruments, they
          can  divine a being's state of health or sickness.  Their medical
          practice earns them quite reasonable amounts of money, with which
          they enter the dungeon.
               Knights  are  distinguished  from  the  common skirmisher by
          their devotion to the ideals of chivalry and  by  the  surpassing
          excellence of their armor.
               Monks are ascetics, who by rigorous practice of physical and
          mental disciplines have become capable of fighting as effectively
          without  weapons  as with.  They wear no armor but make up for it
          with increased mobility.
               Priests and Priestesses are clerics militant, crusaders  ad-
          vancing  the  cause  of  righteousness with arms, armor, and arts
          thaumaturgic.  Their ability to commune with deities  via  prayer
          occasionally extricates them from peril, but can also put them in
          it.
               Rangers are most at home in the woods, and some say slightly
          out of place in a dungeon.  They are, however, experts in archery
          as well as tracking and stealthy movement.
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               3
               Rogues are agile and stealthy  thieves,  with  knowledge  of
          locks,  traps,  and  poisons.   Their advantage lies in surprise,
          which they employ to great advantage.
               Samurai are the elite warriors of feudal Nippon.   They  are
          lightly  armored  and  quick, and wear the dai-sho, two swords of
          the deadliest keenness.
               Tourists start out with lots of gold (suitable for  shopping
          with),  a  credit card, lots of food, some maps, and an expensive
          camera.  Most monsters don't like being photographed.
               Valkyries are hardy warrior women.  Their upbringing in  the
          harsh  Northlands  makes  them strong, inures them to extremes of
          cold, and instills in them stealth and cunning.
               Wizards start out with a knowledge of magic, a selection  of
          magical  items,  and a particular affinity for dweomercraft.  Al-
          though seemingly weak and easy to overcome at first sight, an ex-
          perienced Wizard is a deadly foe.
               You may also choose the race of your character:
               Dwarves are smaller than humans or elves, but are stocky and
          solid individuals.  Dwarves' most notable trait  is  their  great
          expertise  in mining and metalwork.  Dwarvish armor is said to be
          second in quality not even to the mithril armor of the Elves.
               Elves are agile, quick, and perceptive; very little of  what
          goes  on  will escape an Elf.  The quality of Elven craftsmanship
          often gives them an advantage in arms and armor.
               Gnomes are smaller than but generally  similar  to  dwarves.
          Gnomes  are known to be expert miners, and it is known that a se-
          cret underground mine complex built by this  race  exists  within
          the Mazes of Menace, filled with both riches and danger.
               Humans are by far the most common race of the surface world,
          and are thus the norm by which other races  are  often  compared.
          Although  they have no special abilities, they can succeed in any
          role.
               Orcs are a cruel and barbaric race that  hate  every  living
          thing  (including other orcs).  Above all others, Orcs hate Elves
          with a passion unequalled, and will go out of their way  to  kill
          one  at  any opportunity.  The armor and weapons fashioned by the
          Orcs are typically of inferior quality.
          3.  What do all those things on the screen mean?
               On the screen is kept a map of where you have been and  what
          you  have  seen on the current dungeon level; as you explore more
          of the level, it appears on the screen in front of you.
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               4
               When NetHack's ancestor rogue  first  appeared,  its  screen
          orientation  was  almost  unique  among  computer  fantasy games.
          Since then, screen orientation has become the  norm  rather  than
          the  exception;  NetHack  continues  this fine tradition.  Unlike
          text adventure games that accept commands in pseudo-English  sen-
          tences and explain the results in words, NetHack commands are all
          one or two keystrokes and the results are  displayed  graphically
          on  the  screen.  A minimum screen size of 24 lines by 80 columns
          is recommended; if the screen is larger,  only  a  21x80  section
          will be used for the map.
               NetHack can even be played by blind players, with the assis-
          tance of Braille readers or  speech  synthesisers.   Instructions
          for  configuring NetHack for the blind are included later in this
          document.
               NetHack generates a new dungeon every time you play it; even
          the  authors  still find it an entertaining and exciting game de-
          spite having won several times.
               NetHack offers a variety of display  options.   The  options
          available  to  you  will vary from port to port, depending on the
          capabilities of your hardware and software, and  whether  various
          compile-time options were enabled when your executable was creat-
          ed.  The three possible display options are: a monochrome charac-
          ter  interface,  a color character interface, and a graphical in-
          terface using small pictures called tiles.  The two character in-
          terfaces allow fonts with other characters to be substituted, but
          the default assignments use standard ASCII characters  to  repre-
          sent everything.  There is no difference between the various dis-
          play options with respect to game play.  Because we cannot repro-
          duce the tiles or colors in the Guidebook, and because it is com-
          mon to all ports, we will use the default ASCII  characters  from
          the  monochrome  character  display  when referring to things you
          might see on the screen during your game.
               In order to understand what is going on  in  NetHack,  first
          you  must  understand what NetHack is doing with the screen.  The
          NetHack screen replaces the ``You see ...'' descriptions of  text
          adventure  games.   Figure 1 is a sample of what a NetHack screen
          might look like.  The way the screen looks  for  you  depends  on
          your platform.
          --------------------------------------------------------------------
           The bat bites!
               ------
               |....|    ----------
               |.<..|####...@...$.|
               |....-#   |...B....+
               |....|    |.d......|
               ------    -------|--
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               5
           Player the Rambler     St:12 Dx:7 Co:18 In:11 Wi:9 Ch:15  Neutral
           Dlvl:1 $:0  HP:9(12) Pw:3(3) AC:10 Exp:1/19 T:257 Weak
          --------------------------------------------------------------------
                                      Figure 1
          3.1.  The status lines (bottom)
               The  bottom  two lines of the screen contain several cryptic
          pieces of information describing your current status.  If  either
          status  line  becomes  longer  than  the width of the screen, you
          might not see all of it.  Here are explanations of what the vari-
          ous status items mean (though your configuration may not have all
          the status items listed below):
          Rank
               Your character's name and professional ranking (based on the
               experience level, see below).
          Strength
               A  measure of your character's strength; one of your six ba-
               sic attributes.  A human character's  attributes  can  range
               from  3  to 18 inclusive; non-humans may exceed these limits
               (occasionally you may get super-strengths of the form 18/xx,
               and  magic  can  also  cause attributes to exceed the normal
               limits).  The higher your strength, the  stronger  you  are.
               Strength  affects  how  successfully  you  perform  physical
               tasks, how much damage you do in combat, and how  much  loot
               you can carry.
          Dexterity
               Dexterity  affects  your  chances to hit in combat, to avoid
               traps, and do other tasks requiring agility or  manipulation
               of objects.
          Constitution
               Constitution  affects  your ability to recover from injuries
               and other strains on your stamina.
          Intelligence
               Intelligence affects your ability to cast  spells  and  read
               spellbooks.
          Wisdom
               Wisdom comes from your practical experience (especially when
               dealing with magic).  It affects your magical energy.
          Charisma
               Charisma affects how certain creatures react toward you.  In
               particular,  it can affect the prices shopkeepers offer you.
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               6
          Alignment
               Lawful, Neutral, or Chaotic.  Often, Lawful is taken as good
               and Chaotic as evil, but legal and ethical do not always co-
               incide.  Your alignment influences how other monsters  react
               toward you.  Monsters of a like alignment are more likely to
               be non-aggressive, while those of an opposing alignment  are
               more likely to be seriously offended at your presence.
          Dungeon Level
               How deep you are in the dungeon.  You start at level one and
               the number increases as you  go  deeper  into  the  dungeon.
               Some  levels  are  special, and are identified by a name and
               not a number.  The Amulet of Yendor is reputed to  be  some-
               where beneath the twentieth level.
          Gold
               The  number  of  gold  pieces you are openly carrying.  Gold
               which you have concealed in containers is not counted.
          Hit Points
               Your current and maximum hit points.   Hit  points  indicate
               how  much  damage you can take before you die.  The more you
               get hit in a fight, the lower they get.  You can regain  hit
               points  by  resting,  or  by  using certain magical items or
               spells.  The number in parentheses  is  the  maximum  number
               your hit points can reach.
          Power
               Spell  points.  This tells you how much mystic energy (mana)
               you have available for spell casting.  Again,  resting  will
               regenerate the amount available.
          Armor Class
               A measure of how effectively your armor stops blows from un-
               friendly creatures.  The lower this number is, the more  ef-
               fective the armor; it is quite possible to have negative ar-
               mor class.
          Experience
               Your current experience level and experience points.  As you
               adventure,  you  gain experience points.  At certain experi-
               ence point totals, you gain an experience level.   The  more
               experienced you are, the better you fight and withstand mag-
               ical attacks.  Many dungeons show only your experience level
               here.
          Time
               The  number  of  turns elapsed so far, displayed if you have
               the time option set.
          Hunger status
               Your current hunger status, ranging from  Satiated  down  to
               Fainting.   If  your hunger status is normal, it is not dis-
               played.
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               7
               Additional status flags may appear after the hunger  status:
          Conf  when you're confused, FoodPois or Ill when sick, Blind when
          you can't see, Stun when stunned, and Hallu when hallucinating.
          3.2.  The message line (top)
               The top line of the screen is reserved for messages that de-
          scribe  things that are impossible to represent visually.  If you
          see a ``--More--'' on the top line, this means that  NetHack  has
          another  message  to  display on the screen, but it wants to make
          certain that you've read the one that is there  first.   To  read
          the next message, just press the space bar.
          3.3.  The map (rest of the screen)
               The  rest  of the screen is the map of the level as you have
          explored it so far.  Each symbol on the screen  represents  some-
          thing.   You  can  set various graphics options to change some of
          the symbols the game uses; otherwise, the game will  use  default
          symbols.  Here is a list of what the default symbols mean:
          - and |
               The walls of a room, or an open door.  Or a grave (|).
          .    The floor of a room, ice, or a doorless doorway.
          #    A  corridor,  or iron bars, or a tree, or possibly a kitchen
               sink (if your dungeon has sinks), or a drawbridge.
          >    Stairs down: a way to the next level.
          <    Stairs up: a way to the previous level.
          +    A closed door, or a spellbook containing a spell you may  be
               able to learn.
          @    Your character or a human.
          $    A pile of gold.
          ^    A trap (once you have detected it).
          )    A weapon.
          [    A suit or piece of armor.
          %    Something edible (not necessarily healthy).
          ?    A scroll.
          /    A wand.
          =    A ring.
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               8
          !    A potion.
          (    A useful item (pick-axe, key, lamp...).
          "    An amulet or a spider web.
          *    A gem or rock (possibly valuable, possibly worthless).
          `    A boulder or statue.
          0    An iron ball.
          _    An altar, or an iron chain.
          {    A fountain.
          }    A pool of water or moat or a pool of lava.
          \    An opulent throne.
          a-zA-Z and other symbols
               Letters  and certain other symbols represent the various in-
               habitants of the Mazes of Menace.  Watch out,  they  can  be
               nasty and vicious.  Sometimes, however, they can be helpful.
          I    This marks the last known location of an invisible or other-
               wise  unseen  monster.   Note  that  the  monster could have
               moved.  The 'F' and 'm' commands may be useful here.
               You need not memorize all these symbols;  you  can  ask  the
          game  what  any  symbol  represents with the `/' command (see the
          next section for more info).
          4.  Commands
               Commands are initiated by  typing  one  or  two  characters.
          Some  commands, like ``search'', do not require that any more in-
          formation be collected by NetHack.  Other commands might  require
          additional  information, for example a direction, or an object to
          be used.  For those commands that require additional information,
          NetHack  will present you with either a menu of choices or with a
          command line prompt requesting information.  Which you  are  pre-
          sented with will depend chiefly on how you have set the menustyle
          option.
               For example, a common question, in the form  ``What  do  you
          want  to use? [a-zA-Z ?*]'', asks you to choose an object you are
          carrying.  Here, ``a-zA-Z'' are the  inventory  letters  of  your
          possible  choices.   Typing  `?'  gives  you an inventory list of
          these items, so you can see what each letter refers to.  In  this
          example,  there  is  also a `*' indicating that you may choose an
          object not on the list, if you wanted to use something  unexpect-
          ed.  Typing a `*' lists your entire inventory, so you can see the
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                               9
          inventory letters of every object you're carrying.   Finally,  if
          you change your mind and decide you don't want to do this command
          after all, you can press the ESC key to abort the command.
               You can put a number before some  commands  to  repeat  them
          that  many times; for example, ``10s'' will search ten times.  If
          you have the number_pad option set, you must type `n' to prefix a
          count,  so  the  example  above  would be typed ``n10s'' instead.
          Commands for which counts make no sense ignore  them.   In  addi-
          tion,  movement commands can be prefixed for greater control (see
          below).  To cancel a count or a prefix, press the ESC key.
               The list of commands is rather long, but it can be  read  at
          any  time during the game through the `?' command, which accesses
          a menu of helpful texts.  Here are the commands for  your  refer-
          ence:
          ?    Help menu:  display one of several help texts available.
          /    Tell  what a symbol represents.  You may choose to specify a
               location or type a symbol (or even a whole word) to explain.
               Specifying a location is done by moving the cursor to a par-
               ticular spot on the map and then pressing one of  `.',  `,',
               `;',  or `:'.  `.' will explain the symbol at the chosen lo-
               cation, conditionally check for ``More info?'' depending up-
               on whether the help option is on, and then you will be asked
               to pick another location; `,' will explain  the  symbol  but
               skip  any  additional  information; `;' will skip additional
               info and also not bother asking you to choose another  loca-
               tion  to  examine;  `:'  will  show additional info, if any,
               without asking for confirmation.  When picking  a  location,
               pressing  the ESC key will terminate this command, or press-
               ing `?'  will give a brief reminder about how it works.
               Specifying a name rather than a location  always  gives  any
          additional information available about that name.
          &    Tell what a command does.
          <    Go  up  to  the previous level (if you are on a staircase or
               ladder).
          >    Go down to the next level (if you are on a staircase or lad-
               der).
          [yuhjklbn]
               Go  one  step in the direction indicated (see Figure 2).  If
               you sense or remember a monster there, you  will  fight  the
               monster  instead.   Only  these  one-step  movement commands
               cause  you  to  fight  monsters;  the  others  (below)   are
               ``safe.''
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                              10
                                    y  k  u          7  8  9
                                     \ | /            \ | /
                                    h- . -l          4- . -6
                                     / | \            / | \
                                    b  j  n          1  2  3
                                              (if number_pad is set)
                                         Figure 2
          [YUHJKLBN]
               Go  in that direction until you hit a wall or run into some-
               thing.
          m[yuhjklbn]
               Prefix:  move without picking up objects or  fighting  (even
               if you remember a monster there)
          F[yuhjklbn]
               Prefix:   fight  a  monster  (even  if you only guess one is
               there)
          M[yuhjklbn]
               Prefix:  move far, no pickup.
          g[yuhjklbn]
               Prefix:  move until something interesting is found.
          G[yuhjklbn] or <CONTROL->[yuhjklbn]
               Prefix:  same as `g', but forking of corridors is  not  con-
               sidered interesting.
          _    Travel to a map location via a shortest-path algorithm.  The
               shortest path is computed over map locations the hero  knows
               about  (e.g.  seen or previously traversed).  If there is no
               known path, a guess is made instead.  Stops on most  of  the
               same  conditions  as the `G' command, but without picking up
               objects, similar to the `M' command.  For ports  with  mouse
               support,  the  command  is  also  invoked when a mouse-click
               takes place on a location other than the current position.
          .    Rest, do nothing for one turn.
          a    Apply (use) a tool (pick-axe, key, lamp...).
          A    Remove one or more worn items, such as armor.  Use `T' (take
               off)  to take off only one piece of armor or `R' (remove) to
               take off only one accessory.
          ^A   Redo the previous command.
          c    Close a door.
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                              11
          C    Call (name) an individual monster.
          ^C   Panic button.  Quit the game.
          d    Drop something.  Ex. ``d7a'' means drop seven items  of  ob-
               ject a.
          D    Drop several things.  In answer to the question ``What kinds
               of things do you want to drop? [!%= BUCXaium]''  you  should
               type  zero  or  more object symbols possibly followed by `a'
               and/or `i' and/or `u' and/or `m'.  In addition, one or  more
               of the blessed/uncursed/cursed groups may be typed.
                    DB  - drop all objects known to be blessed.
                    DU  - drop all objects known to be uncursed.
                    DC  - drop all objects known to be cursed.
                    DX  - drop all objects of unknown B/U/C status.
                    Da  - drop all objects, without asking for confirmation.
                    Di  - examine your inventory before dropping anything.
                    Du  - drop only unpaid objects (when in a shop).
                    Dm  - use a menu to pick which object(s) to drop.
                    D%u - drop only unpaid food.
          ^D   Kick something (usually a door).
          e    Eat food.
          E    Engrave   a  message  on  the  floor.   Engraving  the  word
               ``Elbereth'' will cause most  monsters  to  not  attack  you
               hand-to-hand  (but if you attack, you will rub it out); this
               is often useful to give yourself a breather.  (This  feature
               may  be  compiled out of the game, so your version might not
               have it.)
                    E- - write in the dust with your fingers.
          f    Fire one of the objects placed in your quiver.  You may  se-
               lect ammunition with a previous `Q' command, or let the com-
               puter pick something appropriate if autoquiver is true.
          i    List your inventory (everything you're carrying).
          I    List selected parts of your inventory.
                    I* - list all gems in inventory;
                    Iu - list all unpaid items;
                    Ix - list all used up items that are on your shopping bill;
                    I$ - count your money.
          o    Open a door.
          O    Set options.  A menu showing the current option values  will
               be  displayed.  You can change most values simply by select-
               ing the menu entry for the given option (ie, by  typing  its
          NetHack 3.4                                      December 2, 2003
          NetHack Guidebook                                              12
               letter  or  clicking  upon it, depending on your user inter-
               face).  For the  non-boolean  choices,  a  further  menu  or
               prompt will appear once you've closed this menu.  The avail-
               able options are listed later in  this  Guidebook.   Options
               are  usually  set  before  the game rather than with the `O'
               command; see the section on options below.
          p    Pay your shopping bill.
          P    Put on a ring or other accessory (amulet, blindfold).
          ^P   Repeat previous message.   Subsequent  ^P's  repeat  earlier
               messages.  The behavior can be varied via the msg_window op-
               tion.
          q    Quaff (drink) something (potion, water, etc).
          Q    Select an object for your quiver.  You can then  throw  this
               using  the  `f' command.  (In versions prior to 3.3 this was
               the command to quit the game, which has now  been  moved  to
               `#quit'.)
          r    Read a scroll or spellbook.
          R    Remove an accessory (ring, amulet, etc).
          ^R   Redraw the screen.
          s    Search  for  secret  doors and traps around you.  It usually
               takes several tries to find something.
          S    Save (and suspend) the game.  The game will be restored  au-
               tomatically the next time you play.
          t    Throw an object or shoot a projectile.
          T    Take off armor.
          ^T   Teleport, if you have the ability.
          v    Display version number.
          V    Display the game history.
          w    Wield weapon.
                    w- - wield nothing, use your bare hands.
          W    Wear armor.
          x    Exchange your wielded weapon with the item in your alternate
               weapon slot.  The latter is used as  your  secondary  weapon
               when  engaging  in  two-weapon  combat.  Note that if one of
               these slots is empty, the exchange still takes place.
          NetHack 3.4                                      December 2, 2003