Advertisement
wit4er

Autoscript v5.4.7 wip

May 4th, 2014
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 44.24 KB | None | 0 0
  1. print("Autoscript v5.4.7 loaded!\n\n\n")
  2. --config
  3. local autoscript = 1
  4. local EnemyCooldowns = 1
  5. local FCTtweaks = 1
  6. local Macro = 0
  7. local LoCRemover = 1
  8. local ArenaTrinkets = 1
  9. local ArenaDR = 1
  10. local RogueDR = 1
  11. local Combat = 1
  12. local HideFrames = 1
  13. local MoveFrames = 1
  14. local UnitFrames = 1
  15. local Animation = 1
  16. local ShadowDanceBar = 1
  17. local InterruptA = 1
  18. local Slice = 1
  19. local cArenas = 1
  20. --config
  21.  
  22. if (autoscript == 1) then
  23. --[[enemy cooldowns ]]
  24. if (EnemyCooldowns == 1) then
  25.  
  26. USS="UNIT_SPELLCAST_SUCCEEDED";OE="OnEvent";F="Frame";CF=CreateFrame;BO="Border";xb=394;yb=300;sb=24;ib=1;ii=1  
  27. function TrS(f,x,y,cd,T,s,h)f:SetPoint("BOTTOMLEFT",x,y)f:SetSize(s,s)f.c=CF("Cooldown",cd)f.c:SetAllPoints(f)f.t=f:CreateTexture(nil,BO)f.t:SetAllPoints()f.t:SetTexture(T);if not h then f:Hide();end f:RegisterEvent(USS)end
  28. function Ts(f,cd,U,N,S,TI)if CPz(N,S,U) then f:Show();CooldownFrame_SetTimer(cd,GetTime(),TI,1)f.elapsed = 0 f:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > TI+1 then self:SetScript('OnUpdate', nil) self:Hide();else self.elapsed = self.elapsed + elapsed end end)end end
  29. function CPz(N,S,U)if(N==S and (U=="arena1" or U=="arena2" or U=="arena3" or U=="arenapet1" or U=="arenapet2" or U=="arenapet3" or U=="target" or U=="focus"))then return true else return false end end
  30. --rogue
  31. t1p="Interface\\Icons\\ability_rogue_shadowdance";t1=CF(F);TrS(t1,xb,yb,"cd1",t1p,sb,false);t1:SetScript(OE,function(self,event,...) Ts(t1,cd1,select(1,...),select(5,...),51713,60) end);
  32. t60p="Interface\\Icons\\ability_rogue_deadliness";t60=CF(F);TrS(t60,xb,yb,"cd60",t60p,sb,false);t60:SetScript(OE,function(self,event,...) Ts(t60,cd60,select(1,...),select(5,...),79140,120) end);
  33. t2p="Interface\\Icons\\ability_rogue_kidneyshot";t2=CF(F);TrS(t2,xb+sb+ii,yb,"cd2",t2p,sb,false);t2:SetScript(OE,function(self,event,...) Ts(t2,cd2,select(1,...),select(5,...),408,20) end);
  34. t3p="Interface\\Icons\\spell_shadow_nethercloak";t3=CF(F);TrS(t3,xb+sb*2+ii*2,yb,"cd3",t3p,sb,false);t3:SetScript(OE,function(self,event,...) Ts(t3,cd3,select(1,...),select(5,...),31224,120) end);
  35. t4p="Interface\\Icons\\ability_rogue_combatreadiness";t4=CF(F);TrS(t4,xb+sb*2+ii*2,yb,"cd4",t4p,sb,false);t4:SetScript(OE,function(self,event,...) Ts(t4,cd4,select(1,...),select(5,...),74001,120) end);
  36. t5p="Interface\\Icons\\ability_vanish";t5=CF(F);TrS(t5,xb+sb*3+ii*3,yb,"cd5",t5p,sb,false);t5:SetScript(OE,function(self,event,...) Ts(t5,cd5,select(1,...),select(5,...),1856,180) end);
  37. t6p="Interface\\Icons\\ability_rogue_dismantle";t6=CF(F);TrS(t6,xb+sb*4+ii*4,yb,"cd6",t6p,sb,false);t6:SetScript(OE,function(self,event,...) Ts(t6,cd6,select(1,...),select(5,...),51722,60) end);
  38. t7p="Interface\\Icons\\ability_rogue_shadowstep";t7=CF(F);TrS(t7,xb+sb*5+ii*5,yb,"cd7",t7p,sb,false);t7:SetScript(OE,function(self,event,...) Ts(t7,cd7,select(1,...),select(5,...),36554,24) end);
  39. t10p="Interface\\Icons\\ability_rogue_preparation";t10=CF(F);TrS(t10,xb+sb*5+ii*5,yb,"cd10",t10p,sb,false);t10:SetScript(OE,function(self,event,...) Ts(t10,cd10,select(1,...),select(5,...),14185,300) end);
  40. t8p="Interface\\Icons\\spell_shadow_mindsteal";t8=CF(F);TrS(t8,xb+sb*6+ii*6,yb,"cd8",t8p,sb,false);t8:SetScript(OE,function(self,event,...) Ts(t8,cd8,select(1,...),select(5,...),2094,90) end);
  41. t9p="Interface\\Icons\\ability_rogue_smoke";t9=CF(F);TrS(t9,xb+sb*7+ii*7,yb,"cd9",t9p,sb,false);t9:SetScript(OE,function(self,event,...) Ts(t9,cd9,select(1,...),select(5,...),76577,180) end);
  42. --warlock
  43. t11p="Interface\\Icons\\ability_warlock_howlofterror";t11=CF(F);TrS(t11,xb,yb-(sb+ib),"cd11",t11p,sb,false);t11:SetScript(OE,function(self,event,...) Ts(t11,cd11,select(1,...),select(5,...),5484,40) end);
  44. t12p="Interface\\Icons\\ability_warlock_mortalcoil";t12=CF(F);TrS(t12,xb,yb-(sb+ib),"cd12",t12p,sb,false);t12:SetScript(OE,function(self,event,...) Ts(t12,cd12,select(1,...),select(5,...),6789,45) end);
  45. t13p="Interface\\Icons\\ability_warlock_shadowfurytga";t13=CF(F);TrS(t13,xb,yb-(sb+ib),"cd13",t13p,sb,false);t13:SetScript(OE,function(self,event,...) Ts(t13,cd13,select(1,...),select(5,...),30283,30) end);
  46. t14p="Interface\\Icons\\spell_shadow_demoniccircleteleport";t14=CF(F);TrS(t14,xb+sb+ii,yb-(sb+ib),"cd14",t14p,sb,false);t14:SetScript(OE,function(self,event,...) Ts(t14,cd14,select(1,...),select(5,...),48020,30) end);
  47. t61p="Interface\\Icons\\spell_shadow_mindrot";t61=CF(F);TrS(t61,xb+sb*2+ii*2,yb-(sb+ib),"cd61",t61p,sb,false);t61:SetScript(OE,function(self,event,...) Ts(t61,cd61,select(1,...),select(5,...),19647,24) end);
  48. --mage
  49. t15p="Interface\\Icons\\ability_mage_deepfreeze";t15=CF(F);TrS(t15,xb,yb-2*(sb+ib),"cd15",t15p,sb,false);t15:SetScript(OE,function(self,event,...) Ts(t15,cd15,select(1,...),select(5,...),44572,30) end);
  50. t16p="Interface\\Icons\\spell_frost_wizardmark";t16=CF(F);TrS(t16,xb+sb+ii,yb-2*(sb+ib),"cd16",t16p,sb,false);t16:SetScript(OE,function(self,event,...) Ts(t16,cd16,select(1,...),select(5,...),11958,180) end);
  51. t64p="Interface\\Icons\\ability_mage_greaterinvisibility";t64=CF(F);TrS(t64,xb+sb+ii,yb-2*(sb+ib),"cd64",t64p,sb,false);t64:SetScript(OE,function(self,event,...) Ts(t64,cd64,select(1,...),select(5,...),110959,150) end);
  52. t17p="Interface\\Icons\\spell_arcane_blink";t17=CF(F);TrS(t17,xb+sb*2+ii*2,yb-2*(sb+ib),"cd17",t17p,sb,false);t17:SetScript(OE,function(self,event,...) Ts(t17,cd17,select(1,...),select(5,...),1953,15) end);
  53. t59p="Interface\\Icons\\spell_mage_temporalshield";t59=CF(F);TrS(t59,xb+sb*3+ii*3,yb-2*(sb+ib),"cd59",t59p,sb,false);t59:SetScript(OE,function(self,event,...) Ts(t59,cd59,select(1,...),select(5,...),115610,25) end);
  54. t65p="Interface\\Icons\\spell_fire_burningspeed";t65=CF(F);TrS(t65,xb+sb*3+ii*3,yb-2*(sb+ib),"cd65",t65p,sb,false);t65:SetScript(OE,function(self,event,...) Ts(t65,cd65,select(1,...),select(5,...),108843,25) end);
  55. t66p="Interface\\Icons\\ability_mage_frostjaw";t66=CF(F);TrS(t66,xb+sb*3+ii*3,yb-2*(sb+ib),"cd66",t66p,sb,false);t66:SetScript(OE,function(self,event,...) Ts(t66,cd66,select(1,...),select(5,...),102051,20) end);
  56. --dk
  57. t18p="Interface\\Icons\\spell_shadow_soulleech_3";t18=CF(F);TrS(t18,xb,yb-3*(sb+ib),"cd18",t18p,sb,false);t18:SetScript(OE,function(self,event,...) Ts(t18,cd18,select(1,...),select(5,...),47476,120) end);
  58. t19p="Interface\\Icons\\spell_shadow_antimagicshell";t19=CF(F);TrS(t19,xb+sb+ii,yb-3*(sb+ib),"cd19",t19p,sb,false);t19:SetScript(OE,function(self,event,...) Ts(t19,cd19,select(1,...),select(5,...),48707,45) end);
  59. t20p="Interface\\Icons\\spell_deathknight_iceboundfortitude";t20=CF(F);TrS(t20,xb+sb*2+ii*2,yb-3*(sb+ib),"cd20",t20p,sb,false);t20:SetScript(OE,function(self,event,...) Ts(t20,cd20,select(1,...),select(5,...),48792,180) end);
  60. t21p="Interface\\Icons\\inv_sword_62";t21=CF(F);TrS(t21,xb+sb*3+ii*3,yb-3*(sb+ib),"cd21",t21p,sb,false);t21:SetScript(OE,function(self,event,...) Ts(t21,cd21,select(1,...),select(5,...),47568,300) end);
  61. t22p="Interface\\Icons\\spell_shadow_raisedead";t22=CF(F);TrS(t22,xb+sb*4+ii*4,yb-3*(sb+ib),"cd22",t22p,sb,false);t22:SetScript(OE,function(self,event,...) Ts(t22,cd22,select(1,...),select(5,...),49039,120) end);
  62. t23p="Interface\\Icons\\spell_deathknight_strangulate";t23=CF(F);TrS(t23,xb+sb*5+ii*5,yb-3*(sb+ib),"cd23",t23p,sb,false);t23:SetScript(OE,function(self,event,...) Ts(t23,cd23,select(1,...),select(5,...),49576,25) end);
  63. t24p="Interface\\Icons\\spell_deathknight_antimagiczone";t24=CF(F);TrS(t24,xb+sb*4+ii*4,yb-3*(sb+ib),"cd24",t24p,sb,false);t24:SetScript(OE,function(self,event,...) Ts(t24,cd24,select(1,...),select(5,...),51052,120) end);
  64. t25p="Interface\\Icons\\ability_deathknight_summongargoyle";t25=CF(F);TrS(t25,xb+sb*6+ii*6,yb-3*(sb+ib),"cd25",t25p,sb,false);t25:SetScript(OE,function(self,event,...) Ts(t25,cd25,select(1,...),select(5,...),49206,180) end);
  65. --priest
  66. t26p="Interface\\Icons\\spell_shadow_psychicscream";t26=CF(F);TrS(t26,xb,yb-4*(sb+ib),"cd26",t26p,sb,false);t26:SetScript(OE,function(self,event,...) Ts(t26,cd26,select(1,...),select(5,...),8122,26) end);
  67. t27p="Interface\\Icons\\spell_shadow_psychicscream";t27=CF(F);TrS(t27,xb+sb+ii,yb-4*(sb+ib),"cd27",t27p,sb,false);t27:SetScript(OE,function(self,event,...) Ts(t27,cd27,select(1,...),select(5,...),8122,30) end);
  68. t28p="Interface\\Icons\\spell_frost_windwalkon";t28=CF(F);TrS(t28,xb+sb*2+ii*2,yb-4*(sb+ib),"cd28",t28p,sb,false);t28:SetScript(OE,function(self,event,...) Ts(t28,cd28,select(1,...),select(5,...),89485,45) end);
  69. t29p="Interface\\Icons\\spell_holy_painsupression";t29=CF(F);TrS(t29,xb+sb*3+ii*3,yb-4*(sb+ib),"cd29",t29p,sb,false);t29:SetScript(OE,function(self,event,...) Ts(t29,cd29,select(1,...),select(5,...),33206,180) end);
  70. t30p="Interface\\Icons\\spell_shadow_dispersion";t30=CF(F);TrS(t30,xb+sb*4+ii*4,yb-4*(sb+ib),"cd30",t30p,sb,false);t30:SetScript(OE,function(self,event,...) Ts(t30,cd30,select(1,...),select(5,...),47585,120) end);
  71. t31p="Interface\\Icons\\spell_shadow_psychichorrors";t31=CF(F);TrS(t31,xb+sb*5+ii*5,yb-4*(sb+ib),"cd31",t31p,sb,false);t31:SetScript(OE,function(self,event,...) Ts(t31,cd31,select(1,...),select(5,...),64044,45) end);
  72. t32p="Interface\\Icons\\ability_priest_silence";t32=CF(F);TrS(t32,xb+sb*6+ii*6,yb-4*(sb+ib),"cd32",t32p,sb,false);t32:SetScript(OE,function(self,event,...) Ts(t32,cd32,select(1,...),select(5,...),15487,45) end);
  73. t69p="Interface\\Icons\\spell_priest_voidtendrils";t69=CF(F);TrS(t69,xb+sb*7+ii*7,yb-4*(sb+ib),"cd69",t69p,sb,false);t69:SetScript(OE,function(self,event,...) Ts(t69,cd69,select(1,...),select(5,...),108920,30) end);
  74. t70p="Interface\\Icons\\spell_priest_psyfiend";t70=CF(F);TrS(t70,xb+sb*7+ii*7,yb-4*(sb+ib),"cd70",t70p,sb,false);t70:SetScript(OE,function(self,event,...) Ts(t70,cd70,select(1,...),select(5,...),108921,45) end);
  75. t71p="Interface\\Icons\\spell_shadow_shadowworddominate";t71=CF(F);TrS(t71,xb+sb*7+ii*7,yb-4*(sb+ib),"cd71",t71p,sb,false);t71:SetScript(OE,function(self,event,...) Ts(t71,cd71,select(1,...),select(5,...),605,30) end);
  76. --paladin
  77. t33p="Interface\\Icons\\spell_holy_sealofvalor";t33=CF(F);TrS(t33,xb,yb-5*(sb+ib),"cd33",t33p,sb,false);t33:SetScript(OE,function(self,event,...) Ts(t33,cd33,select(1,...),select(5,...),1044,25) end);
  78. t34p="Interface\\Icons\\spell_holy_sealofmight";t34=CF(F);TrS(t34,xb+sb+ii,yb-5*(sb+ib),"cd34",t34p,sb,false);t34:SetScript(OE,function(self,event,...) Ts(t34,cd34,select(1,...),select(5,...),853,40) end);
  79. t58p="Interface\\Icons\\spell_holy_sealofmight";t58=CF(F);TrS(t58,xb+sb*2+ii*2,yb-5*(sb+ib),"cd58",t58p,sb,false);t58:SetScript(OE,function(self,event,...) Ts(t58,cd58,select(1,...),select(5,...),853,60) end);
  80. t35p="Interface\\Icons\\spell_holy_sealofsacrifice";t35=CF(F);TrS(t35,xb+sb*3+ii*3,yb-5*(sb+ib),"cd35",t35p,sb,false);t35:SetScript(OE,function(self,event,...) Ts(t35,cd35,select(1,...),select(5,...),6940,120) end);
  81. t36p="Interface\\Icons\\spell_holy_sealofprotection";t36=CF(F);TrS(t36,xb+sb*4+ii*4,yb-5*(sb+ib),"cd36",t36p,sb,false);t36:SetScript(OE,function(self,event,...) Ts(t36,cd36,select(1,...),select(5,...),1022,300) end);
  82. t37p="Interface\\Icons\\spell_holy_divineshield";t37=CF(F);TrS(t37,xb+sb*5+ii*5,yb-5*(sb+ib),"cd37",t37p,sb,false);t37:SetScript(OE,function(self,event,...) Ts(t37,cd37,select(1,...),select(5,...),642,300) end);
  83. t38p="Interface\\Icons\\spell_holy_auramastery";t38=CF(F);TrS(t38,xb+sb*6+ii*6,yb-5*(sb+ib),"cd38",t38p,sb,false);t38:SetScript(OE,function(self,event,...) Ts(t38,cd38,select(1,...),select(5,...),31821,180) end);
  84. --warrior
  85. t39p="Interface\\Icons\\ability_warrior_charge";t39=CF(F);TrS(t39,xb,yb-6*(sb+ib),"cd39",t39p,sb,false);t39:SetScript(OE,function(self,event,...) Ts(t39,cd39,select(1,...),select(5,...),100,20) end);
  86. t40p="Interface\\Icons\\ability_warrior_bladestorm";t40=CF(F);TrS(t40,xb+sb+ii,yb-6*(sb+ib),"cd40",t40p,sb,false);t40:SetScript(OE,function(self,event,...) Ts(t40,cd40,select(1,...),select(5,...),46924,90) end);
  87. t72p="Interface\\Icons\\ability_warrior_shockwave";t72=CF(F);TrS(t72,xb+sb+ii,yb-6*(sb+ib),"cd72",t72p,sb,false);t72:SetScript(OE,function(self,event,...) Ts(t72,cd72,select(1,...),select(5,...),46968,20) end);
  88. t73p="Interface\\Icons\\ability_warrior_dragonroar";t73=CF(F);TrS(t73,xb+sb+ii,yb-6*(sb+ib),"cd73",t73p,sb,false);t73:SetScript(OE,function(self,event,...) Ts(t73,cd73,select(1,...),select(5,...),118000,60) end);
  89. t41p="Interface\\Icons\\ability_heroicleap";t41=CF(F);TrS(t41,xb+sb*2+ii*2,yb-6*(sb+ib),"cd41",t41p,sb,false);t41:SetScript(OE,function(self,event,...) Ts(t41,cd41,select(1,...),select(5,...),6544,45) end);
  90. t42p="Interface\\Icons\\spell_nature_ancestralguardian";t42=CF(F);TrS(t42,xb+sb*3+ii*3,yb-6*(sb+ib),"cd42",t42p,sb,false);t42:SetScript(OE,function(self,event,...) Ts(t42,cd42,select(1,...),select(5,...),18499,30) end);
  91. t43p="Interface\\Icons\\ability_criticalstrike";t43=CF(F);TrS(t43,xb+sb*4+ii*4,yb-6*(sb+ib),"cd43",t43p,sb,false);t43:SetScript(OE,function(self,event,...) Ts(t43,cd43,select(1,...),select(5,...),1719,300) end);
  92. t44p="Interface\\Icons\\ability_warrior_shieldwall";t44=CF(F);TrS(t44,xb+sb*5+ii*5,yb-6*(sb+ib),"cd44",t44p,sb,false);t44:SetScript(OE,function(self,event,...) Ts(t44,cd44,select(1,...),select(5,...),871,300) end);
  93. --druid
  94. t45p="Interface\\Icons\\ability_hunter_pet_bear";t45=CF(F);TrS(t45,xb,yb-7*(sb+ib),"cd45",t45p,sb,false);t45:SetScript(OE,function(self,event,...) Ts(t45,cd45,select(1,...),select(5,...),16979,15) end);
  95. t46p="Interface\\Icons\\spell_druid_feralchargecat";t46=CF(F);TrS(t46,xb+sb+ii,yb-7*(sb+ib),"cd46",t46p,sb,false);t46:SetScript(OE,function(self,event,...) Ts(t46,cd46,select(1,...),select(5,...),49376,15) end);
  96. t47p="Interface\\Icons\\spell_nature_stoneclawtotem";t47=CF(F);TrS(t47,xb+sb*2+ii*2,yb-7*(sb+ib),"cd47",t47p,sb,false);t47:SetScript(OE,function(self,event,...) Ts(t47,cd47,select(1,...),select(5,...),22812,60) end);
  97. t48p="Interface\\Icons\\ability_druid_bash";t48=CF(F);TrS(t48,xb+sb*3+ii*3,yb-7*(sb+ib),"cd48",t48p,sb,false);t48:SetScript(OE,function(self,event,...) Ts(t48,cd48,select(1,...),select(5,...),5211,50) end);
  98. t74p="Interface\\Icons\\ability_druid_demoralizingroar";t74=CF(F);TrS(t74,xb+sb*3+ii*3,yb-7*(sb+ib),"cd74",t74p,sb,false);t74:SetScript(OE,function(self,event,...) Ts(t74,cd48,select(1,...),select(5,...),99,30) end);
  99. t75p="Interface\\Icons\\spell_druid_ursolsvortex";t75=CF(F);TrS(t75,xb+sb*3+ii*3,yb-7*(sb+ib),"cd75",t75p,sb,false);t75:SetScript(OE,function(self,event,...) Ts(t75,cd48,select(1,...),select(5,...),102793,60) end);
  100. t49p="Interface\\Icons\\ability_druid_tigersroar";t49=CF(F);TrS(t49,xb+sb*4+ii*4,yb-7*(sb+ib),"cd49",t49p,sb,false);t49:SetScript(OE,function(self,event,...) Ts(t49,cd49,select(1,...),select(5,...),61336,180) end);
  101. t50p="Interface\\Icons\\ability_druid_berserk";t50=CF(F);TrS(t50,xb+sb*5+ii*5,yb-7*(sb+ib),"cd50",t50p,sb,false);t50:SetScript(OE,function(self,event,...) Ts(t50,cd50,select(1,...),select(5,...),50334,180) end);
  102. --hunter
  103. t51p="Interface\\Icons\\ability_golemstormbolt";t51=CF(F);TrS(t51,xb+sb*4+ii*4,yb-2*(sb+ib),"cd51",t51p,sb,false);t51:SetScript(OE,function(self,event,...) Ts(t51,cd51,select(1,...),select(5,...),19503,30) end);
  104. t52p="Interface\\Icons\\spell_frost_chainsofice";t52=CF(F);TrS(t52,xb+sb*5+ii*5,yb-2*(sb+ib),"cd52",t52p,sb,false);t52:SetScript(OE,function(self,event,...) Ts(t52,cd52,select(1,...),select(5,...),1499,30) end);
  105. t53p="Interface\\Icons\\ability_whirlwind";t53=CF(F);TrS(t53,xb+sb*6+ii*6,yb-2*(sb+ib),"cd53",t53p,sb,false);t53:SetScript(OE,function(self,event,...) Ts(t53,cd53,select(1,...),select(5,...),19263,120) end);
  106. t54p="Interface\\Icons\\ability_hunter_murderofcrows";t54=CF(F);TrS(t54,xb+sb*7+ii*7,yb-2*(sb+ib),"cd54",t54p,sb,false);t54:SetScript(OE,function(self,event,...) Ts(t54,cd54,select(1,...),select(5,...),131894,120) end);
  107. t67p="Interface\\Icons\\spell_arcane_arcane04";t67=CF(F);TrS(t67,xb+sb*7+ii*7,yb-2*(sb+ib),"cd67",t67p,sb,false);t67:SetScript(OE,function(self,event,...) Ts(t67,cd54,select(1,...),select(5,...),130392,20) end);
  108. t68p="Interface\\Icons\\ability_hunter_catlikereflexes";t68=CF(F);TrS(t68,xb+sb*7+ii*7,yb-2*(sb+ib),"cd68",t68p,sb,false);t68:SetScript(OE,function(self,event,...) Ts(t68,cd54,select(1,...),select(5,...),120697,90) end);
  109. --shaman
  110. t62p="Interface\\Icons\\ability_shaman_multitotemactivation";t62=CF(F);TrS(t62,xb+sb*3+ii*3,yb-(sb+ib),"cd62",t62p,sb,false);t62:SetScript(OE,function(self,event,...) Ts(t62,cd62,select(1,...),select(5,...),108285,180) end);
  111. t63p="Interface\\Icons\\ability_shaman_totemrelocation";t63=CF(F);TrS(t63,xb+sb*3+ii*3,yb-(sb+ib),"cd63",t63p,sb,false);t63:SetScript(OE,function(self,event,...) Ts(t63,cd63,select(1,...),select(5,...),108287,10) end);
  112. t55p="Interface\\Icons\\spell_shaman_hex";t55=CF(F);TrS(t55,xb+sb*4+ii*4,yb-(sb+ib),"cd55",t55p,sb,false);t55:SetScript(OE,function(self,event,...) Ts(t55,cd55,select(1,...),select(5,...),51514,45) end);
  113. t56p="Interface\\Icons\\spell_shaman_spiritlink";t56=CF(F);TrS(t56,xb+sb*5+ii*5,yb-(sb+ib),"cd56",t56p,sb,false);t56:SetScript(OE,function(self,event,...) Ts(t56,cd56,select(1,...),select(5,...),98008,180) end);
  114. t57p="Interface\\Icons\\spell_nature_tremortotem";t57=CF(F);TrS(t57,xb+sb*6+ii*6,yb-(sb+ib),"cd57",t57p,sb,false);t57:SetScript(OE,function(self,event,...) Ts(t57,cd57,select(1,...),select(5,...),8143,60) end);
  115. t85p="Interface\\Icons\\spell_nature_groundingtotem";t85=CF(F);TrS(t85,xb+sb*7+ii*7,yb-(sb+ib),"cd85",t85p,sb,false);t85:SetScript(OE,function(self,event,...) Ts(t85,cd85,select(1,...),select(5,...),8177,25) end);
  116. --monk
  117. t76p="Interface\\Icons\\ability_monk_chargingoxwave";t76=CF(F);TrS(t76,xb,yb-8*(sb+ib),"cd76",t76p,sb,false);t76:SetScript(OE,function(self,event,...) Ts(t76,cd76,select(1,...),select(5,...),119392,60) end);
  118. t77p="Interface\\Icons\\ability_monk_legsweep";t77=CF(F);TrS(t77,xb,yb-8*(sb+ib),"cd77",t77p,sb,false);t77:SetScript(OE,function(self,event,...) Ts(t77,cd77,select(1,...),select(5,...),119381,45) end);
  119. t78p="Interface\\Icons\\ability_monk_dampenharm";t78=CF(F);TrS(t78,xb+sb+ii,yb-8*(sb+ib),"cd78",t78p,sb,false);t78:SetScript(OE,function(self,event,...) Ts(t78,cd78,select(1,...),select(5,...),122278,90) end);
  120. t79p="Interface\\Icons\\spell_arcane_massdispel";t79=CF(F);TrS(t79,xb+sb+ii,yb-8*(sb+ib),"cd79",t79p,sb,false);t79:SetScript(OE,function(self,event,...) Ts(t79,cd78,select(1,...),select(5,...),122783,90) end);
  121. t80p="Interface\\Icons\\ability_monk_rushingjadewind";t80=CF(F);TrS(t80,xb+sb*2+ii*2,yb-8*(sb+ib),"cd80",t80p,sb,false);t80:SetScript(OE,function(self,event,...) Ts(t80,cd80,select(1,...),select(5,...),116847,30) end);
  122. t81p="Interface\\Icons\\ability_monk_summontigerstatue";t81=CF(F);TrS(t81,xb+sb*2+ii*2,yb-8*(sb+ib),"cd81",t81p,sb,false);t81:SetScript(OE,function(self,event,...) Ts(t81,cd81,select(1,...),select(5,...),123904,180) end);
  123. t82p="Interface\\Icons\\ability_monk_clashingoxcharge";t82=CF(F);TrS(t82,xb+sb*3+ii*3,yb-8*(sb+ib),"cd82",t82p,sb,false);t82:SetScript(OE,function(self,event,...) Ts(t82,cd82,select(1,...),select(5,...),122057,35) end);
  124. t83p="Interface\\Icons\\ability_monk_touchofdeath";t83=CF(F);TrS(t83,xb+sb*4+ii*4,yb-8*(sb+ib),"cd83",t83p,sb,false);t83:SetScript(OE,function(self,event,...) Ts(t83,cd83,select(1,...),select(5,...),115080,90) end);
  125. t84p="Interface\\Icons\\ability_monk_zenmeditation";t84=CF(F);TrS(t84,xb+sb*5+ii*5,yb-8*(sb+ib),"cd84",t84p,sb,false);t84:SetScript(OE,function(self,event,...) Ts(t84,cd84,select(1,...),select(5,...),115176,180) end)
  126. end
  127.  
  128.  
  129.  
  130.  
  131.  
  132. --[[FCTtweaks]]
  133. if (FCTtweaks == 1) then
  134. local frame = CreateFrame("FRAME", "DefaultUIScrips")
  135. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  136.      local function eventHandler(self, event, ...)
  137.         LARGE_NUMBER_SEPERATOR = ""
  138.         UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
  139.         COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_ABSORB.show = nil
  140.         COMBAT_TEXT_TYPE_INFO.HEAL_CRIT_ABSORB.show = nil
  141.         COMBAT_TEXT_TYPE_INFO.HEAL_ABSORB.show = nil
  142.         COMBAT_TEXT_TYPE_INFO.ABSORB.show = nil
  143.         COMBAT_TEXT_TYPE_INFO.SPELL_ABSORB.show = nil
  144.         PlayerHitIndicator:SetFont("Fonts\\font.ttf",30)           
  145. end
  146. frame:SetScript("OnEvent", eventHandler)
  147. --[[combat text font ]]
  148. local fontName = "Fonts\\font.ttf"
  149. local fontHeight = 40
  150. local fFlags = ""
  151. local function FS_SetFont()
  152.     DAMAGE_TEXT_FONT = fontName
  153.     COMBAT_TEXT_HEIGHT = fontHeight
  154.     COMBAT_TEXT_CRIT_MAXHEIGHT = fontHeight + 2
  155.     COMBAT_TEXT_CRIT_MINHEIGHT = fontHeight - 2
  156.     local fName, fHeight, fFlags = CombatTextFont:GetFont()
  157.     CombatTextFont:SetFont(fontName, fontHeight, fFlags)
  158. end
  159. FS_SetFont()
  160. --[[combat text location]]
  161. local f = CreateFrame("FRAME");
  162. f:SetScript("OnEvent", function(self,event,...)
  163. local arg1 =...;        
  164.      if (arg1=="Blizzard_CombatText") then
  165.         f:UnregisterEvent("ADDON_LOADED");
  166.         hooksecurefunc("CombatText_UpdateDisplayedMessages",
  167.         function ()
  168.         COMBAT_TEXT_LOCATIONS =
  169.         {startX  = 350,
  170.         startY = 500 * COMBAT_TEXT_Y_SCALE, endX =350,endY = 300 * COMBAT_TEXT_Y_SCALE};                        
  171. end)end end)
  172. f:RegisterEvent("ADDON_LOADED");
  173. end
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. --[[macro/binds]]
  182. if (Macro == 1) then
  183. hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
  184.     local macro, hotkey = _G[self:GetName()..'Name'], _G[self:GetName()..'HotKey']
  185.     if macro and hotkey then macro:Hide() hotkey:Hide() end
  186. end)
  187. end
  188.  
  189.  
  190.  
  191.  
  192. if (UnitFrames == 1) then
  193. --[[player frame tweaks]]
  194. hooksecurefunc("PlayerFrame_UpdateStatus", function()
  195. if IsResting("player") then PlayerStatusTexture:Hide()PlayerRestIcon:Hide()PlayerRestGlow:Hide()PlayerStatusGlow:Hide()
  196. elseif PlayerFrame.inCombat then PlayerStatusTexture:Hide()PlayerAttackIcon:Hide()PlayerRestIcon:Hide()PlayerAttackGlow:Hide()
  197. PlayerRestGlow:Hide()PlayerStatusGlow:Hide()PlayerAttackBackground:Hide() end end)
  198. --[[ background tweaks ]]
  199. hooksecurefunc('TargetFrame_CheckFaction', function(self)
  200.   if ( not UnitPlayerControlled(self.unit)
  201.   and UnitIsTapped(self.unit)
  202.   and not UnitIsTappedByPlayer(self.unit)
  203.   and not UnitIsTappedByAllThreatList(self.unit) ) then
  204.     self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
  205.     if ( self.portrait ) then
  206.       self.portrait:SetVertexColor(0.5, 0.5, 0.5);
  207.     end
  208.   else
  209.     self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
  210.     if ( self.portrait ) then
  211.       self.portrait:SetVertexColor(1.0, 1.0, 1.0);
  212.     end
  213.   end  
  214. end)
  215. --[[ hp ]]
  216. local f=function(v)if(v>=1e4) then return ('%.1fk'):format(v/1e3):gsub('%.?0+([km])$','%1') else return v end end
  217.         hooksecurefunc("TextStatusBar_UpdateTextString",function(s)
  218.         if not GetCVarBool("statusTextPercentage") then
  219.             if s.TextString and s.currValue then
  220.             s.TextString:SetText(f(s.currValue))           
  221.           end
  222.      end
  223. end)
  224. --[[class colored hp bars ]]
  225. local UnitIsPlayer,UnitIsConnected, UnitClass, RAID_CLASS_COLORS = UnitIsPlayer,UnitIsConnected,UnitClass, RAID_CLASS_COLORS
  226. local _, class, c
  227. local function colour(statusbar, unit, name)
  228.       if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
  229.           _, class = UnitClass(unit) c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
  230.           statusbar:SetStatusBarColor(c.r, c.g, c.b)         
  231.           statusbar = _G["PlayerFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--playerframe fix   
  232.       end    
  233. end
  234. hooksecurefunc("UnitFrameHealthBar_Update", colour)
  235. hooksecurefunc("HealthBar_OnValueChanged", function(self)colour(self, self.unit)end)
  236. --[[class colored names]]--
  237. hooksecurefunc("UnitFrame_Update", function(self)
  238. if UnitClass(self.unit) then
  239. local c = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[select(2,UnitClass(self.unit))]
  240. self.name:SetTextColor(c.r,c.g,c.b,1) self.name:SetFont("Fonts\\font.ttf", 13)end end)
  241. end
  242.  
  243.  
  244.  
  245.  
  246. --[[Loss-Of-Control Remover  ]]
  247. if (LoCRemover == 1) then
  248. f=CreateFrame("Frame")f:RegisterEvent("LOSS_OF_CONTROL_ADDED")f:RegisterEvent("LOSS_OF_CONTROL_UPDATE")
  249. f:SetScript("OnEvent",function()for b in pairs(ActionBarActionEventsFrame.frames)do
  250. b.cooldown:SetLossOfControlCooldown(0,0)end end)
  251. select(1,LossOfControlFrame:GetRegions()):SetAlpha(0)
  252. select(2,LossOfControlFrame:GetRegions()):SetAlpha(0)
  253. select(3,LossOfControlFrame:GetRegions()):SetAlpha(0)
  254. select(5,LossOfControlFrame:GetRegions()):SetAlpha(0)
  255. end
  256.  
  257.  
  258.  
  259.  
  260. --[[arena/bg trinkets]]
  261. if (ArenaTrinkets == 1) then
  262. local trinkets = {}
  263. local events = CreateFrame("Frame")
  264. function events:ADDON_LOADED(addonName)
  265.     if addonName ~= "Blizzard_ArenaUI" then
  266.         return
  267.     end
  268.         ArenaEnemyFrame1:ClearAllPoints()
  269.         ArenaEnemyFrame1:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -300, -200)    
  270.         ArenaEnemyFrame1.SetPoint = function() end 
  271.         ArenaEnemyFrame2:ClearAllPoints()
  272.         ArenaEnemyFrame2:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -50)
  273.         ArenaEnemyFrame2.SetPoint = function() end
  274.         ArenaEnemyFrame3:ClearAllPoints()
  275.         ArenaEnemyFrame3:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -100)
  276.         ArenaEnemyFrame3.SetPoint = function() end
  277.         ArenaEnemyFrame4:ClearAllPoints()
  278.         ArenaEnemyFrame4:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -150)
  279.         ArenaEnemyFrame4.SetPoint = function() end
  280.         ArenaEnemyFrame5:ClearAllPoints()
  281.         ArenaEnemyFrame5:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -200)
  282.         ArenaEnemyFrame5.SetPoint = function() end     
  283.     local arenaFrame, trinket
  284.     for i = 1, MAX_ARENA_ENEMIES do
  285.         arenaFrame = "ArenaEnemyFrame"..i
  286.         trinket = CreateFrame("Cooldown", arenaFrame.."Trinket", ArenaEnemyFrames)
  287.         trinket:SetPoint("TOPRIGHT", arenaFrame, 35, -6)
  288.         trinket:SetSize(24, 24)
  289.         trinket.icon = trinket:CreateTexture(nil, "BACKGROUND")
  290.         trinket.icon:SetAllPoints()
  291.         trinket.icon:SetTexture("Interface\\Icons\\inv_jewelry_trinketpvp_02")
  292.         trinket:Hide()
  293.         trinkets["arena"..i] = trinket
  294.     end
  295.     self:UnregisterEvent("ADDON_LOADED")
  296. end
  297. function events:UNIT_SPELLCAST_SUCCEEDED(unitID, spell, rank, lineID, spellID)
  298.     if not trinkets[unitID] then
  299.         return
  300.     end
  301.     if spellID == 59752 or spellID == 42292 then
  302.         CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 120, 1)
  303.         SendChatMessage("Trinket used by: "..GetUnitName(unitID, true), "PARTY")    
  304.     end
  305. end
  306. function events:PLAYER_ENTERING_WORLD()
  307.     local _, instanceType = IsInInstance()
  308.     if instanceType == "arena" then
  309.         self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  310.     elseif self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") then
  311.         self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  312.         for _, trinket in pairs(trinkets) do
  313.             trinket:SetCooldown(0, 0)
  314.             trinket:Hide()
  315.         end
  316.     end
  317. end
  318. SLASH_TESTAEF1 = "/testaef"
  319. SlashCmdList["TESTAEF"] = function(msg, editBox)
  320.     if not IsAddOnLoaded("Blizzard_ArenaUI") then
  321.         LoadAddOn("Blizzard_ArenaUI")
  322.     end
  323.     ArenaEnemyFrames:Show()
  324.     local arenaFrame
  325.     for i = 1, 5 do
  326.         arenaFrame = _G["ArenaEnemyFrame"..i]      
  327.         arenaFrame.classPortrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
  328.         arenaFrame.classPortrait:SetTexCoord(unpack(CLASS_ICON_TCOORDS["WARRIOR"]))
  329.         arenaFrame.name:SetText("Dispelme")
  330.         arenaFrame:Show()              
  331.         CooldownFrame_SetTimer(trinkets["arena"..i], GetTime(), 120, 1)    
  332.     end
  333. end
  334. events:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
  335. events:RegisterEvent("ADDON_LOADED")
  336. events:RegisterEvent("PLAYER_ENTERING_WORLD")
  337. end
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344. if (ArenaDR == 1) then
  345. DRt={
  346. --[[ STUNS ]]--
  347. {108194,91800,91797,115001,102795,22570,5211,9005,113801,117526,24394,
  348. 90337,126246,126423,126355,56626,50519,96201,118271,44572,119392,122242,
  349. 120086,119381,115752,853,110698,119072,105593,1833,408,118345,118905,
  350. 89766,30283,22703,132168,107570,20549},
  351. --[[ FEARS ]]--
  352. {113004,113056,1513,105421,10326,145067,8122,113792,2094,5782,118699,5484,
  353. 115268,6358,5246,20511},
  354. --[[ DESORIENT ]]--
  355. {2637,3355,19386,118,28272,28271,61305,61025,61721,61780,82691,115078,
  356. 20066,9484,1776,6770,76780,51514,710,107079},
  357. --[[ SILENCES ]]--
  358. {108194,47476,114237,34490,102051,55021,137460,116709,31935,15487,1330,
  359. 24259,115782,25046,28730,50613,69179,80483}
  360.     }
  361. drx=106;drs=24;dp="RIGHT";dre="COMBAT_LOG_EVENT_UNFILTERED"drp="PLAYER_ENTERING_WORLD"dra="ARENA_OPPONENT_UPDATE"LoadAddOn("Blizzard_ArenaUI")function gaef(f,n)return _G["ArenaEnemyFrame"..n.."HealthBar"]end
  362. function rDR(f)f.e=1;f.t:SetTexture(nil)f.c:Hide()end function sDR(f)f.e=f.e+1;f.c:Show()end function gDRt(i,j)return _G["drc"..i..":"..j]end function runDR(f,n)CooldownFrame_SetTimer(f.c,GetTime(),18,1)eDR(f,n)sDR(f)oDR(n)end
  363. function eDR(f,n)local t=1;f:SetScript("OnUpdate",function(s,e)t=t+e;if(t>=18)then f:SetScript("OnUpdate",nil)rDR(f)oDR(n)end end)end function cDR(f,n,s)if f.e<4 then local _,_,t=GetSpellInfo(s)f.t:SetTexture(t)runDR(f,n)end end
  364. function oDR(n)local r=1;for j in ipairs(DRt)do local f=gDRt(n,j)f:SetPoint(dp,gaef(f,n),dp,drx+(r-1)*25,-2)r=r+1;end end function uDR(n,s)for i,t in ipairs(DRt)do for _,j in ipairs(t)do if s==j then cDR(gDRt(n,i),n,s)end end end end
  365. function DRc(i,j)local f=CreateFrame("Frame",nil,UIParent)f:SetSize(drs,drs)f.t=f:CreateTexture(nil,"BORDER")f.t:SetAllPoints(true)f.c=CreateFrame("Cooldown",nil,f)f.c:SetAllPoints(f)f.e=1 return f end
  366. function clDR(_,e,_,_,_,_,_,d,_,_,_,s)if(e=="SPELL_AURA_REMOVED" or e=="SPELL_AURA_REFRESH")then for i=1,5 do local ag=UnitGUID("arena"..i)if(ag ~= nil and d==ag)then uDR(i,s)end end end end
  367. function iDRt(o,m)for i=1,m do for j in ipairs(DRt)do local f=gDRt(i,j)rDR(f)if o then f:Show()end end end end for i=1,5 do for j in ipairs(DRt)do _G["drc"..i..":"..j]=DRc(i,j)end end
  368. dt=CreateFrame("Frame")dt:SetScript("OnEvent",function(_,e,...)if e==dre then clDR(...)elseif e==dra then iDRt(1,GetNumArenaOpponents())else iDRt(nil,5)end end)dt:RegisterEvent(dra)dt:RegisterEvent(drp)dt:RegisterEvent(dre)
  369. end
  370.  
  371.  
  372.  
  373. --rogue drtracker
  374. if (RogueDR == 1) then
  375. USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
  376. CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t) CS:RegisterEvent(USD)
  377. CS.c:SetAllPoints(CS) CS:SetPoint("BOTTOMRIGHT",PlayerFrame,-55,-20)CS:SetSize(26,26)CS:Hide()CS.t=CS:CreateTexture(nil,RD)CS.t:SetAllPoints()CS.t:SetTexture("Interface\\Icons\\ability_rogue_kidneyshot")
  378. CS:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==1833 then CST:SetCooldown(GetTime(),23)CS:Show()CS.elapsed = 0 CS:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 24 then self:SetScript('OnUpdate', nil) self:Hide() else self.elapsed = self.elapsed + elapsed end end)end if UE(select(1,...))==UE("player")and select(5,...)==408 then CST:SetCooldown(GetTime(),24)CS:Show() CS.elapsed = 0 CS:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 25 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end end)
  379. SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t) SP:RegisterEvent(USD)
  380. SP.c:SetAllPoints(SP) SP:SetPoint("BOTTOMRIGHT",PlayerFrame,-29,-20)SP:Hide()SP:SetSize(26,26)SP.t=SP:CreateTexture(nil,RD)SP.t:SetAllPoints()SP.t:SetTexture("Interface\\Icons\\ability_sap")
  381. SP:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==6770 then SAP:SetCooldown(GetTime(),26)SP:Show()SP.elapsed = 0 SP:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 27 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end if UE(select(1,...))==UE("player")and select(5,...)==1776 then SAP:SetCooldown(GetTime(),22)SP:Show()SP.elapsed = 0 SP:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 23 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end end)
  382. GR=RF(FR) GR.c=RF("Cooldown","GAR",GR.t)  
  383. GR.c:SetAllPoints(GR) GR:SetPoint("BOTTOMRIGHT",PlayerFrame,-3,-20)GR:Hide()GR:SetSize(26,26)GR.t=GR:CreateTexture(nil,RD)GR.t:SetAllPoints()GR.t:SetTexture("Interface\\Icons\\spell_frost_iceshock")
  384. GR:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==703 then GAR:SetCooldown(GetTime(),23)GR:Show()GR.elapsed = 0 GR:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 24 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end end) GR:RegisterEvent(USD)
  385. end
  386.  
  387.  
  388.  
  389. --combat script
  390. if (Combat == 1) then
  391. CTT=CreateFrame("Frame")CTT:SetParent(TargetFrame)CTT:SetPoint("Left",TargetFrame,-30,5)CTT:SetSize(25,25)CTT.t=CTT:CreateTexture(nil,BORDER)CTT.t:SetAllPoints()CTT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CTT:Hide()
  392. local function FrameOnUpdate(self) if UnitAffectingCombat("target") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CTT) end)
  393. CFT=CreateFrame("Frame")CFT:SetParent(FocusFrame)CFT:SetPoint("Left",FocusFrame,-30,5)CFT:SetSize(25,25)CFT.t=CFT:CreateTexture(nil,BORDER)CFT.t:SetAllPoints()CFT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CFT:Hide()
  394. local function FrameOnUpdate(self) if UnitAffectingCombat("focus") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CFT) end)
  395. CPT=CreateFrame("Frame")--[[CPT:SetParent(PlayerFrame)]]CPT:SetPoint("BOTTOMRIGHT",PlayerFrame,-55,6)CPT:SetSize(26,26)CPT.t=CPT:CreateTexture(nil,BORDER)CPT.t:SetAllPoints()CPT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CPT:Hide()
  396. local function FrameOnUpdate(self) if UnitAffectingCombat("player") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CPT) end)
  397. end
  398.  
  399.  
  400. --tweaks
  401. if (HideFrames == 1) then
  402. for i, v in pairs({MainMenuBarTexture0,MainMenuBarTexture1,MainMenuBarTexture2,MainMenuBarTexture3,MainMenuBarLeftEndCap,MainMenuBarRightEndCap,MainMenuMaxLevelBar0,MainMenuMaxLevelBar1,MainMenuMaxLevelBar2,MainMenuMaxLevelBar3,BonusActionBarFrameTexture1,
  403. BonusActionBarFrameTexture2,BonusActionBarFrameTexture3,BonusActionBarFrameTexture4,ActionBarUpButton,ActionBarDownButton,MainMenuBarPageNumber,StanceBarFrame,CharacterBag0Slot,CharacterBag1Slot,CharacterBag2Slot,CharacterBag3Slot,TargetFrameTextureFramePVPIcon,
  404. FocusFrameTextureFramePVPIcon,PlayerPVPIcon}) do v:SetAlpha(0) end
  405. end
  406.  
  407. --,WatchFrameHeader,WatchFrameCollapseExpandButton
  408.  
  409.  
  410.  
  411. if (MoveFrames == 1) then
  412. MultiBarBottomLeft:ClearAllPoints()MultiBarBottomLeft:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",0,6)MultiBarBottomLeft.SetPoint = function() end
  413. MultiBarBottomRight:ClearAllPoints()MultiBarBottomRight:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",0,48)MultiBarBottomRight.SetPoint = function() end
  414. MainMenuBar:ClearAllPoints()MainMenuBar:SetPoint("BOTTOMLEFT",nil,"BOTTOMLEFT",250,0)MainMenuBar.SetPoint = function() end
  415. MainMenuBarBackpackButton:ClearAllPoints()MainMenuBarBackpackButton:SetPoint("BOTTOMRIGHT",nil,"BOTTOMRIGHT",0,0)MainMenuBarBackpackButton.SetPoint = function() end
  416. CharacterMicroButton:ClearAllPoints()CharacterMicroButton:SetPoint("TOPRIGHT",UIParent,"TOPRIGHT",0,-356)CharacterMicroButton.SetPoint = function() end
  417. SpellbookMicroButton:ClearAllPoints()SpellbookMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-34)SpellbookMicroButton.SetPoint = function() end
  418. TalentMicroButton:ClearAllPoints()TalentMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-68)TalentMicroButton.SetPoint = function() end
  419. AchievementMicroButton:ClearAllPoints()AchievementMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-102)AchievementMicroButton.SetPoint = function() end
  420. QuestLogMicroButton:ClearAllPoints()QuestLogMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-136)QuestLogMicroButton.SetPoint = function() end
  421. GuildMicroButton:ClearAllPoints()GuildMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-170)GuildMicroButton.SetPoint = function() end
  422. PVPMicroButton:ClearAllPoints()PVPMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-204)PVPMicroButton.SetPoint = function() end
  423. LFDMicroButton:ClearAllPoints()LFDMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-238)LFDMicroButton.SetPoint = function() end
  424. CompanionsMicroButton:ClearAllPoints()CompanionsMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-272)CompanionsMicroButton.SetPoint = function() end
  425. EJMicroButton:ClearAllPoints()EJMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-306)EJMicroButton.SetPoint = function() end
  426. StoreMicroButton:ClearAllPoints()StoreMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-340)StoreMicroButton.SetPoint = function() end
  427. MainMenuMicroButton:ClearAllPoints()MainMenuMicroButton:SetPoint("LEFT",CharacterMicroButton,0,-374)MainMenuMicroButton.SetPoint = function() end
  428. MainMenuExpBar:ClearAllPoints()MainMenuExpBar:SetPoint("TOPLEFT",UIParent,"TOPLEFT",0,0)MainMenuExpBar:SetScale(0.7)MainMenuExpBar:SetAlpha(0.5)MainMenuExpBar.SetPoint = function() end
  429. end
  430. --SnowfallKeyPress animation
  431. if (Animation == 1) then
  432. local animationsCount, animations = 5, {}
  433. local animationNum = 1
  434. local frame, texture, alpha1, scale1, scale2, rotation2
  435.  
  436. for i = 1, animationsCount do
  437.     frame = CreateFrame("Frame")
  438.     texture = frame:CreateTexture() texture:SetTexture('Interface\\Cooldown\\star4') texture:SetAlpha(0) texture:SetAllPoints() texture:SetBlendMode("ADD")
  439.     animationGroup = texture:CreateAnimationGroup()
  440.     alpha1 = animationGroup:CreateAnimation("Alpha") alpha1:SetChange(1) alpha1:SetDuration(0) alpha1:SetOrder(1)
  441.     scale1 = animationGroup:CreateAnimation("Scale") scale1:SetScale(1.5, 1.5) scale1:SetDuration(0) scale1:SetOrder(1)
  442.     scale2 = animationGroup:CreateAnimation("Scale") scale2:SetScale(0, 0) scale2:SetDuration(0.3) scale2:SetOrder(2)
  443.     rotation2 = animationGroup:CreateAnimation("Rotation") rotation2:SetDegrees(90) rotation2:SetDuration(0.3) rotation2:SetOrder(2)
  444.     animations[i] = {frame = frame, animationGroup = animationGroup}
  445. end
  446.  
  447. local AnimateButton = function(self)
  448.     if not self:IsVisible() then return true end
  449.     local animation = animations[animationNum]
  450.     local frame = animation.frame
  451.     local animationGroup = animation.animationGroup
  452.     frame:SetFrameStrata(self:GetFrameStrata())
  453.     frame:SetFrameLevel(self:GetFrameLevel() + 10)
  454.     frame:SetAllPoints(self)
  455.     animationGroup:Stop()
  456.     animationGroup:Play()
  457.     animationNum = (animationNum % animationsCount) + 1
  458.     return true
  459. end
  460.  
  461. hooksecurefunc('MultiActionButtonDown', function(bname, id) AnimateButton(_G[bname..'Button'..id]) end)
  462.  
  463. hooksecurefunc('ActionButtonDown', function(id)
  464.      local button
  465.      if C_PetBattles.IsInBattle() then
  466.           if PetBattleFrame then
  467.                if id > NUM_BATTLE_PET_HOTKEYS then return end
  468.                button = PetBattleFrame.BottomFrame.abilityButtons[id]
  469.                if id == BATTLE_PET_ABILITY_SWITCH then
  470.                     button = PetBattleFrame.BottomFrame.SwitchPetButton;
  471.                elseif id == BATTLE_PET_ABILITY_CATCH then
  472.                     button = PetBattleFrame.BottomFrame.CatchButton;
  473.                end
  474.                if not button then return end
  475.           end
  476.           return
  477.      end
  478.  
  479.      if OverrideActionBar and OverrideActionBar:IsShown() then
  480.           if id > NUM_OVERRIDE_BUTTONS then return end
  481.           button = _G["OverrideActionBarButton"..id]
  482.      else
  483.           button = _G["ActionButton"..id]
  484.      end
  485.      if not button then return end
  486.  
  487.      AnimateButton(button)
  488. end)    
  489. end
  490.  --SDB fix
  491. if (ShadowDanceBar == 1) then
  492. local shadowdancebar = 2 -- внимание! это номер панели для шд
  493. local f = CreateFrame('frame', 'myownstatedriver', UIParent, 'SecureHandlerStateTemplate')
  494. for i=1,12 do f:SetFrameRef('ActionButton'..i, _G['ActionButton'..i]) end
  495. f:Execute([[ buttons = table.new() for i = 1, 12 do table.insert(buttons, self:GetFrameRef('ActionButton'..i)) end ]])
  496. f:SetAttribute('_onstate-page', [[  for i, button in ipairs(buttons) do button:SetAttribute('actionpage', tonumber(newstate)) end ]])
  497. local getBar = function()
  498.     local class, spec = select(2, UnitClass('player')), GetSpecialization()
  499.     local pages = {
  500.         ['DRUID'] = '[bonusbar:1,nostealth] 7; [bonusbar:1,stealth] 8; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10;',        
  501.         ['WARRIOR'] = '[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;',
  502.         ['PRIEST'] = '[bonusbar:1] 7;',
  503.         ['ROGUE'] = '[form:1][form:'..(spec==3 and 3 or 2)..',stealth] 7; [form:'..(spec==3 and 3 or 2)..',nostealth]'..shadowdancebar..';',
  504.         ['WARLOCK'] = '[form:2] 10;',
  505.         ['MONK'] = '[form:1] '..(spec == 1 and 8 or spec == 2 and 9 or spec == 3 and 7 or 9)..'; [form:2] 7;',
  506.         ['DEFAULT'] = '[vehicleui] 12; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;',
  507.     }
  508.     local condition, page = pages['DEFAULT'], pages[class]
  509.     if page then condition = condition..' '..page end
  510.     condition = condition..' 1'
  511.     return condition
  512. end
  513. RegisterStateDriver(f, 'page', getBar())
  514. end
  515.  
  516.  
  517. --interrupt announcer
  518. if (InterruptA == 1) then
  519. local f = CreateFrame("Frame")
  520. local function Update(self, event, ...)
  521.         if event == "COMBAT_LOG_EVENT_UNFILTERED" then     
  522.         local timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, _, spellID, spellName, _, extraskillID, extraSkillName = ...
  523.         if eventType == "SPELL_INTERRUPT" and sourceName == UnitName("player") then
  524.             SendChatMessage("Interrupted >> "..GetSpellLink(extraskillID).."!", "SAY")
  525.         end
  526.     end
  527. end
  528. f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  529. f:SetScript("OnEvent", Update)
  530. end
  531. --recup/snd tracker
  532. if (Slice == 1) then
  533. local f = CreateFrame("Frame")
  534. local function Update(self, event, ...)
  535. local RECUP = GetSpellInfo(73651)
  536. local SLICE = GetSpellInfo(5171)
  537. if event == "PLAYER_ENTERING_WORLD" then
  538.         Frame="Frame";CreateFrame=CreateFrame;Border="Border"
  539.         REC=CreateFrame(Frame)REC.c=CreateFrame("Cooldown","RC",REC.t)REC.c:SetAllPoints(REC)
  540.         REC:SetPoint("BOTTOMRIGHT",PlayerFrame,-3,6)REC:SetSize(26,26)REC.t=REC:CreateTexture(nil,Border)
  541.         REC.t:SetAllPoints()REC.t:SetTexture("Interface\\Icons\\ability_rogue_recuperate")
  542.         SND=CreateFrame(Frame)SND.c=CreateFrame("Cooldown","SN",SND.t)SND.c:SetAllPoints(SND)
  543.         SND:SetPoint("BOTTOMRIGHT",PlayerFrame,-29,6)SND:SetSize(26,26)SND.t=SND:CreateTexture(nil,Border)
  544.         SND.t:SetAllPoints()SND.t:SetTexture("Interface\\Icons\\ability_rogue_slicedice")
  545. end
  546. if event == "UNIT_AURA" then
  547. local maxx = 0
  548. local _, name, d, D, x
  549. for i = 1, 40 do
  550.                 name, _, icon, _, _, d, x = UnitBuff("player", i)
  551.                 if not name then break end
  552.         if name == RECUP then
  553.                    maxx = x
  554.                    D = d                 
  555.                    if D > 0 then
  556.                         RC:SetCooldown(maxx - D - 0.5, D)
  557.                    end
  558.                  
  559.                            
  560.                 elseif name == SLICE then
  561.                    maxx = x
  562.                    D = d
  563.                    if D > 0 then
  564.                         SN:SetCooldown(maxx-D - 0.5,D)                
  565.                    end
  566.         end
  567.     end
  568. end
  569. end
  570. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  571. f:RegisterEvent("UNIT_AURA")
  572. f:SetScript("OnEvent", Update)
  573. end
  574. ----------------------------------------------------------------------------------------------------  
  575. -- Class colors in arena frames
  576. ----------------------------------------------------------------------------------------------------
  577. if (cArenas == 1) then
  578. local frame = CreateFrame("FRAME")
  579. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  580. frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
  581. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  582. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  583. frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
  584. frame:RegisterEvent("PLAYER_CONTROL_GAINED")
  585. frame:RegisterEvent("PLAYER_CONTROL_LOST")
  586. frame:RegisterEvent("ADDON_LOADED");
  587.  
  588. local function DoArenaColorHook()
  589.         hooksecurefunc("ArenaEnemyFrame_Unlock",
  590.                 function(self)
  591.                         local color=RAID_CLASS_COLORS[select(2,UnitClass(self.unit)) or ""]
  592.                         if color then
  593.                                 self.healthbar:SetStatusBarColor(color.r,color.g,color.b)
  594.                                 self.healthbar.lockColor=true
  595.                         end                                            
  596.                 end
  597.         )
  598. end
  599.  
  600. local function eventHandler(self, event, arg, ...)
  601.              
  602.         if event == "ADDON_LOADED" then
  603.                 if arg == "Blizzard_ArenaUI" then
  604.                         self:UnregisterEvent(event);
  605.                         DoArenaColorHook();
  606.                 end
  607.         end            
  608. end
  609. if IsAddOnLoaded("Blizzard_ArenaUI") then
  610.         DoArenaColorHook();
  611. end
  612. frame:SetScript("OnEvent", eventHandler)
  613. end
  614.  
  615.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement