private Vector3 GetAggressiveTumblePos(EloBuddy.Obj_AI_Base target) { var cursorPos = EloBuddy.Game.CursorPos; if (!IsDangerousPosition(cursorPos)) { return(cursorPos); } //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ ) if (!target.IsMelee && EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1) { return(cursorPos); } var aRC = new Challenger_Series.Utils.Geometry.Circle(EloBuddy.ObjectManager.Player.ServerPosition.ToVector2(), 300).ToPolygon().ToClipperPath(); var targetPosition = target.ServerPosition; foreach (var p in aRC) { var v3 = new Vector2(p.X, p.Y).ToVector3(); var dist = v3.Distance(targetPosition); if (dist > 325 && dist < 450) { return(v3); } } return(Vector3.Zero); }
private Vector3 GetTumblePos(EloBuddy.Obj_AI_Base target) { if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { return(GetAggressiveTumblePos(target)); } var cursorPos = EloBuddy.Game.CursorPos; var targetCrowdControl = from tuplet in CachedCrowdControl where tuplet.Item1 == target.CharData.BaseSkinName select tuplet.Item2; if (!IsDangerousPosition(cursorPos) && !(targetCrowdControl.FirstOrDefault() != null && targetCrowdControl.Any( crowdControlEntry => target.Spellbook.GetSpell(crowdControlEntry.Slot).IsReady()))) { return(cursorPos); } //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ ) if (!target.IsMelee && EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1) { return(cursorPos); } var targetWaypoints = LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(target); if (targetWaypoints[targetWaypoints.Count - 1].Distance(EloBuddy.ObjectManager.Player.ServerPosition) > 550) { return(Vector3.Zero); } var aRC = new Challenger_Series.Utils.Geometry.Circle(EloBuddy.ObjectManager.Player.ServerPosition.ToVector2(), 300).ToPolygon().ToClipperPath(); var targetPosition = target.ServerPosition; var pList = (from p in aRC select new Vector2(p.X, p.Y).ToVector3() into v3 let dist = v3.Distance(targetPosition) where !IsDangerousPosition(v3) && dist < 500 select v3).ToList(); if (EloBuddy.ObjectManager.Player.UnderTurret() || EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1 || cursorPos.CountEnemyHeroesInRange(450) <= 1) { return(pList.Count > 1 ? pList.OrderBy(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero); } return(pList.Count > 1 ? pList.OrderByDescending(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero); }
private Vector3 GetTumblePos(EloBuddy.Obj_AI_Base target) { if (Orbwalker.ActiveMode != LSOrbwalker.OrbwalkingMode.Combo) return GetAggressiveTumblePos(target); var cursorPos = EloBuddy.Game.CursorPos; var targetCrowdControl = from tuplet in CachedCrowdControl where tuplet.Item1 == target.CharData.BaseSkinName select tuplet.Item2; if (!IsDangerousPosition(cursorPos) && !(targetCrowdControl.FirstOrDefault() != null && targetCrowdControl.Any( crowdControlEntry => target.Spellbook.GetSpell(crowdControlEntry.Slot).IsReady()))) return cursorPos; //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ ) if (!target.IsMelee && EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1) return cursorPos; var targetWaypoints = LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(target); if (targetWaypoints[targetWaypoints.Count - 1].Distance(EloBuddy.ObjectManager.Player.ServerPosition) > 550) return Vector3.Zero; var aRC = new Challenger_Series.Utils.Geometry.Circle(EloBuddy.ObjectManager.Player.ServerPosition.ToVector2(), 300).ToPolygon().ToClipperPath(); var targetPosition = target.ServerPosition; var pList = (from p in aRC select new Vector2(p.X, p.Y).ToVector3() into v3 let dist = v3.Distance(targetPosition) where !IsDangerousPosition(v3) && dist < 500 select v3).ToList(); if (EloBuddy.ObjectManager.Player.UnderTurret() || EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1 || cursorPos.CountEnemyHeroesInRange(450) <= 1) { return pList.Count > 1 ? pList.OrderBy(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero; } return pList.Count > 1 ? pList.OrderByDescending(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero; }
private Vector3 GetAggressiveTumblePos(EloBuddy.Obj_AI_Base target) { var cursorPos = EloBuddy.Game.CursorPos; if (!IsDangerousPosition(cursorPos)) return cursorPos; //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ ) if (!target.IsMelee && EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1) return cursorPos; var aRC = new Challenger_Series.Utils.Geometry.Circle(EloBuddy.ObjectManager.Player.ServerPosition.ToVector2(), 300).ToPolygon().ToClipperPath(); var targetPosition = target.ServerPosition; foreach (var p in aRC) { var v3 = new Vector2(p.X, p.Y).ToVector3(); var dist = v3.Distance(targetPosition); if (dist > 325 && dist < 450) { return v3; } } return Vector3.Zero; }