public static void SafePositionQ(AIHeroClient enemy) { var range = Orbwalker.GetRealAutoAttackRange(enemy); var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(), Prediction.GetPrediction(enemy, 0.25f).UnitPosition.To2D(), Program.Q.Range, range); if (path.Count() > 0) { var epos = path.MinOrDefault(x => x.Distance(Game.CursorPosition)); if (epos.To3D().UnderTurret(true) || epos.To3D().IsWall()) { return; } if (epos.To3D().CountEnemiesInRange(Program.Q.Range - 100) > 0) { return; } Program.Q.Cast(epos); } if (path.Count() == 0) { var epos = ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -Program.Q.Range); if (epos.UnderTurret(true) || epos.IsWall()) { return; } // no intersection or target to close Program.Q.Cast(ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -Program.Q.Range)); } }
private static void BeforeAttack(BeforeAttackEventArgs Args) { if (MiscOption.GetBool("Forcus")) { if (isComboMode || isHarassMode) { foreach (var target in ObjectManager.Heroes.Enemies.Where(x => !x.IsDead && !x.IsZombie && Orbwalker.InAutoAttackRange(x) && x.HasBuff("kalistacoopstrikemarkally")) ) { if (!target.IsDead && target.IsValidTarget(Orbwalker.GetRealAutoAttackRange(target))) { myOrbwalker.ForceTarget(target); } } } else if (isLaneClearMode || isJungleClearMode) { var minion = MinionManager .GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me), MinionTypes.All, MinionTeam.NotAlly) .FirstOrDefault(x => Orbwalker.InAutoAttackRange(x) && x.HasBuff("kalistacoopstrikemarkally")); if (minion != null && minion.IsValidTarget(Orbwalker.GetRealAutoAttackRange(minion))) { myOrbwalker.ForceTarget(minion); } } } }
private static void Combo() { var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical); if (target.IsValidTarget(R.Range)) { if (ComboOption.UseR && R.IsReady() && ComboOption.GetSlider("ComboRLimit") >= GetRCount && target.IsValidTarget(R.Range)) { SpellManager.PredCast(R, target, true); } if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range)) { SpellManager.PredCast(Q, target, true); } if (ComboOption.UseE && E.IsReady() && target.IsValidTarget(E.Range)) { SpellManager.PredCast(E, target); } if (ComboOption.UseW && W.IsReady() && target.IsValidTarget(W.Range) && target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me) && Orbwalker.CanAttack()) { W.Cast(); } } }
private static void BeforeAttack(BeforeAttackEventArgs Args) { if (!Args.Unit.IsMe) { return; } if (MiscOption.GetBool("Forcus")) { if (isComboMode || isHarassMode) { foreach (var enemy in ObjectManager.Heroes.Enemies.Where(x => !x.IsDead && !x.IsZombie && HavePassive(x))) { myOrbwalker.ForceTarget(enemy); } } if (isLaneClearMode || isJungleClearMode) { var all = MinionManager.GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me), MinionTypes.All, MinionTeam.NotAlly).Where(HavePassive).ToArray(); if (all.Any()) { myOrbwalker.ForceTarget(all.FirstOrDefault()); } } } }
private static void Combo() { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target.IsValidTarget(Q.Range)) { if (ComboOption.UseE && E.IsReady() && Me.HasBuff("QuinnR")) { E.CastOnUnit(target); } if (ComboOption.UseQ && Q.IsReady() && !Me.HasBuff("QuinnR")) { if (target.DistanceToPlayer() <= Orbwalker.GetRealAutoAttackRange(Me) && HavePassive(target)) { return; } SpellManager.PredCast(Q, target, true); } if (ComboOption.UseW && W.IsReady()) { var WPred = W.GetPrediction(target); if ((NavMesh.GetCollisionFlags(WPred.CastPosition) == CollisionFlags.Grass || NavMesh.IsGrass(target.ServerPosition)) && !target.IsVisible) { W.Cast(); } } } }
private static void LaneClear() { if (LaneClearOption.HasEnouguMana) { var minions = MinionManager.GetMinions(Me.Position, R.Range); if (minions.Any()) { if (LaneClearOption.UseR && R.IsReady() && LaneClearOption.GetSlider("LaneClearRLimit") >= GetRCount) { var rMinion = minions.FirstOrDefault(x => x.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me)); if (rMinion != null && MinionHealthPrediction.GetHealthPrediction(rMinion, 250) > 0) { R.Cast(rMinion); } } if (LaneClearOption.UseE && E.IsReady()) { var eMinions = MinionManager.GetMinions(Me.Position, E.Range); var eFarm = MinionManager.GetBestLineFarmLocation(eMinions.Select(x => x.Position.To2D()).ToList(), E.Width, E.Range); if (eFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearECount")) { E.Cast(eFarm.Position); } } if (LaneClearOption.UseQ && Q.IsReady()) { var qMinion = MinionManager .GetMinions( Me.Position, Q.Range) .FirstOrDefault( x => x.Health < Q.GetDamage(x) && MinionHealthPrediction.GetHealthPrediction(x, 250) > 0 && x.Health > Me.GetAutoAttackDamage(x)); if (qMinion != null) { Q.Cast(qMinion); } } } } }
private static void AfterAttack(AttackableUnit unit, AttackableUnit ArgsTarget) { if (!unit.IsMe || Me.IsDead || ArgsTarget == null || ArgsTarget.IsDead || !ArgsTarget.IsValidTarget()) { return; } if (isComboMode && ArgsTarget.ObjectType == GameObjectType.AIHeroClient) { if (ComboOption.UseQ && Q.IsReady()) { var target = (AIHeroClient)ArgsTarget; if (!target.IsDead && !target.IsZombie) { if (Me.HasBuff("asheqcastready")) { Q.Cast(true); Orbwalker.ResetAutoAttackTimer(); } } } } else if (isJungleClearMode && ArgsTarget.ObjectType == GameObjectType.obj_AI_Minion) { if (JungleClearOption.HasEnouguMana && JungleClearOption.UseQ && Q.IsReady()) { var mobs = MinionManager.GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me), MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Any()) { foreach (var mob in mobs) { if (!mob.IsValidTarget(Orbwalker.GetRealAutoAttackRange(Me)) || !(mob.Health > Me.GetAutoAttackDamage(mob) * 2)) { continue; } if (Me.HasBuff("asheqcastready")) { Q.Cast(true); Orbwalker.ResetAutoAttackTimer(); } } } } } }
public static void DoLastHit() { var q = LasthitMenu.GetCheckbox("useQ") && Q.IsReady(); var e = LasthitMenu.GetCheckbox("useE") && E.IsReady(); var minion = ObjectManager.MinionsAndMonsters.Enemy.Where(x => x.IsValidTarget(E.Range)); foreach (var m in minion) { if (q && ObjectManager.Me.Distance(m) > Orbwalker.GetRealAutoAttackRange(m) && Q.GetDamage(m) >= m.Health) { Q.Cast(m); } if (e && ObjectManager.Me.Distance(m) > Orbwalker.GetRealAutoAttackRange(m) && E.GetDamage(m) >= m.Health) { E.CastOnUnit(m); } } }
private static void AutoRLogic() { if (MiscOption.GetBool("AutoR") && R.IsReady()) { foreach (var target in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(R.Range))) { if (!(target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me)) || !(target.DistanceToPlayer() <= 700) || !(target.Health > Me.GetAutoAttackDamage(target)) || !(target.Health < R.GetDamage(target) + Me.GetAutoAttackDamage(target) * 3) || target.HasBuffOfType(BuffType.SpellShield)) { continue; } SpellManager.PredCast(R, target); return; } } }
private static void KillSteal() { if (KillStealOption.UseW && W.IsReady()) { foreach (var target in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(W.Range))) { if (!target.IsValidTarget(W.Range) || !(target.Health < W.GetDamage(target))) { continue; } if (target.DistanceToPlayer() <= Orbwalker.GetRealAutoAttackRange(Me) && Me.HasBuff("AsheQAttack")) { continue; } if (!target.IsUnKillable()) { SpellManager.PredCast(W, target); return; } } } if (KillStealOption.UseR && R.IsReady()) { foreach (var target in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(2000) && KillStealOption.GetKillStealTarget(x.ChampionName))) { if (!(target.DistanceToPlayer() > 800) || !(target.Health < R.GetDamage(target)) || target.HasBuffOfType(BuffType.SpellShield)) { continue; } if (!target.IsUnKillable()) { SpellManager.PredCast(R, target); return; } } } }
private static void LastHit() { if (LastHitOption.HasEnouguMana) { if (LastHitOption.UseQ && Q.IsReady()) { var minions = MinionManager.GetMinions(Me.Position, Q.Range) .Where( x => x.DistanceToPlayer() <= Q.Range && x.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me) && x.Health < Q.GetDamage(x)).ToArray(); if (minions.Any()) { Q.Cast(minions.FirstOrDefault(), true); } } } }
private static void BeforeAttack(BeforeAttackEventArgs Args) { if (!Args.Target.IsMe) { return; } if (isComboMode || isHarassMode) { var ForcusETarget = ObjectManager.Heroes.Enemies.FirstOrDefault( x => x.IsValidTarget(Orbwalker.GetRealAutoAttackRange(Me)) && x.HasBuff("kindredecharge")); var ForcusTarget = ObjectManager.Heroes.Enemies.FirstOrDefault( x => x.IsValidTarget(Orbwalker.GetRealAutoAttackRange(Me)) && x.HasBuff("kindredhittracker")); if (ForcusETarget.IsValidTarget(Orbwalker.GetRealAutoAttackRange(Me)) && MiscOption.GetBool("ForcusE")) { myOrbwalker.ForceTarget(ForcusETarget); } else if (MiscOption.GetBool("Forcus") && ForcusTarget.IsValidTarget(Orbwalker.GetRealAutoAttackRange(Me))) { myOrbwalker.ForceTarget(ForcusTarget); } else { myOrbwalker.ForceTarget(null); } } }
private static void BeforeAttack(BeforeAttackEventArgs Args) { if (!Args.Unit.IsMe) { return; } if (isComboMode) { if (MiscOption.GetBool("Forcustarget")) { foreach ( var enemy in ObjectManager.Heroes.Enemies.Where( enemy => Orbwalker.InAutoAttackRange(enemy) && enemy.HasBuff("TristanaEChargeSound"))) { myOrbwalker.ForceTarget(enemy); } } if (ComboOption.UseQ && Q.IsReady()) { if (ComboOption.GetBool("ComboQAlways")) { var Target = Args.Target.ObjectType == GameObjectType.AIHeroClient ? (AIHeroClient)Args.Target : null; if (Target != null && (Target.HasBuff("TristanaEChargeSound") || Target.HasBuff("TristanaECharge"))) { Q.Cast(); } } else { Q.Cast(); } } } else if (isHarassMode) { if (MiscOption.GetBool("Forcustarget")) { foreach ( var enemy in ObjectManager.Heroes.Enemies.Where( enemy => Orbwalker.InAutoAttackRange(enemy) && enemy.HasBuff("TristanaEChargeSound"))) { myOrbwalker.ForceTarget(enemy); } } } else if (isJungleClearMode && JungleClearOption.HasEnouguMana) { if (JungleClearOption.UseQ && Q.IsReady()) { var minion = MinionManager.GetMinions(Orbwalker.GetRealAutoAttackRange(ObjectManager.Player), MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (minion.Any(x => x.NetworkId == Args.Target.NetworkId)) { Q.Cast(); } } } }
private static void Combo() { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target.IsValidTarget(Q.Range)) { if (ComboOption.GetBool("ComboAttack") && target.DistanceToPlayer() > Me.AttackRange + Me.BoundingRadius) { var minion = MinionManager.GetMinions(Me.Position, Me.AttackRange + Me.BoundingRadius, MinionTypes.All, MinionTeam.NotAlly) .Where(Orbwalker.InAutoAttackRange) .OrderBy(x => x.DistanceToPlayer()) .FirstOrDefault(); if (minion != null && !minion.IsDead) { Orbwalker.Orbwalk(minion, Game.CursorPosition); } } if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range) && !Orbwalker.InAutoAttackRange(target)) { if (ComboOption.GetBool("ComboMana")) { if (Me.Mana > Q.ManaCost + E.ManaCost) { var qPred = Q.GetPrediction(target); if (qPred.Hitchance >= HitChance.VeryHigh) { Q.Cast(qPred.CastPosition, true); } } } else { var qPred = Q.GetPrediction(target); if (qPred.Hitchance >= HitChance.VeryHigh) { Q.Cast(qPred.CastPosition, true); } } } if (ComboOption.UseW && W.IsReady() && Utils.TickCount - LastCastTickW > 2000) { if (NavMesh.IsGrass(target.ServerPosition) && !target.IsVisible) { if (ComboOption.GetBool("ComboMana")) { if (Me.Mana > Q.ManaCost + E.ManaCost * 2 + W.ManaCost + R.ManaCost) { W.Cast(target.ServerPosition, true); } } else { W.Cast(target.ServerPosition, true); } } } if (ComboOption.UseE && E.IsReady() && target.IsValidTarget(E.Range) && target.HasBuff("kalistaexpungemarker") && Utils.TickCount - lastETime >= 500) { if (target.Health < GetRealEDamage(target)) { E.Cast(true); } if (ComboOption.GetBool("ComboEUse") && target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me) + 100) { var EKillMinion = MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All, MinionTeam.NotAlly) .FirstOrDefault(x => x.HasBuff("kalistaexpungemarker") && x.DistanceToPlayer() <= E.Range && x.Health < GetRealEDamage(x)); if (EKillMinion != null && EKillMinion.DistanceToPlayer() <= E.Range && target.IsValidTarget(E.Range)) { E.Cast(true); } } } } }
private static void Combo() { var target = MiscOption.GetList("PlayMode") == 0 ? TargetSelector.GetTarget(EQ.Range, TargetSelector.DamageType.Physical) : TargetSelector.GetTarget(EQ.Range); if (target.IsValidTarget(EQ.Range)) { if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range)) { SpellManager.PredCast(Q, target); } if (ComboOption.UseW && W.IsReady() && target.IsValidTarget(W.Range)) { SpellManager.PredCast(W, target, true); } if (ComboOption.UseE && E.IsReady() && target.IsValidTarget(EQ.Range)) { if (ComboOption.GetBool("ComboECheck") && !Me.UnderTurret(true) && Me.CountEnemiesInRange(1200) <= 2) { var useECombo = false; if (target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me) && target.IsValidTarget()) { if (target.Health < E.GetDamage(target) + Me.GetAutoAttackDamage(target) && target.Distance(Game.CursorPosition) < Me.Distance(Game.CursorPosition)) { useECombo = true; } if (target.Health < E.GetDamage(target) + W.GetDamage(target) && W.IsReady() && target.Distance(Game.CursorPosition) + 350 < Me.Distance(Game.CursorPosition)) { useECombo = true; } if (target.Health < E.GetDamage(target) + Q.GetDamage(target) && Q.IsReady() && target.Distance(Game.CursorPosition) + 300 < Me.Distance(Game.CursorPosition)) { useECombo = true; } } if (useECombo) { var CastEPos = Me.Position.Extend(target.Position, 475f); if (ComboOption.GetBool("ComboEWall")) { if (NavMesh.GetCollisionFlags(CastEPos) != CollisionFlags.Wall && NavMesh.GetCollisionFlags(CastEPos) != CollisionFlags.Building && NavMesh.GetCollisionFlags(CastEPos) != CollisionFlags.Prop) { E.Cast(CastEPos); useECombo = false; } } else { E.Cast(CastEPos); useECombo = false; } } } } if (ComboOption.UseR && R.IsReady()) { if (Me.UnderTurret(true) || Me.CountEnemiesInRange(800) > 1) { return; } foreach (var rTarget in ObjectManager.Heroes.Enemies.Where( x => x.IsValidTarget(R.Range) && target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me))) { if (target.Health < R.GetDamage(rTarget) && R.GetPrediction(rTarget).Hitchance >= HitChance.VeryHigh && target.DistanceToPlayer() > Q.Range + E.Range / 2) { R.Cast(rTarget, true); } if (rTarget.IsValidTarget(Q.Range + E.Range) && R.GetDamage(rTarget) + (Q.IsReady() ? Q.GetDamage(rTarget) : 0) + (W.IsReady() ? W.GetDamage(rTarget) : 0) > rTarget.Health + rTarget.HPRegenRate * 2) { R.Cast(rTarget, true); } } } } }
private static void AfterAttack(AttackableUnit unit, AttackableUnit ArgsTarget) { if (!unit.IsMe || !W.IsReady() || ArgsTarget == null) { return; } if (isComboMode) { var hero = ArgsTarget as AIHeroClient; if (hero != null && ComboOption.UseW && W.IsReady()) { if (hero.IsValidTarget(Orbwalker.GetRealAutoAttackRange(Me))) { W.Cast(); Orbwalker.ResetAutoAttackTimer(); } } } else { if (isLaneClearMode && LaneClearOption.HasEnouguMana && LaneClearOption.UseW) { if (ArgsTarget.ObjectType == GameObjectType.obj_AI_Turret || ArgsTarget.ObjectType == GameObjectType.obj_Barracks || ArgsTarget.ObjectType == GameObjectType.obj_HQ || ArgsTarget.ObjectType == GameObjectType.obj_Turret || ArgsTarget.ObjectType == GameObjectType.obj_BarracksDampener) { if (Me.CountEnemiesInRange(1000) == 0) { W.Cast(); Orbwalker.ResetAutoAttackTimer(); } } else if (ArgsTarget.ObjectType == GameObjectType.obj_AI_Minion && ArgsTarget.Team != GameObjectTeam.Neutral) { var minions = MinionManager.GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me)); if (minions.Count >= 3) { W.Cast(); Orbwalker.ResetAutoAttackTimer(); } } } if (isJungleClearMode && JungleClearOption.HasEnouguMana) { if (ArgsTarget.ObjectType == GameObjectType.obj_AI_Minion && ArgsTarget.Team == GameObjectTeam.Neutral) { var Mobs = MinionManager.GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me), MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (Mobs.Any()) { W.Cast(); Orbwalker.ResetAutoAttackTimer(); } } } } }
private static void Combo() { if (R.Instance.SpellData.Name == "JhinRShot") { return; } var wTarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical); if (ComboOption.UseW && W.IsReady() && wTarget.IsValidTarget(W.Range)) { if (ComboOption.GetBool("ComboWOnly")) { if (HasPassive(wTarget)) { SpellManager.PredCast(W, wTarget, true); } } else { SpellManager.PredCast(W, wTarget, true); } } if (ComboOption.UseQ && Q.IsReady()) { var target = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Physical); var qTarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (qTarget.IsValidTarget(Q.Range) && !Orbwalker.CanAttack()) { Q.CastOnUnit(qTarget, true); } else if (target.IsValidTarget(Q.Range + 300) && ComboOption.GetBool("ComboQMinion")) { if (Me.HasBuff("JhinPassiveReload") || (!Me.HasBuff("JhinPassiveReload") && Me.CountEnemiesInRange(Orbwalker.GetRealAutoAttackRange(Me) + Me.BoundingRadius) == 0)) { var qPred = Core.Prediction.GetPrediction(target, 0.25f); var bestQMinion = MinionManager.GetMinions(qPred.CastPosition, 300) .Where(x => x.IsValidTarget(Q.Range)) .OrderBy(x => x.Health) .ThenBy(x => x.Distance(target)) .FirstOrDefault(); if (bestQMinion != null && bestQMinion.IsValidTarget(Q.Range)) { Q.CastOnUnit(bestQMinion, true); } } } } var eTarget = TargetSelector.GetTarget(E.Range); if (ComboOption.UseE && E.IsReady() && eTarget.IsValidTarget(E.Range) && Utils.TickCount - LastECast > 2500 && !IsAttack) { if (!eTarget.CanMoveMent()) { SpellManager.PredCast(E, eTarget, true); } else { if (E.GetPrediction(eTarget).Hitchance >= HitChance.High) { E.Cast(E.GetPrediction(eTarget).UnitPosition); } } } }
private static void Combo() { if (ComboOption.UseR && R.IsReady()) { foreach (var target in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(1200))) { if (target.IsValidTarget(600) && Me.CountEnemiesInRange(600) >= 3 && target.CountAlliesInRange(200) <= 2) { SpellManager.PredCast(R, target); } if (Me.CountEnemiesInRange(800) == 1 && target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me) && target.DistanceToPlayer() <= 700 && target.Health > Me.GetAutoAttackDamage(target) && target.Health < R.GetDamage(target) + Me.GetAutoAttackDamage(target) * 3 && !target.HasBuffOfType(BuffType.SpellShield)) { SpellManager.PredCast(R, target); } if (target.DistanceToPlayer() <= 1000 && (!target.CanMove || target.HasBuffOfType(BuffType.Stun) || R.GetPrediction(target).Hitchance == HitChance.Immobile)) { SpellManager.PredCast(R, target); } } } if (ComboOption.UseW && W.IsReady() && !Me.HasBuff("AsheQAttack")) { if ((ComboOption.GetBool("ComboSaveMana") && Me.Mana > (R.IsReady() ? R.ManaCost : 0) + W.ManaCost + Q.ManaCost) || !ComboOption.GetBool("ComboSaveMana")) { var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical); if (target.IsValidTarget(W.Range)) { SpellManager.PredCast(W, target); } } } if (ComboOption.UseE && E.IsReady()) { var target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical); if (target.IsValidTarget(1000)) { var EPred = E.GetPrediction(target); if ((NavMesh.GetCollisionFlags(EPred.CastPosition) == CollisionFlags.Grass || NavMesh.IsGrass(target.ServerPosition)) && !target.IsVisible) { E.Cast(EPred.CastPosition); } } } }
private static void Harass() { if (HarassOption.HasEnouguMana) { if (HarassOption.UseQ && Q.IsReady()) { var target = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName))); if (target.IsValidTarget(Q.Range)) { Q.CastOnUnit(target, true); } else if (target.IsValidTarget(Q.Range + 300) && HarassOption.GetBool("HarassQMinion")) { if (Me.HasBuff("JhinPassiveReload") || (!Me.HasBuff("JhinPassiveReload") && Me.CountEnemiesInRange(Orbwalker.GetRealAutoAttackRange(Me)) == 0)) { var qPred = Core.Prediction.GetPrediction(target, 0.25f); var bestQMinion = MinionManager.GetMinions(qPred.CastPosition, 300) .Where(x => x.IsValidTarget(Q.Range)) .OrderBy(x => x.Distance(target)) .ThenBy(x => x.Health) .FirstOrDefault(); if (bestQMinion != null) { Q.CastOnUnit(bestQMinion, true); } } } } if (HarassOption.UseE && E.IsReady() && Utils.TickCount - LastECast > 2500 && !IsAttack) { var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName))); if (eTarget.IsValidTarget(E.Range)) { SpellManager.PredCast(E, eTarget, true); } } if (HarassOption.UseW && W.IsReady()) { var target = TargetSelector.GetTarget(1500f, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName))); if (target.IsValidTarget(W.Range)) { if (HarassOption.GetBool("HarassWOnly") && !HasPassive(target)) { return; } SpellManager.PredCast(W, target, true); } } } }