void ELogic() { if (EntityManager.Heroes.Enemies.Any(t => IsRendKillable(t))) { E.Cast(); } if (EntityManager.MinionsAndMonsters.Monsters.Any(IsRendKillable) || ObjectManager.Get <Obj_AI_Minion>().Any(m => (m.CharData.BaseSkinName.Contains("Baron") || m.CharData.BaseSkinName.Contains("Dragon") || m.CharData.BaseSkinName.Contains("Crab") || m.CharData.BaseSkinName.Contains("Herald")) && this.IsRendKillable(m))) { E.Cast(); } if (AlwaysUseEIf2MinionsKillableBool && GameObjects.EnemyMinions.Count(IsRendKillable) >= 2) { E.Cast(); } if (UseEIfResettedByAMinionBool && ObjectManager.Player.ManaPercent > EResetByAMinionMinManaSlider) { if (ValidTargets.Any(e => e != null ? e.Distance(ObjectManager.Player.ServerPosition) > 615 : false && GetRendBuff(e).Count >= MinEnemyStacksForEMinionResetSlider) && EntityManager.MinionsAndMonsters.EnemyMinions.Any(m => IsRendKillable(m))) { E.Cast(); } } if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)) && GameObjects.EnemyMinions.Any(m => IsRendKillable(m) && Health.GetPrediction(m, (int)((Game.Ping / 2) + ObjectManager.Player.AttackCastDelay * 1000)) < 1 && Health.GetPrediction(m, (int)((Game.Ping / 2) + 100)) > 1)) { E.Cast(); } }
private void WLogic() { if (W.IsReady() && !IsWActive() && ValidTargets.Any(h => h.Health > 1 && h.Distance(ObjectManager.Player.ServerPosition) < GetAttackRangeAfterWIsApplied() && h.LSIsValidTarget()) && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { W.Cast(); } }
void ELogic() { if (ValidTargets.Any(t => IsRendKillable(t))) { E.Cast(); } if (GameObjects.JungleLarge.Any(IsRendKillable) || ObjectManager.Get <Obj_AI_Minion>().Any( m => (m.CharData.BaseSkinName.Contains("Baron") || m.CharData.BaseSkinName.Contains("Dragon") || m.Name.Contains("Crab") || m.Name.Contains("Herald")) && this.IsRendKillable(m))) { E.Cast(); } if (AlwaysUseEIf2MinionsKillableBool && GameObjects.EnemyMinions.Count(IsRendKillable) >= 2) { E.Cast(); } if (UseEIfResettedByAMinionBool && ObjectManager.Player.ManaPercent > EResetByAMinionMinManaSlider.Value) { if ( ValidTargets.Any(e => e.Distance(ObjectManager.Player.ServerPosition) > 615 && GetRendBuff(e).Count >= MinEnemyStacksForEMinionResetSlider.Value) && GameObjects.EnemyMinions.Any(m => IsRendKillable(m))) { E.Cast(); } } /*if (GameObjects.EnemyMinions.Any(m => m.CharData.BaseSkinName.Contains("MinionSiege") && IsRendKillable(m))) * { * E.Cast(); * }*/ if ((Orbwalker.ActiveMode == OrbwalkingMode.LaneClear || Orbwalker.ActiveMode == OrbwalkingMode.LastHit) && GameObjects.EnemyMinions.Any( m => IsRendKillable(m) && Health.GetPrediction(m, (int)((Game.Ping / 2) + ObjectManager.Player.AttackCastDelay * 1000)) < 1 && Health.GetPrediction(m, (int)((Game.Ping / 2) + 100)) > 1)) { E.Cast(); } }
public override void OnUpdate(EventArgs args) { base.OnUpdate(args); if (ValidTargets.Any(t => IsRendKillable(t))) { E.Cast(); } if (GameObjects.JungleLarge.Any(IsRendKillable) || GameObjects.EnemyMinions.Any( m => m.CharData.BaseSkinName.Contains("Baron") || m.CharData.BaseSkinName.Contains("Dragon") && this.IsRendKillable(m))) { E.Cast(); } if (AlwaysUseEIf2MinionsKillableBool && GameObjects.EnemyMinions.Count(IsRendKillable) >= 2) { E.Cast(); } if (Orbwalker.ActiveMode == OrbwalkingMode.Combo) { var target = TargetSelector.GetTarget(900); if (target == null || !target.IsHPBarRendered) { return; } if (ObjectManager.Player.ManaPercent > UseQManaSlider.Value) { if (target.Distance(ObjectManager.Player) > 585 && target.Distance(ObjectManager.Player) < 1100 && UseQCantAABool) { var prediction = Q.GetPrediction(target); var predictedPos = prediction.UnitPosition; if (prediction.CollisionObjects.Count == 0 && (int)prediction.Hitchance >= (int)HitChance.High) { Q.Cast(predictedPos); } } } } }
void WLogic() { var wTarget = TargetSelector.GetTarget(1100, DamageType.Physical); if (wTarget != null && !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None) && UseWHarass && !ValidTargets.Any(e => e.InAutoAttackRange())) { var pred = W.GetPrediction(wTarget); if (!pred.CollisionObjects.Any() && pred.UnitPosition.Distance(ObjectManager.Player.ServerPosition) < 1100) { if (pred.UnitPosition.CountEnemyHeroesInRange(400) >= 1) { W.Cast(pred.UnitPosition); } } } }
private bool IsDangerousPosition(Vector3 pos) { return(ValidTargets.Any(e => e.IsMelee && e.Distance(pos) < 375) || (pos.UnderTurret(true) && !ObjectManager.Player.ServerPosition.UnderTurret(true))); }
private void OnOrbwalkingAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs) { if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack) { Orbwalker.ForceTarget = null; var possible2WTarget = ValidTargets.FirstOrDefault( h => h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 500 && h.GetBuffCount("vaynesilvereddebuff") == 2); if (Orbwalker.ActiveMode != OrbwalkingMode.Combo) { if (possible2WTarget.IsValidTarget() && UseEAs3rdWProcBool && possible2WTarget.GetWaypoints().LastOrDefault().Distance(ObjectManager.Player.ServerPosition) < 1000) { if (EDelaySlider.Value > 0) { var thisEnemy = possible2WTarget; DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(possible2WTarget); } } if (orbwalkingActionArgs.Target is Obj_AI_Hero && UseQBool) { if (Q.IsReady()) { var tg = orbwalkingActionArgs.Target as Obj_AI_Hero; if (tg != null) { var mode = QModeStringList.SelectedValue; var tumblePosition = Game.CursorPos; switch (mode) { case "PRADA": tumblePosition = GetTumblePos(tg); break; default: tumblePosition = Game.CursorPos; break; } if (tumblePosition.Distance(ObjectManager.Player.Position) > 2000 || IsDangerousPosition(tumblePosition)) { return; } Q.Cast(tumblePosition); } } } if (orbwalkingActionArgs.Target is Obj_AI_Minion && Orbwalker.ActiveMode == OrbwalkingMode.LaneClear) { var tg = orbwalkingActionArgs.Target as Obj_AI_Minion; if (E.IsReady()) { if (this.IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.IsValidTarget() && this.UseEJungleFarm) { if (this.EDelaySlider.Value > 0) { var thisEnemy = tg; DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(tg); } } if (this.UseQFarm && this.Q.IsReady()) { if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.IsValidTarget() && !this.IsDangerousPosition(Game.CursorPos)) { Q.Cast(Game.CursorPos); } if (ObjectManager.Player.UnderAllyTurret() && GameObjects.EnemyMinions.Count( m => m.Position.Distance(ObjectManager.Player.Position) < 550 && m.Health < ObjectManager.Player.GetAutoAttackDamage(m) && Health.GetPrediction(m, (int)(100 + (Game.Ping / 2) + ObjectManager.Player.AttackCastDelay * 1000)) > 3) > 1 && !this.IsDangerousPosition(Game.CursorPos)) { Q.Cast(Game.CursorPos); } if (ObjectManager.Player.UnderAllyTurret()) { if (GameObjects.EnemyMinions.Count( m => m.Position.Distance(ObjectManager.Player.Position) < 550 && m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + Q.GetDamage(m)) > 0 && !this.IsDangerousPosition(Game.CursorPos)) { Q.Cast(Game.CursorPos); } } } } if (UseQOnlyAt2WStacksBool && Orbwalker.ActiveMode != OrbwalkingMode.Combo && possible2WTarget.IsValidTarget()) { Q.Cast(GetTumblePos(possible2WTarget)); } } if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack) { var possible2WTarget = ValidTargets.FirstOrDefault( h => h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 500 && h.GetBuffCount("vaynesilvereddebuff") == 2); if (TryToFocus2WBool && possible2WTarget.IsValidTarget()) { Orbwalker.ForceTarget = possible2WTarget; } if (ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool) { if ( ValidTargets.Any( e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350 && e.IsMelee)) { orbwalkingActionArgs.Process = false; } } var possibleTarget = Variables.TargetSelector.GetTarget(615, DamageType.Physical); if (possibleTarget != null && orbwalkingActionArgs.Target is Obj_AI_Minion && UseQBonusOnEnemiesNotCS && ObjectManager.Player.HasBuff("vaynetumblebonus")) { Orbwalker.ForceTarget = possibleTarget; Orbwalker.Attack(possibleTarget); orbwalkingActionArgs.Process = false; } var possibleNearbyMeleeChampion = ValidTargets.FirstOrDefault( e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350); if (possibleNearbyMeleeChampion.IsValidTarget()) { if (Q.IsReady() && UseQBool) { var pos = ObjectManager.Player.ServerPosition.Extend(possibleNearbyMeleeChampion.ServerPosition, -350); if (!IsDangerousPosition(pos)) { Q.Cast(pos); orbwalkingActionArgs.Process = false; } } if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady()) { var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName select tuplet.Item2; if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null) { if ( possibleMeleeChampionsGapclosers.Any( gapcloserEntry => possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady())) { return; } } if ( possibleNearbyMeleeChampion.GetWaypoints() .LastOrDefault() .Distance(ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange) { if (EDelaySlider.Value > 0) { var thisEnemy = possibleNearbyMeleeChampion; DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(possibleNearbyMeleeChampion); } } } } }
private void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args) { if (args.Process) { IsWindingUp = true; } else { IsWindingUp = false; } if (R.IsReady() && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && UseRBool && args.Target is EloBuddy.AIHeroClient && (!(args.Target as EloBuddy.AIHeroClient).IsUnderEnemyTurret() || EloBuddy.ObjectManager.Player.IsUnderEnemyTurret()) && EloBuddy.ObjectManager.Player.CountAllyHeroesInRange(800) >= EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800)) { R.Cast(); } var possible2WTarget = ValidTargets.FirstOrDefault( h => h.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 500 && h.GetBuffCount("vaynesilvereddebuff") == 2); if (TryToFocus2WBool && possible2WTarget.LSIsValidTarget()) { Orbwalker.ForcedTarget = (possible2WTarget); } if (EloBuddy.ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool) { if ( ValidTargets.Any( e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350 && e.IsMelee)) { args.Process = false; } } var possibleTarget = TargetSelector.GetTarget(615, EloBuddy.DamageType.Physical); if (possibleTarget != null && args.Target is EloBuddy.Obj_AI_Minion && UseQBonusOnEnemiesNotCS && EloBuddy.ObjectManager.Player.HasBuff("vaynetumblebonus")) { Orbwalker.ForcedTarget = (possibleTarget); args.Process = false; } var possibleNearbyMeleeChampion = ValidTargets.FirstOrDefault( e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350); if (possibleNearbyMeleeChampion.LSIsValidTarget()) { if (Q.IsReady() && UseQBool) { var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(possibleNearbyMeleeChampion.ServerPosition, -350); if (!IsDangerousPosition(pos)) { Q.Cast(pos); args.Process = false; } } if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady()) { var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName select tuplet.Item2; if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null) { if ( possibleMeleeChampionsGapclosers.Any( gapcloserEntry => possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady())) { return; } } if ( LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(possibleNearbyMeleeChampion) .LastOrDefault() .Distance(EloBuddy.ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange) { if (EDelaySlider > 0) { var thisEnemy = possibleNearbyMeleeChampion; LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy)); return; } E.CastOnUnit(possibleNearbyMeleeChampion); } } } }
private void OnOrbwalkerAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs) { if (orbwalkingActionArgs.Target == null) { return; } if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack) { Orbwalker.ForceTarget = null; if (UseEIfResettedByAMinionBool && ObjectManager.Player.ManaPercent > EResetByAMinionMinManaSlider.Value) { if ( ValidTargets.Any(e => e.Distance(ObjectManager.Player.ServerPosition) > 615 && GetRendBuff(e).Count >= MinEnemyStacksForEMinionResetSlider.Value) && GameObjects.EnemyMinions.Any(m => IsRendKillable(m))) { E.Cast(); } } if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Q.IsReady()) { var hero = orbwalkingActionArgs.Target as Obj_AI_Hero; if (hero != null) { if (hero.IsHPBarRendered) { var pred = Q.GetPrediction(hero); if (pred.Hitchance >= HitChance.High) { Q.Cast(pred.UnitPosition); return; } } } else { foreach (var target in ValidTargets.Where(t => t.Distance(ObjectManager.Player) < 900)) { if (ObjectManager.Player.ManaPercent > UseQManaSlider.Value) { var pred = Q.GetPrediction(target); if (pred.Hitchance >= HitChance.High) { Q.Cast(pred.UnitPosition); return; } } } } } if (UseQStackTransferBool && orbwalkingActionArgs.Target is Obj_AI_Minion) { var target = orbwalkingActionArgs.Target as Obj_AI_Minion; if (GetRendBuff(target).Count >= UseQStackTransferMinStacksSlider && target.Health < Q.GetDamage(target)) { foreach (var enemy in ValidTargets.Where(en => en.Distance(ObjectManager.Player) < 900)) { var pred = Q.GetPrediction(enemy, false); if (pred.CollisionObjects.All(co => co is Obj_AI_Minion && co.Health < Q.GetDamage(co)) && pred.CollisionObjects.Any(m => m.NetworkId == target.NetworkId)) { Q.Cast(pred.UnitPosition); } } } } } if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack) { if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && FocusWBuffedEnemyBool) { var wMarkedEnemy = ValidTargets.FirstOrDefault( h => h.Distance(ObjectManager.Player.ServerPosition) < 600 && h.HasBuff("kalistacoopstrikemarkally")); if (wMarkedEnemy != null && wMarkedEnemy.IsValidTarget()) { Orbwalker.ForceTarget = wMarkedEnemy; } } if (Orbwalker.ActiveMode != OrbwalkingMode.Combo && FocusWBuffedEnemyInHarassBool) { var wMarkedEnemy = ValidTargets.FirstOrDefault( h => h.Distance(ObjectManager.Player.ServerPosition) < 600 && h.HasBuff("kalistacoopstrikemarkally")); if (wMarkedEnemy != null && wMarkedEnemy.IsValidTarget()) { Orbwalker.ForceTarget = wMarkedEnemy; } } if (Orbwalker.ActiveMode == OrbwalkingMode.LaneClear && orbwalkingActionArgs.Target.Type != GameObjectType.obj_AI_Hero) { if (FocusWBuffedMinions) { Orbwalker.ForceTarget = GameObjects.EnemyMinions.FirstOrDefault( m => m.Distance(ObjectManager.Player.ServerPosition) < 615 && m.HasBuff("kalistacoopstrikemarkally") && m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + W.GetDamage(m)); } } } }
public override void OnUpdate(EventArgs args) { var wTarget = TargetSelector.GetTarget(1100); var rTarget = TargetSelector.GetTarget(1400, DamageType.Physical, false); if (W.IsReady() && Orbwalker.ActiveMode != OrbwalkingMode.None && UseWHarass && !ValidTargets.Any(e => e.InAutoAttackRange())) { var pred = W.GetPrediction(wTarget); if (!pred.CollisionObjects.Any() && pred.UnitPosition.Distance(ObjectManager.Player.ServerPosition) < 1100) { if (pred.UnitPosition.CountEnemyHeroesInRange(400) >= 1) { W.Cast(pred.UnitPosition); } } } if (R.IsReady() && Orbwalker.ActiveMode == OrbwalkingMode.Combo && UseRCombo) { var pred = R.GetPrediction(rTarget); if (pred.Hitchance >= HitChance.High) { R.Cast(pred.UnitPosition); } } }