Sorry, I read your post to quickly, use code like:
wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) =>
{
var me = wManager.Wow.ObjectManager.ObjectManager.Me;
if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause &&
unit.IsValid &&
!me.IsCast &&
unit.IsGoodInteractDistance) // put here your conditions to running backwards
{
var p = robotManager.Helpful.Math.GetPosition2DOfAngleAndDistance(me.Position, robotManager.Helpful.Math.GetAngle(unit.Position, me.Position), wManager.Wow.Helpers.CustomClass.GetRange - unit.GetDistance - 3);
var z = wManager.Wow.Helpers.PathFinder.GetZPosition(p);
if (z != 0)
{
p.Z = z;
wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p, 3.5f, true, context => (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause));
}
}
};