Thread Tools Display Modes
03-15-06, 09:42 AM   #1
pqee
A Fallenroot Satyr
Join Date: Mar 2005
Posts: 28
Send time left on cooldown to chat channel?

Is there any way to set a button so if it's in the middle of a cooldown and I click it, it will send a message to a channel indicating how much time is left?
  Reply With Quote
03-20-06, 10:23 AM   #2
pqee
A Fallenroot Satyr
Join Date: Mar 2005
Posts: 28
I'm a noob for scripting but think I figured out how it can be done with a floater.

On_click:
tempCD = CooldownRemaining("InserSpellIDHere");
If tempCD > 0 then
SmarChat("Spell cooldown at: " .. tempCD .. "s",TRUE);
End


For a bar though I'm not sure how to get the ID of the button that was clicked (assuming the code above actually works).
  Reply With Quote
03-20-06, 03:46 PM   #3
Lozareth
An Onyxian Warder
 
Lozareth's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 366
Don't capitalize If and End and TRUE. Use local tempCD instead of just tempCD so that it's not a global. Can all fit in a macro too:

/script local c=DMF_CR(action ID or "Action Name"); if c>0 then SendChatMessage("Spell cooldown at: "..c.."s", "SAY"); end
__________________
High Pope of the Divine Chihuahua
http://www.discordmods.com
  Reply With Quote
03-20-06, 07:06 PM   #4
pqee
A Fallenroot Satyr
Join Date: Mar 2005
Posts: 28
Well it's good to know I had the structure right. Thanks for clearing up the syntax for me and if I can do it in a Macro it'll be even easier.

Thanks!
  Reply With Quote
04-19-06, 07:47 PM   #5
Arkillion
A Kobold Labourer
Join Date: Apr 2006
Posts: 1
I am trying to use this cooldown counter to do something for me. When I click on the button I want it to either cast power infusion on my target and tell them or if it has a cooldown tell my target how many seconds are left. I don't know too much about scripting but I came up with this and it creates an error message.

/script c=DMF_CR("Power Infusion"); if c>0 then SendChatMessage("Spell cooldown at: "..c.."s", "WHISPER", UnitName("target")); else CastSpellByName("Power Infusion"); SendChatMessage("you have power infusion", "WHISPER", "UnitName("target")); end

any help is appreciated
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » Send time left on cooldown to chat channel?


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