이름표위에 쿨체크

1. [스킬아이디]=쿨타임 식으로 추가히시면됩니다.

/run COOLDOWN_MAP={[49039]=120,[48707]=45,[48792]=180,[33891]=180,[61336]=180,[50334]=180,[19263]=120,[45438]=300,[633]=420,[1022]=180,[642]=300,[8122]=23,[47585]=75,[33206]=180,[19236]=120,[31224]=70,[1856]=120,[1044]=22};cooldown={};

 

2.

/run function isHarm(sFlags)return bit.band(sFlags, COMBATLOG_OBJECT_REACTION_HOSTILE)end;function isSpellCast(etType) return eType=="SPELL_CAST_SUCCESS"or eType=="SPELL_AURA_APPLIED"or eType=="SPELL_MISSED"or etType=="SPELL_SUMMON";end

 

3.

/run function StartCool(name,spellID,size,x,y)if not cooldown[name]then cooldown[name]={}end;if not cooldown[name][spellID]then cooldown[name][spellID]=mCool(spellID..name,spellID,size,x,y);end;ActCooldown(spellID..name,COOLDOWN_MAP[spellID])NPlate()end

4.

/run function NPlate()for i=1,WorldFrame:GetNumChildren()do frame=select(i,WorldFrame:GetChildren())if(frame:GetName():find("Plate")and frame:IsVisible())then frame:HookScript('OnShow',pPlate)frame:HookScript('OnHide',hPlate)pPlate(frame)end;end;end

 

5.

/run function pPlate(s)local n=strmatch(select(4,s:GetRegions()):GetText(),"[%P]+")if(cooldown[n])then local x=0;for _,frame in pairs(cooldown[n])do frame:SetPoint("BOTTOMLEFT",s,"TOPLEFT",x,-5)x=x+30;frame:Show()frame.c:Show()end;end;end

 

6.

/run function hPlate(s) local n=strmatch(select(4,s:GetRegions()):GetText(),"[%P]+")if(cooldown[n])then for id,frame in pairs(cooldown[n])do frame:Hide()frame.c:Hide()end;end;end;

 

7.

/run function cSkill(self,e,...)if(e==e6)then _,eType,_,_,sName,sFlags,_,_,_,_,_,spellID,_,_,_=...;if(isHarm(sFlags)~=0 and isSpellCast(eType)and COOLDOWN_MAP[spellID])then sName=strmatch(sName,"[%P]+")StartCool(sName,spellID,30,0,1000)end;else end;end

 

8.

/run function dCooldown() for name,table in pairs(cooldown)do for id,frame in pairs(table)do frame:Hide()frame.c:Hide()_G[id..name]=nil;end;end;cooldown={}end

 

9.

/run f=CreateFrame("frame");f:SetAllPoints();e3="ARENA_OPPONENT_UPDATE";e6="COMBAT_LOG_EVENT_UNFILTERED"
/script f:SetScript("OnEvent", cSkill)f:RegisterEvent(e6)

 

 

아군 쿨체크

 

1.[스킬아이디]=쿨타임 식으로 적어주심되요 cx는 센터로부터 시작하는 CX좌표를잡아줍니다.

/run COOLDOWN_MAPS={[49576]=25};x=200;cooldown={};cx=-80;

 

2.

/run function StartCools(name,spellID)if not cooldown[name]then cooldown[name]={}end;if not cooldown[name][spellID]then cooldown[name][spellID]=mCool(spellID..name,spellID,40,cx,260)cx=cx+50;end;ActCooldown(spellID..name,COOLDOWN_MAPS[spellID])end

 

3.

/run function cSkills(self,e,...)if(e==e6)then _,eType,_,_,sName,sFlags,_,_,_,_,_,spellID,_,_,_=...;if(isHarm(sFlags)==0 and isSpellCast(eType)and COOLDOWN_MAPS[spellID])then StartCools(sName,spellID)end;else dCooldown()end;end

 

4.

/run function isHarm(sFlags)return bit.band(sFlags, COMBATLOG_OBJECT_REACTION_HOSTILE)end;function isSpellCast(etType) return eType=="SPELL_CAST_SUCCESS"or eType=="SPELL_AURA_APPLIED"or eType=="SPELL_MISSED"or etType=="SPELL_SUMMON";end

 

5.

 

/run f=CreateFrame("frame");f:SetAllPoints();e3="ARENA_OPPONENT_UPDATE";e6="COMBAT_LOG_EVENT_UNFILTERED"
/script f:SetScript("OnEvent", cSkills)f:RegisterEvent(e6)f:RegisterEvent(e3);

 

 

==========================================================================================