private static void WaveClear() { var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => (m.LSIsValidTarget()) && (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.R].Range)); if (SpellSlot.Q.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "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.LSTo2D()).ToList(), Spells[SpellSlot.Q].Width, Spells[SpellSlot.Q].Range); if (QLocation.MinionsHit >= 1) { Spells[SpellSlot.Q].Cast(QLocation.Position); } } if (SpellSlot.W.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "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.LSTo2D()).ToList(), Spells[SpellSlot.W].Width, Spells[SpellSlot.W].Range); if (WLocation.MinionsHit >= 1) { Spells[SpellSlot.W].Cast(WLocation.Position); } } if (SpellSlot.E.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.UseE")) { Obj_AI_Minion KillableMinionE = null; var eminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range); if (CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.useekillable")) { KillableMinionE = eminions.FirstOrDefault(m => m.Health < Player.LSGetSpellDamage(m, SpellSlot.E)); } else { KillableMinionE = eminions.OrderBy(x => x.Health).FirstOrDefault(); } if (KillableMinionE != null) { if (CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.useepoison")) { if (KillableMinionE.isPoisoned()) { Spells[SpellSlot.E].Cast(KillableMinionE); } } else { Spells[SpellSlot.E].Cast(KillableMinionE); } } } if (SpellSlot.R.IsReady() && CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.UseR")) { MinionManager.FarmLocation RLocation = MinionManager.GetBestLineFarmLocation( Minions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells[SpellSlot.R].Width, Spells[SpellSlot.R].Range); if (RLocation.MinionsHit > CassioUtils.getSliderItem(CassiopeiaMenu.Waveclear, "Waveclear.Rcount")) { Spells[SpellSlot.R].Cast(RLocation.Position); } } }
private static void OnWaveClear() { // Minions around var minions = MinionManager.GetMinions(player.Position, W.Range + W.Width / 2); // Spell usage bool useQ = boolLinks["waveUseQ"].Value && Q.IsReady(); bool useW = boolLinks["waveUseW"].Value && W.IsReady(); bool useE = boolLinks["waveUseE"].Value && E.IsReady(); if (useQ) { // Loop through all minions to find a target, preferred a killable one Obj_AI_Base target = null; foreach (var minion in minions) { var prediction = Q.GetPrediction(minion); if (prediction.Hitchance == HitChance.High) { // Set target target = minion; // Break if killlable if (minion.Health > player.GetAutoAttackDamage(minion) && Q.IsKillable(minion)) { break; } } } // Cast if target found if (target != null) { Q.Cast(target); } } if (useW) { // Get farm location var farmLocation = MinionManager.GetBestCircularFarmLocation(minions.Select(minion => minion.ServerPosition.To2D()).ToList(), W.Width, W.Range); // Check required hitnumber and cast if (farmLocation.MinionsHit >= sliderLinks["waveNumW"].Value.Value) { W.Cast(farmLocation.Position); } } if (useE) { // Loop through all minions to find a target foreach (var minion in minions) { // Distance check if (E.IsInRange(minion.ServerPosition)) { // E only on targets that are ablaze or killable if (minion.IsAblazed() || minion.Health > player.GetAutoAttackDamage(minion) && E.IsKillable(minion)) { E.CastOnUnit(minion); break; } } } } }
private static void OnWaveClear() { List <Obj_AI_Base> allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range); if (Config.Item("UseQFarm").GetValue <bool>() && Q.IsReady()) { foreach (Obj_AI_Base minion in allMinions.Where( minion => minion.IsValidTarget() && HealthPrediction.GetHealthPrediction( minion, (int)(Vector3.Distance(Player.ServerPosition, minion.ServerPosition) * 1000 / 1400)) < 0.75 * Player.GetSpellDamage(minion, SpellSlot.Q))) { if (Vector3.Distance(minion.ServerPosition, ObjectManager.Player.ServerPosition) > Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= Q.Range) { Orbwalker.SetAttack(false); Q.CastOnUnit(minion, false); Orbwalker.SetAttack(true); return; } } } if (Config.Item("UseWFarm").GetValue <bool>() && W.IsReady()) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Player.Position, W.Range) .Select(minion => minion.ServerPosition.To2D()) .ToList(), W.Width, W.Range); if (Wnorm && !Wevolved) { if (Vector2.Distance(Player.ServerPosition.To2D(), farmLocation.Position) <= W.Range) { W.Cast(farmLocation.Position); } } if (Wevolved && !Wnorm) { if (Vector2.Distance(Player.ServerPosition.To2D(), farmLocation.Position) <= WE.Range) { W.Cast(farmLocation.Position); } } } if (Config.Item("UseEFarm").GetValue <bool>() && E.IsReady()) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Player.Position, E.Range) .Select(minion => minion.ServerPosition.To2D()) .ToList(), E.Width, E.Range); if (Vector2.Distance(Player.ServerPosition.To2D(), farmLocation.Position) <= W.Range) { E.Cast(farmLocation.Position); } } if (Config.Item("UseItemsFarm").GetValue <bool>()) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Player.Position, HDR.Range) .Select(minion => minion.ServerPosition.To2D()) .ToList(), HDR.Range, HDR.Range); if (HDR.IsReady() && Vector2.Distance(Player.ServerPosition.To2D(), farmLocation.Position) <= HDR.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3074, ObjectManager.Player); } if (TIA.IsReady() && Vector2.Distance(Player.ServerPosition.To2D(), farmLocation.Position) <= TIA.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3077, ObjectManager.Player); } } }
void Waveclear() { List <Obj_AI_Minion> allMinions = ObjectManager.Get <Obj_AI_Minion>().OrderBy(x => x.Health).Where(x => x.IsValidTarget(W.Range) && !MinionManager.IsWard(x)).ToList(); if (Config.GetBool("UseQFarm") && Q.IsReady()) { var minion = Orbwalker.GetTarget() as Obj_AI_Minion; if (minion != null && HealthPrediction.GetHealthPrediction( minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) > 0.35f * Khazix.GetSpellDamage(minion, SpellSlot.Q) && Khazix.Distance(minion) <= Q.Range) { Q.Cast(minion); } else if (minion == null || !minion.IsValid) { foreach (var min in allMinions.Where(x => x.IsValidTarget(Q.Range))) { if (HealthPrediction.GetHealthPrediction( min, (int)(Khazix.Distance(min) * 1000 / 1400)) > 3 * Khazix.GetSpellDamage(min, SpellSlot.Q) && Khazix.Distance(min) <= Q.Range) { Q.Cast(min); break; } } } } if (Config.GetBool("UseWFarm") && W.IsReady() && Khazix.HealthPercent <= Config.GetSlider("Farm.WHealth")) { var wmins = EvolvedW ? allMinions.Where(x => x.IsValidTarget(WE.Range)) : allMinions.Where(x => x.IsValidTarget(W.Range)); MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation(wmins .Select(minion => minion.ServerPosition.To2D()) .ToList(), EvolvedW ? WE.Width : W.Width, EvolvedW ? WE.Range : W.Range); var distcheck = EvolvedW ? Khazix.Distance(farmLocation.Position) <= WE.Range : Khazix.Distance(farmLocation.Position) <= W.Range; if (distcheck) { W.Cast(farmLocation.Position); } } if (Config.GetBool("UseEFarm") && E.IsReady()) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Khazix.ServerPosition, E.Range) .Select(minion => minion.ServerPosition.To2D()) .ToList(), E.Width, E.Range); if (Khazix.Distance(farmLocation.Position) <= E.Range) { E.Cast(farmLocation.Position); } } if (Config.GetBool("UseItemsFarm")) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Khazix.ServerPosition, Hydra.Range) .Select(minion => minion.ServerPosition.To2D()) .ToList(), Hydra.Range, Hydra.Range); if (Hydra.IsReady() && Khazix.Distance(farmLocation.Position) <= Hydra.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3074, Khazix); } if (Tiamat.IsReady() && Khazix.Distance(farmLocation.Position) <= Tiamat.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3077, Khazix); } if (Titanic.IsReady() && Khazix.Distance(farmLocation.Position) <= Titanic.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3748, Khazix); } } }
void LH() { List <Obj_AI_Base> allMinions = MinionManager.GetMinions(Khazix.ServerPosition, Q.Range); if (Config.GetBool("UseQFarm") && Q.IsReady()) { foreach (Obj_AI_Base minion in allMinions.Where( minion => minion.IsValidTarget() && HealthPrediction.GetHealthPrediction( minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) < 0.75 * Khazix.GetSpellDamage(minion, SpellSlot.Q))) { if (Vector3.Distance(minion.ServerPosition, Khazix.ServerPosition) > Orbwalking.GetRealAutoAttackRange(Khazix) && Khazix.Distance(minion) <= Q.Range) { Q.CastOnUnit(minion); return; } } } if (Config.GetBool("UseWFarm") && W.IsReady()) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Khazix.ServerPosition, W.Range).Where(minion => HealthPrediction.GetHealthPrediction( minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) < 0.75 * Khazix.GetSpellDamage(minion, SpellSlot.W)) .Select(minion => minion.ServerPosition.To2D()) .ToList(), W.Width, W.Range); if (farmLocation.MinionsHit >= 1) { if (!EvolvedW) { if (Khazix.Distance(farmLocation.Position) <= W.Range) { W.Cast(farmLocation.Position); } } if (EvolvedW) { if (Khazix.Distance(farmLocation.Position) <= W.Range) { W.Cast(farmLocation.Position); } } } } if (Config.GetBool("UseEFarm") && E.IsReady()) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Khazix.ServerPosition, E.Range).Where(minion => HealthPrediction.GetHealthPrediction( minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) < 0.75 * Khazix.GetSpellDamage(minion, SpellSlot.W)) .Select(minion => minion.ServerPosition.To2D()) .ToList(), E.Width, E.Range); if (farmLocation.MinionsHit >= 1) { if (Khazix.Distance(farmLocation.Position) <= E.Range) { E.Cast(farmLocation.Position); } } } if (Config.GetBool("UseItemsFarm")) { MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation( MinionManager.GetMinions(Khazix.ServerPosition, Hydra.Range) .Select(minion => minion.ServerPosition.To2D()) .ToList(), Hydra.Range, Hydra.Range); if (Hydra.IsReady() && Khazix.Distance(farmLocation.Position) <= Hydra.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3074, Khazix); } if (Tiamat.IsReady() && Khazix.Distance(farmLocation.Position) <= Tiamat.Range && farmLocation.MinionsHit >= 2) { Items.UseItem(3077, Khazix); } } }
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() && LuxUtils.Active("Waveclear.UseQ")) { var qminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.Q].Range && m.IsValidTarget()); MinionManager.FarmLocation QLocation = MinionManager.GetBestLineFarmLocation( 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.E.IsReady() && LuxUtils.Active("Waveclear.UseE")) { if (LuxE == null) { var Eminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells[SpellSlot.E].Range + Spells[SpellSlot.E].Width); MinionManager.FarmLocation ELocation = MinionManager.GetBestCircularFarmLocation( Eminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[SpellSlot.E].Width, Spells[SpellSlot.E].Range); if (ELocation.MinionsHit >= 2) { Spells[SpellSlot.E].Cast(ELocation.Position); } } if (LuxUtils.Active("Waveclear.UseE2") && LuxE != null && LuxE.Position == LuxE.EndPosition) { Spells[SpellSlot.E].Cast(); } } if (SpellSlot.R.IsReady() && LuxUtils.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 > LuxUtils.GetSlider("Waveclear.Rcount")) { Spells[SpellSlot.R].Cast(RLocation.Position); } } }
public static void OnWaveClear(Obj_AI_Base afterAttackTarget = null) { // Unburrowed if (!player.IsBurrowed()) { if (afterAttackTarget.IsValidTarget() && afterAttackTarget.Team != GameObjectTeam.Neutral) { // Item usage if (Config.BoolLinks["waveUseItems"].Value && ItemManager.UseHydraOrTiamat(afterAttackTarget)) { return; } // Validate spells we wanna use if (!Q.IsEnabledAndReady(Mode.WAVE) && !E.IsEnabledAndReady(Mode.WAVE)) { return; } // Get surrounding minions var minions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth); if (minions.Count > 0) { // Q usage if (Q.IsEnabledAndReady(Mode.WAVE)) { // Check the number of Minions we would hit with Q, if (minions.FindAll(m => m.Distance(player, true) < 450 * 450).Count >= Config.SliderLinks["waveNumQ"].Value.Value) { if (Q.Cast()) { return; } } } // E usage if (E.IsEnabledAndReady(Mode.WAVE)) { var targets = minions.FindAll(m => player.HasMaxFury() || m.Health < E.GetRealDamage(m)); if (targets.Count > 0) { var target = targets.OrderByDescending(m => E.GetRealDamage(m) / m.MaxHealth).First(); E.Cast(target); } } } } } // Burrowed else { // Disable auto attacks Config.Menu.Orbwalker.SetAttack(false); if (Q.IsEnabledAndReady(Mode.WAVE, true)) { // Get the best position to shoot the Q var location = MinionManager.GetBestCircularFarmLocation(MinionManager.GetMinions(Q.Range).Select(m => m.ServerPosition.To2D()).ToList(), Q.Width, Q.Range); if (location.MinionsHit > 0) { Q.Cast(location.Position); } } else { // Get minions above us var minions = MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth); if (minions.Count > 0) { // Unburrow W.Cast(); } } } }
void Waveclear() { if (Syndra.ManaPercent < GetSliderFloat("lc.mana")) { return; } var Minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.IsValidTarget() && (Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.Q.Range || Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.W.Range || Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.E.Range)); if (SpellSlot.Q.IsReady() && GetBool("lc.q")) { var qminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.Q.Range); MinionManager.FarmLocation QLocation = MinionManager.GetBestCircularFarmLocation(qminions.Select(m => m.ServerPosition.To2D()).ToList(), SpellManager.Q.Width, SpellManager.Q.Range); if (QLocation.Position != null && QLocation.MinionsHit > 1) { SpellManager.Q.Cast(QLocation.Position); } } if (SpellSlot.W.IsReady() && GetBool("lc.w")) { var wminions = Minions.Where( m => Vector3.Distance(m.ServerPosition, Syndra.ServerPosition) <= SpellManager.W.Range); MinionManager.FarmLocation wLocation = MinionManager.GetBestCircularFarmLocation(wminions.Select(m => m.ServerPosition.To2D()).ToList(), SpellManager.W2.Width, SpellManager.W2.Range); if (wLocation.Position != null && wLocation.MinionsHit > 0) { if (!HasSecondW && WGood) { ForceGrab(); } else if (HasSecondW) { SpellManager.W.Cast(wLocation.Position); } } } if (SpellSlot.E.IsReady() && GetBool("lc.e")) { int hitcount = 0; foreach (var min in Minions.Where(x => x.IsInRange(SpellManager.E.Range))) { var predictedposition = min.ServerPosition.Extend(Syndra.ServerPosition, -Math.Max((1200 - min.Distance(Syndra.ServerPosition)), 700)).To2D(); var rect = new PolyUtils.Rectangle(min.ServerPosition.To2D(), predictedposition, min.BoundingRadius).ToPolygon(); Polygons.Add(rect); if (rect.PointInPolygon(min.ServerPosition.To2D()) == 1) { hitcount++; } if (hitcount >= 3) { SpellManager.E.Cast(min.ServerPosition); } } } }