public void OnCombo() { var qTarget = TargetSelector.GetTarget(Variables.Spells[SpellSlot.Q].Range / 1.5f, TargetSelector.DamageType.Magical); if (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo) && qTarget.IsValidTarget()) { var targetPrediction = LeagueSharp.Common.Prediction.GetPrediction(qTarget, 0.75f); if (ObjectManager.Player.HealthPercent >= 35) { var enemyHeroesPositions = HeroManager.Enemies.Select(hero => hero.Position.To2D()).ToList(); var Groups = PositioningHelper.GetCombinations(enemyHeroesPositions); foreach (var group in Groups) { if (group.Count >= 3) { var Circle = MEC.GetMec(group); if (Circle.Center.To3D().CountEnemiesInRange(Variables.Spells[SpellSlot.Q].Range) >= 2 && Circle.Center.Distance(ObjectManager.Player) <= Variables.Spells[SpellSlot.Q].Range && Circle.Radius <= Variables.Spells[SpellSlot.Q].Width) { this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.Q, Where = Circle.Center.To3D() }); return; } } } } this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.Q, Where = targetPrediction.UnitPosition }); } if (Variables.Spells[SpellSlot.W].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo) && qTarget.IsValidTarget(Variables.Spells[SpellSlot.W].Range)) { var ballLocation = this.BallManager.BallPosition; var minWEnemies = 2; if (ObjectManager.Player.CountEnemiesInRange(Variables.Spells[SpellSlot.Q].Range + 245f) >= 2) { if (ballLocation.CountEnemiesInRange(Variables.Spells[SpellSlot.W].Range) >= minWEnemies) { this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.W, }); } } else { if (ballLocation.CountEnemiesInRange(Variables.Spells[SpellSlot.W].Range) >= 1) { this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.W, }); } } } if (Variables.Spells[SpellSlot.R].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo)) { if (ObjectManager.Player.CountEnemiesInRange(Variables.Spells[SpellSlot.Q].Range + 250f) > 1) { var EnemyPositions = HeroManager.Enemies.Select(hero => hero.Position.To2D()).ToList(); var Combinations = PositioningHelper.GetCombinations(EnemyPositions); foreach (var group in Combinations) { if (group.Count >= 2) { var Circle = MEC.GetMec(group); if (Variables.Spells[SpellSlot.Q].IsReady() && Circle.Center.Distance(ObjectManager.Player) <= Variables.Spells[SpellSlot.Q].Range && Circle.Radius <= Variables.Spells[SpellSlot.R].Range && Circle.Center.To3D().CountEnemiesInRange(Variables.Spells[SpellSlot.R].Range) >= 2) { Variables.Spells[SpellSlot.Q].Cast(Circle.Center.To3D()); var arrivalDelay = (int) (BallManager.BallPosition.Distance(Circle.Center.To3D()) / Variables.Spells[SpellSlot.Q].Speed * 1000f + Variables.Spells[SpellSlot.Q].Delay * 1000f + Game.Ping / 2f + 100f); Utility.DelayAction.Add( arrivalDelay, () => { //Extra check just for safety if ( BallManager.BallPosition.CountEnemiesInRange( Variables.Spells[SpellSlot.R].Range) >= 2) { Variables.Spells[SpellSlot.R].Cast(); } }); } } } } else { var targetForQR = TargetSelector.GetTarget( Variables.Spells[SpellSlot.Q].Range / 1.2f, TargetSelector.DamageType.Magical); if (targetForQR.IsValidTarget()) { var QWDamage = ObjectManager.Player.GetComboDamage( targetForQR, new[] { SpellSlot.Q, SpellSlot.W }); var QRDamage = ObjectManager.Player.GetComboDamage( targetForQR, new[] { SpellSlot.Q, SpellSlot.W, SpellSlot.R }); var healthCheck = targetForQR.Health + 10f < QRDamage && !(targetForQR.Health + 10f < QWDamage); if (!healthCheck) { return; } var rPosition = targetForQR.ServerPosition.Extend( ObjectManager.Player.ServerPosition, Variables.Spells[SpellSlot.R].Range / 2f); if (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo) && rPosition.Distance(ObjectManager.Player.ServerPosition) <= Variables.Spells[SpellSlot.Q].Range) { Variables.Spells[SpellSlot.Q].Cast(rPosition); var actionDelay = (int) (BallManager.BallPosition.Distance(rPosition) / Variables.Spells[SpellSlot.Q].Speed * 1000f + Variables.Spells[SpellSlot.Q].Delay * 1000f + Game.Ping / 2f + 100f); Utility.DelayAction.Add( actionDelay, () => { if ( BallManager.BallPosition.CountEnemiesInRange( Variables.Spells[SpellSlot.R].Range) >= 1) { Variables.Spells[SpellSlot.R].Cast(); } }); } } } } }
public void OnMixed() { if (ObjectManager.Player.ManaPercent < Variables.AssemblyMenu.GetItemValue <Slider>("dzaio.champion.orianna.mixed.mana").Value) { return; } var qTarget = TargetSelector.GetTarget(Variables.Spells[SpellSlot.Q].Range / 1.5f, TargetSelector.DamageType.Magical); if (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Harrass) && qTarget.IsValidTarget()) { var targetPrediction = LeagueSharp.Common.Prediction.GetPrediction(qTarget, 0.75f); if (ObjectManager.Player.HealthPercent >= 35) { var enemyHeroesPositions = HeroManager.Enemies.Select(hero => hero.Position.To2D()).ToList(); var Groups = PositioningHelper.GetCombinations(enemyHeroesPositions); foreach (var group in Groups) { if (group.Count >= 3) { var Circle = MEC.GetMec(group); if (Circle.Center.To3D().CountEnemiesInRange(Variables.Spells[SpellSlot.Q].Range) >= 2 && Circle.Center.Distance(ObjectManager.Player) <= Variables.Spells[SpellSlot.Q].Range && Circle.Radius <= Variables.Spells[SpellSlot.Q].Width) { this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.Q, Where = Circle.Center.To3D() }); return; } } } } this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.Q, Where = targetPrediction.UnitPosition }); } if (Variables.Spells[SpellSlot.W].IsEnabledAndReady(ModesMenuExtensions.Mode.Harrass) && qTarget.IsValidTarget(Variables.Spells[SpellSlot.W].Range)) { var ballLocation = this.BallManager.BallPosition; var minWEnemies = 2; if (ObjectManager.Player.CountEnemiesInRange(Variables.Spells[SpellSlot.Q].Range + 245f) >= 2) { if (ballLocation.CountEnemiesInRange(Variables.Spells[SpellSlot.W].Range) >= minWEnemies) { this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.W, }); } } else { if (ballLocation.CountEnemiesInRange(Variables.Spells[SpellSlot.W].Range) >= 1) { this.BallManager.ProcessCommand(new Command() { SpellCommand = Commands.W, }); } } } }