private static void HarassHandler() { if (Player.ManaPercent < LissUtils.GetSlider("Harass.Mana")) { return; } if (LissUtils.Active("Harass.UseQ")) { var target = TargetSelector.GetTarget(Spells["Q"].Range, TargetSelector.DamageType.Magical); if (target != null) { CastQ(target); } } if (LissUtils.Active("Harass.UseW")) { var target = TargetSelector.GetTarget(Spells["W"].Range, TargetSelector.DamageType.Magical); if (target != null && target.IsValidTarget()) { CastW(target); } } if (LissUtils.Active("Harass.UseE") && LissEMissile == null && !LissUtils.CanSecondE()) { var target = TargetSelector.GetTarget(Spells["E"].Range, TargetSelector.DamageType.Magical); if (target != null && !target.IsInvulnerable) { CastE(target); } } }
//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 (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 >= 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(MissilePosition) && LissUtils.Active("Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); return; } var enemiesatpointW = LissEMissile.Position.CountEnemiesInRange(Spells["W"].Range); if (enemiesatpointW >= LissUtils.GetSlider("Combo.ecountW") && SpellSlot.W.IsReady()) { if (LissUtils.PointUnderEnemyTurret(MissilePosition) && LissUtils.Active("Misc.DontETurret")) { return; } Spells["E"].CastOnUnit(Player); } } }
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); } } }
private static void FarmHandler() { if (Player.ManaPercent < LissUtils.GetSlider("Farm.Mana")) { return; } 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("Farm.UseQ")) { var KillableMinionsQ = Minions.Where(m => m.Health <Player.GetSpellDamage(m, SpellSlot.Q) && Vector3.Distance(m.ServerPosition, Player.ServerPosition)> Player.AttackRange); if (KillableMinionsQ.Any()) { Spells["Q"].Cast(KillableMinionsQ.FirstOrDefault()); } } if (SpellSlot.W.IsReady() && LissUtils.Active("Farm.UseW")) { var KillableMinionsW = Minions.Where(m => m.Health < Player.GetSpellDamage(m, SpellSlot.W) && Vector3.Distance(Player.ServerPosition, m.ServerPosition) < Spells["W"].Range); if (KillableMinionsW.Any()) { Spells["W"].CastOnUnit(Player); } } if (SpellSlot.E.IsReady() && LissUtils.Active("Farm.UseE") && LissEMissile == null && !LissUtils.CanSecondE() && LissEMissile == null && !LissUtils.CanSecondE()) { var KillableMinionsE = Minions.Where(m => m.Health <Player.GetSpellDamage(m, SpellSlot.E) && Vector3.Distance(m.ServerPosition, Player.ServerPosition)> Player.AttackRange); if (KillableMinionsE.Any()) { Spells["E"].Cast(KillableMinionsE.FirstOrDefault().ServerPosition); } } }
static void CastR(Obj_AI_Hero currenttarget) { var Check = HeroManager.Enemies .Where( h => h.IsValidTarget(Spells["R"].Range) && h.CountEnemiesInRange(Spells["R"].Range) >= LissUtils.GetSlider("Combo.Rcount") && !LissUtils.Active("Blacklist." + h.ChampionName)).ToList(); if (Player.CountEnemiesInRange(Spells["R"].Range) >= LissUtils.GetSlider("Combo.Rcount")) { Check.Add(Player); } if (Check != null) { if (Check.Contains(Player) && !LissUtils.isHealthy()) { Spells["R"].CastOnUnit(Player); return; } var target = Check.FirstOrDefault(); if (target != null) { Spells["R"].Cast(target); return; } } if (LissUtils.Active("Blacklist." + currenttarget.ChampionName)) { return; } if (currenttarget.IsKillableFromPoint(Player.ServerPosition)) { Spells["R"].Cast(currenttarget); return; } if (LissUtils.PointUnderAllyTurret(currenttarget.ServerPosition)) { Spells["R"].Cast(currenttarget); return; } var dmgto = Player.GetSpellDamage(currenttarget, SpellSlot.R); if (dmgto > currenttarget.Health && currenttarget.Health >= 0.40 * dmgto) { Spells["R"].Cast(currenttarget); return; } var enemycount = LissUtils.GetSlider("Combo.Rcount"); if (!LissUtils.isHealthy() && Player.CountEnemiesInRange(Spells["R"].Range - 100) >= enemycount) { Spells["R"].CastOnUnit(Player); return; } var possibilities = HeroManager.Enemies.Where(h => (h.IsValidTarget() && Vector3.Distance(h.ServerPosition, Player.ServerPosition) <= Spells["R"].Range || (h.IsKillableFromPoint(Player.ServerPosition) && h.IsValidTarget() && !h.IsInvulnerable)) && !LissUtils.Active("Blacklist." + h.ChampionName)).ToList(); var arranged = possibilities.OrderByDescending(h => h.CountEnemiesInRange(Spells["R"].Range)); if (LissUtils.Active("Misc.PrioritizeUnderTurret")) { var EnemyUnderTurret = arranged.Where(h => LissUtils.PointUnderAllyTurret(h.ServerPosition) && !h.IsInvulnerable); if (EnemyUnderTurret != null) { var Enemytofocus = EnemyUnderTurret.MaxOrDefault(h => h.CountEnemiesInRange(Spells["R"].Range)); if (Enemytofocus != null) { Spells["R"].Cast(Enemytofocus); return; } } } var UltTarget = arranged.FirstOrDefault(); if (UltTarget != null) { if (!LissUtils.isHealthy() && Player.CountEnemiesInRange(Spells["R"].Range) > UltTarget.CountEnemiesInRange(Spells["R"].Range) + 1) { Spells["R"].CastOnUnit(Player); return; } Spells["R"].Cast(UltTarget); } }