Module equiped
These functions help in retrieving information about equiped items.
Equiped Item functions are the profile API table `equiped` (br.api.profile.equiped); profiles use it by name. `item` in the function represent the name in the item list defined in System/List/Items.lua
Functions
| item (itemID[, slotID]) | This function checks if the specified itemID is equipped or not. |
| itemIn (slotID) | The item ID in an equipment slot (16 main hand, 17 off hand, ...), or nil when it's empty. |
| tier (tierLevel[, numEquiped]) | Gets the number of equiped items for the specified `tierLevel`, or with numEquiped whether at least that many are equiped. |
| type (itemType) | Checks if you have the specified `itemType` equiped or not. |
| equiped. ([slotID]) | Checks if item is equiped or not. |
Functions
- item (itemID[, slotID])
-
This function checks if the specified itemID is equipped or not.
It can also check a specific slotID.
If no slotID is provided, it checks all slots for that item.
Parameters:
- itemID number the ID of the item you want to check if it's equipped
- slotID number If specified, the ID of the slot you want to check for the given item. (optional)
Returns:
-
boolean
whether the item is equipped (in the slot, if given)
Usage:
equiped.item(12345) -- true if item 12345 is equipped anywhere
equiped.item(12345, 1) -- true if item 12345 is equipped in slot 1
- itemIn (slotID)
-
The item ID in an equipment slot (16 main hand, 17 off hand, ...), or nil when it's empty.
Parameters:
- slotID number The equipment slot
Returns:
-
number or nil
Usage:
local weapon = equiped.itemIn(16) -- the main-hand weapon's item ID
- tier (tierLevel[, numEquiped])
-
Gets the number of equiped items for the specified `tierLevel`, or with numEquiped whether
at least that many are equiped.
Parameters:
- tierLevel string|number The tier level to check for. (e.g. "T20" or 20)
- numEquiped number How many pieces to require (optional)
Returns:
-
number or boolean
- type (itemType)
-
Checks if you have the specified `itemType` equiped or not.
Parameters:
- itemType string The type of item to check for. (e.g. "Weapon" or "Trinket")
Returns:
-
boolean
- equiped. ([slotID])
-
Checks if item is equiped or not.
Parameters:
- slotID number The equipment slot number to check. (optional)
Returns:
-
boolean