A crystal ball, when applied or #invoked, lets you search for a symbol on the current level, consuming a charge. You use the crystal ball by looking into it, so it will not work if you are blind. A crystal ball appears as a glass orb when unidentified.
In addition to the usual places tools are generated, elvenkings have a 2% chance of getting one. 
The Orb of Fate and Orb of Detection are both artifact crystal balls, as is the now-defunct Palantir of Westernesse. Invoking an artifact crystal ball will activate its artifact special ability; to peer into it you must apply it instead.
To successfully use a crystal ball, you must pass an Intelligence check. For a blessed or uncursed ball a d20 is rolled; the result must be less than or equal to your Intelligence. A cursed crystal ball will always produce failure when used.
If the check succeeds, “You may look for an object or monster symbol.” You can specify any symbol representing a monster or an object, or you can enter ^ to look for traps and portals. If you try to search for anything else, such as stairs or other dungeon features, you will receive an irrelevant message instead.
If the check fails, or the ball is cursed, you will suffer one of the following effects at random:
- No further effect.
- You are confused for d100 turns.
- You are blinded for d100 turns.
- You hallucinate for d100 turns.
- The ball explodes, dealing d30 damage. This will never happen to artifact crystal balls.
Attempting to use a crystal ball while blind will fail (“Too bad you can't see the crystal ball.”), with no chance of negative effects.
Using a crystal ball while hallucinating still activates the Intelligence check, but if you pass you will simply be given a useless message. Failure still has the usual consequences.
Using a crystal ball with no charges will always reveal nothing (“The vision is unclear.”) but does not risk negative effects.
If your successful peer reveals nothing, you might occasionally be told, “You see the Wizard of Yendor gazing out at you”, this is just a little joke from the DevTeam to, “make them nervous.”
Applying a crystal ball will put you into a trance for 1 to 10 turns, during which time you will be helpless if attacked. A ring of free action will not prevent this.
A crystal ball can have up to 5 charges normally, and an uncursed scroll of charging will add a single charge up to this maximum. A blessed scroll of charging will set the crystal ball to 6 charges instead.
A crystal ball initially has 0-5 charges, and is generated 25% blessed, 50% uncursed, 25% cursed.
The crystal ball is characterized by its shortcomings, at least as much as its strengths. It is quite heavy, makes the user helpless for a period of time, and, even with 18 Intelligence, has a non-trivial 10% chance of failure--and failure can be deadly to a weak or low-level character. If it does work, it only allows the user to search for a single class of monster or object, whereas most searching items are completely reliable, non-incapacitating, and will reveal all monsters or objects on a level.
A crystal ball should never be used if you are in a position where you could be attacked in the next 10 turns.
If your Intelligence is less than 20 (and failure is therefore a possibility), it should not be used if:
- you have fewer than 30 HP, in case of explosion; or
- you lack the means to cure blindness, confusion, or hallucination, and are unwilling to wait out the duration of those effects.
That said, there are cases in which a crystal ball can be effectively employed:
- It can be used to locate the portals on the elemental planes (as noted above) by searching for traps, ^. Do not do this unless you are safe from attack. (And remember, the Wizard can always show up...) The more traditional approach is to read a scroll of gold detection while confused. Gold detection is usually preferable, because confusion is less dangerous than being in a trance, and because four scrolls and four potions of booze or confusion weigh less than a crystal ball. However, the scroll of gold detection is not an option for illiterate characters.
- If you are concerned about traps because, for example, you lack magic resistance and are below DL 8, where polymorph traps start to appear, using the crystal ball in a safe area can reduce the risk of falling prey to one (confused gold detection would still be better; this is a question of resource availability and conservation).
- When searching for vaults to clean out or locate the portal to Fort Ludios, a crystal ball can be used on otherwise clear levels to search for $ with a minimum of risk (gold detection and object detection are safer, but the note on resources still applies).
- Finally, a crystal ball is a magical tool, and thus a prime candidate for polypiling in hopes of receiving a magic marker.
In the iOS ports of Nethack and Slash'EM by Dirk Zimmerman, an otherwise-successful application or invocation of a crystal ball will cause the game to crash and when the player re-opens the application, he or she will find the game rolled back to the last portal or set of stairs traversed.
This can be used as a panic tool, though doing so is an exploit.
If the player is blind or the search would otherwise fail, the normal effects will occur.