Thread Tools Display Modes
02-10-15, 09:46 PM   #1
wallst
A Murloc Raider
Join Date: Feb 2015
Posts: 5
ICD Tracking script

Hi, help modify this script. Need hide icon frame when cd timer expired
Lua Code:
  1. local t=CreateFrame("FRAME")
  2. t:SetPoint("RIGHT",TargetFrame,12,12)
  3. t:SetSize(30,30)
  4. t.c=CreateFrame("Cooldown","cd1")
  5. t.c:SetAllPoints(t)
  6. t.t=t:CreateTexture(nil,"BORDER")
  7. t.t:SetAllPoints()
  8. t.t:SetTexture("Interface\\Icons\\spell_holy_divinepurpose")
  9. t:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  10. t:Hide()
  11.  
  12. t:SetScript("OnEvent", function(...)
  13. local b,_,_,e,_,_,_,_,_,_,l = select(4, ...)
  14. if (e == UnitName("Player") and (b=="SPELL_AURA_REMOVED")and l==126705)
  15. then t:Show() CooldownFrame_SetTimer(cd1,GetTime(),45,1)
  16. return
  17. end
  18. end)
  Reply With Quote
02-11-15, 09:51 PM   #2
sticklord
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 57
Try this:
Lua Code:
  1. local t=CreateFrame("FRAME")
  2. t:SetPoint("RIGHT",TargetFrame,12,12)
  3. t:SetSize(30,30)
  4. t.c=CreateFrame("Cooldown","cd1")
  5. t.c:SetAllPoints(t)
  6. t.t=t:CreateTexture(nil,"BORDER")
  7. t.t:SetAllPoints()
  8. t.t:SetTexture("Interface\\Icons\\spell_holy_divinepurpose")
  9. t:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  10. t:Hide()
  11.  
  12. t:SetScript("OnEvent", function(...)
  13. local b,_,_,e,_,_,_,_,_,_,l = select(4, ...)
  14. if (e == UnitName("Player") and (b=="SPELL_AURA_REMOVED")and l==126705)
  15. then t:Show() CooldownFrame_SetTimer(cd1,GetTime(),45,1)
  16. C_Timer.After(45, function() t:Hide() end)
  17. return
  18. end
  19. end)
  Reply With Quote
02-12-15, 02:16 PM   #3
wallst
A Murloc Raider
Join Date: Feb 2015
Posts: 5
sticklord thanks!
  Reply With Quote
02-26-15, 10:12 AM   #4
wallst
A Murloc Raider
Join Date: Feb 2015
Posts: 5
This script don't work after 6.1 patch. What happened ?
  Reply With Quote
02-26-15, 05:14 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
What, exactly, "doesn't work"?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-27-15, 05:22 PM   #6
wallst
A Murloc Raider
Join Date: Feb 2015
Posts: 5
Originally Posted by Seerah View Post
What, exactly, "doesn't work"?
Lua Code:
  1. then t:Show() CooldownFrame_SetTimer(cd1,GetTime(),45,1)
  2. C_Timer.After(45, function() t:Hide() end)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » ICD Tracking script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off