Skip to content

/automend

Script-provided

Registered by automend. Start it with /lua run automend.

Syntax

/lua run automend

Description

Auto-repair gear at a mender NPC. Polls for the Merchant window, switches to the Repair tab, presses Repair All, and closes.

The script watches for the Merchant window to appear. When visible and the current target is a mender (guild tag contains "Mender"), it switches to the Repair tab, clicks Repair All, waits briefly, then closes the window.

Non-mender merchant windows are ignored, so automend is safe to leave running while interacting with regular vendors.

Multibox: peer boxes need a target too

The mender check reads this client's own current target. On a background/peer box that never independently targeted the mender, automend sees the Merchant window open — opened by relayclicks's object-click relay — but no target selected, so it never acts.

Run /lua run targetsync (or autoload it) on every peer box so the relayed target selection actually lands there. See Writing a peer-relay receiver.

How it works

  1. Polls every 500 ms for a visible _HUD.Merchant window.
  2. Reads the target's guild/subname string to confirm it contains "Mender".
  3. If the Repair tab is not already active, clicks it first.
  4. Clicks "Repair All" (the CommandBuySellOtherNumber button).
  5. Waits 2 seconds, then closes the merchant window.
  6. Will not act again until the window closes and reopens.

Examples

/lua run automend
/lua stop automend

Across the group:

/dga /lua run automend

See also