Pay is a command in NetHack done by pressing p. It is used to pay shopkeepers while in shops.
Pressing p while inside a shop will attempt to pay the nearest shopkeeper you can see - this will automatically pay any debts incurred from usage fees or used/destroyed items, then prompt you to ask for itemized billing. Selecting yes will allow you to pay for each item individually, while saying no will attempt to pay for all unpaid items at once. If in an area with multiple shopkeepers, such as Minetown, you will be prompted to select the shopkeeper you are paying via cursor.
The command can also be used outside of a shop, though in a majority of cases it will not do anything. However, if a shopkeeper is outside of their shop - e.g., chasing you down after you steal from them or damage their shop - you can use the pay command to cover any applicable debts or else try to pacify them. Using this with a shopkeeper that you did not steal from, but angered through other means, will attempt to give them 1000 zorkmids; this has a 2⁄3 chance to pacify them.
- There appears to be no shopkeeper here to receive your payment.
- You used the pay command while not inside a shop.
- <Foo> is not near enough to receive your payment.
- As above, but you are outside a shop.
- <Foo> is not interested in your payment.
- You were prompted to select a monster to pay and chose a non-shopkeeper.
While payment is mostly restricted to use with shopkeepers in NetHack, variants may also employ it for additional purposes.
In SLASH'EM, dNetHack, SpliceHack, SpliceHack-Rewrite, and SlashTHEM, if you attempt to pay in a shop while you do not owe anything, the shopkeeper will ask if you want to try their other services.