Uncommon Rares
Macro APITriggers

Item Drop Found

Runs when an item appears during a run.

Category
Loot
Runs when
An item drops.
Summary
Runs when an item appears during a run.
Version
1

Events

  • system-item-drop

Lua Example

if ctx.itemDrop.item.upgrade ~= nil and ctx.itemDrop.item.upgrade.isUpgradeForEquippedSlot then
  return loot.equipItem(ctx.itemDrop.item)
end

if ctx.itemDrop.item.rarity == "junk" then
  return loot.salvageItem(ctx.itemDrop.item)
end

return loot.keepItem(ctx.itemDrop.item)

ctx Fields

TriggerPathTypeLabelDescription
Item Drop Foundctx.itemDrop.timelineItemDropIdidItem drop idThe item drop row id when the runtime can expose it before commit.
Item Drop Foundctx.itemDrop.timelineEventIdidSource eventThe game event where the item appeared.
Item Drop Foundctx.itemDrop.item.itemDefinitionKeystringDrop item definitionThe dropped item's definition key.
Item Drop Foundctx.itemDrop.item.categoryKeystringDrop item categoryThe dropped item's category key.
Item Drop Foundctx.itemDrop.item.categoryFilterGroupstringDrop item filter groupThe dropped item's broad filter group.
Item Drop Foundctx.itemDrop.item.raritystringDrop item rarityThe dropped item's rarity.
Item Drop Foundctx.itemDrop.item.quantitynumberDrop item quantityThe dropped stack quantity.
Item Drop Foundctx.itemDrop.item.itemLevelnumberDrop item levelThe dropped item's required level.
Item Drop Foundctx.itemDrop.item.dropLevelnumberDrop levelThe level used to generate the item.
Item Drop Foundctx.itemDrop.item.vendorValueCoppernumberDrop vendor valueThe stack's vendor value in copper.
Item Drop Foundctx.itemDrop.item.tags[]arrayDrop item tagsAffix group and tag labels on the dropped item.
Item Drop Foundctx.itemDrop.item.isEquippablebooleanDrop item equippableWhether the dropped item can be equipped.
Item Drop Foundctx.itemDrop.item.upgrade.slotstringDrop upgrade slotThe equipped slot the dropped item was compared against; two-slot item types use the weaker occupied slot, or an empty slot first.
Item Drop Foundctx.itemDrop.item.upgrade.isUpgradeForEquippedSlotbooleanDrop upgradeTrue when the dropped item's raw stat total is greater than the compared equipped slot, or the slot is empty.
Item Drop Foundctx.itemDrop.item.upgrade.statDeltas.maxLifenumberDrop upgrade stat deltaA stat delta versus the compared equipped slot; other stat keys are available beside maxLife.
Item Drop Foundctx.itemDrop.item.affixes[].keystringDrop affix keyA rolled affix key on the dropped item.
Item Drop Foundctx.itemDrop.item.affixes[].typestringDrop affix typeWhether the rolled affix is a prefix or suffix.
Item Drop Foundctx.itemDrop.item.affixes[].namestringDrop affix nameThe rolled affix display name.
Item Drop Foundctx.itemDrop.item.affixes[].equipLevelRequirednumberDrop affix levelThe level required by the rolled affix.
Item Drop Foundctx.itemDrop.item.affixes[].modifiers[].statstringDrop affix modifier statThe stat changed by a rolled affix modifier.
Item Drop Foundctx.itemDrop.item.affixes[].modifiers[].opstringDrop affix modifier opThe operation used by a rolled affix modifier.
Item Drop Foundctx.itemDrop.item.affixes[].modifiers[].valuenumberDrop affix modifier valueThe numeric value of a rolled affix modifier.
Item Drop Foundctx.itemDrop.item.implicitModifiers[].statstringDrop implicit modifier statThe stat changed by a base implicit modifier.
Item Drop Foundctx.itemDrop.item.implicitModifiers[].opstringDrop implicit modifier opThe operation used by a base implicit modifier.
Item Drop Foundctx.itemDrop.item.implicitModifiers[].valuenumberDrop implicit modifier valueThe numeric value of a base implicit modifier.
Item Drop Foundctx.itemDrop.item.isUniquebooleanDrop is uniqueTrue when the dropped item is an Uncommon Rare.
Item Drop Foundctx.itemDrop.item.uniqueImplicitModifiers[].statstringDrop unique implicit statThe stat changed by a unique implicit modifier.
Item Drop Foundctx.itemDrop.item.uniqueImplicitModifiers[].opstringDrop unique implicit opThe operation used by a unique implicit modifier.
Item Drop Foundctx.itemDrop.item.uniqueImplicitModifiers[].valuenumberDrop unique implicit valueThe numeric value of a unique implicit modifier.
Item Drop Foundctx.itemDrop.item.timelineEventIdidDrop item eventThe timeline event id to pass back to drop item actions.
Item Drop Foundctx.player.levelnumberPlayer levelThe player level used for this macro run.
Item Drop Foundctx.player.currencyCoppernumberCurrencyThe player currency carried in copper.
Item Drop Foundctx.player.bag.usedSlotsnumberBag usedThe number of backpack slots currently occupied.
Item Drop Foundctx.player.bag.maxSlotsnumberBag capacityThe current backpack capacity including equipped bag bonuses.
Item Drop Foundctx.player.bag.freeSlotsnumberBag freeThe number of free backpack slots remaining.
Item Drop Foundctx.player.derivedStats.maxLifenumberDerived statA derived stat value; other stat keys are available beside maxLife.
Item Drop Foundctx.player.equipment.mainHand.itemDefinitionKeystringEquipped itemAn equipped item definition key. Replace mainHand with another equipment slot as needed.
Item Drop Foundctx.player.equipment.mainHand.raritystringEquipped item rarityThe rarity of an equipped item.
Item Drop Foundctx.player.equipment.mainHand.itemLevelnumberEquipped item levelThe required level of an equipped item.
Item Drop Foundctx.player.equipment.mainHand.dropLevelnumberEquipped drop levelThe drop level used to generate an equipped item.
Item Drop Foundctx.player.equipment.mainHand.stats.maxLifenumberEquipped item statA stat contribution from an equipped item; other stat keys are available beside maxLife.
Item Drop Foundctx.player.equipment.mainHand.affixes[].keystringEquipped affixA rolled affix key on an equipped item.

Blocks

BlockCategorySummary
If item is rareRulesChecks whether the current item rarity is rare.
If item is weaponRulesChecks whether the current item category is weapon.
Keep itemLootMoves the current item into your inventory.
Leave itemLootSkips the current item without picking it up.
Salvage itemLootConverts the current item into crafting materials.
Sell itemLootConverts the current item into its vendor value.
Equip itemLootMoves the current item into a legal equipment slot when possible, otherwise keeps it.
ContinueFlowReturns continue to the Storyteller.
PauseFlowReturns pause to the Storyteller.