Skip to content

Instantly share code, notes, and snippets.

@Choonster
Last active December 14, 2015 04:19
Show Gist options
  • Save Choonster/5027358 to your computer and use it in GitHub Desktop.
Save Choonster/5027358 to your computer and use it in GitHub Desktop.
A WoW AddOn to sequence your focus between arena enemies.
local header = FocusSequenceHeader or CreateFrame("Frame", "FocusSequenceHeader", nil, "SecureHandlerBaseTemplate")
local button = FoSeq or CreateFrame("Button", "FoSeq", nil, "SecureActionButtonTemplate")
button:SetAttribute("type", "focus")
local PreClickSnippet = [==[
CURRENT_IND = CURRENT_IND or 1
MAX_IND = tonumber( (SecureCmdOptionParse("[@arena5,exists]5;[@arena3,exists]3;[@arena2,exists]2;1")) )
self:SetAttribute("unit", "arena" .. CURRENT_IND)
-- print("CURRENT_IND", CURRENT_IND)
CURRENT_IND = CURRENT_IND % MAX_IND + 1
]==]
header:WrapScript(button, "OnClick", PreClickSnippet)
## Interface: 50001
## Title: FocusSequence
## Author: Choonster
## Notes: Sequences your focus between arena enemies.
## Version: 1.0
core.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment