internal static void Init() { if (SpellManager.isCastingUlt || !ManaManager.SpellFarm) { return; } var mobs = MinionManager.GetMinions(Me.Position, Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (mob != null && mob.IsValidTarget(Q.Range)) { if (Menu.GetBool("JungleClearQ") && Q.IsReady() && mob.IsValidTarget(Q.Range)) { Q.CastOnUnit(mob, true); } if (Menu.GetBool("JungleClearW") && W.IsReady() && mob.IsValidTarget(W.Range)) { W.Cast(); } if (Menu.GetBool("JungleClearE") && E.IsReady()) { if (Daggers.Any( x => mobs.Any(a => a.Distance(x.Position) <= SpellManager.PassiveRange) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(mob.Position) <= SpellManager.PassiveRange) .OrderByDescending(x => x.Position.Distance(mob.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { E.Cast(obj.Position, true); } } } else if (mob.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(mob.Position, mob.DistanceToPlayer() + 130); E.Cast(pos, true); } else if (mob.IsValidTarget(E.Range)) { E.Cast(mob, true); } } } } }
internal static Vector3 GetEPosition(AIHeroClient target) { if (Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= PassiveRange) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= PassiveRange) .OrderByDescending(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { return(obj.Position); } } } else if ( Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= E.Range) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= E.Range) .OrderBy(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { return(obj.Position); } } } else if (target.DistanceToPlayer() <= E.Range - 130) { return(Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130)); } else if (target.IsValidTarget(E.Range)) { return(target.Position); } else { return(Vector3.Zero); } return(Vector3.Zero); }
private static void JungleClearEvent() { try { if (isCastingUlt) { return; } var mobs = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMob()).ToArray(); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (mob != null && mob.IsValidTarget(Q.Range)) { if (ClearMenu["FlowersKatarina.ClearMenu.JungleClearQ"].Enabled && Q.Ready && mob.IsValidTarget(Q.Range)) { Q.CastOnUnit(mob); } if (ClearMenu["FlowersKatarina.ClearMenu.JungleClearW"].Enabled && W.Ready && mob.IsValidTarget(W.Range)) { W.Cast(); } if (ClearMenu["FlowersKatarina.ClearMenu.JungleClearE"].Enabled && E.Ready) { if (Daggers.Any( x => mobs.Any(a => a.Distance(x.pos) <= PassiveRange) && x.pos.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.pos.Distance(mob.Position) <= PassiveRange) .OrderByDescending(x => x.pos.Distance(mob.Position))) { if (obj.obj != null && obj.obj.IsValid && obj.pos.DistanceToPlayer() <= E.Range) { E.Cast(obj.pos); } } } else if (mob.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(mob.Position, mob.DistanceToPlayer() + 130); E.Cast(pos); } else if (mob.IsValidTarget(E.Range)) { E.Cast(mob); } } } } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.JungleClearEvent." + ex); } }
private static void KillStealEvent() { try { if (isCastingUlt && !KillStealMenu["FlowersKatarina.KillStealMenu.CancelR"].Enabled) { return; } if (Me.CountEnemyHeroesInRange(E.Range) == 0) { return; } foreach ( var target in GameObjects.EnemyHeroes.Where(x => !x.IsDead && x.IsValidTarget(E.Range + 300)) .OrderBy(x => x.Health)) { if (target.IsValidTarget(E.Range + 300)) { if (KillStealMenu["FlowersKatarina.KillStealMenu.Q"].Enabled && target.Health < Q.GetDamage(target) && Q.Ready && target.IsValidTarget(Q.Range)) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); Q.CastOnUnit(target); return; } Q.CastOnUnit(target); return; } if (KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && target.Health < E.GetDamage(target) && E.Ready) { if (target.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130); if (isCastingUlt) { MyExtraManager.CancelUlt(true); E.Cast(pos); return; } E.Cast(pos); return; } if (target.IsValidTarget(E.Range)) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); E.Cast(target); return; } E.Cast(target); return; } } if (KillStealMenu["FlowersKatarina.KillStealMenu.Q"].Enabled && target.Health < Q.GetDamage(target) + E.GetDamage(target) && KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && Q.Ready && E.Ready && target.IsValidTarget(E.Range)) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); Q.CastOnUnit(target); E.Cast(target); return; } Q.CastOnUnit(target); E.Cast(target); return; } if (target.Health < MyExtraManager.GetKataPassiveDamage(target) + E.GetDamage(target) && KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && E.Ready && Daggers.Any( x => x.obj.IsValid && x.pos.Distance(target.Position) <= PassiveRange && x.pos.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.pos.Distance(target.Position) <= PassiveRange) .OrderBy(x => x.pos.Distance(target.Position))) { if (obj.obj != null && obj.obj.IsValid && obj.pos.DistanceToPlayer() <= E.Range) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); E.Cast(obj.pos); MyDelayAction.Queue(100 + Game.Ping, () => E.Cast(target)); return; } E.Cast(obj.pos); MyDelayAction.Queue(100 + Game.Ping, () => E.Cast(target)); return; } } } if (target.Health < R.GetDamage(target) * 0.6 && KillStealMenu["FlowersKatarina.KillStealMenu.R"].Enabled && R.Ready && target.IsValidTarget(R.Range) && target.Health > 50 * target.Level) { R.Cast(); return; } } } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.KillStealEvent." + ex); } }
internal static void EQWLogic(bool useQ, bool useW, bool useE) { var target = TargetSelector.GetTarget(E.Range + 300f, TargetSelector.DamageType.Magical); if (target.Check(E.Range + 300f)) { if (useE && E.IsReady() && target.IsValidTarget(E.Range + 300f)) { if (Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= PassiveRange) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= PassiveRange) .OrderByDescending(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { E.Cast(obj.Position, true); } } } else if ( Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= E.Range) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= E.Range) .OrderBy(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { E.Cast(obj.Position, true); } } } else if (target.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130); E.Cast(pos, true); } else if (target.IsValidTarget(E.Range)) { E.Cast(target, true); } } if (useQ && Q.IsReady() && target.IsValidTarget(Q.Range) && !E.IsReady()) { Q.CastOnUnit(target, true); } if (useW && W.IsReady() && target.IsValidTarget(W.Range)) { W.Cast(); } } }
private static void Game_OnUpdate(EventArgs args) { // blocking AA if (ComboDontAttack.GetValue <bool>() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { if (Daggers.Any(x => x.Dagger.Position.Distance(Player.Position) <= 150 + ComboDontAttackRange.GetValue <Slider>().Value) && !Daggers.Any(x => x.Dagger.Position.Distance(Player.Position) <= 150)) { Orbwalking.Attack = false; } else { Orbwalking.Attack = true; } } else { Orbwalking.Attack = true; } if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo) { return; } // cancel R if (ComboCancelRNoTarget.GetValue <bool>() && Player.IsChannelingImportantSpell() && Player.CountEnemiesInRange(R.Range) == 0 && Environment.TickCount >= LastRMis) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } // ks if (ComboCancelRForKS.GetValue <bool>() || !Player.IsChannelingImportantSpell()) { var targetQ = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (targetQ.IsValidTarget() && Q.IsReady() && GetQDamage(targetQ) >= targetQ.Health) { Q.Cast(targetQ); } var targetE = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (targetE.IsValidTarget() && E.IsReady() && GetEDamage(targetE) >= targetE.Health) { E.Cast(targetE); } var targetEQ = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (targetEQ.IsValidTarget() && E.IsReady() && Q.IsReady() && GetEDamage(targetEQ) + GetQDamage(targetEQ) >= targetEQ.Health) { E.Cast(targetEQ); } if (Q.IsReady() && E.IsReady()) { foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(E.Range + Q.Range + 150) && GetQDamage(x) >= x.Health)) { var nearest = GetEVinasun().MinOrDefault(x => x.Position.Distance(hero.Position)); if (nearest != null && nearest.Position.Distance(hero.Position) <= 150 + Q.Range) { var pos = nearest.Position.To2D().Extend(hero.Position.To2D(), 150); E.Cast(pos); } } } } // normal if (Player.IsChannelingImportantSpell()) { return; } //hextechgunblade if (ItemData.Hextech_Gunblade.GetItem().IsReady()) { var target = TargetSelector.GetTarget(700, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { ItemData.Hextech_Gunblade.GetItem().Cast(target); } } //cutlass if (ItemData.Bilgewater_Cutlass.GetItem().IsReady()) { var target = TargetSelector.GetTarget(550, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { ItemData.Bilgewater_Cutlass.GetItem().Cast(target); } } // W if (W.IsReady() && !E.IsReady()) { var target = TargetSelector.GetTarget(300, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { W.Cast(); } } // Q if (Q.IsReady()) { if (!(W.IsReady() && E.IsReady())) { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { Q.Cast(target); } } } //E if (E.IsReady()) { var EdaggerTarget = TargetSelector.GetTarget(E.Range + 200, TargetSelector.DamageType.Magical); var ETarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); var EdaggerOthers = HeroManager.Enemies.Where(x => x.IsValidTarget(E.Range + 200) && IsDaggerFixed(x)); if (EdaggerTarget != null && IsDaggerFixed(EdaggerTarget)) { var EdaggerTargetdagger = GetFixedDagger(EdaggerTarget); if (EdaggerTargetdagger.Dagger != null) { CastEFixedDagger(EdaggerTargetdagger, EdaggerTarget); } } else if (EdaggerOthers.Any()) { var target = EdaggerOthers.MinOrDefault(x => x.Health); var targetdagger = GetFixedDagger(target); if (targetdagger.Dagger != null) { CastEFixedDagger(targetdagger, target); } } else if (ETarget != null && !(Q.IsReady() && !W.IsReady())) { var pos = Player.Position.To2D().Extend(ETarget.Position.To2D(), Player.Distance(ETarget) + 150); E.Cast(pos); } // gapclose else if (Q.IsReady() || W.IsReady() || R.IsReady()) { var Vinasun = PickableDaggers.Where(x => x.Dagger.Position.CountEnemiesInRange(E.Range) > 0).MaxOrDefault(x => x.Dagger.Position.CountEnemiesInRange(E.Range)); if (Vinasun != null) { E.Cast(Vinasun.Dagger.Position); } } } // R if (R.Level >= 1 && R.Instance.CooldownExpires <= Game.Time) { //Game.PrintChat("1"); { var expires = (E.Instance.CooldownExpires - Game.Time) * 1000; if (E.IsReady() || expires < 50) { //Game.PrintChat("2"); var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { E.Cast(target.Position); } } else if (R.IsReady()) { //Game.PrintChat("3"); var target = TargetSelector.GetTarget(R.Range - 200, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { if (W.IsReady()) { W.Cast(); } else if (Q.IsReady()) { Q.Cast(target); } else { R.Cast(); } } } } } }
private static void DoCombo() { var target = TargetSelector.GetTarget(e.Range); var UseQ = Menu["Combo"].GetValue <MenuBool>("comboQ"); var UseW = Menu["Combo"].GetValue <MenuBool>("comboW"); var UseE = Menu["Combo"].GetValue <MenuBool>("comboE"); var UseETurret = Menu["Combo"].GetValue <MenuBool>("eTurret"); var SaveE = Menu["Combo"].GetValue <MenuBool>("eDagger"); var noR = Menu["Combo"].GetValue <MenuBool>("noR"); var eMode = Menu["Combo"].GetValue <MenuList>("comboEMode"); var rMode = Menu["Combo"].GetValue <MenuList>("comboRMode"); var minRHealth = Menu["Combo"].GetValue <MenuSlider>("MinRHealth"); if (!target.IsValidTarget()) { return; } if (Player.HasBuff("katarinarsound")) { if (noR) { if (Player.CountEnemyHeroesInRange(r.Range) == 0) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } if (target != null && UseQ && UseE && Player.GetSpellDamage(target, SpellSlot.Q) + Player.GetSpellDamage(target, SpellSlot.E) >= target.Health) { foreach (var daggers in GameObjects.AllGameObjects) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid && e.IsReady()) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range) && e.IsReady()) { e.Cast(daggers.Position.Extend(target.Position, 200)); } if (daggers.Distance(Player) > e.Range) { e.Cast(target.Position.Extend(Player.Position, -50)); } if (daggers.Distance(target) > 450) { e.Cast(target.Position.Extend(Player.Position, -50)); } } if (!Daggers.Any() && e.IsReady()) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); e.Cast(target.Position.Extend(Player.Position, -50)); } if (target.IsValidTarget(q.Range) && q.IsReady()) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); q.CastOnUnit(target); } } } } switch (Menu["Combo"].GetValue <MenuList>("comboMode").Index) { case 0: if (q.IsReady() && UseQ && target.IsValidTarget(q.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } q.CastOnUnit(target); } } if (e.IsReady() && UseE && target.IsValidTarget(e.Range) && !q.IsReady()) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } if (UseETurret && target.IsUnderEnemyTurret()) { return; } foreach (var daggers in GameObjects.AllGameObjects) { if (!SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(Player) > e.Range) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(target) > 450) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (!Daggers.Any()) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } } } } } if (w.IsReady() && UseW && target.IsValidTarget(w.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } w.Cast(); } } if (r.IsReady() && rMode.Index != 2) { if (rMode.Index == 0) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.HealthPercent <= minRHealth.Value) { r.Cast(); } } } if (rMode.Index == 1) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.Health <= Player.GetSpellDamage(target, SpellSlot.Q) + Player.GetSpellDamage(target, SpellSlot.E) + Daggersdmg(target) + Rdmg(target) * 10) { if (!q.IsReady()) { r.Cast(); } } } } } break; case 1: if (e.IsReady() && UseE && target.IsValidTarget(e.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } if (UseETurret && target.IsUnderEnemyTurret()) { return; } foreach (var daggers in GameObjects.AllGameObjects) { if (!SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(Player) > e.Range) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(target) > 450) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (!Daggers.Any()) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } } } } } if (w.IsReady() && UseW && target.IsValidTarget(w.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } w.Cast(); } } if (q.IsReady() && UseQ && target.IsValidTarget(q.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } q.CastOnUnit(target); } } if (r.IsReady() && rMode.Index != 2) { if (rMode.Index == 0) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.HealthPercent <= minRHealth.GetValue <MenuSlider>().Value) { r.Cast(); } } } if (rMode.Index == 1) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.Health <= Player.GetSpellDamage(target, SpellSlot.Q) + Player.GetSpellDamage(target, SpellSlot.E) + Daggersdmg(target) + Rdmg(target) * 10) { if (!q.IsReady()) { r.Cast(); } } } } } break; } }
internal static void Init() { if (SpellManager.isCastingUlt && !Menu.GetBool("KillStealCancel")) { return; } foreach ( var target in HeroManager.Enemies.Where(x => !x.IsDead && !x.IsZombie && x.IsValidTarget(E.Range + 300)) .OrderBy(x => x.Health)) { if (target.Check(E.Range + 300)) { if (target.Health < DamageCalculate.GetQDamage(target) && Menu.GetBool("KillStealQ") && Q.IsReady() && target.IsValidTarget(Q.Range)) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); Q.CastOnUnit(target, true); return; } Q.CastOnUnit(target, true); return; } if (target.Health < DamageCalculate.GetEDamage(target) && Menu.GetBool("KillStealE") && E.IsReady()) { if (target.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130); if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); E.Cast(pos, true); return; } E.Cast(pos, true); return; } if (target.IsValidTarget(E.Range)) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); E.Cast(target, true); return; } E.Cast(target, true); return; } } if (target.Health < DamageCalculate.GetQDamage(target) + DamageCalculate.GetEDamage(target) && Menu.GetBool("KillStealQ") && Menu.GetBool("KillStealE") && Q.IsReady() && E.IsReady() && target.IsValidTarget(E.Range)) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); Q.CastOnUnit(target, true); E.Cast(target, true); return; } Q.CastOnUnit(target, true); E.Cast(target, true); return; } if (target.Health < DamageCalculate.GetPassiveDamage(target) + DamageCalculate.GetEDamage(target) && Menu.GetBool("KillStealE") && E.IsReady() && Daggers.Any( x => x.Dagger.IsValid && x.Position.Distance(target.Position) <= SpellManager.PassiveRange && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= SpellManager.PassiveRange) .OrderBy(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); E.Cast(obj.Position, true); LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () => E.Cast(target, true)); return; } E.Cast(obj.Position, true); LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () => E.Cast(target, true)); return; } } } } } }