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 upgrade [on|off|check]
/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.
upgrade [on\|off\|check] Toggle the armor/jewelry upgrade Need rule (see below). Bare upgrade shows its status; check evaluates the currently-open loot window against your gear.
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. Default — Decline if nothing above matched.

Upgrade rule and auto-equip

/nbg upgrade on adds a rule that rolls Need on a dropped item when it is an actual upgrade for you — an armor or jewelry piece that beats what you have in that slot, or an Adept+ spell scroll for one of your abilities — and, when you win it, equips it automatically. It compares the drop against your equipped gear using the item data layer (lib/loot/upgrade.lua), and gates on your class/level so it won't Need something you can't use.

  • The rule is off by default; turn it on with /nbg upgrade on. The setting is saved per character (via autoloot's config).
  • /nbg upgrade check runs the evaluation against the loot window that's open right now and prints what it decided — handy for confirming it recognises a drop.
  • It respects dry-run: while dry-run is on it prints its decisions and equips nothing.

Live smoke pending

The upgrade comparison and auto-equip are built and the data layer is verified, but auto-equip on a real contested drop is still being smoke tested. Run with /nbg dryrun on first and watch what /nbg upgrade check reports before letting it roll live.

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.