Download
(8Kb)
Download
Compatible with Retail, Classic & TBC
Updated: 06-07-23 06:27 AM
Pictures
File Info
Compatibility:
Embers of Neltharion (10.1.0)
WOTLK Patch (3.4.1)
Classic (1.14.3)
TBC Patch (2.5.4)
Updated:06-07-23 06:27 AM
Created:06-06-23 06:18 AM
Downloads:36
Favorites:0
MD5:

MacroBindings

Version: 3
by: MunkDev [More]

MacroBindings
Use conditional bindings inside macros - World of Warcraft addon

This library adds support for executing bindings based on macro conditions. Bindings can be dynamically mapped to macros based on where the macros are placed on the action bars. The library has a self-contained state handler and tracker for the macro namespace and current action bar loadout.

Example usage in macros

  • Interact when possible, otherwise jump
    Code:
    /binding [@anyinteract,exists] Interact With Target; Jump
  • Use extra action button when it's available, otherwise cast spell
    Code:
    #showtooltip
    /binding [extrabar] Extra Action Button 1
    /cast Living Flame
Bindings can be referenced by both their localized name and their IDs.

API
The API is very slim. A macro body can be tested to see which conditions will be configured in a macro driver.
Apart from that, different page drivers and binding ID templates can be used to work with action bar addons that do not follow the Blizzard standard.

Code:
-- @param body        : The body of the macro to parse.
-- @return conditions : A table containing all conditions found in the macro.
MacroBindings:ParseBody(body)

-- @param barID       : The ID of the bar to drive.
-- @param condition   : The condition to execute the response on.
-- @param response    : The response to execute. Optional. Defaults to result of condition.
MacroBindings:SetPageDriver(barID, condition, response)

-- @param barID       : The ID of the bar to get binding keys for.
-- @param template    : The binding template to use, e.g. ACTIONBUTTON%d
MacroBindings:SetBindingTemplate(barID, template)

Macro Bindings
3 (2023-06-07)
Full Changelog Previous Releases
  • Embed LibStub
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
2
7kB
MunkDev
06-06-23 06:32 AM


There have been no comments posted to this file.
Be the first to add one.



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.