void Combo() { AIHeroClient target = null; if (SpellSlot.E.IsReady() && SpellSlot.Q.IsReady()) { target = TargetSelector.GetTarget((E.Range + Q.Range) * 0.95f, DamageType.Physical); } if (target == null) { target = TargetSelector.GetTarget(W.Range, DamageType.Physical); } if ((target != null)) { var dist = Khazix.Distance(target); // Normal abilities if (Q.IsReady() && !Jumping && getCheckBoxItem(combo, "UseQCombo")) { if (dist <= Q.Range) { Q.Cast(target); } } if (W.IsReady() && !EvolvedW && dist <= W.Range && getCheckBoxItem(combo, "UseWCombo")) { var pred = W.GetPrediction(target); if (pred.Hitchance >= Config.GetHitChance("WHitchance")) { W.Cast(pred.CastPosition); } } if (E.IsReady() && !Jumping && dist <= E.Range && getCheckBoxItem(combo, "UseECombo") && dist > Q.Range + (0.7 * Khazix.MoveSpeed)) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition)) { E.Cast(pred.CastPosition); } } // Use EQ AND EW Synergy if ((dist <= E.Range + Q.Range + (0.7 * Khazix.MoveSpeed) && dist > Q.Range && E.IsReady() && getCheckBoxItem(combo, "UseEGapclose")) || (dist <= E.Range + W.Range && dist > Q.Range && E.IsReady() && W.IsReady() && getCheckBoxItem(combo, "UseEGapcloseW"))) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition)) { E.Cast(pred.CastPosition); } if (getCheckBoxItem(combo, "UseRGapcloseW") && R.IsReady()) { R.CastOnUnit(Khazix); } } // Ult Usage if (R.IsReady() && !Q.IsReady() && !W.IsReady() && !E.IsReady() && getCheckBoxItem(combo, "UseRCombo")) { R.Cast(); } // Evolved if (W.IsReady() && EvolvedW && dist <= WE.Range && getCheckBoxItem(combo, "UseWCombo")) { PredictionOutput pred = WE.GetPrediction(target); if (pred.Hitchance >= Config.GetHitChance("WHitchance")) { CastWE(target, pred.UnitPosition.To2D(), 0, Config.GetHitChance("WHitchance")); } if (pred.Hitchance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = pred.CollisionObjects; var x = PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30).FirstOrDefault(); if (x != null) { W.Cast(x.Position); } } } if (dist <= E.Range + (0.7 * Khazix.MoveSpeed) && dist > Q.Range && getCheckBoxItem(combo, "UseECombo") && E.IsReady()) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition)) { E.Cast(pred.CastPosition); } } if (getCheckBoxItem(combo, "UseItems")) { UseItems(target); } } }
void Combo() { Obj_AI_Hero target = null; TargetSelector.TargetSelectionConditionDelegate conditions = targ => targ.IsIsolated() || targ.Health <= GetBurstDamage(targ); float targetSelectionRange = Khazix.AttackRange; if (SpellSlot.Q.IsReady()) { targetSelectionRange += Q.Range; } if (SpellSlot.E.IsReady()) { targetSelectionRange += E.Range; } else if (SpellSlot.W.IsReady()) { targetSelectionRange += W.Range; } //Get Optimal target if available target = TargetSelector.GetTarget(targetSelectionRange, TargetSelector.DamageType.Physical, true, null, null, conditions); //If could not find then settle for anything if (target == null) { target = TargetSelector.GetTarget(targetSelectionRange, TargetSelector.DamageType.Physical, true, null, null); } //If a target has been found if ((target != null && target.IsValidEnemy())) { var dist = Khazix.Distance(target.ServerPosition); // Normal abilities if (Config.GetBool("UseQCombo") && Q.IsReady() && !Jumping) { if (dist <= Q.Range) { Q.Cast(target); } } if (Config.GetBool("UseWCombo") && W.IsReady() && !EvolvedW && dist <= W.Range) { var pred = W.GetPrediction(target); if (pred.Hitchance >= Config.GetHitChance("WHitchance")) { W.Cast(pred.CastPosition); } } if (Config.GetBool("UseECombo") && E.IsReady() && !Jumping && dist <= E.Range && dist > Q.Range + (0.4 * Khazix.MoveSpeed)) { var jump = GetJumpPosition(target); if (jump.shouldJump) { E.Cast(jump.position); } } // Use EQ if ((Config.GetBool("UseEGapcloseQ") && Q.IsReady() && E.IsReady() && dist > Q.Range + (0.4 * Khazix.MoveSpeed) && dist <= E.Range + Q.Range)) { var jump = GetJumpPosition(target); if (jump.shouldJump) { E.Cast(jump.position); } if (Config.GetBool("UseRGapcloseL") && R.IsReady()) { R.CastOnUnit(Khazix); } } // Ult Usage if (R.IsReady() && !Q.IsReady() && !W.IsReady() && !E.IsReady() && Config.GetBool("UseRCombo") && Khazix.CountEnemiesInRange(500) > 0) { R.Cast(); } // Evolved if (W.IsReady() && EvolvedW && dist <= WE.Range && Config.GetBool("UseWCombo")) { PredictionOutput pred = WE.GetPrediction(target); if (pred.Hitchance >= Config.GetHitChance("WHitchance")) { CastWE(target, pred.UnitPosition.To2D(), 0, Config.GetHitChance("WHitchance")); } if (pred.Hitchance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = pred.CollisionObjects; var x = PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30).FirstOrDefault(); if (x != null) { W.Cast(x.Position); } } } if (Config.GetBool("Combo.Smite")) { if (SmiteManager.CanCast(target)) { SmiteManager.Cast(target); } } if (Config.GetBool("UseItems")) { UseItems(target); } } }
public static void Do() { var isolatedlist = GetQTargets(); // isolatedlist. // HitChance hitchance = HarassHitChance(); var target = new AIHeroClient(); if (isolatedlist != null && isolatedlist.Any()) { var isolated = TargetSelector.GetTarget(Program.getE.Range, DamageType.Physical); target = isolated; } else { target = TargetSelector.GetTarget(Program.getE.Range, DamageType.Physical); } if (target == null && target.IsValidTarget(Program.getE.Range + 100) && !target.IsZombie) { target = TargetSelector.GetTarget(Program.getE.Range, DamageType.Physical); } if (target != null) { if (Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getQ.Range && Program.ComboMenu["QC"].Cast <CheckBox>().CurrentValue&& Program.getQ.IsReady() && !Program.Jumping) { Orbwalker.DisableAttacking = true; Program.getQ.Cast(target); Orbwalker.DisableAttacking = false; } if (Wnorm && Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getQ.Range && Program.ComboMenu["WC"].Cast <CheckBox>().CurrentValue&& Program.getW.IsReady() && Program.getW.GetPrediction(target).HitChance == HitChance.High) { Program.getW.Cast(target); } if (Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getE.Range && Program.ComboMenu["EC"].Cast <CheckBox>().CurrentValue&& Program.getE.IsReady() && Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) > Program.getQ.Range + (0.7 * Player.Instance.MoveSpeed)) { if (target.IsValid && !target.IsDead) { Program.getE.Cast(target); } } if ((Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getE.Range + Program.getQ.Range + (0.7 * Player.Instance.MoveSpeed) && Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) > Program.getQ.Range && Program.getE.IsReady() && Program.ComboMenu["ECG"].Cast <CheckBox>().CurrentValue) || (Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getE.Range + Program.getW.Range && Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) > Program.getQ.Range && Program.getE.IsReady() && Program.getW.IsReady() && Program.ComboMenu["WCG"].Cast <CheckBox>().CurrentValue)) { // PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { if (Program.getE.GetPrediction(target).HitChance == HitChance.High) { Program.getE.Cast(target); } } // UseRCG if (Program.ComboMenu["RCG"].Cast <CheckBox>().CurrentValue&& Program.getR.IsReady()) { Program.getR.Cast(); } } if (Program.getR.IsReady() && !Program.getQ.IsReady() && !Program.getW.IsReady() && !Program.getE.IsReady() && Program.ComboMenu["RC"].Cast <CheckBox>().CurrentValue) { Program.getR.Cast(); } if (Program.evolW && Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getWE.Range && Program.ComboMenu["WC"].Cast <CheckBox>().CurrentValue&& Program.getW.IsReady()) { var qpred = Program.getWE.GetPrediction(target); if (Program.getWE.GetPrediction(target).HitChance == HitChance.High) { Program.getWE.Cast(target); } if (Program.getWE.GetPrediction(target).HitChance >= HitChance.Collision) { var PCollision = qpred.CollisionObjects; var x = PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30).FirstOrDefault(); if (x != null) { Program.getW.Cast(x.Position); } } } if (Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) <= Program.getE.Range + (0.7 * Player.Instance.MoveSpeed) && Vector3.Distance(Player.Instance.ServerPosition, target.ServerPosition) > Program.getQ.Range && Program.ComboMenu["EC"].Cast <CheckBox>().CurrentValue&& Program.getE.IsReady()) { if (target.IsValid && !target.IsDead) { Program.getE.Cast(target); } } if (Program.ComboMenu["IC"].Cast <CheckBox>().CurrentValue) { UseItems(target); } } }
private static void Combo() { if (Player.IsDead) { return; } var usePacket = Config.Item("usePackets").GetValue <bool>(); var isolatedlist = GetIsolatedTargets(); HitChance hitchance = HarassHitChance(); Obj_AI_Hero target = new Obj_AI_Hero(); if (isolatedlist != null && isolatedlist.Any()) { var isolated = isolatedlist.OrderByDescending( hero => Player.CalcDamage(hero, Damage.DamageType.Physical, 100) / (1 + hero.Health) * TargetSelector.GetPriority(hero)).FirstOrDefault(); target = isolated; isolatedlist.Clear(); } else { target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); } if (target == null || !target.IsValid || !target.IsEnemy || target.IsDead || Player.Distance(target) > E.Range + 100) { target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); } if ((target != null)) { // Normal abilities if (Player.Distance(target) <= Q.Range && Config.Item("UseQCombo").GetValue <bool>() && Q.IsReady()) { Orbwalker.SetAttack(false); Q.Cast(target, usePacket); Orbwalker.SetAttack(true); } if (Wnorm && Player.Distance(target) <= W.Range && Config.Item("UseWCombo").GetValue <bool>() && W.IsReady() && W.GetPrediction(target).Hitchance >= hitchance) { PredictionOutput pred = W.GetPrediction(target); W.Cast(pred.CastPosition, usePacket); } if (Player.Distance(target) <= E.Range && Config.Item("UseECombo").GetValue <bool>() && E.IsReady() && Player.Distance(target) > Q.Range) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition, usePacket); } } // Use EQ AND EW Synergy if ((Player.Distance(target) <= E.Range + Q.Range && Player.Distance(target) > Q.Range && E.IsReady() && Config.Item("UseEGapclose").GetValue <bool>()) || (Player.Distance(target) <= E.Range + W.Range && Player.Distance(target) > Q.Range && E.IsReady() && W.IsReady() && Config.Item("UseEGapcloseW").GetValue <bool>())) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition, usePacket); } if (Config.Item("UseRGapcloseW").GetValue <bool>() && R.IsReady()) { R.CastOnUnit(ObjectManager.Player); } } // Ult Usage if (R.IsReady() && !Q.IsReady() && !W.IsReady() && !E.IsReady() && Config.Item("UseRCombo").GetValue <bool>()) { R.Cast(); if (Config.Item("Debugon").GetValue <bool>()) { Game.PrintChat("9 - Basic Ult Cast"); } } // Evolved if (Wevolved && Player.Distance(target) <= WE.Range && Config.Item("UseWCombo").GetValue <bool>() && W.IsReady() && W.GetPrediction(target).Hitchance >= hitchance) { PredictionOutput pred = WE.GetPrediction(target); // W.Cast(pred.CastPosition, usePacket); CastWE(target, pred.UnitPosition.To2D()); } if (Wevolved && Player.Distance(target) <= WE.Range && Config.Item("UseWCombo").GetValue <bool>() && W.IsReady() && W.GetPrediction(target).Hitchance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = W.GetPrediction(target).CollisionObjects; foreach ( Obj_AI_Base PredCollisionChar in PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30)) { W.Cast(PredCollisionChar.Position, usePacket); } } if (Player.Distance(target) <= E.Range && Player.Distance(target) > Q.Range && Config.Item("UseECombo").GetValue <bool>() && E.IsReady()) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition, usePacket); } } if (Config.Item("UseItems").GetValue <bool>()) { UseItems(target); } } }
private static void KillSteal() { Obj_AI_Hero target = ObjectManager.Get <Obj_AI_Hero>() .Where(x => x.IsValidTarget() && x.Distance(Player.Position) < 1000f) .OrderBy(x => x.Health).FirstOrDefault(); var usePacket = Config.Item("usePackets").GetValue <bool>(); if (target != null && !target.IsInvulnerable && !target.IsDead && !target.IsZombie) { double igniteDmg = Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite); double QDmg = getdamages(SpellSlot.Q, target); double WDmg = Player.GetSpellDamage(target, SpellSlot.W); double EDmg = Player.GetSpellDamage(target, SpellSlot.E); double hydradmg = Player.GetItemDamage(target, Damage.DamageItems.Hydra); double tiamatdmg = Player.GetItemDamage(target, Damage.DamageItems.Tiamat); if (Config.Item("UseIgnite").GetValue <bool>() && IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready) { if (igniteDmg > target.Health) { Player.Spellbook.CastSpell(IgniteSlot, target); } } if (!ishealthy() && Config.Item("autoescape").GetValue <bool>() && Player.CountEnemiesInRange(300) >= 1) { var objAiHero = ObjectManager.Get <Obj_AI_Hero>().FirstOrDefault(x => x.IsAlly && x.CountEnemiesInRange(300) == 0 && x.HealthPercentage() > 45 && E.IsInRange(x)); if (objAiHero != null) { var bestposition = objAiHero.ServerPosition; E.Cast(bestposition, usePacket); } } if (Q.IsReady() && Player.Distance(target) <= Q.Range && Config.Item("UseQKs").GetValue <bool>()) { if (target.Health <= QDmg) { Orbwalker.SetAttack(false); Q.Cast(target, usePacket); Orbwalker.SetAttack(true); } } if (E.IsReady() && Player.Distance(target) <= E.Range && Config.Item("UseEKs").GetValue <bool>()) { if (target.Health <= EDmg) { Utility.DelayAction.Add( Game.Ping + Config.Item("EDelay").GetValue <Slider>().Value, delegate { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition, usePacket); } }); } } if (W.IsReady() && Wnorm && Player.Distance(target) <= W.Range && Config.Item("UseWKs").GetValue <bool>()) { if (target.Health <= WDmg) { if (W.GetPrediction(target).Hitchance >= HitChance.Medium) { PredictionOutput pred = W.GetPrediction(target); W.Cast(pred.CastPosition); } } if (W.IsReady() && Wevolved && Player.Distance(target) <= W.Range && Config.Item("UseWKs").GetValue <bool>()) { if (target.Health <= WDmg) { PredictionOutput pred = W.GetPrediction(target); CastWE(target, pred.UnitPosition.To2D()); } if (W.GetPrediction(target).Hitchance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = W.GetPrediction(target).CollisionObjects; foreach (Obj_AI_Base PredCollisionChar in PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30)) { W.Cast(PredCollisionChar.Position, Config.Item("usePackets").GetValue <bool>()); } } } } // Mixed's EQ KS if (Q.IsReady() && E.IsReady() && Player.Distance(target) <= E.Range + Q.Range && Config.Item("UseEQKs").GetValue <bool>()) { if ((target.Health <= QDmg + EDmg)) { Utility.DelayAction.Add(Game.Ping + 200, delegate { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition); } }); } } // MIXED EW KS if (W.IsReady() && E.IsReady() && Wnorm && Player.Distance(target) <= W.Range + E.Range && Config.Item("UseEWKs").GetValue <bool>()) { if (target.Health <= WDmg) { Utility.DelayAction.Add(Game.Ping + 200, delegate { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition); } }); } } if (TIA.IsReady() && Player.Distance(target) <= TIA.Range && Config.Item("UseTiaKs").GetValue <bool>()) { if (target.Health <= tiamatdmg) { TIA.Cast(); } } if (HDR.IsReady() && Player.Distance(target) <= HDR.Range && Config.Item("UseTiaKs").GetValue <bool>()) { if (target.Health <= hydradmg) { HDR.Cast(); } } } }
static void Combo() { var target = TargetSelector.GetTarget(W.Range, DamageType.Physical); if ((target != null)) { var dist = myHero.Distance(target); // Normal abilities if (Q.IsReady() && dist <= Q.Range && UseQCombo) { Q.Cast(target); } if (W.IsReady() && !EvolvedW && dist <= W.Range && UseWCombo) { var pred = W.GetPrediction(target); if (pred.HitChance >= HitChance.High) { W.Cast(pred.CastPosition); } } if (E.IsReady() && dist <= E.Range && UseECombo && dist > Q.Range + (0.7 * myHero.MoveSpeed)) { PredictionResult pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition)) { E.Cast(pred.CastPosition); } } // Use EQ AND EW Synergy if ((dist <= E.Range + Q.Range + (0.7 * myHero.MoveSpeed) && dist > Q.Range && E.IsReady() && UseEGapclose) || (dist <= E.Range + W.Range && dist > Q.Range && E.IsReady() && W.IsReady() && UseEGapcloseW)) { PredictionResult pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition)) { E.Cast(pred.CastPosition); } if (UseRGapcloseW && R.IsReady()) { R.Cast(); } } // Ult Usage if (R.IsReady() && !Q.IsReady() && !W.IsReady() && !E.IsReady() && UseRCombo) { R.Cast(); } // Evolved if (W.IsReady() && EvolvedW && dist <= WE.Range && UseWCombo) { PredictionResult pred = WE.GetPrediction(target); if (pred.HitChance >= HitChance.High) { CastWE(target, pred.UnitPosition.To2D(), 0, HitChance.High); } if (pred.HitChance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = pred.CollisionObjects.ToList(); var x = PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30).FirstOrDefault(); if (x != null) { W.Cast(x.Position); } } } if (dist <= E.Range + (0.7 * myHero.MoveSpeed) && dist > Q.Range && UseECombo && E.IsReady()) { PredictionResult pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead && ShouldJump(pred.CastPosition)) { E.Cast(pred.CastPosition); } } if (UseItems_) { UseItems(target); } } }
private static void Combo() { if (Player.IsDead || Player.IsRecalling()) { return; } var isolatedlist = GetIsolatedTargets(); HitChance hitchance = HarassHitChance(); Obj_AI_Hero target = new Obj_AI_Hero(); if (isolatedlist != null && isolatedlist.Any()) { var isolated = isolatedlist.MaxOrDefault(h => TargetSelector.GetPriority(h)); target = isolated; } else { target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); } if (target == null && target.IsValidTarget(E.Range + 100) && !target.IsZombie) { target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); } if ((target != null)) { // Normal abilities if (Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= Q.Range && Config.Item("UseQCombo").GetValue <bool>() && Q.IsReady() && !Jumping) { Orbwalker.SetAttack(false); Q.Cast(target); Orbwalker.SetAttack(true); } if (Wnorm && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range && Config.Item("UseWCombo").GetValue <bool>() && W.IsReady() && W.GetPrediction(target).Hitchance >= hitchance) { PredictionOutput pred = W.GetPrediction(target); W.Cast(pred.CastPosition); } if (Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range && Config.Item("UseECombo").GetValue <bool>() && E.IsReady() && Vector3.Distance(Player.ServerPosition, target.ServerPosition) > Q.Range + (0.7 * Player.MoveSpeed)) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition); } } // Use EQ AND EW Synergy if ((Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range + Q.Range + (0.7 * Player.MoveSpeed) && Vector3.Distance(Player.ServerPosition, target.ServerPosition) > Q.Range && E.IsReady() && Config.Item("UseEGapclose").GetValue <bool>()) || (Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range + W.Range && Vector3.Distance(Player.ServerPosition, target.ServerPosition) > Q.Range && E.IsReady() && W.IsReady() && Config.Item("UseEGapcloseW").GetValue <bool>())) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition); } if (Config.Item("UseRGapcloseW").GetValue <bool>() && R.IsReady()) { R.CastOnUnit(ObjectManager.Player); } } // Ult Usage if (R.IsReady() && !Q.IsReady() && !W.IsReady() && !E.IsReady() && Config.Item("UseRCombo").GetValue <bool>()) { R.Cast(); } // Evolved if (Wevolved && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= WE.Range && Config.Item("UseWCombo").GetValue <bool>() && W.IsReady()) { PredictionOutput pred = WE.GetPrediction(target); if (pred.Hitchance >= hitchance) { CastWE(target, pred.UnitPosition.To2D()); } if (pred.Hitchance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = pred.CollisionObjects; var x = PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30).FirstOrDefault(); if (x != null) { W.Cast(x.Position); } } } if (Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range + (0.7 * Player.MoveSpeed) && Vector3.Distance(Player.ServerPosition, target.ServerPosition) > Q.Range && Config.Item("UseECombo").GetValue <bool>() && E.IsReady()) { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition); } } if (Config.Item("UseItems").GetValue <bool>()) { UseItems(target); } } }
private static void KillSteal() { Obj_AI_Hero target = HeroList .Where(x => x.IsValidTarget() && x.Distance(Player.Position) < 1000f && !x.IsZombie) .MinOrDefault(x => x.Health); var usePacket = Config.Item("usePackets").GetValue <bool>(); if (target != null) { if (Config.Item("UseIgnite").GetValue <bool>() && IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready) { double igniteDmg = Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite); if (igniteDmg > target.Health) { Player.Spellbook.CastSpell(IgniteSlot, target); return; } } if (Config.Item("autoescape").GetValue <bool>() && !ishealthy()) { var ally = HeroList.Where(h => h.HealthPercent > 50 && h.CountEnemiesInRange(400) == 0 && !PointUnderEnemyTurret(h.ServerPosition)).FirstOrDefault(); if (ally != null && ally.IsValid) { E.Cast(ally.ServerPosition); return; } var objAiturret = EnemyTurretPositions.Where(x => Vector3.Distance(Player.ServerPosition, x) <= 900f); if (objAiturret.Any() || Player.CountEnemiesInRange(500) >= 1) { var bestposition = Player.ServerPosition.Extend(NexusPosition, E.Range); E.Cast(bestposition, usePacket); return; } } if (Config.Item("UseQKs").GetValue <bool>() && Q.IsReady() && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= Q.Range) { double QDmg = GetQDamage(target); if (!Jumping && target.Health <= QDmg) { Q.Cast(target, usePacket); return; } } if (Config.Item("UseEKs").GetValue <bool>() && E.IsReady() && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range && Vector3.Distance(Player.ServerPosition, target.ServerPosition) > Q.Range) { double EDmg = Player.GetSpellDamage(target, SpellSlot.E); if (!Jumping && target.Health < EDmg) { Utility.DelayAction.Add( Game.Ping + Config.Item("EDelay").GetValue <Slider>().Value, delegate { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition, usePacket); return; } }); } } if (W.IsReady() && Wnorm && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range && Config.Item("UseWKs").GetValue <bool>()) { double WDmg = Player.GetSpellDamage(target, SpellSlot.W); if (target.Health <= WDmg) { var pred = W.GetPrediction(target); if (pred.Hitchance >= HitChance.Medium) { W.Cast(pred.CastPosition); return; } } } if (W.IsReady() && Wevolved && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range && Config.Item("UseWKs").GetValue <bool>()) { double WDmg = Player.GetSpellDamage(target, SpellSlot.W); PredictionOutput pred = W.GetPrediction(target); if (target.Health <= WDmg && pred.Hitchance > HitChance.Medium) { CastWE(target, pred.UnitPosition.To2D()); return; } if (pred.Hitchance >= HitChance.Collision) { List <Obj_AI_Base> PCollision = pred.CollisionObjects; var x = PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30) .FirstOrDefault(); if (x != null) { W.Cast(x.Position, Config.Item("usePackets").GetValue <bool>()); return; } } } // Mixed's EQ KS if (Q.IsReady() && E.IsReady() && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range + Q.Range && Config.Item("UseEQKs").GetValue <bool>()) { double QDmg = GetQDamage(target); double EDmg = Player.GetSpellDamage(target, SpellSlot.E); if ((target.Health <= QDmg + EDmg)) { Utility.DelayAction.Add(Config.Item("EDelay").GetValue <Slider>().Value, delegate { PredictionOutput pred = E.GetPrediction(target); if (target.IsValidTarget() && !target.IsZombie) { E.Cast(pred.CastPosition); return; } }); } } // MIXED EW KS if (W.IsReady() && E.IsReady() && Wnorm && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range + E.Range && Config.Item("UseEWKs").GetValue <bool>()) { double WDmg = Player.GetSpellDamage(target, SpellSlot.W); if (target.Health <= WDmg) { Utility.DelayAction.Add(Config.Item("EDelay").GetValue <Slider>().Value, delegate { PredictionOutput pred = E.GetPrediction(target); if (target.IsValid && !target.IsDead) { E.Cast(pred.CastPosition); return; } }); } } if (TIA.IsReady() && Vector2.Distance(Player.ServerPosition.To2D(), target.ServerPosition.To2D()) <= TIA.Range && Config.Item("UseTiaKs").GetValue <bool>()) { double tiamatdmg = Player.GetItemDamage(target, Damage.DamageItems.Tiamat); if (target.Health <= tiamatdmg) { TIA.Cast(); return; } } if (HDR.IsReady() && Vector2.Distance(Player.ServerPosition.To2D(), target.ServerPosition.To2D()) <= HDR.Range && Config.Item("UseTiaKs").GetValue <bool>()) { double hydradmg = Player.GetItemDamage(target, Damage.DamageItems.Hydra); if (target.Health <= hydradmg) { HDR.Cast(); return; } } } }