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 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 void Obj_AI_Base_OnProcessSpellCast(EloBuddy.Obj_AI_Base unit, EloBuddy.GameObjectProcessSpellCastEventArgs args) { if (unit.IsMinion) { return; } if (unit.IsMe) { if (args.SData.Name == "JinxWMissile") { WCastTime = EloBuddy.Game.Time; } } if (E.IsReady()) { if (unit.IsEnemy && eMenu["opsE"].Cast <CheckBox>().CurrentValue&& unit.LSIsValidTarget(E.Range) && ShouldUseE(args.SData.Name)) { E.Cast(unit.ServerPosition, true); } if (unit.IsAlly && args.SData.Name == "RocketGrab" && Player.LSDistance(unit.Position) < E.Range) { grabTime = EloBuddy.Game.Time; } } }
private static void Obj_AI_Base_OnNewPath(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectNewPathEventArgs args) { if (!sender.IsMe) { return; } PathPerSecCounter++; }
private static void Obj_AI_Base_OnIssueOrder(EloBuddy.Obj_AI_Base sender, EloBuddy.PlayerIssueOrderEventArgs args) { if (!Config["enable"].Cast <CheckBox>().CurrentValue) { return; } var screenPos = EloBuddy.Drawing.WorldToScreen(args.TargetPosition); var mouseDis = LastMousePos.LSDistance(screenPos); if (LastUserClickTime) { LastUserClickTime = false; return; } if (args.Order == EloBuddy.GameObjectOrder.AttackUnit && args.Target is EloBuddy.Obj_AI_Minion && LastType == 0 && Utils.TickCount - LastMouseTime > mouseDis / 15) { //Console.WriteLine("SBW farm protection"); LastType = 1; LastMouseTime = Utils.TickCount; LastMousePos = screenPos; return; } //Console.WriteLine(args.Order); if (Utils.TickCount - LastMouseTime < Config["ClickTime"].Cast <Slider>().CurrentValue + (mouseDis / 15)) { //Console.WriteLine("BLOCK " + args.Order); args.Process = false; return; } //Console.WriteLine("DIS " + LastMousePos.Distance(screenPos) + " TIME " + (Utils.TickCount - LastMouseTime)); if (args.Order == EloBuddy.GameObjectOrder.AttackUnit) { if (Config["blockOut"].Cast <CheckBox>().CurrentValue&& !Render.OnScreen(screenPos)) { args.Process = false; //Console.WriteLine("SBW BLOCK AA OUT SCREEN"); } if (args.Target is EloBuddy.Obj_AI_Minion && LastType == 0) { LastType = 1; return; } LastType = 1; } else { LastType = 0; } LastMouseTime = Utils.TickCount; LastMousePos = screenPos; }
private int VayneWStacks(EloBuddy.Obj_AI_Base o) { if (o == null) { return(0); } if (o.Buffs.FirstOrDefault(b => b.Name.Contains("vaynesilver")) == null || !o.Buffs.Any(b => b.Name.Contains("vaynesilver"))) { return(0); } return(o.Buffs.FirstOrDefault(b => b.Name.Contains("vaynesilver")).Count); }
private Vector3 GetTumblePos(EloBuddy.Obj_AI_Base target) { if (!EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.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 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); }
static float GetComboDamage(EloBuddy.Obj_AI_Base target) { double comboDamage = (float)EloBuddy.ObjectManager.Player.GetComboDamage(target, GetSpellCombo()); return((float)(comboDamage + EloBuddy.ObjectManager.Player.LSGetAutoAttackDamage(target))); }
public static bool IsUnderEnemyTurret(this EloBuddy.Obj_AI_Base vector) { return(EntityManager.Turrets.Enemies.Any(x => x.IsValidTarget(900, true, vector.Position))); }
private static void Interrupter_OnInterruptableSpell(EloBuddy.Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs e) { }
private float GetRealDistance(EloBuddy.Obj_AI_Base target) { return(Player.ServerPosition.LSDistance(Prediction.GetPrediction(target, 0.05f).CastPosition) + Player.BoundingRadius + target.BoundingRadius); }