What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

heal if more then one person needs healing

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.

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.
 
Back
Top