private static void WaveClear() { var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => (m.IsValidTarget()) && (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.R].Range)); if (SpellSlot.Q.IsReady() && CassioUtils.Active("Waveclear.UseQ")) { var qminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range); MinionManager.FarmLocation QLocation = MinionManager.GetBestCircularFarmLocation( qminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.Q].Width, Spells[SpellSlot.Q].Range); if (QLocation.MinionsHit >= 1) { Spells[SpellSlot.Q].Cast(QLocation.Position); } } if (SpellSlot.W.IsReady() && CassioUtils.Active("Waveclear.UseW")) { var wminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.W].Range); MinionManager.FarmLocation WLocation = MinionManager.GetBestCircularFarmLocation( wminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.W].Width, Spells[SpellSlot.W].Range); if (WLocation.MinionsHit >= 1) { Spells[SpellSlot.W].Cast(WLocation.Position); } } if (SpellSlot.E.IsReady() && CassioUtils.Active("Waveclear.UseE")) { Obj_AI_Minion KillableMinionE = null; var eminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range); if (CassioUtils.Active("Waveclear.useekillable")) { KillableMinionE = eminions.FirstOrDefault(m => m.Health < Player.GetSpellDamage(m, SpellSlot.E)); } else { KillableMinionE = eminions.OrderBy(x => x.Health).FirstOrDefault(); } if (KillableMinionE != null) { if (CassioUtils.Active("Waveclear.useepoison")) { if (KillableMinionE.isPoisoned()) { Spells[SpellSlot.E].Cast(KillableMinionE); } } else { Spells[SpellSlot.E].Cast(KillableMinionE); } } } if (SpellSlot.R.IsReady() && CassioUtils.Active("Waveclear.UseR")) { MinionManager.FarmLocation RLocation = MinionManager.GetBestLineFarmLocation( Minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.R].Width, Spells[SpellSlot.R].Range); if (RLocation.MinionsHit > CassioUtils.GetSlider("Waveclear.Rcount")) { Spells[SpellSlot.R].Cast(RLocation.Position); DontMove = true; Utility.DelayAction.Add(200, () => DontMove = false); } } }