WoW API: IsItemInRange
Jump to navigation
Jump to search
← WoW API < IsItemInRange
Returns 1 if you are in range of the specified unit to use the item specified by item, 0 if not, nil if the target is invalid, etc.
- Arguments
- (String item, String unit)
- item
- The item to use (e.g. "Heavy Silk Bandage")
- unit
- The unit to query (e.g. "target", "party1", "pet", "player")
Common Ranges
- Bandages: 18 yards
- Returns
- If in range to perform the action, 1 (true). Otherwise, 0 (false), or nil (false) if the action is invalid.
- Notes
- Example
if ( IsItemInRange("Heavy Silk Bandage","target") ) then -- light up a part of the interface else -- darken end