ArdaNPCs WIKI & GUIDES
/
Guide 07 1.1.0

Shops, mail and companions

Configure shops, banks and teleporters. Send mail with attachments and hire NPC companions.

An NPC can provide dialogue and several services. Players open the service menu with Shift + right-click, then choose a shop, bank, teleport, mail or companion. The menu shows services actually available at that NPC. Configuration requires operator permission level 2; ordinary service use does not.

Trader: your first offer

  1. Open the shop settings in the NPC editor and enable the shop.
  2. Add an offer. For example, use minecraft:emerald as currency, price 1, minecraft:bread as goods and goods amount 3.
  3. Enable the offer and Allow buying. Buying is from the player's perspective: the player pays currency and receives goods.
  4. To allow selling back, enable Allow selling. The player hands over the configured quantity of goods and receives currency. This uses the same item pair and base price.
  5. Save the shop. Try Shift + right-click → Shop with the required currency and room in your inventory.

A shop supports up to 16 offers. Items use registry IDs, so you can also use items from installed mods. An enabled shop needs at least one usable offer before players can open it.

Buying and selling have separate toggles, reputation requirements and limits. Also check whom the configured limit applies to. Reputation and event tabs let you configure discounts and temporary discount events. If a trade fails, check currency, quantities, inventory space, reputation and exhausted limits. Correct invalid item IDs before saving.

Banker

Select the Banker primary role in the editor, set the bank title and a size of 1–6 rows of nine slots, then save. Players open the bank from the NPC's service menu and move items like in a container.

A vault belongs to one player at one particular NPC. Players do not see each other's items, and a different NPC has a separate vault. A cloned banker is therefore not another access point to the original bank. Before changing capacity or removing a banker, arrange for stored contents to be handled and back up the world.

Teleporter

  1. Select the Teleporter primary role.
  2. Set an existing dimension, such as minecraft:overworld, the destination coordinates and viewing direction.
  3. For a free teleport, leave the cost item ID blank and the amount at 0. For a paid teleport, set a valid item and quantity, such as 2 × minecraft:emerald.
  4. Save and try Use teleporter from the service menu.

Prepare clear, safe space with a floor at the destination coordinates. Checking the dimension and world bounds is not a search for a safe landing area. The cost is removed after a successful teleport; invalid coordinates, an invalid price or insufficient items produce a message.

Mail between players

Open your mailbox with /ardanpcs_mail. Alternatively, enable the additional postman service in an NPC's editor and select Mail from its services. Enabling mail does not replace dialogue or other roles.

  1. Start a new letter in the mailbox and search for a recipient by name or UUID.
  2. Enter the subject and message. The recipient must already be known to the server by having joined it. They can receive mail while offline.
  3. Optionally select attachments and quantities from your current inventory. Do not move selected items before sending.
  4. Send the letter and check Sent. The recipient opens Inbox, reads the message and claims its attachments.

The subject allows up to 80 characters and the message 2,000. A letter supports up to four attachment slots, with at most 64 items per slot. Item components such as custom names, enchantments and damage are preserved. An ordinary player can send three letters per minute.

The inventory must fit all attachments at once. If space is insufficient, nothing is claimed; free some room and try again. The mailbox supports read status and replies. Deleting unclaimed attachments requires confirmation that they will be discarded permanently. Hiding a sent copy does not destroy the recipient's attachments.

For a story message from an NPC, use the api.mail script operation. It sends text without attachments to the current player and uses a unique delivery key to prevent repeated delivery.

Hireable companions

Enable the additional companion service in the NPC editor. Set the hire price, duration of 60–604800 real seconds, default mode, optional safe catch-up teleport and an owner limit of 1–3. A price of 0 makes hiring free. A player can have at most three hires in total, including suspended payments.

The player chooses Shift + right-click → Companion, reads the price and duration, then hires the NPC. At the same NPC they can change its mode or dismiss it. Controls are available to the owner nearby in the same dimension. Changes to the configured price or duration affect future contracts.

ModeBehaviour
FollowFollows the owner without choosing attack targets.
WaitStops movement and attacks; swimming remains possible.
DefendFollows and reacts to a recent attacker of the owner or NPC, or a recent target of the owner.

Hire time continues while the player is offline and while the server is stopped. An offline owner's companion waits. When the owner dies, it switches to Wait; the owner must change the mode again after respawning. It does not travel between dimensions after its owner, instead returning home in its own dimension.

Catch-up teleport works only within the same dimension, into loaded chunks and when a suitable location is found. Otherwise normal navigation remains. A companion does not force chunks to load and cannot simultaneously act as a quest escort. Defence respects friendly relationships, teams, factions, server PvP and the attack-players setting.

After expiry or confirmed dismissal, the NPC returns home and the hire ends. The price is not refunded. Cloning an NPC copies service configuration, not the owner or an active contract.

When a payment or attachment is suspended

After an uncertain save, mail or a paid hire may require administrator recovery. Do not repeatedly add or remove items by hand without checking. The administrator first compares the actual inventory with the records; confirming recovery does not create items or refund a price by itself.

  • Mail: the Recovery required tab for OP2.
  • /ardanpcs_companion list [page]: list suspended contracts.
  • /ardanpcs_companion recovery <NPC UUID>: repair a contract even if its NPC is missing.
  • /ardanpcs_transfer pending: list unresolved shared transfers.

Handle recovery with the affected player online and a world backup. Administrator guidance continues in troubleshooting.