Thread Tools Display Modes
01-05-16, 05:02 PM   #1
EvilMaddness
An Aku'mai Servant
 
EvilMaddness's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 33
Trying to get this code to work for Casade CD

Hey Everyone I have this code that will change the color on a bar in weakauras for a cooldown depending where you set the warning time at. I was able to get this code working for Mind Blast, SW: D, & Shadowfiend
so far but for some reason it will not work for Cascade. There are also a few other spells I can't get it to work with yet like Vampiric Embrace, or Desperate Prayer. Anyone know how to get it to work for Cascade for now? If you can get it to work for the other spells I posted here that would be awesome and save me a lot of time of trying to figure out how it works.

Lua Code:
  1. function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
  2.     local start, duration, enable = GetSpellCooldown ("Mind Blast")
  3.     local warning_time = 3
  4.     local progress = start + duration - GetTime()
  5.     if start>0 then
  6.         if progress < warning_time then
  7.             return r2, g2, b2, a2
  8.         end
  9.     end
  10.     return r1,g1,b1, a1
  11. end

So here's the code that's works for Mind Blast as is but won't work for Cascade after changing the spell name.
__________________
The Maddness Within lua

Last edited by EvilMaddness : 01-05-16 at 05:04 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Trying to get this code to work for Casade CD


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