tuanha
Well-Known Member
- Joined
- Nov 29, 2011
- Messages
- 6,998
- Reaction score
- 124
Currently, my code look like this
The code will scan all friendly player 15y around ME and if 2 or more player be dispelled, the bot will cast mass dispell on My location.
Is there a Improved Mass Dispel Code that scan for the BEST location to drop Mass Dispell (dispel as much as possible by 1 cast)
Thank you.
#region MassDispelFriendlyComp
private int MassDispelCount()
{
using (new FrameLock())
{
int count = 0;
foreach (WoWPlayer p in NearbyFriendlyPlayers)
{
if (CheckTarget(p, 15) && CountDebuffMagic(p) >= 1)
{
count++;
}
}
return count;
}
}
public Composite MassDispelFriendlyComp()
{
return new PrioritySelector(
new Decorator(ret => Mass_Dispel(Me) && MassDispelCount() >= 2 && Me.ManaPercent >= ManaForDispel,
new Wait(2, ret => GCDL() <= LagTolerance,
new Action(delegate
{
if (Mass_Dispel(Me))
{
if (Me.IsCasting)
{
SpellManager.StopCasting();
}
if (Me.IsMoving)
{
WoWMovement.MoveStop();
}
CastSpell("Mass Dispel", Me);
LegacySpellManager.ClickRemoteLocation(Me.Location);
return RunStatus.Success;
}
else
{
return RunStatus.Failure;
}
})))
);
}
#endregion
The code will scan all friendly player 15y around ME and if 2 or more player be dispelled, the bot will cast mass dispell on My location.
Is there a Improved Mass Dispel Code that scan for the BEST location to drop Mass Dispell (dispel as much as possible by 1 cast)
Thank you.