//return asap to check the most amount of times static void SecondEChecker(Obj_AI_Hero target) { if (LissUtils.AutoSecondE() && LissUtils.isHealthy() && LissEMissile != null && Spells["E"].IsReady()) { if (Vector3.Distance(MissilePosition, target.ServerPosition) < Vector3.Distance(Player.ServerPosition, target.ServerPosition) && !LissUtils.PointUnderEnemyTurret(MissilePosition)) { Spells["E"].CastOnUnit(Player); return; } var Enemiesatpoint = Utility.GetEnemiesInRange(LissEMissile.Position, Spells["R"].Range); var enemiesatpointR = Enemiesatpoint.Count; if ((enemiesatpointR >= Config.Item("Combo.ecountR").GetValue <Slider>().Value&& SpellSlot.R.IsReady()) || (Enemiesatpoint.Any(e => e.IsKillableFromPoint(LissEMissile.Position) && Vector3.Distance(LissEMissile.Position, e.ServerPosition) < Vector3.Distance(Player.ServerPosition, e.ServerPosition)))) { if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); return; } var enemiesatpointW = Utility.CountEnemiesInRange(LissEMissile.Position, Spells["W"].Range); if (enemiesatpointW >= Config.Item("Combo.ecountW").GetValue <Slider>().Value&& SpellSlot.W.IsReady()) { if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); return; } } }
private static void WaveClearHandler() { var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.IsValidTarget() && (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range || Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range || Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range)); if (SpellSlot.Q.IsReady() && LissUtils.Active("Waveclear.UseQ")) { var qminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range && m.IsValidTarget()); MinionManager.FarmLocation QLocation = MinionManager.GetBestLineFarmLocation(qminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells["Q"].Width, Spells["Q"].Range); if (QLocation.Position != null && QLocation.MinionsHit > 1) { Spells["Q"].Cast(QLocation.Position); } } if (SpellSlot.E.IsReady() && LissUtils.Active("Waveclear.UseE")) { var eminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range && m.IsValidTarget()); if (LissEMissile == null && !LissUtils.CanSecondE()) { var Eminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range); MinionManager.FarmLocation ELocation = MinionManager.GetBestLineFarmLocation(Eminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells["E"].Width, Spells["E"].Range); if (ELocation.Position != null && ELocation.MinionsHit > 0) { Spells["E"].Cast(ELocation.Position); } } else if (LissEMissile != null && LissUtils.Active("Waveclear.UseE2") && LissEMissile.Position == LissEMissile.EndPosition - 15 && SpellSlot.E.IsReady()) { if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); } } if (SpellSlot.W.IsReady() && LissUtils.Active("Waveclear.UseW")) { var wminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range && m.IsValidTarget()); if (wminions.Count() > LissUtils.GetSlider("Waveclear.Wcount")) { Spells["W"].CastOnUnit(Player); } } }
//return asap to check the most amount of times private static void SecondEChecker(AIHeroClient target) { if (LissUtils.AutoSecondE() && LissUtils.isHealthy() && LissEMissile != null && Spells["E"].IsReady()) { if (Vector2.Distance(MissilePosition, target.ServerPosition.To2D()) < Vector3.Distance(Player.ServerPosition, target.ServerPosition) && !LissUtils.PointUnderEnemyTurret(MissilePosition) && Vector3.Distance(target.ServerPosition, LissEMissile.EndPosition) > Vector3.Distance(Player.ServerPosition, target.ServerPosition)) { Spells["E"].CastOnUnit(Player); return; } var Enemiesatpoint = LissEMissile.Position.GetEnemiesInRange(Spells["R"].Range); var enemiesatpointR = Enemiesatpoint.Count; if ((enemiesatpointR >= getSliderItem(comboMenu, "Combo.ecountR") && SpellSlot.R.IsReady()) || Enemiesatpoint.Any( e => e.IsKillableFromPoint(LissEMissile.Position) && Vector3.Distance(LissEMissile.Position, e.ServerPosition) < Vector3.Distance(Player.ServerPosition, e.ServerPosition))) { if (LissUtils.PointUnderEnemyTurret(MissilePosition) && getCheckBoxItem(miscMenu, "Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); return; } var enemiesatpointW = LissEMissile.Position.CountEnemiesInRange(Spells["W"].Range); if (enemiesatpointW >= getSliderItem(comboMenu, "Combo.ecountW") && SpellSlot.W.IsReady()) { if (LissUtils.PointUnderEnemyTurret(MissilePosition) && getCheckBoxItem(miscMenu, "Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); } } }
static void KillSteal() { var targets = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie); if (SpellSlot.Q.IsReady() && LissUtils.Active("Killsteal.UseQ")) { Obj_AI_Hero qtarget = targets.Where(x => x.Distance(Player.Position) < Spells["Q"].Range) .MinOrDefault(x => x.Health); if (qtarget != null) { var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q); if (qtarget.Health < qdmg) { var pred = Spells["Q"].GetPrediction(qtarget, false); if (pred != null) { Spells["Q"].Cast(pred.CastPosition); } } } } if (SpellSlot.W.IsReady() && LissUtils.Active("Killsteal.UseW")) { Obj_AI_Hero wtarget = targets.Where(x => x.Distance(Player.Position) < Spells["W"].Range) .MinOrDefault(x => x.Health); if (wtarget != null) { var wdmg = Player.GetSpellDamage(wtarget, SpellSlot.W); if (wtarget.Health < wdmg) { Spells["W"].CastOnUnit(Player); } } } Obj_AI_Hero etarget = targets.Where(x => x.Distance(Player.Position) < Spells["E"].Range).MinOrDefault(x => x.Health); if (SpellSlot.E.IsReady() && LissEMissile == null && !LissUtils.CanSecondE() && LissUtils.Active("Killsteal.UseE")) { if (etarget != null) { var edmg = Player.GetSpellDamage(etarget, SpellSlot.E); if (etarget.Health < edmg) { var pred = Spells["E"].GetPrediction(etarget, false); if (pred != null) { Spells["E"].Cast(pred.CastPosition); } } } } if (LissEMissile != null && etarget != null && etarget.HealthPercent > 5 && etarget.HealthPercent < 15 && LissUtils.isHealthy() && LissUtils.Active("Killsteal.UseE2")) { if (Vector3.Distance(LissEMissile.Position, etarget.Position) < Spells["Q"].Range && SpellSlot.Q.IsReady() && etarget.Health < Player.GetSpellDamage(etarget, SpellSlot.Q)) { if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); } } if (Spells["Ignite"].IsReady() && LissUtils.Active("Killsteal.UseIgnite")) { Obj_AI_Hero igntarget = targets.Where(x => x.Distance(Player.Position) < Spells["Ignite"].Range) .MinOrDefault(x => x.Health); if (igntarget != null) { var igniteDmg = Player.GetSummonerSpellDamage(igntarget, Damage.SummonerSpell.Ignite); if (igniteDmg > igntarget.Health) { Spells["Ignite"].Cast(igntarget); } } } if (SpellSlot.R.IsReady() && LissUtils.Active("Killsteal.UseR")) { var Rtarget = targets.Where(h => (Vector3.Distance(Player.ServerPosition, h.ServerPosition) < Spells["R"].Range) && h.CountEnemiesInRange(Spells["R"].Range) > 1 && h.Health < Player.GetSpellDamage(h, SpellSlot.R) && !LissUtils.Active("Blacklist." + h.ChampionName)).MinOrDefault(h => h.Health); if (Rtarget != null) { Spells["R"].Cast(Rtarget); } } }
private static void KillSteal() { var targets = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie); var objAiHeroes = targets as IList <AIHeroClient> ?? targets.ToList(); if (SpellSlot.Q.IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseQ")) { var qtarget = objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["Q"].Range) .MinOrDefault(x => x.Health); if (qtarget != null) { var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q); if (qtarget.Health < qdmg) { var pred = Spells["Q"].GetPrediction(qtarget); if (pred != null) { Spells["Q"].Cast(qtarget); } } } } if (SpellSlot.W.IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseW")) { var wtarget = objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["W"].Range) .MinOrDefault(x => x.Health); if (wtarget != null) { var wdmg = Player.GetSpellDamage(wtarget, SpellSlot.W); if (wtarget.Health < wdmg) { Spells["W"].CastOnUnit(Player); } } } var etarget = objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["E"].Range).MinOrDefault(x => x.Health); if (SpellSlot.E.IsReady() && LissEMissile == null && !LissUtils.CanSecondE() && getCheckBoxItem(ksMenu, "Killsteal.UseE")) { if (etarget != null) { var edmg = Player.GetSpellDamage(etarget, SpellSlot.E); if (etarget.Health < edmg) { var pred = Spells["E"].GetPrediction(etarget); if (pred != null) { Spells["E"].Cast(etarget); } } } } if (LissEMissile != null && etarget != null && etarget.HealthPercent > 5 && etarget.HealthPercent < 15 && LissUtils.isHealthy() && getCheckBoxItem(ksMenu, "Killsteal.UseE2")) { if (Vector3.Distance(LissEMissile.Position, etarget.Position) < Spells["Q"].Range && SpellSlot.Q.IsReady() && etarget.Health < Player.GetSpellDamage(etarget, SpellSlot.Q)) { if (LissUtils.PointUnderEnemyTurret(MissilePosition) && getCheckBoxItem(miscMenu, "Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); } } if (Spells["Ignite"].IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseIgnite")) { var igntarget = objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["Ignite"].Range) .MinOrDefault(x => x.Health); if (igntarget != null) { var igniteDmg = Player.GetSummonerSpellDamage(igntarget, Damage.SummonerSpell.Ignite); if (igniteDmg > igntarget.Health) { Spells["Ignite"].Cast(igntarget); } } } if (SpellSlot.R.IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseR")) { var Rtarget = objAiHeroes.Where( h => (Vector3.Distance(Player.ServerPosition, h.ServerPosition) < Spells["R"].Range) && h.CountEnemiesInRange(Spells["R"].Range) > 1 && h.Health < Player.GetSpellDamage(h, SpellSlot.R) && !getCheckBoxItem(blackListMenu, "Blacklist." + h.NetworkId)).MinOrDefault(h => h.Health); if (Rtarget != null) { Spells["R"].Cast(Rtarget); } } }
private static void WaveClearHandler() { var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.LSIsValidTarget() && m.IsEnemy && (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range || Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range || Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range)); if (Spells["Q"].IsReady() && getCheckBoxItem(clearMenu, "Waveclear.UseQ")) { var qminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range && m.LSIsValidTarget()); var QLocation = MinionManager.GetBestLineFarmLocation(qminions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells["Q"].Width, Spells["Q"].Range); if (QLocation.Position != null && QLocation.MinionsHit > 1) { Spells["Q"].Cast(QLocation.Position); } } if (Spells["E"].IsReady() && getCheckBoxItem(clearMenu, "Waveclear.UseE")) { if (LissEMissile == null && !LissUtils.CanSecondE()) { var Eminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range); var ELocation = MinionManager.GetBestLineFarmLocation(Eminions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells["E"].Width, Spells["E"].Range); if (ELocation.Position != null && ELocation.MinionsHit > 0) { Spells["E"].Cast(ELocation.Position); } } else if (LissEMissile != null && getCheckBoxItem(clearMenu, "Waveclear.UseE2") && Vector2.Distance(MissilePosition, LissEMissile.EndPosition.LSTo2D()) <= 15 && Spells["E"].IsReady()) { if (LissUtils.PointUnderEnemyTurret(MissilePosition) && getCheckBoxItem(miscMenu, "Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); } } if (Spells["W"].IsReady() && getCheckBoxItem(clearMenu, "Waveclear.UseW")) { var wminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range && m.LSIsValidTarget()); if (wminions.Count() > getSliderItem(clearMenu, "Waveclear.Wcount")) { Spells["W"].CastOnUnit(Player); } } }