Thread Tools Display Modes
02-18-11, 02:56 AM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
Vars Scripted, ColorVar

Let's start out with the assumption I already have 4 static colors:

Color Static: Black
Color Static: LightYellow
Color Static: Yellow
Color Static: DarkYellow

Then we define a condition:

Code:
  local holypower
  if UnitAura(uid, GetSpellInfo(86172)) then holypower = UnitPower(uid,9)+3;
  else holypower = UnitPower(uid,9);
  end
Now I want to know how I make the condition and colors I want to all add in. S_S

When holypower = 0, I want it to point to my Color Static: Black.
When holypower = 1, I want it to point to my Color Static: LightYellow
When holypower = 1, I want it to point to my Color Static: Yellow
When holypower = 3 or more, I want it to point to my Color Static: DarkYellow

CAN'T FIGURE OUT HOW TO DO THIS WITH VARS SCRIPETD, ARGH. D:<
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 02-18-11 at 03:16 AM.
  Reply With Quote
02-18-11, 05:50 AM   #2
Cripsii
A Black Drake
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 82
Easy

I've create a sample code (recovery) with simple texture custom and texture colorizer who change color depending the number of HolyPower you have.

For 0 HolyPower => Texture go Black
For 1 HolyPower => Texture go LightYellow
For 2 HolyPower => Texture go Yellow
For 3 HolyPower => Texture go DarkYellow.

See the recovery for know how to use Vars: Scripted => ColorVar

But I don't know Why you want define the Divine Purpose Condition. In Your explication, There should be a fifth condition for Divine Purpose proc and add another static color..
For ma part it's not helpful. The Color is set by Holypower count and with the proc you have 3 HP and after use HP you have 3 HP, the color don't change.

If you want to show the DP proc use another way. AuraInfo + conditionnal color

Enjoy
Attached Files
File Type: lua RDX_recovery.lua (2.9 KB, 649 views)

Last edited by Cripsii : 02-18-11 at 05:56 AM.
  Reply With Quote
02-18-11, 02:43 PM   #3
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
Thanks a lot for the script, I couldn't have imagined that it would be so simple, and it tells me a lot about how that works.

I gave those colors as an example for something I wanted to do custom and you did it perfectly!

Code:
function SetC()
  local holy
   if UnitAura(uid, GetSpellInfo(90174)) then holy = UnitPower(uid,9)+3;
   else holy = UnitPower(uid,9);
  end
  
  if (holy == 1) then
    return LightYellow;
  elseif (holy == 2) then
    return Yellow;
  elseif (holy >= 3) then
    return DarkYellow;
  else 
    return Black;
  end;
  
end;

varcolor1 = SetC();
I mean, I already have the Wow default powerauras showing, this just makes it cleaner to me to show divine purpose as well. I may try to make an animation instead to signify when I have divinepurpose, however.

edit: to clairify a little, Divine Purpose does not give me 3 HP, it acts as 3HP but it isn't technically our actual resource, it's a buff that signifies we can use 3HP abilities without a cost, while actually having 3HP on our resource bar is when we have it.


Atleast that's how it seems to be for me. O_O
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 02-18-11 at 05:10 PM.
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » Vars Scripted, ColorVar


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