Addon Integration Functions
Overview
The core.addons module provides functions for interacting with popular World of Warcraft addons. Each addon has its own sub-namespace. Always check is_loaded() before calling other functions in an addon's namespace, as the addon may not be installed or active.
Zygor
core.addons.zygor.is_loaded
Syntax
core.addons.zygor.is_loaded() -> boolean
boolean: Whether the Zygor addon is loaded and active.
Returns whether the Zygor Guides addon is currently loaded. Always check this before calling other Zygor functions.
core.addons.zygor.has_current_step
Syntax
core.addons.zygor.has_current_step() -> boolean
boolean: Whether Zygor currently has an active step.
Returns whether Zygor has a current guide step available. If no guide is active or the guide is complete, this returns false.
core.addons.zygor.get_current_step
Syntax
core.addons.zygor.get_current_step() -> table
table: Current Zygor step info containingstep_text(string),goal_text(string), and other step properties.
Returns detailed information about the current Zygor guide step, including the step text and goal text. Check has_current_step() before calling.
core.addons.zygor.get_current_stickies
Syntax
core.addons.zygor.get_current_stickies() -> table[]
table[]: Array of sticky step tables.
Returns an array of Zygor sticky steps. Sticky steps are persistent guide objectives that remain visible alongside the current step.
core.addons.zygor.get_objectives
Syntax
core.addons.zygor.get_objectives() -> (number|string)[]
(number|string)[]: Array of objective values.
Returns an array of objective values from the current Zygor guide step. Values may be numbers (for progress tracking) or strings (for text objectives).
core.addons.zygor.get_current_waypoint
Syntax
core.addons.zygor.get_current_waypoint() -> zygor_waypoint_info
zygor_waypoint_info: A table with the following fields:map_id:integer- The map ID of the waypoint.x:number- The X coordinate (0-1 range).y:number- The Y coordinate (0-1 range).dist:number- Distance to the waypoint.title:string- Waypoint title text.type:string- Waypoint type identifier.goal_num:integer- Associated goal number.is_manual:boolean- Whether the waypoint was manually placed.
Returns the current active Zygor waypoint with its location, distance, and metadata.
core.addons.zygor.get_step_waypoints
Syntax
core.addons.zygor.get_step_waypoints() -> zygor_waypoint_info[]
zygor_waypoint_info[]: Array of waypoint tables (same structure asget_current_waypoint).
Returns all waypoints associated with the current Zygor guide step. This may include multiple waypoints when a step has several objectives in different locations.
BigWigs
core.addons.bigwigs.is_loaded
Syntax
core.addons.bigwigs.is_loaded() -> boolean
boolean: Whether the BigWigs addon is loaded and active.
Returns whether the BigWigs boss mod addon is currently loaded. Always check this before calling other BigWigs functions.
core.addons.bigwigs.has_active_bars
Syntax
core.addons.bigwigs.has_active_bars() -> boolean
boolean: Whether there are any active BigWigs timer bars.
Returns whether BigWigs currently has any active timer bars displayed. Use this as a quick check before iterating over bars.
core.addons.bigwigs.get_bars
Syntax
core.addons.bigwigs.get_bars() -> bigwigs_bar_info[]
bigwigs_bar_info[]: Array of bar tables, each containing:key:integer- Unique bar identifier.text:string- The bar label text (ability name).remaining:number- Seconds remaining on the timer.duration:number- Total duration of the timer in seconds.expire_time:number- Game time when the bar expires.is_emphasized:boolean- Whether the bar is emphasized (important/imminent).
Returns all active BigWigs timer bars. Each bar represents an upcoming boss ability or mechanic with timing information.
Conroc
core.addons.conroc.is_loaded
Syntax
core.addons.conroc.is_loaded() -> boolean
boolean: Whether the Conroc addon is loaded and active.
Returns whether the Conroc rotation helper addon is currently loaded. Always check this before calling other Conroc functions.
core.addons.conroc.get_suggested_spells
Syntax
core.addons.conroc.get_suggested_spells() -> table
table: The suggested spell list from Conroc.
Returns the list of spells that Conroc is currently suggesting for the player's rotation. These represent the optimal next abilities to use.
core.addons.conroc.get_suggested_utility_spells
Syntax
core.addons.conroc.get_suggested_utility_spells() -> table
table: The suggested utility spell list from Conroc.
Returns the list of utility spells that Conroc is currently suggesting. These are non-rotational spells such as interrupts, defensives, or movement abilities.
Questie
core.addons.questie.is_loaded
Syntax
core.addons.questie.is_loaded() -> boolean
boolean: Whether the Questie addon is loaded and active.
Returns whether the Questie quest helper addon is currently loaded. Always check this before calling other Questie functions.
core.addons.questie.get_quest_npc_ids
Syntax
core.addons.questie.get_quest_npc_ids() -> table
table: A table of NPC IDs related to the player's active quests.
Returns a table of NPC IDs that are relevant to the player's current quests, as tracked by Questie. This can be used to identify quest targets in the game world.
TSM (TradeSkillMaster)
core.addons.tsm.is_loaded
Syntax
core.addons.tsm.is_loaded() -> boolean
boolean: Whether the TSM addon is loaded and active.
Returns whether the TradeSkillMaster addon is currently loaded. Always check this before calling other TSM functions.
core.addons.tsm.get_item_prices
Syntax
core.addons.tsm.get_item_prices(item_id: integer) -> table
Parameters
item_id:integer- The item ID to look up prices for.
table: TSM price data for the item.
Returns TSM price data for a specific item. The returned table contains various price points tracked by TSM such as market value, historical price, and sale averages.
core.addons.tsm.get_market_data
Syntax
core.addons.tsm.get_market_data(item_ids: integer[]) -> table
Parameters
item_ids:integer[]- Array of item IDs to look up market data for.
table: Bulk market data for all requested items.
Returns market data for multiple items at once. More efficient than calling get_item_prices individually when you need data for many items.
core.addons.tsm.get_sniper_max_price
Syntax
core.addons.tsm.get_sniper_max_price(item_id: integer) -> number
Parameters
item_id:integer- The item ID to check.
number: The sniper threshold price in copper.
Returns the maximum price threshold for TSM's sniper feature for the given item. Prices are in copper (1 gold = 10000 copper).
core.addons.tsm.get_shopping_max_price
Syntax
core.addons.tsm.get_shopping_max_price(item_id: integer) -> number
Parameters
item_id:integer- The item ID to check.
number: The shopping maximum price in copper.
Returns the maximum shopping price for an item as configured in TSM shopping operations. Prices are in copper.
core.addons.tsm.get_auctioning_prices
Syntax
core.addons.tsm.get_auctioning_prices(item_id: integer) -> table
Parameters
item_id:integer- The item ID to check.
table: A table containingmin_price,normal_price, andmax_pricefields (all in copper).
Returns the auctioning operation prices for an item. The returned table contains the minimum, normal, and maximum posting prices as configured in TSM auctioning operations.
core.addons.tsm.get_shopping_restock_quantity
Syntax
core.addons.tsm.get_shopping_restock_quantity(item_id: integer) -> integer
Parameters
item_id:integer- The item ID to check.
integer: The restock quantity needed.
Returns how many of an item need to be purchased to reach the restock target as defined in TSM shopping operations.
Complete Examples
Checking BigWigs Bars for Upcoming Mechanics
local function check_boss_timers()
if not core.addons.bigwigs.is_loaded() then
return
end
if not core.addons.bigwigs.has_active_bars() then
return
end
local bars = core.addons.bigwigs.get_bars()
for _, bar in ipairs(bars) do
if bar.remaining < 3.0 then
core.log("IMMINENT: " .. bar.text .. " in " .. string.format("%.1f", bar.remaining) .. "s")
end
if bar.is_emphasized then
core.log("IMPORTANT: " .. bar.text .. " (" .. string.format("%.1f", bar.remaining) .. "s)")
end
end
end
TSM Price Checking for Auction House Decisions
local function evaluate_item(item_id)
if not core.addons.tsm.is_loaded() then
core.log("TSM is not loaded")
return
end
local prices = core.addons.tsm.get_item_prices(item_id)
if not prices then
core.log("No price data for item: " .. item_id)
return
end
local auctioning = core.addons.tsm.get_auctioning_prices(item_id)
if auctioning then
local min_gold = auctioning.min_price / 10000
local normal_gold = auctioning.normal_price / 10000
local max_gold = auctioning.max_price / 10000
core.log(string.format("Auctioning - Min: %.1fg, Normal: %.1fg, Max: %.1fg", min_gold, normal_gold, max_gold))
end
local sniper_max = core.addons.tsm.get_sniper_max_price(item_id)
if sniper_max then
core.log(string.format("Sniper threshold: %.1fg", sniper_max / 10000))
end
local restock = core.addons.tsm.get_shopping_restock_quantity(item_id)
if restock and restock > 0 then
core.log("Need to restock: " .. restock .. " units")
end
end
-- Example: Check price data for Draconium Ore (item ID 190312)
evaluate_item(190312)