private static void Harass() { if (ObjectManager.Player.ManaPercent < Config.Item("harass.mana").GetValue <Slider>().Value) { return; } if (Config.Item("disable.harass.under.turret").GetValue <bool>()) { if (ObjectManager.Get <Obj_AI_Turret>().Any(x => ObjectManager.Player.Distance(x) < x.AttackRange && x.Team != ObjectManager.Player.Team)) { return; } } if (Q.IsReady() && Config.Item("q.harass").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Q.Range))) { Q.SPredictionCast(enemy, SpellHitChance(Config, "q.hit.chance")); } } if (W.IsReady() && Config.Item("w.harass").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range + W.Width) && W.GetSPrediction(x).HitChance >= SpellHitChance(Config, "w.hit.chance"))) { UseW(enemy, enemy); } } if (Q.IsReady() && E.IsReady() && Config.Item("qe.harass").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Qe.Range) && Qe.GetSPrediction(x).HitChance >= SpellHitChance(Config, "qe.hit.chance"))) { UseQe(enemy); } } }
private static void Combo() { if (Q.IsReady() && Config.Item("q.combo").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= SpellHitChance(Config, "q.hit.chance"))) { Q.SPredictionCast(enemy, SpellHitChance(Config, "q.hit.chance")); } } if (W.IsReady() && Config.Item("w.combo").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range + W.Width) && W.GetSPrediction(x).HitChance >= SpellHitChance(Config, "w.hit.chance"))) { UseW(enemy, enemy); } } if (Q.IsReady() && E.IsReady() && Config.Item("qe.combo").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Qe.Range) && Qe.GetSPrediction(x).HitChance >= SpellHitChance(Config, "qe.hit.chance"))) { UseQe(enemy); } } if (R.IsReady() && Config.Item("r.combo").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range) && !BuffCheck(x) && Config.Item("r.combo." + x.ChampionName).GetValue <bool>())) { if (enemy.Health < R.GetDamage(enemy)) { R.CastOnUnit(enemy); R.LastCastAttemptT = Environment.TickCount; } } } if (IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready && Config.Item("use.ignite").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Player.Spellbook.GetSpell(IgniteSlot).SData.CastRange) && x.Health < Q.GetDamage(x) + W.GetDamage(x))) { Player.Spellbook.CastSpell(IgniteSlot, enemy); } } }