Its not, but when right clicking any where, hero start moving to the target, instead moving to the right clicked place..face() shouldnt move him, you should make sure theres no other code actually moving you.
Please, can u give me some example, how i can use this?use IsSafetlyFacing, you'll understand the difference when you see it... it's a lot better and doesn't make you look like a bot compared to .Face().
// Move closer to the target if we are too far away or in !Los
new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && Navigator.CanNavigateFully(Me.Location, Me.CurrentTarget.Location) && (Me.CurrentTarget.Distance > PullDistance - 1 || !Me.CurrentTarget.InLineOfSight || !Me.InLineOfSpellSight),
new Action(delegate
{
Log("Moving towards:{0}", Me.CurrentTarget);
Navigator.MoveTo(Me.CurrentTarget.Location);
return RunStatus.Success;
})),
// Stop moving if we are moving
new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.IsMoving,
new Action(ret => WoWMovement.MoveStop())),
new Decorator(
ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && !Me.IsFacing(Me.CurrentTarget),
new Action(ret => WoWMovement.Face())
),
then your code is off, it shouldnt be doing both, moving to and facing at the same time, you need to code it so it hits one, then it hits the other, moving to should be the first code it hits, then returns, so it moves to, then faces.
heres an example of how its done in amplify
the runstatus.success tells it if it was successfull, go back to the root of the tree, so while we arent in range of the target, then its not going to proceed any further in the tree. then the last thing we check is if we have a target and if im facing him, if not then send a face.Code:// Move closer to the target if we are too far away or in !Los new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && Navigator.CanNavigateFully(Me.Location, Me.CurrentTarget.Location) && (Me.CurrentTarget.Distance > PullDistance - 1 || !Me.CurrentTarget.InLineOfSight || !Me.InLineOfSpellSight), new Action(delegate { Log("Moving towards:{0}", Me.CurrentTarget); Navigator.MoveTo(Me.CurrentTarget.Location); return RunStatus.Success; })), // Stop moving if we are moving new Decorator(ret => !AmplifySettings.Instance.MoveDisable && Me.IsMoving, new Action(ret => WoWMovement.MoveStop())), new Decorator( ret => !AmplifySettings.Instance.MoveDisable && Me.GotTarget && !Me.IsFacing(Me.CurrentTarget), new Action(ret => WoWMovement.Face()) ),
make sense?
WoWPlayer unit = ObjectManager.GetObjectsOfType<WoWPlayer>(false, false).
Where(p => p.IsHostile && !p.IsTotem && !p.IsPet && !p.Dead && p.DistanceSqr <= (10 * 10)).
OrderBy(u => u.HealthPercent).FirstOrDefault();
if (unit == null)
{
unit = ObjectManager.GetObjectsOfType<WoWPlayer>(false, false).
Where(p => p.IsHostile && !p.IsTotem && !p.IsPet && !p.Dead && p.DistanceSqr <= (35 * 35)).
OrderBy(u => u.DistanceSqr).FirstOrDefault();
}
if (unit != null)
{
TargetUnit(unit);
Move(unit.Location);
}






