Last active
August 29, 2015 14:06
-
-
Save nefftd/0248996ba4b20179b17a to your computer and use it in GitHub Desktop.
Arena frame debuffs, with whitelist filtering, written as a series of macros for the arena tournament.
This file contains hidden or 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
The below code is hereby released into the Public Domain. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | |
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | |
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
OTHER DEALINGS IN THE SOFTWARE. | |
In other words, you can't sue me if it breaks. ;) | |
Add spell names and IDs to whitelist to the first line, inside the {} brackets. To add a new spell ID, add the following INSIDE the closing `}`: | |
[0]=1, | |
where 0 is replaced by the spell ID. Do not forget the comma afterward. | |
To add a new spell NAME, add the following INSIDE the closing `}`: | |
["NAME"]=1, | |
where NAME is replaced by the exact spell name (case-sensitive!). Do not forget the quotation marks (") or the comma afterward. | |
/run _NFW={[8122]=1,[408]=1,[1833]=1,[6770]=1,[2094]=1,[118]=1,[82691]=1,[71757]=1,[12598]=1,[122]=1,[33395]=1,[83302]=1,[76577]=1,[12357]=1,[44572]=1,[55021]=1,} | |
/run _NFA={"local a={}for b=1,5 do a['arena'..b]=setmetatable({},{__index=function(c,d)local b,e,f,g=b;e=_G['ArenaEnemyFrame'..b]f=CreateFrame('Frame','nfaDB'..b..d,e,'TargetDebuffFrameTemplate')f:SetPoint('LEFT',e,'RIGHT',-2+24*d-1,-2)g=f:CreateFontSt"} | |
/run _NFA[2]="ring(nil,'OVERLAY')g:SetPoint'CENTER'g:SetFont(UNIT_NAME_FONT,10,'OUTLINE')f:SetScript('OnUpdate',function(h)local i=h.e-GetTime()if i>=60 then g:SetFormattedText('%dm',floor(i/60+.5))else g:SetText(ceil(i))end;if i>=60 then g:SetTextColor" | |
/run _NFA[3]="(1,1,1)elseif i>4 then g:SetTextColor(1,1,0)else g:SetTextColor(1,0,0)end end)f.unit='arena'..b;c[d]=f;return f end})end;local j=function(k)local l=a[k]if not l then return end;local b,d,m,n,o,p,h,f,q=1,1;while true do m,q,n,q,q,o,p,q,q,q," | |
/run _NFA[4]="h=UnitAura(k,b,'HARMFUL')if not m then break end;if _NFW[h]or _NFW[m]then f=l[d]f:Show()_G[f:GetName()..'Icon']:SetTexture(n)f:SetID(b)f.e=p;d=d+1 end;b=b+1 end;for b=d,#l do l[b]:Hide()end end;local r=CreateFrame'Frame'r:RegisterEvent'UNI" | |
/run _NFA[5]="T_AURA'r:RegisterEvent'ARENA_OPPONENT_UPDATE'r:RegisterEvent'PLAYER_ENTERING_WORLD'r:SetScript('OnEvent',function(q,p,s)if p=='UNIT_AURA'then j(s)else for b=1,5 do j('arena'..b)end end end)"loadstring(table.concat(_NFA))()_NFA=nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment