Skip to content

/nbg

Script-provided

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

Syntax

/nbg need <item>
/nbg greed <item>
/nbg decline <item>
/nbg clear <item>
/nbg rules
/nbg leader
/nbg dryrun
/nbg status

Description

Watches for Need-Before-Greed loot windows and automatically clicks Need, Greed, or Decline per item based on configurable rules. Runs alongside /autoloot, which only handles Free-for-All windows — this script leaves those alone and only acts on NBG-mode ones.

Ships armed, tier rules all set to Decline

The underlying lib.loot.nbg module defaults to dry-run (print only, click nothing) until you flip a setting. The bundled needbeforegreed.lua overrides that to DRY_RUN = false — clicks fire from the moment you /lua run needbeforegreed, unless a saved per-character config (see below) already turned it back on. It also overrides every tier's default action to Decline rather than the library's need-fabled / greed-treasured defaults, so out of the box this script only acts on items you've added a name rule for — everything else is declined. Check /nbg status right after loading, and use /nbg dryrun to toggle safely.

Subcommands

Subcommand What
need <item> Always roll Need on this item. Shift-click an item link instead of typing the name.
greed <item> Always roll Greed on this item.
decline <item> Always Decline this item.
clear <item> Remove a name rule, falling back to the tier/default rules.
rules / list List all name rules.
leader Toggle this character as the Greed-everything safety-net leader.
dryrun / dry Toggle dry-run mode (print decisions, click nothing). Saved per character.
status Show dry-run/leader state, class, and rule counts.
help Print subcommand help.

Rule priority

Evaluated in order for every non-leader character, first match wins:

  1. Name rules — set with /nbg need|greed|decline <item>.
  2. Class check — Decline if your class can't equip the item. Fails open: if class data can't be resolved, the item is not declined on this basis.
  3. Tier rules — per-rarity default action (all Decline as shipped; see the warning above).
  4. DefaultDecline if nothing above matched.

Leader / follower

Designate exactly one character per group as the leader with /nbg leader. The leader Greeds every item as a safety net to collect anything left unclaimed, waiting LEADER_GREED_DELAY_MS (3s) before acting so followers get first pick with Need. Every other character evaluates the rule priority above and Needs or Declines. Both the leader flag and dry-run state persist per character to config/nbg/<CharacterName>.lua; name rules persist group-wide to config/nbg/rules.lua.

Examples

/lua run needbeforegreed
/nbg need <shift-click item link>
/nbg decline Battered Buckler
/nbg rules
/nbg dryrun
/nbg leader
/nbg status
/lua stop needbeforegreed

See also

  • /autoloot — the companion script for Free-for-All loot windows.
  • lib.loot.nbg — the rule engine and window-detection logic behind this script.