Originally Posted by SDPhantom
This is just raw Lua code you can run to accomplish this.
Lua Code:
hooksecurefunc("UnitFrameHealthBar_Update",function(bar,unit) if bar and not bar.lockValues then local cur,_,max=bar:GetValue,bar:GetMinMaxValues(); local r,g,b=1,0,0;-- Default red for both bar and text if cur/max>0.3 then r,g,b=0,1,0; end-- Green bar if >30% if not bar.disconnected and not bar.lockColor then bar:SetStatusBarColor(r,g,b); end if cur/max>0.3 or bar.isZero then r,g,b=1,1,1; end-- White text if dead or >30% if bar.TextString then bar.TextString:SetTextColor(r,g,b); end if bar.LeftText then bar.LeftText:SetTextColor(r,g,b); end if bar.RightText then bar.RightText:SetTextColor(r,g,b); end end end);
That's pretty much how mine looks all the time. I still use the default UI with Frankenstein bits and pieces of code I added. ![Big Grin](//cdn-wow.mmoui.com/images/style_mmoi_wowi2/smilies/biggrin.gif)
|
Hey thanks for this! I appreciate it. However, in all of my noobity, I'm not completely sure how to use it. I tried sticking the code into a custom LUA box for text in stuf but nothing comes up, and I just am not sure where to put it for the bar. Do you think you could give me a little step-by-step?
Sorry! Thanks a lot. And yee frankenstein o/