Shop

A shop is a special room found on some dungeon levels. Each has an attendant shopkeeper and a selection of items to buy. The shopkeepers will also buy items from you, depending on the type of shop. A complete list is below.

The shopkeeper
A shopkeeper owns a shop and buys and sells the items within.

At first, shopkeepers seem skilled enough to prevent adventurers such as yourself from taking anything without payment. However, many NetHack players know where shopkeepers are vulnerable; if you do not, see stealing from shops.

Normal transactions
Normally, shopkeepers own all items on any square of the floor of their shop, with the notable exception of the square adjacent to the door, here called the "entrance square". Here we make a distinction between:
 * the shop inventory, the items on the floor of the shop.
 * the shopkeeper's personal inventory, the items which the shopkeeper is carrying; this often includes several dangerous offensive wands.

If you pick up such an item, you will have an unpaid object in your inventory. Press [p] to pay for the items; the shopkeeper will ask you about each unpaid object, and if you pay, you will own the object while the gold will transfer to the shopkeeper's personal inventory.

If you drop an item onto the shop floor (not the entrance square), the shopkeeper might offer to buy it. If you refuse, or if the shopkeeper makes no offer, then you continue to own the item and can pick it up again without paying. However, if the shopkeeper forgets that you own the item, then the shopkeeper will start selling it. This will happen if you exit the shop after dropping an item there.

Shopkeepers are greedy!

 * Shopkeepers will own and sell anything on their shop floor. If you kill a monster in a shop, even if you had to kill it to save your own life, the shopkeeper will own all the dropped items and the corpse. Likewise, if you eat fried food and drop your weapon, it's his. When you are in a shop, never kill a leprechaun that has stolen your gold or a nymph that has stolen an item, unless you like paying for what was previously yours.  In Slash'EM's Black Market, dropped artifacts may reach ridiculous prices.
 * If you are hungry, shopkeepers charge more for food! (They even do this for corpses of monsters that you killed.)
 * Shopkeepers will reveal the identities of common weapons and armor when you buy or sell them. For example, if you sell a crude dagger, the shopkeeper will reveal that it was an orcish dagger. These identities are the same during every game. What shopkeepers never identify for you are scrolls, spellbooks, rings, or other such useful information. Shopkeepers also never tell you about BUC status or enchantment (directly - though price can hint at an item's enchantment).
 * Shopkeepers will sell unidentified gems at high prices (as if all gems are valuable) while purchasing them at cheap prices (as if all gems are glass). So the most obvious way to identify gems by price does not work.
 * You can calm an angry shopkeeper by pressing [p]. If you have enough money, you can calm nearly any shopkeeper. In some cases, such as when you attack them unprovoked, they cannot be placated ("Izchak is after your hide, not your money! You try to appease the angry Izchak by giving him 1000 gold pieces. But Izchak is as angry as ever")

Notable shopkeepers

 * Asidonhopo
 * Izchak
 * One-eyed Sam

Table of shops
Accessories and rare book shops may not be larger than 20 squares; if they would otherwise be (about half the time), they are converted into general stores instead.

Generation
Shops have a base 3/DL chance of being created between level 2 and Medusa, provided there is a suitable room to put them in (no stairs, only one door), and provided that there are enough rooms on the level to start with (minimum 3, 4 for a branch level). Note that this means that there will always be a shop on each of levels 2 and 3 if the conditions are right (which in practice turns out to only be the case about 45% of the time).

The probability of a shop being of a particular type is given in the second column above.

Minetown is also guaranteed a number of shops, including Izchak's lighting store. Abandoned shops can be found in Orcus-town and occasionally in bones files.

Shops can be generated "closed", in which case the message "Closed for inventory" will be written in dust outside of the shop door. The shop door itself will be locked. Opening the door with a lockpick or key will not anger the shopkeeper, and you will be able to buy and sell as usual. Breaking down the door will anger the owner unless you immediately pay 400 zorkmids.

Messages
You can tell there is a shop on the level if you receive any of the following messages.

Strategy
Shops are extremely useful. As well as being a source of items, they let you do price identification.

Do not quaff any unidentified potions in a shop - it may be a potion of invisibility, and if you do not have a mummy wrapping you will have to teleport out (recommended) or kill the shopkeeper (not recommended). This goes double for cloaks, as a cursed cloak of invisibility could well render your game unwinnable.

Shopkeeper actions
Shopkeepers stay within a few squares of the entrance square to their shops. They move fast (speed 18, the normal speed of a character is only 12) and will alway immediately move to the entrance square if you pick up an unpaid item (i.e. not one that you have refused to sell or they are not interested in), and if you are outside their shop and invisible or carry a visible digging tool (see below). This means that a very fast character can beat them to the entrance square, at which point you will receive a warning to pay for any items you haven't before you exit the shop.

Shopkeepers will not allow invisible customers "SHKNAME detects your presence. Invisible customers are not welcome!" or those with visible digging tools in to their shops, saying "Hello PLAYER, welcome {again} to SHKNAME's STORETYPE! Will you please leave your {pick-axe/mattock} outside?", providing passive identification of your mattock if unidentified. They will then move to bar access to their shop.

To gain access, you need to wear a mummy wrapping or take off that ring of invisibility and drop (or stash in a bag) any digging tools you may be carrying. The door of the shop is not considered suitable for dropping your digging tools, to prevent people using a grappling hook to retrieve them, and thus causing a security risk. They do not check contents of containers, however.

When you are inside their shop, shopkeepers will allow characters that become voluntarily invisible to exit, but not if that was due to an unpaid item - if you drink a potion of invisibility you will need to pay for it first.

If you smuggle a digging tool in to the shop, when you take it out of the container, the shopkeeper will ask you to leave, "You sneaky cad! Get out of here with that {pick/mattock}". If you then dig a pit in the floor, you get a warning, "Be careful, {sir/madam}, or you might fall through the floor!" but otherwise there are no ill effects - the shopkeeper does not become angry. If you dig again and create a hole, items on the same square will fall through, and potentially other items from the squares around your hole. This angers the shopkeeper, making it more dangerous if you return to the level with the shop.

Robbing shops
It's possible to steal from a shop with the help of a pet, or without.

Scrolls of scare monster
Because a cursed scroll of scare monster turns to dust when picked up, novice adventurers who shop by picking up items can find themselves trapped in a store with no money and no way out. There are several ways to prevent this from happening to you:
 * Use #chat instead of picking up items.
 * Always carry a few hundred spare zorkmids to cover any accidental charges you incur.
 * As a last-chance option, sell everything you have to cover the cost of the scroll. Better to leave naked than in a coffin.

Mimics
While mimics may appear elsewhere in the dungeons, they are most likely to appear in shops, disguised as items. Earlier versions of NetHack made them relatively easy to identify, but more recent versions have made them virtually indistinguishable from the rest of the shopkeeper's wares. Clever adventurers can still identify mimics:
 * Search before walking onto an item.
 * A mimic can be healed while disguised. This will result in a message such as "the leash looks browner".
 * Quaff an uncursed potion of object detection. You may notice suspicious blank squares if you have not yet seen the contents of the shop.
 * Throw a single gold piece across the store. If it hits the wall, nothing in its path was a mimic. This is better than throwing items, because you don't run the risk of angering a shopkeeper.
 * Wear a ring of protection from shape changers. This will cause mimics to appear as mimics.
 * Use telepathy or warning.
 * If you don't have telepathy and can't chance being attacked by a mimic, a less effective method is to only walk where your pet or the shopkeeper has walked.