item
The item namespace provides functions for querying items: activation state, cooldowns, inventory counts, loadout contents, and treasure chest capacity.
See Appendix A — Ability Cooldown IDs for the full list of ability ID strings.
item.CanActivate() → boolean
Returns true if item abilities can be activated right now. Some game moments (cinematic sequences, pre-boss countdown) disable all activations even when cooldowns are ready.
?item.CanActivate()
equip Bardiche
activate Ritem.CanActivate(str) → boolean
Returns true if a specific item (by ability ID string) can be activated. The item must be equipped. This is a subset of item.GetCooldown() — an item may have zero cooldown but still be inactivatable.
equip bardiche
?item.GetCooldown("skeleton_arm") <= 0
equip skeleton arm
?item.CanActivate("skeleton_arm")
activate Ritem.GetCooldown(str) → integer
Returns the remaining cooldown in frames for the given ability ID string. Returns -1 for invalid IDs or abilities not yet used.
?foe = boss & item.GetCooldown("bardiche") <= 0
equip bardiche
activate Ritem.GetCount(str) → integer
Returns the number of copies of an item matching the search criteria in your inventory. Returns 0 if none found. Accepts the same search filter syntax as equip.
var searchCriteria = "sword *0 -big -socket"
var swordCount = item.GetCount(searchCriteria)
>I have @swordCount@ basic swordsitem.GetLoadoutL(int) → string
Returns the item stored in the left slot of the specified loadout number. Returns an empty string if the slot is empty.
item.GetLoadoutR(int) → string
Returns the item stored in the right slot of the specified loadout number.
>`0,1,Left: @item.GetLoadoutL(1)@
>`0,2,Right: @item.GetLoadoutR(1)@item.GetTreasureCount() → integer
Returns the current number of treasure chests in your inventory.
item.GetTreasureLimit() → integer
Returns the maximum capacity for treasure chests.
var trs = item.GetTreasureCount()
var max = item.GetTreasureLimit()
>`0,2,Treasures: @trs@/@max@