Created
June 15, 2013 21:03
-
-
Save orlp/5789582 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local driver = CreateFrame("Button", "casthack_driver", nil, "SecureHandlerClickTemplate") | |
local executor = CreateFrame("Button", "casthack_executor", nil, "SecureActionButtonTemplate") | |
driver:SetAttribute("_onclick", [[ | |
local executor = self:GetFrameRef("executor") | |
if math.random() < 0.5 then | |
executor:SetAttribute("type", "spell") | |
executor:SetAttribute("spell", "Concussive Shot") | |
else | |
executor:SetAttribute("type", "spell") | |
executor:SetAttribute("spell", "Arcane Shot") | |
end | |
]]) | |
driver:RegisterForClicks("AnyDown") | |
driver:SetFrameRef("executor", executor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment