Module br.player.use
These functions help in retrieving information if you can use an item or not.
Use functions are stored in br.player.use and can be utilized by `local use = br.player.use` in your profile. For item use, `item` in the function represent the name in the items list defined in System/List/Items.lua
Functions
use.item ([slotID[, thisUnit="target"]]) | Uses the item. |
use.item (itemID[, thisUnit="target"]) | Uses the item. |
use.bestItem ([thisUnit="target"]) | Uses the best possible item in a list of items. |
use.isOneOfUsable () | iterates through a list of items and returns true if they are usable typically for using higher quality items first, such as gold items over silver, etc. |
use.slot (slotID[, thisUnit="target"]) | Uses the item in the specified equipment slot. |
use.able.item ([slotID]) | Checks if item is usable or not. |
use.able.item (itemID) | Checks if item is usable or not. |
use.able.slot (slotID) | Checks if item in the specified equipment slot is usable or not. |
Functions
- use.item ([slotID[, thisUnit="target"]])
-
Uses the item.
Parameters:
- slotID number The equipment slot number to use the item from. (optional)
- thisUnit string The unit to use the item on. (default "target")
Returns:
-
boolean
- use.item (itemID[, thisUnit="target"])
-
Uses the item.
Note: `item` here is literally item, you pass the itemID to specify the item
Parameters:
- itemID number The ID of the item to use.
- thisUnit string The unit to use the item on. (default "target")
Returns:
-
boolean
- use.bestItem ([thisUnit="target"])
-
Uses the best possible item in a list of items.
in the items.lua usage precedence will be the order the items appear in the array from first to last.
typically for using higher quality items first, such as gold items over silver, etc.
example, howlingRuneQualities = {194820,194819,194817} would attempt to use 194820 (gold qual) first, then 194819 (silver qaul) second, etc.
Parameters:
- thisUnit string The unit to use the item on. (default "target")
Returns:
-
boolean
- use.isOneOfUsable ()
-
iterates through a list of items and returns true if they are usable
typically for using higher quality items first, such as gold items over silver, etc.
example, howlingRuneQualities = {194820,194819,194817} would attempt to use 194820 (gold qual) first, then 194819 (silver qaul) second, etc.
Returns:
-
boolean
- use.slot (slotID[, thisUnit="target"])
-
Uses the item in the specified equipment slot.
Parameters:
- slotID number The ID of the equipment slot to use the item from.
- thisUnit string The unit to use the item on. (default "target")
Returns:
-
boolean
- use.able.item ([slotID])
-
Checks if item is usable or not.
Note: `item` here refers to the name in the item list defined in System/List/Items.lua
Parameters:
- slotID number The ID of the equipment slot to check. (optional)
Returns:
-
boolean
- use.able.item (itemID)
-
Checks if item is usable or not.
Note: `item` here is literally item, you pass the itemID to specify the item
Parameters:
- itemID number The ID of the item check.
Returns:
-
boolean
- use.able.slot (slotID)
-
Checks if item in the specified equipment slot is usable or not.
Parameters:
- slotID number The ID of the equipment slot to check.
Returns:
-
boolean