10/31/09, 10:31 AM
|
#1
|
|
the staleness of Max's dumps
Vykromond
Tauren Druid
No WoW Account
|
Infraction for Mandragora10: 2. All opinions should be stated as succinctly as possible.
Post: Mage UI and Add-ons (READ THE FIRST POST)
User: Mandragora10
Infraction: 2. All opinions should be stated as succinctly as possible.
Points: 1
Administrative Note:
Message to User:
|
Don't quote a huge block of text and add 1 line, snip the quote.
|
Original Post:


Originally Posted by kaytwo
I wrote a LuaText for this a couple months ago that I always kept forgetting to post about. Here's the edit:
local max = MaxPower(unit)
local evostart, evocd, _ = GetSpellCooldown("Evocation")
local gemstart, gemcd, _ = GetItemCooldown("Mana Sapphire")
local cr,cg,cb = 255,255,255
if UnitClass(unit) ~= "Mage" then
return "%s/%s",Power(unit),max
end
if max - Power(unit) > 3500 then
if gemstart > 0.0 and gemcd > 0.0 then
cr,cg,cb = 0,127,0
else
cr,cg,cb = 0,255,0
end
end
if Power(unit) / max < .4 then
if gemcd == 0 and gemstart == 0 then
cr,cg,cb = 0,255,0
elseif evostart > 0 and evocd > 1.5 then
cr,cg,cb = 255,0,0
else
cr,cg,cb = 255,255,0
end
end
if max > 0 then
return "|cff%02x%02x%02x%s|r/%s",cr,cg,cb,Power(unit),max
end
This LuaText changes the color of my current/available mana text, rather than the bar itself: I found this to be sufficient for being able to gauge my mana situation at a glance. If you aren't playing a mage this won't interfere with your MP text coloring.
Between Full and (Full - 3500), the text is white: no regen needed.
Between (Full - 3500) and 0, the text is bright green if mana gem is not on CD.
Between (Full - 3500) and 40%, the text is dark green if mana gem is on CD.
Between 40% and 0%, the text is yellow if evocation is not on CD, and red if both evocation and mana gem are on CD.
|
This code seems to be nice, but how to use it ?
|
|
|
|
|
|