witcher
[14.3]
|
0
Скрипты Neilyo и не только
Немного упростил настройку Enemy Cooldowns
Скрытый текст Код:
- ----------------------------------------------------------------------------------------------------
- --EnemyCooldownsImproved--
- ----------------------------------------------------------------------------------------------------
- --wit4er
- local USS="UNIT_SPELLCAST_SUCCEEDED"
- local OE="OnEvent"
- local PvP="Interface\\Icons\\inv_jewelry_trinketpvp_01"
- local F="Frame"
- local CF=CreateFrame
- local BO="Border"
- local PvPT="PvP Trinket"
- local EMFH="Every Man For Himself"
- local UC=UnitClass
- local SCM=SendChatMessage
- local RW="RAID_WARNING"
- local xb=240
- local yb=500
- 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
- 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 --hidden
- 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) --hidden
- end
- end
- 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
-
- t1p="Interface\\Icons\\ability_rogue_shadowdance";t1=CF(F);TrS(t1,xb,yb,"cd1",t1p,22,false);
- t1:SetScript(OE,function(self,event,...) Ts(t1,cd1,select(1,...),select(5,...),51713,60) end);
- t2p="Interface\\Icons\\ability_rogue_kidneyshot";t2=CF(F);TrS(t2,xb+22,yb,"cd2",t2p,22,false);
- t2:SetScript(OE,function(self,event,...) Ts(t2,cd2,select(1,...),select(5,...),408,20) end);
- t3p="Interface\\Icons\\spell_shadow_nethercloak";t3=CF(F);TrS(t3,xb+44,yb,"cd3",t3p,22,false);
- t3:SetScript(OE,function(self,event,...) Ts(t3,cd3,select(1,...),select(5,...),31224,90) end);
- t4p="Interface\\Icons\\ability_rogue_combatreadiness";t4=CF(F);TrS(t4,xb+44,yb,"cd4",t4p,22,false);
- t4:SetScript(OE,function(self,event,...) Ts(t4,cd4,select(1,...),select(5,...),74001,90) end);
- t5p="Interface\\Icons\\ability_vanish";t5=CF(F);TrS(t5,xb+66,yb,"cd5",t5p,22,false);
- t5:SetScript(OE,function(self,event,...) Ts(t5,cd5,select(1,...),select(5,...),1856,120) end);
- t6p="Interface\\Icons\\ability_rogue_dismantle";t6=CF(F);TrS(t6,xb+88,yb,"cd6",t6p,22,false);
- t6:SetScript(OE,function(self,event,...) Ts(t6,cd6,select(1,...),select(5,...),51722,60) end);
- t7p="Interface\\Icons\\ability_rogue_shadowstep";t7=CF(F);TrS(t7,xb+110,yb,"cd7",t7p,22,false);
- t7:SetScript(OE,function(self,event,...) Ts(t7,cd7,select(1,...),select(5,...),36554,24) end);
- t8p="Interface\\Icons\\spell_shadow_mindsteal";t8=CF(F);TrS(t8,xb+132,yb,"cd8",t8p,22,false);
- t8:SetScript(OE,function(self,event,...) Ts(t8,cd8,select(1,...),select(5,...),2094,120) end);
- t9p="Interface\\Icons\\ability_rogue_smoke";t9=CF(F);TrS(t9,xb+154,yb,"cd9",t9p,22,false);
- t9:SetScript(OE,function(self,event,...) Ts(t9,cd9,select(1,...),select(5,...),76577,180) end);
- t10p="Interface\\Icons\\ability_rogue_preparation";t10=CF(F);TrS(t10,xb+176,yb,"cd10",t10p,22,false);
- t10:SetScript(OE,function(self,event,...) Ts(t10,cd10,select(1,...),select(5,...),14185,300) end);
-
- t11p="Interface\\Icons\\spell_shadow_deathscream";t11=CF(F);TrS(t11,xb,yb-30,"cd11",t11p,22,false);
- t11:SetScript(OE,function(self,event,...) Ts(t11,cd11,select(1,...),select(5,...),5484,32) end);
- t12p="Interface\\Icons\\spell_shadow_deathcoil";t12=CF(F);TrS(t12,xb+44,yb-30,"cd12",t12p,22,false);
- t12:SetScript(OE,function(self,event,...) Ts(t12,cd12,select(1,...),select(5,...),6789,90) end);
- t13p="Interface\\Icons\\spell_shadow_demoniccircleteleport";t13=CF(F);TrS(t13,xb+22,yb-30,"cd13",t13p,22,false);
- t13:SetScript(OE,function(self,event,...) Ts(t13,cd13,select(1,...),select(5,...),48020,25) end);
- t14p="Interface\\Icons\\spell_shadow_mindrot";t14=CF(F);TrS(t14,xb+66,yb-30,"cd14",t14p,22,false);
- t14:SetScript(OE,function(self,event,...) Ts(t14,cd14,select(1,...),select(5,...),19647,24) end);
-
- t15p="Interface\\Icons\\ability_mage_deepfreeze";t15=CF(F);TrS(t15,xb,yb-60,"cd15",t15p,22,false);
- t15:SetScript(OE,function(self,event,...) Ts(t15,cd15,select(1,...),select(5,...),44572,30) end);
- t16p="Interface\\Icons\\spell_frost_wizardmark";t16=CF(F);TrS(t16,xb+22,yb-60,"cd16",t16p,22,false);
- t16:SetScript(OE,function(self,event,...) Ts(t16,cd16,select(1,...),select(5,...),11958,480) end);
- t17p="Interface\\Icons\\spell_arcane_blink";t17=CF(F);TrS(t17,xb+44,yb-60,"cd17",t17p,22,false);
- t17:SetScript(OE,function(self,event,...) Ts(t17,cd17,select(1,...),select(5,...),1953,15) end);
- t59p="Interface\\Icons\\spell_frost_iceshock";t59=CF(F);TrS(t59,xb+66,yb-60,"cd59",t59p,22,false);
- t59:SetScript(OE,function(self,event,...) Ts(t59,cd59,select(1,...),select(5,...),2139,24) end);
-
- t18p="Interface\\Icons\\spell_shadow_soulleech_3";t18=CF(F);TrS(t18,xb,yb-90,"cd18",t18p,22,false);
- t18:SetScript(OE,function(self,event,...) Ts(t18,cd18,select(1,...),select(5,...),47476,120) end);
- t19p="Interface\\Icons\\spell_shadow_antimagicshell";t19=CF(F);TrS(t19,xb+22,yb-90,"cd19",t19p,22,false);
- t19:SetScript(OE,function(self,event,...) Ts(t19,cd19,select(1,...),select(5,...),48707,45) end);
- t20p="Interface\\Icons\\spell_deathknight_iceboundfortitude";t20=CF(F);TrS(t20,xb+44,yb-90,"cd20",t20p,22,false);
- t20:SetScript(OE,function(self,event,...) Ts(t20,cd20,select(1,...),select(5,...),48792,180) end);
- t21p="Interface\\Icons\\inv_sword_62";t21=CF(F);TrS(t21,xb+66,yb-90,"cd21",t21p,22,false);
- t21:SetScript(OE,function(self,event,...) Ts(t21,cd21,select(1,...),select(5,...),47568,300) end);
- t22p="Interface\\Icons\\spell_shadow_raisedead";t22=CF(F);TrS(t22,xb+88,yb-90,"cd22",t22p,22,false);
- t22:SetScript(OE,function(self,event,...) Ts(t22,cd22,select(1,...),select(5,...),49039,120) end);
- t23p="Interface\\Icons\\spell_deathknight_strangulate";t23=CF(F);TrS(t23,xb+110,yb-90,"cd23",t23p,22,false);
- t23:SetScript(OE,function(self,event,...) Ts(t23,cd23,select(1,...),select(5,...),49576,25) end);
- t24p="Interface\\Icons\\spell_deathknight_antimagiczone";t24=CF(F);TrS(t24,xb+132,yb-90,"cd24",t24p,22,false);
- t24:SetScript(OE,function(self,event,...) Ts(t24,cd24,select(1,...),select(5,...),51052,120) end);
- t25p="Interface\\Icons\\ability_deathknight_summongargoyle";t25=CF(F);TrS(t25,xb+154,yb-90,"cd25",t25p,22,false);
- t25:SetScript(OE,function(self,event,...) Ts(t25,cd25,select(1,...),select(5,...),49206,180) end);
-
- t26p="Interface\\Icons\\spell_shadow_psychicscream";t26=CF(F);TrS(t26,xb,yb-120,"cd26",t26p,22,false);
- t26:SetScript(OE,function(self,event,...) Ts(t26,cd26,select(1,...),select(5,...),8122,26) end);
- t27p="Interface\\Icons\\spell_shadow_psychicscream";t27=CF(F);TrS(t27,xb+22,yb-120,"cd27",t27p,22,false);
- t27:SetScript(OE,function(self,event,...) Ts(t27,cd27,select(1,...),select(5,...),8122,30) end);
- t28p="Interface\\Icons\\spell_frost_windwalkon";t28=CF(F);TrS(t28,xb+44,yb-120,"cd28",t28p,22,false);
- t28:SetScript(OE,function(self,event,...) Ts(t28,cd28,select(1,...),select(5,...),89485,45) end);
- t29p="Interface\\Icons\\spell_holy_painsupression";t29=CF(F);TrS(t29,xb+66,yb-120,"cd29",t29p,22,false);
- t29:SetScript(OE,function(self,event,...) Ts(t29,cd29,select(1,...),select(5,...),33206,180) end);
- t30p="Interface\\Icons\\spell_shadow_dispersion";t30=CF(F);TrS(t30,xb+88,yb-120,"cd30",t30p,22,false);
- t30:SetScript(OE,function(self,event,...) Ts(t30,cd30,select(1,...),select(5,...),47585,75) end);
- t31p="Interface\\Icons\\spell_shadow_psychichorrors";t31=CF(F);TrS(t31,xb+110,yb-120,"cd31",t31p,22,false);
- t31:SetScript(OE,function(self,event,...) Ts(t31,cd31,select(1,...),select(5,...),64044,90) end);
- t32p="Interface\\Icons\\ability_priest_silence";t32=CF(F);TrS(t32,xb+132,yb-120,"cd32",t32p,22,false);
- t32:SetScript(OE,function(self,event,...) Ts(t32,cd32,select(1,...),select(5,...),15487,45) end);
-
- t33p="Interface\\Icons\\spell_holy_sealofvalor";t33=CF(F);TrS(t33,xb,yb-150,"cd33",t33p,22,false);
- t33:SetScript(OE,function(self,event,...) Ts(t33,cd33,select(1,...),select(5,...),1044,25) end);
- t34p="Interface\\Icons\\spell_holy_sealofmight";t34=CF(F);TrS(t34,xb+22,yb-150,"cd34",t34p,22,false);
- t34:SetScript(OE,function(self,event,...) Ts(t34,cd34,select(1,...),select(5,...),853,40) end);
- t58p="Interface\\Icons\\spell_holy_sealofmight";t58=CF(F);TrS(t58,xb+44,yb-150,"cd58",t58p,22,false);
- t58:SetScript(OE,function(self,event,...) Ts(t58,cd58,select(1,...),select(5,...),853,60) end);
- t35p="Interface\\Icons\\spell_holy_sealofsacrifice";t35=CF(F);TrS(t35,xb+66,yb-150,"cd35",t35p,22,false);
- t35:SetScript(OE,function(self,event,...) Ts(t35,cd35,select(1,...),select(5,...),6940,90) end);
- t36p="Interface\\Icons\\spell_holy_sealofprotection";t36=CF(F);TrS(t36,xb+88,yb-150,"cd36",t36p,22,false);
- t36:SetScript(OE,function(self,event,...) Ts(t36,cd36,select(1,...),select(5,...),1022,180) end);
- t37p="Interface\\Icons\\spell_holy_divineshield";t37=CF(F);TrS(t37,xb+110,yb-150,"cd37",t37p,22,false);
- t37:SetScript(OE,function(self,event,...) Ts(t37,cd37,select(1,...),select(5,...),642,300) end);
- t38p="Interface\\Icons\\spell_holy_auramastery";t38=CF(F);TrS(t38,xb+132,yb-150,"cd38",t38p,22,false);
- t38:SetScript(OE,function(self,event,...) Ts(t38,cd38,select(1,...),select(5,...),31821,120) end);
-
- t39p="Interface\\Icons\\ability_warrior_charge";t39=CF(F);TrS(t39,xb,yb-180,"cd39",t39p,22,false);
- t39:SetScript(OE,function(self,event,...) Ts(t39,cd39,select(1,...),select(5,...),100,13) end);
- t40p="Interface\\Icons\\inv_mace_62";t40=CF(F);TrS(t40,xb+22,yb-180,"cd40",t40p,22,false);
- t40:SetScript(OE,function(self,event,...) Ts(t40,cd40,select(1,...),select(5,...),85388,45) end);
- t41p="Interface\\Icons\\ability_heroicleap";t41=CF(F);TrS(t41,xb+44,yb-180,"cd41",t41p,22,false);
- t41:SetScript(OE,function(self,event,...) Ts(t41,cd41,select(1,...),select(5,...),6544,60) end);
- t42p="Interface\\Icons\\spell_nature_ancestralguardian";t42=CF(F);TrS(t42,xb+66,yb-180,"cd42",t42p,22,false);
- t42:SetScript(OE,function(self,event,...) Ts(t42,cd42,select(1,...),select(5,...),18499,30) end);
- t43p="Interface\\Icons\\ability_criticalstrike";t43=CF(F);TrS(t43,xb+88,yb-180,"cd43",t43p,22,false);
- t43:SetScript(OE,function(self,event,...) Ts(t43,cd43,select(1,...),select(5,...),1719,300) end);
- t44p="Interface\\Icons\\ability_warrior_shieldwall";t44=CF(F);TrS(t44,xb+110,yb-180,"cd44",t44p,22,false);
- t44:SetScript(OE,function(self,event,...) Ts(t44,cd44,select(1,...),select(5,...),871,300) end);
-
- t45p="Interface\\Icons\\ability_hunter_pet_bear";t45=CF(F);TrS(t45,xb,yb-210,"cd45",t45p,22,false);
- t45:SetScript(OE,function(self,event,...) Ts(t45,cd45,select(1,...),select(5,...),16979,14) end);
- t46p="Interface\\Icons\\spell_druid_feralchargecat";t46=CF(F);TrS(t46,xb+22,yb-210,"cd46",t46p,22,false);
- t46:SetScript(OE,function(self,event,...) Ts(t46,cd46,select(1,...),select(5,...),49376,28) end);
- t47p="Interface\\Icons\\spell_nature_stoneclawtotem";t47=CF(F);TrS(t47,xb+44,yb-210,"cd47",t47p,22,false);
- t47:SetScript(OE,function(self,event,...) Ts(t47,cd47,select(1,...),select(5,...),22812,60) end);
- t48p="Interface\\Icons\\ability_druid_bash";t48=CF(F);TrS(t48,xb+66,yb-210,"cd48",t48p,22,false);
- t48:SetScript(OE,function(self,event,...) Ts(t48,cd48,select(1,...),select(5,...),5211,60) end);
- t49p="Interface\\Icons\\ability_druid_tigersroar";t49=CF(F);TrS(t49,xb+88,yb-210,"cd49",t49p,22,false);
- t49:SetScript(OE,function(self,event,...) Ts(t49,cd49,select(1,...),select(5,...),61336,180) end);
- t50p="Interface\\Icons\\ability_druid_berserk";t50=CF(F);TrS(t50,xb+110,yb-210,"cd50",t50p,22,false);
- t50:SetScript(OE,function(self,event,...) Ts(t50,cd50,select(1,...),select(5,...),50334,180) end);
-
- t51p="Interface\\Icons\\ability_golemstormbolt";t51=CF(F);TrS(t51,xb+88,yb-60,"cd51",t51p,22,false);
- t51:SetScript(OE,function(self,event,...) Ts(t51,cd51,select(1,...),select(5,...),19503,30) end);
- t52p="Interface\\Icons\\spell_frost_chainsofice";t52=CF(F);TrS(t52,xb+110,yb-60,"cd52",t52p,22,false);
- t52:SetScript(OE,function(self,event,...) Ts(t52,cd52,select(1,...),select(5,...),1499,30) end);
- t53p="Interface\\Icons\\ability_whirlwind";t53=CF(F);TrS(t53,xb+132,yb-60,"cd53",t53p,22,false);
- t53:SetScript(OE,function(self,event,...) Ts(t53,cd53,select(1,...),select(5,...),19263,120) end);
- t54p="Interface\\Icons\\ability_rogue_feint";t54=CF(F);TrS(t54,xb+154,yb-60,"cd54",t54p,22,false);
- t54:SetScript(OE,function(self,event,...) Ts(t54,cd54,select(1,...),select(5,...),781,16) end);
-
- t55p="Interface\\Icons\\spell_shaman_hex";t55=CF(F);TrS(t55,xb+88,yb-30,"cd55",t55p,22,false);
- t55:SetScript(OE,function(self,event,...) Ts(t55,cd55,select(1,...),select(5,...),51514,35) end);
- t56p="Interface\\Icons\\spell_shaman_spiritlink";t56=CF(F);TrS(t56,xb+110,yb-30,"cd56",t56p,22,false);
- t56:SetScript(OE,function(self,event,...) Ts(t56,cd56,select(1,...),select(5,...),98008,180) end);
- t57p="Interface\\Icons\\spell_nature_tremortotem";t57=CF(F);TrS(t57,xb+132,yb-30,"cd57",t57p,22,false);
- t57:SetScript(OE,function(self,event,...) Ts(t57,cd57,select(1,...),select(5,...),8143,60) end);
Теперь, чтобы переместить окно в нужное место, достаточно указать координаты первой иконки xb, yb.
Кому надо, могу скинуть вариант, где можно и размер иконок менять.
|