public static void OnNewGapcloser(Gapcloser.GapcloserArgs args) { if (LocalPlayer.Instance.IsDead()) { return; } if (!GapCloserMenu.EBool.Enabled) { return; } var sender = args.Sender; if (sender == null || !sender.IsValid || !sender.IsEnemy()) { return; } if (Invulnerable.IsInvulnerable(sender, false)) { return; } if (E.Ready) { AntiGapcloser.ExecuteE(args); } }
public static void E(EntropyEventArgs args) { if (!BaseMenu.Root["combo"]["eengage"].Enabled) { return; } var bestTarget = Extensions.GetBestEnemyHeroTargetInRange(Champion.E.Range); if (bestTarget == null || Invulnerable.IsInvulnerable(bestTarget, DamageType.Physical) || bestTarget.IsValidTarget(LocalPlayer.Instance.GetAutoAttackRange(bestTarget))) { return; } var posAfterE = LocalPlayer.Instance.Position.Extend(Hud.CursorPositionUnclipped, 425f); if (posAfterE.EnemyHeroesCount(1000f) < 3 && LocalPlayer.Instance.Distance(Hud.CursorPositionUnclipped) > LocalPlayer.Instance.GetAutoAttackRange() && bestTarget.Distance(posAfterE) < LocalPlayer.Instance.GetAutoAttackRange(bestTarget)) { Champion.E.Cast(posAfterE); } }
public static void R(EntropyEventArgs args) { if (Champion.Q.Ready || Champion.W.Ready || Champion.E.Ready || Definitions.IsCulling()) { return; } var bestTarget = ObjectCache.EnemyHeroes .Where(t => BaseMenu.Root["combo"]["whitelists"]["semiAutomaticR"][t.CharName.ToLower()].Enabled && t.IsValidTarget() && !Invulnerable.IsInvulnerable(t, DamageType.Physical, false)) .MinBy(o => o.GetRealHealth(DamageType.Physical)); if (bestTarget == null || Definitions.HasPassive() && bestTarget.DistanceToPlayer() <= LocalPlayer.Instance.GetAutoAttackRange(bestTarget)) { return; } if (BaseMenu.Root["combo"]["normalR"].Enabled) { Champion.R.Cast(bestTarget); } if (BaseMenu.Root["combo"]["essenceR"].Enabled && LocalPlayer.Instance.HasItem(ItemID.EssenceReaver)) { Champion.R.Cast(bestTarget); } }
public static AIHeroClient GetTargetNearMouse(float distance) { AIHeroClient bestTarget = null; var bestRatio = 0f; if (TargetSelector.SelectedTarget.IsValidTarget() && !Invulnerable.IsInvulnerable(TargetSelector.SelectedTarget) && Hud.CursorPositionUnclipped.Distance(TargetSelector.SelectedTarget.Position) < distance && LocalPlayer.Instance.Distance(TargetSelector.SelectedTarget) < R.Range) { return(TargetSelector.SelectedTarget); } foreach (var hero in ObjectCache.EnemyHeroes) { if (!hero.IsValidTarget(R.Range) || Invulnerable.IsInvulnerable(hero) || Hud.CursorPositionUnclipped.Distance(hero.Position) > distance) { continue; } var damage = LocalPlayer.Instance.CalculateDamage(hero, DamageType.Magical, 100); var ratio = damage / (1 + hero.HP) * TargetSelector.OrderedTargets.IndexOf(hero) + 1; if (ratio > bestRatio) { bestRatio = ratio; bestTarget = hero; } } return(bestTarget); }
public static void ExecuteE() { foreach (var target in ObjectCache.EnemyHeroes.Where(t => t.IsValidTarget(E.Range) && E.GetDamage(t) >= t.GetRealHealth(DamageType.Magical) && !Invulnerable.IsInvulnerable(t, damage: E.GetDamage(t)))) { E.Cast(target); break; } }
public static void ExecuteR() { foreach (var target in ObjectCache.EnemyHeroes.Where(t => t.IsValidTarget(AutomaticMenu.RRange.Value) && R.GetDamage(t) >= t.GetRealHealth(DamageType.Magical) && !Invulnerable.IsInvulnerable(t, damage: R.GetDamage(t)))) { R.Cast(target); return; } }
/// <summary> /// Gets the best valid killable enemy hero target in the game inside a determined range. /// </summary> public static AIHeroClient GetBestSortedTarget( DamageType damageType = DamageType.True, bool ignoreShields = false) { var target = TargetSelector.GetOrderedTargets(ObjectCache.EnemyHeroes) .FirstOrDefault(t => !t.IsZombie() && !Invulnerable.IsInvulnerable(t, damageType, ignoreShields)); return(target); }
/// <summary> /// Gets the best valid killable enemy heroes targets in the game inside a determined range. /// </summary> public static IEnumerable <AIHeroClient> GetBestSortedTargetsInRange( float range, DamageType damageType = DamageType.True, bool ignoreShields = false) { var targets = TargetSelector.GetOrderedTargets(ObjectCache.EnemyHeroes) .Where(t => !t.IsZombie() && t.IsValidTarget(range) && !Invulnerable.IsInvulnerable(t, damageType, ignoreShields)); return(targets); }
public static void ExecuteW() { foreach (var target in ObjectCache.EnemyHeroes.Where(t => t.IsValidTarget(W.Range) && W.GetDamage(t) >= t.GetRealHealth(DamageType.Physical) && !Invulnerable.IsInvulnerable(t, damage: W.GetDamage(t)))) { var pred = W.GetPrediction(target); if (pred.HitChance < HitChance.Low) { return; } W.Cast(pred.CastPosition); } }
private static void ExecuteR() { if (!RBool.Enabled) { return; } foreach (var target in ObjectCache.EnemyHeroes.Where(t => R.CanExecute(t) && t.IsValidTarget(R.Range) && !Invulnerable.IsInvulnerable(t, damage: R.GetDamage(t)))) { R.Cast(target); return; } }
public static void W(EntropyEventArgs args) { if (!BaseMenu.Root["killSteal"]["w"].Enabled) { return; } foreach (var target in ObjectCache.EnemyHeroes .Where(t => t.IsValidTarget(Champion.W.Range) && !Invulnerable.IsInvulnerable(t, DamageType.Magical, damage: Champion.W.GetDamage(t)) && Champion.W.GetDamage(t) >= t.GetRealHealth(DamageType.Magical))) { Champion.W.Cast(target); return; } }
public static void ExecuteQ() { if (!Q.IsCharging) { return; } foreach (var target in ObjectCache.EnemyHeroes.Where(t => t.IsValidTarget(Q.ChargedMaxRange) && Q.GetDamage(t) >= t.GetRealHealth(DamageType.Magical) && !Invulnerable.IsInvulnerable(t, damage: Q.GetDamage(t)))) { Definitions.QChargeCasting(target); break; } }
public static AIHeroClient GetSemiAutoTarget( this Spell spell, DamageType type, MenuWhitelist whitelist, float customRange = -1f) { var killableTarget = ObjectCache.EnemyHeroes.FirstOrDefault( e => e.IsValidTarget(customRange < 0 ? spell.Range : customRange) && whitelist.IsWhitelisted(e) && !Invulnerable.IsInvulnerable(e, false, spell.GetDamage(e)) && e.GetRealHealth(type) < spell.GetDamage(e)); if (killableTarget != null) { return(killableTarget); } var selectedTarget = TargetSelector.SelectedTarget; if (selectedTarget != null && selectedTarget.IsValidTarget(spell.Range) && whitelist.IsWhitelisted(selectedTarget) && !Invulnerable.IsInvulnerable(selectedTarget, false, spell.GetDamage(selectedTarget))) { return(selectedTarget); } var nearestTarget = ObjectCache.EnemyHeroes.Where(e => e.IsValidTarget(spell.Range) && whitelist.IsWhitelisted(e) && !Invulnerable.IsInvulnerable( e, false, spell.GetDamage(e))). MinBy(o => o.Distance(Hud.CursorPositionUnclipped)); if (nearestTarget != null) { return(nearestTarget); } return(null); }
private static void ExecuteSemiAutomaticR() { var bestTarget = ObjectCache.EnemyHeroes .Where(t => BaseMenu.Root["combo"]["whitelists"]["semiAutomaticR"][t.CharName.ToLower()].Enabled && t.IsValidTarget() && !Invulnerable.IsInvulnerable(t, DamageType.Physical, false)) .MinBy(o => o.GetRealHealth(DamageType.Physical)); if (bestTarget == null) { return; } if (Champion.W.Ready && bestTarget.DistanceToPlayer() <= Champion.W.Range) { Champion.W.Cast(bestTarget.Position); } Champion.R.Cast(bestTarget.Position); }
public static void ExtendedQ(EntropyEventArgs args) { if (!BaseMenu.Root["killSteal"]["extendedQ"].Enabled) { return; } foreach (var target in ObjectCache.EnemyHeroes .Where(t => t.IsValidTarget(Spells.ExtendedQ.Range) && !Invulnerable.IsInvulnerable(t, DamageType.Physical, damage: Champion.Q.GetDamage(t)) && Champion.Q.GetDamage(t) >= t.GetRealHealth(DamageType.Physical))) { foreach (var minion in ObjectCache.EnemyLaneMinions .Where(m => m.IsValidTarget(Champion.Q.Range) && Definitions.QRectangle(m).IsInsidePolygon(Spells.ExtendedQ.GetPrediction(target).CastPosition))) { Champion.Q.CastOnUnit(minion); return; } } }
public static void OnInterruptableSpell(AIBaseClient sender, Interrupter.InterruptableSpellEventArgs args) { if (LocalPlayer.Instance.IsDead()) { return; } var heroSender = sender as AIHeroClient; if (heroSender == null || !heroSender.IsEnemy()) { return; } if (Invulnerable.IsInvulnerable(heroSender, false)) { return; } if (E.Ready) { OnInterruptable.ExecuteE(sender, args); } }
/// <summary> /// Gets the best valid enemy hero target in the game inside a determined range. /// </summary> public static AIHeroClient GetBestEnemyHeroTargetInRange(float range) { /* * var selectedTarget = TargetSelector.GetSelectedTarget(); * if (selectedTarget != null && * selectedTarget.IsValidTarget(range)) * { * return selectedTarget; * }*/ var orbTarget = Orbwalker.GetOrbwalkingTarget() as AIHeroClient; if (orbTarget != null && orbTarget.IsValidTarget(range)) { return(orbTarget); } var tsTarget = TargetSelector.LastTarget; if (tsTarget != null && tsTarget.IsValidTarget(range)) { return(tsTarget); } var lastTarget = ObjectCache.EnemyHeroes.FirstOrDefault(t => t.IsValidTarget(range) && !t.IsZombie() && !Invulnerable.IsInvulnerable(t)); if (lastTarget != null) { return(lastTarget); } return(null); }