01-15-11, 03:09 PM   #1
unlimit
Lookin' Good

Join Date: Aug 2008
Posts: 484
Word of Glory Predicted Health

So I made a Word of Glory predicted health feature (Thanks Crispii for the code!), only to realize after using it for the night that WoG has a coefficient with SpellPower and AttackPower (hurpdurp?). So, now I'm wondering if there's anyway to directly call to that spell and find out the exact amount, since it doesn't change unless there is a change in spellpower/attackpower?

Or maybe I'm thinking about it the wrong way.

Here's what I have so far:

Code:
```function FracHealthWOG()
local hpa = 2678
local pta = UnitPower(uid, 9);
local a = (UnitHealth(uid)+(hpa*pta));
local b = UnitHealthMax(uid);
if(b<1) then return 0; end
a=a/b;
if a<0 then
return 0;
elseif a>1 then
return 1;
else
return a;
end
end
wog = FracHealthWOG();```
Also, would there be an easy way to automatically change PTA, which is either 1,2,3 (holy power) to 3 when Hand of Light (my mastery buff) pops up?

Thanks!
__________________

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

01-15-11, 05:31 PM   #2
unlimit
Lookin' Good

Join Date: Aug 2008
Posts: 484
Answered my question regarding hand of light:

Code:
```function FracHealthWOG()
local hpa = 2678
local hol = GetSpellInfo(76672)
local pta
if UnitAura(uid, hol) then
pta = 3;
else
pta = UnitPower(uid,9);
end
local a = (UnitHealth(uid)+(hpa*pta));
local b = UnitHealthMax(uid);
if(b<1) then return 0; end
a=a/b;
if a<0 then
return 0;
elseif a>1 then
return 1;
else
return a;
end
end
wog = FracHealthWOG();```
__________________

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

01-15-11, 07:31 PM   #3
Cripsii
A Black Drake
Join Date: Nov 2008
Posts: 82
WHat is hpa?

01-15-11, 07:47 PM   #4
unlimit
Lookin' Good

Join Date: Aug 2008
Posts: 484
HPA = healing point amount, meaning how much Word of Glory hits for, although I want to change it to automatically update based on when WoG updates, I want to be able to automatically find out how much WoG heals for, like is there an API function for that or something? S_S
__________________

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

01-15-11, 10:17 PM   #5
Cripsii
A Black Drake
Join Date: Nov 2008
Posts: 82
For WOG:

In RET and PROT Spec:

WoG Heal = 2133 + (0.209*Spellpower)
The 2133 constant is the median of WoG base heal

In HOLY Spec:

You must add a Variable: K
K = Divinity * Conviction * (1 + Seal of Insight + Walk in Light)
=> K = 1.06 * 1.09 * (1 + 0.05 + 0.15 )

WoG Heal (Holy spec) = K * (2133 + (0.209*Spellpower))

With that you can easily get the heal of WoG:

For a Holypala :
Heal = (1.06*1.09*(1+0.05+0.15))*(2133 + (0.209*SP))

You can check the conviction buff and all other aura in the formula for better view. You also you can Get The SP var with GetSpellBonusHealing() API.

edit: If Wog is Glyphed just multiply by 1.1 => FinalHealForCustomHolyPala = 1.1*Heal
Enjoy !

Cheer !

Last edited by Cripsii : 01-15-11 at 10:22 PM.

01-15-11, 10:32 PM   #6
unlimit
Lookin' Good

Join Date: Aug 2008
Posts: 484
Thank you Crispii! That is a thousand times more accurate already.

I believe word of glory also does a percentage based on attackpower too, though, or am I incorrect?
__________________

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

Last edited by unlimit : 01-15-11 at 10:46 PM.

01-15-11, 11:09 PM   #7
unlimit
Lookin' Good

Join Date: Aug 2008
Posts: 484
Yep, it definitely takes a bit from AP, about 19.8%.

Final code here and perfectly accurate! Thanks a lot Crispii for your help and the original code! =D

Code:
```function FracHealthWOG()
local heal = 2133+(0.209*GetSpellBonusHealing()+0.198*UnitAttackPower(uid));
local holypower
if UnitAura(uid, GetSpellInfo(76672)) then holypower = UnitPower(uid,9)+3;
else holypower = UnitPower(uid,9);
end
local a = (UnitHealth(uid)+(heal*holypower));
local b = UnitHealthMax(uid);
if(b<1) then return 0; end
a=a/b;
if a<0 then
return 0;
elseif a>1 then
return 1;
else
return a;
end
end
wog = FracHealthWOG();```
__________________

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

Last edited by unlimit : 01-17-11 at 03:28 AM.

 WoWInterface » Word of Glory Predicted Health

 Thread Tools Display Modes Linear Mode

 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