public static void Execute() { #region Auto Q if (Config.Misc.Menu.GetCheckBoxValue("Config.Misc.Another.Q.AlwaysStun") && SpellManager.Q.IsReady()) { foreach (var e in EntityManager.Heroes.Enemies.Where(h => h.IsValid && h.IsAlive() && h.IsInRange(Player.Instance, SpellManager.Q.Range) && (h.HasBuffOfType(BuffType.Stun) || h.HasBuffOfType(BuffType.Knockup) || h.HasBuffOfType(BuffType.Fear))).OrderByDescending(h => h.Health)) { SpellManager.Q.Cast(SpellManager.Q.GetPrediction(e).CastPosition); break; } } #endregion #region Flash R if (Config.Combo.Menu.GetCheckBoxValue("Config.Combo.R.FlashRAuto") && SpellManager.R.IsReady() && SpellManager.Flash.IsReady()) { foreach (var e in EntityManager.Heroes.Enemies.Where(h => h.IsValid && h.IsAlive() && !h.IsInvulnerable && h.IsInRange(Player.Instance, SpellManager.R.Range + SpellManager.Flash.Range - 50))) { if (e.Distance(Player.Instance) > SpellManager.Flash.Range && e.CountEnemyChampionsInRange(550) <= 1) { Other.FlashR(e); break; } } } #endregion #region KillSteal foreach (var e in EntityManager.Heroes.Enemies.Where(h => h.IsValid && h.IsAlive() && h.IsInRange(Player.Instance.Position, SpellManager.Q.Range) && !h.IsInvulnerable)) { float health = Prediction.Health.GetPrediction(e, 250); if (Config.Misc.Menu.GetCheckBoxValue("Config.Misc.KillSteal.Q") && SpellManager.Q.IsReady() && health <= Damage.GetQDamage(e)) { SpellManager.Q.Cast(SpellManager.Q.GetPrediction(e).CastPosition); break; } if (Config.Misc.Menu.GetCheckBoxValue("Config.Misc.KillSteal.W") && SpellManager.W.IsReady() && health <= Damage.GetWDamage(e) && e.IsInRange(Player.Instance, SpellManager.W.Range)) { SpellManager.W.Cast(SpellManager.W.GetPrediction(e).CastPosition); break; } if (Config.Misc.Menu.GetCheckBoxValue("Config.Misc.KillSteal.R") && SpellManager.R.IsReady() && health + 5 <= Damage.GetRDamage(e) && e.IsInRange(Player.Instance, SpellManager.R.Range)) { SpellManager.R.Cast(e); break; } } #endregion #region Jungle steal if (SpellManager.R.IsReady() && Config.Farm.Menu.GetCheckBoxValue("Config.Farm.R.Status") && Config.Farm.Menu.GetCheckBoxValue("Config.Farm.R.Steal")) { var monsters = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Instance.Position, SpellManager.Q.Range); if (monsters != null && monsters.Any()) { foreach (var e in monsters.Where(t => t.IsInRange(Player.Instance, SpellManager.R.Range) && Other.BigMonsters.Contains(t.BaseSkinName))) { if (e.Health + 3 <= Damage.GetRDamage(e) && Config.Farm.Menu.GetCheckBoxValue($"Config.Farm.R.Monster.{e.BaseSkinName}")) { SpellManager.R.Cast(e); } } } } #endregion #region Auto harass var target = TargetSelector.GetTarget(SpellManager.Q.Range, DamageType.Mixed); if (target == null || target.IsDead) { return; } if (Player.Instance.Position.IsUnderEnemyTurret() || Player.Instance.Position.IsGrass() && Player.Instance.CountAllyChampionsInRange(150) >= 1 && !target.Position.IsGrass()) { return; // anti trap destroyer Fappa } if (chance(Config.Harass.Menu.GetSliderValue("Config.AutoHarass.Q.Chance")) && Config.Harass.Menu.GetCheckBoxValue("Config.AutoHarass.Q.Status") && SpellManager.Q.IsReady() && Player.Instance.ManaPercent >= Config.Harass.Menu.GetSliderValue("Config.Harass.Q.Mana")) { var predition = SpellManager.Q.GetPrediction(target); if (predition.HitChancePercent >= Config.Harass.Menu.GetSliderValue("Config.Harass.Q.HitChance")) { SpellManager.Q.Cast(predition.CastPosition); } } if (chance(Config.Harass.Menu.GetSliderValue("Config.AutoHarass.W.Chance")) && Config.Harass.Menu.GetCheckBoxValue("Config.AutoHarass.W.Status") && SpellManager.W.IsReady() && Player.Instance.ManaPercent >= Config.Harass.Menu.GetSliderValue("Config.Harass.W.Mana")) { var predition = SpellManager.W.GetPrediction(target); if (predition.HitChancePercent >= Config.Harass.Menu.GetSliderValue("Config.Harass.W.HitChance")) { SpellManager.W.Cast(predition.CastPosition); } } #endregion }
public static void OnTick(EventArgs args) { if (Player.Instance.IsDead || Player.Instance.IsRecalling()) { return; } if (Core.GameTickCount - LastAttack > 5000) { Other.SetSpikes(false); } PermaActive.Execute(); var flags = Orbwalker.ActiveModesFlags; #region Flags checker if (flags.HasFlag(Orbwalker.ActiveModes.Combo)) { try { Combo.Execute(); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); } } if (flags.HasFlag(Orbwalker.ActiveModes.Harass)) { try { Harass.Execute(); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); } } if (flags.HasFlag(Orbwalker.ActiveModes.LastHit)) { try { LastHit.Execute(); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); } } if (flags.HasFlag(Orbwalker.ActiveModes.LaneClear)) { try { LaneClear.Execute(); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); } } if (flags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { try { JungleClear.Execute(); } catch (Exception e) { Console.WriteLine("{0} Exception caught.", e); } } if (Config.Combo.Menu.GetKeyBindValue("Config.Combo.R.FlashR")) { if (SpellManager.R.IsReady() && SpellManager.Flash.IsReady()) { foreach (var e in EntityManager.Heroes.Enemies.Where(h => h.IsValid && h.IsAlive() && !h.IsInvulnerable)) { if (!e.HasSpellshield() && e.IsInRange(Player.Instance, SpellManager.R.Range + 200)) { Other.FlashR(e); break; } } } } #endregion }