public static void Waveclear() { if (Program.FarmingMenu["useEQKill"].Cast <CheckBox>().CurrentValue) { foreach ( var killableBarrel in BarrelManager.Killablebarrels.Where( killableBarrel => killableBarrel.IsValidTarget(SpellManager.Q.Range) && EntityManager.MinionsAndMonsters.EnemyMinions.Count( b => b.Distance(killableBarrel) < 350 && b.Health < GPDmg.EDamage(b, GPDmg.QDamage(b))) > Program.FarmingMenu["useEQKillMin"].Cast <Slider>().CurrentValue)) { SpellManager.Q.Cast(killableBarrel); return; } } if (Program.FarmingMenu["useEWaveClear"].Cast <CheckBox>().CurrentValue) { var count = 0; Obj_AI_Base target = null; foreach ( var source in EntityManager.MinionsAndMonsters.EnemyMinions.Where( a => a.Distance(Player.Instance) < SpellManager.E.Range)) { var count2 = EntityManager.MinionsAndMonsters.EnemyMinions.Count(a => a.Distance(source) < 350); if (count2 > count) { count = count2; target = source; } } if (target != null && count >= Program.FarmingMenu["useEWaveClearMin"].Cast <Slider>().CurrentValue&& !BarrelManager.Killablebarrels.Any(a => a.Distance(target.Position) < 350) && !BarrelManager.Barrels.Any(a => a.Distance(target.Position) < 350)) { SpellManager.E.Cast(target.Position); return; } } var minion = EntityManager.MinionsAndMonsters.EnemyMinions.FirstOrDefault( a => a.Health < GPDmg.QDamage(a) && a.IsValidTarget(SpellManager.Q.Range)); if (Program.FarmingMenu["useQWaveClear"].Cast <CheckBox>().CurrentValue&& SpellManager.Q.IsReady() && minion != null) { SpellManager.Q.Cast(minion); } }
public static void LastHit() { if (!SpellManager.Q.IsReady() || !Program.FarmingMenu["useQLastHit"].Cast <CheckBox>().CurrentValue) { return; } var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault( a => a.Distance(Player.Instance) > Player.Instance.GetAutoAttackRange(a) && !a.BaseSkinName.ToLower().Contains("gang") && Player.Instance.Distance(a) <= SpellManager.Q.Range && a.IsEnemy && a.Health <= GPDmg.QDamage(a)); if (minion == null) { return; } SpellManager.Q.Cast(minion); }