Ama
New Member
- Joined
- Jun 6, 2011
- Messages
- 1,171
- Reaction score
- 33
You have changed up your code a lot from the previous HazzDruid. This is an easy fix though. As stated earlier, you need a counter.
Then you need to add the count condition in Tranquility(). This is a good place to do it...
I just put Change 30 to your HealthPercent you want and 3 to the minimum number you want.
PHP:
private int TranqCount (int hp)
{
int count = 0;
foreach (WoWPlayer p in ObjectManager.GetObjectsOfType<WoWPlayer>(true, true))
{
if (p.IsInMyPartyOrRaid
&& p.IsAlive
&& p.Distance < 40
&& p.HealthPercent <= hp)
{
count++;
}
}
return count;
}
Then you need to add the count condition in Tranquility(). This is a good place to do it...
PHP:
if (tar.Distance > 40 || !tar.InLineOfSight || TranqCount(30)< 3)
{
return true;
}
I just put Change 30 to your HealthPercent you want and 3 to the minimum number you want.