public static void Run() { var target = TargetSelector.GetTarget(Program.E.Range, TargetSelector.DamageType.Physical); var prediction = Program.E.GetPrediction(target); if (prediction.Hitchance >= HitChance.High) { var finalPosition = prediction.UnitPosition.Extend(ObjectManager.Player.Position, -400); if (finalPosition.IsWall()) { Program.E.CastOnUnit(target); return; } for (var i = 1; i < 400; i += 50) { var loc3 = prediction.UnitPosition.Extend(ObjectManager.Player.Position, -i); if (loc3.IsWall()) { if (CheckTargets.CheckTarget(target, Program.E.Range)) { Program.E.CastOnUnit(target); return; } } } } }
public static void Run() { var target = TargetSelector.GetTarget(Program.E.Range, TargetSelector.DamageType.Physical); var pushDistance = Program.emenu.Item("PushDistance").GetValue <Slider>().CurrentValue; var Prediction = Program.E.GetPrediction(target); var endPosition = Prediction.UnitPosition.Extend (ObjectManager.Player.ServerPosition, -pushDistance); if (Prediction.Hitchance >= HitChance.VeryHigh) { if (endPosition.IsWall()) { var condemnRectangle = new Geometry.Polygon.Rectangle(target.ServerPosition.To2D(), endPosition.To2D(), target.BoundingRadius); if ( condemnRectangle.Points.Count( point => NavMesh.GetCollisionFlags(point.X, point.Y) .HasFlag(CollisionFlags.Wall)) >= condemnRectangle.Points.Count * (20 / 100f)) { if (CheckTargets.CheckTarget(target, Program.E.Range)) { Program.E.CastOnUnit(target); } } } else { var step = pushDistance / 5f; for (float i = 0; i < pushDistance; i += step) { var endPositionEx = Prediction.UnitPosition.Extend(ObjectManager.Player.ServerPosition, -i); if (endPositionEx.IsWall()) { var condemnRectangle = new Geometry.Polygon.Rectangle(target.ServerPosition.To2D(), endPosition.To2D(), target.BoundingRadius); if ( condemnRectangle.Points.Count( point => NavMesh.GetCollisionFlags(point.X, point.Y) .HasFlag(CollisionFlags.Wall)) >= condemnRectangle.Points.Count * (20 / 100f)) { if (CheckTargets.CheckTarget(target, Program.E.Range)) { Program.E.CastOnUnit(target); } } return; } } } } }
public static void Run() { var target = TargetSelector.GetTarget(Program.E.Range, TargetSelector.DamageType.Physical); for (var i = 1; i < 8; i++) { var targetBehind = target.Position + Vector3.Normalize(target.ServerPosition - ObjectManager.Player.Position) * i * 50; if (targetBehind.IsWall() && target.IsValidTarget(Program.E.Range)) { if (CheckTargets.CheckTarget(target, Program.E.Range)) { Program.E.CastOnUnit(target); return; } } } }
public static void Run() { var target = TargetSelector.GetTarget(Program.E.Range, TargetSelector.DamageType.Physical); var EPred = Program.E.GetPrediction(target); var PD = Program.emenu.Item("PushDistance").GetValue <Slider>().Value; var PP = EPred.UnitPosition.Extend(ObjectManager.Player.Position, -PD); for (int i = 1; i < PD; i += (int)target.BoundingRadius) { var VL = EPred.UnitPosition.Extend(ObjectManager.Player.Position, -i); var J4 = ObjectManager.Get <Obj_AI_Base>() .Any(f => f.Distance(PP) <= target.BoundingRadius && f.Name.ToLower() == "beacon"); var CF = NavMesh.GetCollisionFlags(VL); if (CF.HasFlag(CollisionFlags.Wall) || CF.HasFlag(CollisionFlags.Building) || J4) { if (CheckTargets.CheckTarget(target, Program.E.Range)) { Program.E.CastOnUnit(target); return; } } } }