private void QLogic(HitChance hitChance) { var target = TargetSelector.GetTarget(Q); if (target != null) { var prediction = CPrediction.Line(Q, target, hitChance); if (prediction.TotalHits <= 0 || prediction.CastPosition.Equals(Vector3.Zero) || SpellCollision(Q, target) && !Orbwalking.InAutoAttackRange(target)) { var newTarget = TargetSelector.GetTarget( Q, true, default(Vector3), new List <Obj_AI_Hero> { target }); if (newTarget != null && !SpellCollision(Q, newTarget)) { prediction = CPrediction.Line(Q, newTarget, hitChance); } } if (prediction.TotalHits > 0 && !prediction.CastPosition.Equals(Vector3.Zero)) { Q.Cast(prediction.CastPosition); } } }
private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, bool simulated = false, string mode = "combo") { try { if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase)) { return(false); } var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true))) { if (!simulated) { R.Cast(pred.CastPosition); var aaTarget = TargetSelector.GetTargets(Player.AttackRange + Player.BoundingRadius * 3f) .FirstOrDefault(Orbwalking.InAutoAttackRange); if (aaTarget != null) { Player.IssueOrder(GameObjectOrder.AttackUnit, aaTarget); } } return(true); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (target == null || !Ultimate.IsActive(mode)) { return(false); } var pred = CPrediction.Circle(R, target, hitChance); if (pred.TotalHits > 0) { if (Ultimate.Check(mode, pred.Hits)) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode, HitChance hitChance) { try { if (Ultimate.ShouldSingle(mode)) { return; } foreach (var t in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t))) { var pred = CPrediction.Circle(R, t, hitChance); if (pred.TotalHits > 0) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); break; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static int HitECount(AIBaseClient target) { return (FeatherList.Select( f => CPrediction.GetLineAoeCanHit(Me.PreviousPosition.Distance(f.PreviousPosition), 55, target, HitChance.High, f.PreviousPosition)).Count(pred => pred)); }
internal static int HitECount(Obj_AI_Base target) { return (FeatherList.Select( f => CPrediction.GetLineAoeCanHit(Me.ServerPosition.Distance(f.ServerPosition), 55, target, HitChance.High, f.ServerPosition)).Count(pred => pred)); }
protected override void Combo() { var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>(); var r = Ultimate.IsActive(UltimateModeType.Combo); if (e && !Q.IsCharging && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value > 0; if (Menu.Item(Menu.Name + ".combo.e-settings.always").GetValue <bool>() || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value || E.IsKillable(target) || CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >= Menu.Item(Menu.Name + ".combo.e-settings.min").GetValue <Slider>().Value) { ELogic(target, E.GetHitChance("combo")); } } } if (q && Q.IsReady()) { var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value > 0; if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-settings.always").GetValue <bool>() || target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value || CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >= Menu.Item(Menu.Name + ".combo.q-settings.min").GetValue <Slider>().Value || Q.IsKillable(target)) { QLogic( target, Q.GetHitChance("combo"), Menu.Item(Menu.Name + ".combo.q-settings.fast-cast-min").GetValue <Slider>().Value); } } } if (r && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null) { if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"), target)) { RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo")); } } } }
protected override void Combo() { var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(); var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(); var useR = _ultimate.IsActive(UltimateModeType.Combo) && R.IsReady(); if (useR) { var target = TargetSelector.GetTarget(R.Range, R.DamageType); if (target != null) { if (!RLogic(UltimateModeType.Combo, target)) { RLogicSingle(UltimateModeType.Combo); } } } if (useE) { var target = TargetSelector.GetTarget((E.Range + Player.AttackRange) * 0.9f, E.DamageType); if (target != null) { var pos = Menu.Item(Menu.Name + ".combo.e-mode").GetValue <StringList>().SelectedIndex == 0 ? Utils.GetDashPosition( E, target, Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value) : Player.Position.Extend( Game.CursorPos, Math.Min(E.Range, Player.Position.Distance(Game.CursorPos))); if (!pos.Equals(Vector3.Zero) && !pos.IsUnderTurret(false)) { E.Cast(pos); } } } if (useQ) { Casting.SkillShot(Q, Q.GetHitChance("combo")); } if (useW) { var target = TargetSelector.GetTarget(W); var best = CPrediction.Circle(W, target, W.GetHitChance("combo")); if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero)) { W.Cast(best.CastPosition); } } }
protected override void Combo() { var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(); var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(); var useR = UltimateManager.Combo() && R.IsReady(); if (useQ) { Casting.SkillShot(Q, Q.GetHitChance("combo")); } if (useW) { var target = TargetSelector.GetTarget(W); var best = CPrediction.Circle(W, target, W.GetHitChance("combo")); if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero)) { W.Cast(best.CastPosition); } } if (useE) { var target = TargetSelector.GetTarget((E.Range + Player.AttackRange) * 0.9f, E.DamageType); if (target != null) { var pos = Player.Position.Extend(Game.CursorPos, E.Range); if (!pos.UnderTurret(true)) { E.Cast(pos); } } } if (useR) { var target = TargetSelector.GetTarget(R); if (target != null && Orbwalking.InAutoAttackRange(target)) { if (!RLogic(target, Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value, useQ)) { if (Menu.Item(Menu.Name + ".ultimate.combo.single").GetValue <bool>()) { RLogicSingle(useQ); } } } } }
protected override void Harass() { if (!ResourceManager.Check("harass") && !Q.IsCharging) { return; } if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && !Q.IsCharging && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".harass.e-settings.stacks").GetValue <Slider>().Value > 0; if (Menu.Item(Menu.Name + ".harass.e-settings.always").GetValue <bool>() || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".harass.e-settings.stacks").GetValue <Slider>().Value || E.IsKillable(target) || CPrediction.Circle(E, target, E.GetHitChance("harass")).TotalHits >= Menu.Item(Menu.Name + ".combo.e-settings.min").GetValue <Slider>().Value) { ELogic(target, E.GetHitChance("harass")); } } } if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady()) { var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".harass.q-settings.stacks").GetValue <Slider>().Value > 0; if (Q.IsCharging || Menu.Item(Menu.Name + ".harass.q-settings.always").GetValue <bool>() || target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".harass.q-settings.stacks").GetValue <Slider>().Value || Q.IsKillable(target) || CPrediction.Line(Q, target, Q.GetHitChance("harass")).TotalHits >= Menu.Item(Menu.Name + ".harass.q-settings.min").GetValue <Slider>().Value) { QLogic( target, Q.GetHitChance("harass"), Menu.Item(Menu.Name + ".harass.q-settings.fast-cast-min").GetValue <Slider>().Value); } } } }
private void ELogic(Obj_AI_Hero target, HitChance hitChance) { try { if (target == null) { return; } var best = CPrediction.Circle(E, target, hitChance); if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero)) { E.Cast(best.CastPosition); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true))) { R.Cast(pred.CastPosition); return(true); } return(false); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (_ultimate.IsActive(mode)) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && _ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, AIHeroClient target) { try { if (Ultimate.IsActive(mode)) { var pred = CPrediction.Line(R, target, R.GetHitChance("combo")); if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void QLogic(HitChance hitChance) { var target = TargetSelector.GetTarget(Q); if (target != null) { var prediction = CPrediction.Line(Q, target, hitChance, false); if (prediction.TotalHits >= 1) { var firstHit = prediction.Hits.OrderBy(h => h.Distance(Player)).FirstOrDefault(); if (firstHit != null && !Utils.IsWallBetween(Player.Position, firstHit.Position)) { if (!GameObjects.EnemyHeroes.Any(e => e.IsValidTarget() && Orbwalking.InAutoAttackRange(e)) || IsReloading() || Q.IsKillable(target) || prediction.TotalHits >= 2) { Q.Cast(prediction.CastPosition); } } } } }
private void RLogicSingle(UltimateModeType mode) { try { if (_ultimate.ShouldSingle(mode)) { foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t))) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0) { R.Cast(pred.CastPosition); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private void QLogic(Obj_AI_Hero target, HitChance hitChance, int minHealthPercent) { try { if (target == null) { return; } var pred = CPrediction.Line(Q, target, hitChance); if (pred.TotalHits > 0 && (QIsKillable(target, GetQCollisionsCount(target, pred.CastPosition)) || Player.HealthPercent <= minHealthPercent)) { Q.Cast(pred.CastPosition); } if (!Q.IsCharging) { if (QMaxRangeHit(target)) { Q.StartCharging(); } } if (Q.IsCharging && (!QMaxRangeHit(target) || IsFullyCharged())) { var pred2 = CPrediction.Line(Q, target, hitChance); if (pred2.TotalHits > 0) { Q.Cast(pred2.CastPosition); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected override void Harass() { if (!ResourceManager.Check("harass")) { return; } if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady()) { QLogic(Q.GetHitChance("harass")); } if (Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady()) { var target = TargetSelector.GetTarget(W); if (target != null) { var best = CPrediction.Line(W, target, W.GetHitChance("harass")); if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero)) { W.Cast(best.CastPosition); } } } }
protected override void Combo() { var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(); var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(); var useR = Ultimate.IsActive(UltimateModeType.Combo) && R.IsReady(); if (useR) { var target = TargetSelector.GetTarget(R.Range, R.DamageType); if (target != null) { if (!RLogic(UltimateModeType.Combo, target)) { RLogicSingle(UltimateModeType.Combo); } } } if (useE) { var target = TargetSelector.GetTarget((E.Range + Q.Range) * 0.9f, E.DamageType); if (target != null) { var safety = Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value; var playerEnemies = GameObjects.EnemyHeroes.Where(e => e.IsValidTarget() && e.Distance(Player) < safety).ToList(); if (playerEnemies.Count >= 2 || playerEnemies.Count == 1 && playerEnemies.First().HealthPercent > Player.HealthPercent) { var pos = Menu.Item(Menu.Name + ".combo.e-mode").GetValue <StringList>().SelectedIndex == 0 ? Utils.GetDashPosition( E, target, Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value) : Player.Position.Extend( Game.CursorPos, Math.Min(E.Range, Player.Position.Distance(Game.CursorPos))); if (!pos.Equals(Vector3.Zero)) { E.Cast(pos); } } else { var newPosition = Player.Position.Extend(target.Position, E.Range); var enemies = GameObjects.EnemyHeroes.Where( e => e.IsValidTarget() && e.Distance(newPosition) < safety * 1.25f).ToList(); var allies = GameObjects.AllyHeroes.Where( e => e.IsValidTarget(float.MaxValue, false) && e.Distance(newPosition) < safety) .ToList(); var avgEnemyHealth = enemies.Average(e => e.HealthPercent); if (enemies.Count - allies.Count <= 1 || enemies.Count - allies.Count <= 2 && allies.Average(e => e.HealthPercent) > avgEnemyHealth && (Player.HealthPercent >= 50 || avgEnemyHealth < 30)) { E.Cast(newPosition); } } } } if (useQ) { QLogic(Q.GetHitChance("combo")); } if (useW) { var target = TargetSelector.GetTarget(W); if (target != null) { var best = CPrediction.Line(W, target, W.GetHitChance("combo")); if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero)) { W.Cast(best.CastPosition); } } } }
protected override void Combo() { var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>(); var r = UltimateManager.Combo(); if (e && !Q.IsCharging && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value > 0; if (Menu.Item(Menu.Name + ".combo.e-always").GetValue <bool>() || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value || E.IsKillable(target) || CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >= Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value) { ELogic(target, E.GetHitChance("combo")); } } } if (q && Q.IsReady()) { var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.q-stacks").GetValue <Slider>().Value > 0; if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-always").GetValue <bool>() || Menu.Item(Menu.Name + ".combo.q-range").GetValue <bool>() && !Orbwalking.InAutoAttackRange(target) || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-stacks").GetValue <Slider>().Value || CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >= Menu.Item(Menu.Name + ".combo.q-min").GetValue <Slider>().Value || Q.IsKillable(target)) { QLogic( target, Q.GetHitChance("combo"), Menu.Item(Menu.Name + ".combo.q-fast-cast-min").GetValue <Slider>().Value); } } } if (r && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null) { if ( !RLogic( target, R.GetHitChance("combo"), Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady())) { if (Menu.Item(Menu.Name + ".ultimate.combo.duel").GetValue <bool>()) { RLogicDuel(q, e); } } } } }
protected override void Combo() { var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(); var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(); var useR = Ultimate.IsActive(UltimateModeType.Combo) && R.IsReady(); if (useR) { var target = TargetSelector.GetTarget(R.Range, R.DamageType); if (target != null) { if (!RLogic(UltimateModeType.Combo, target)) { RLogicSingle(UltimateModeType.Combo); } } } if (useE && !Player.IsWindingUp && !IsReloading()) { var target = TargetSelector.GetTarget( E.Range + Player.AttackRange + Player.BoundingRadius, E.DamageType); if (target != null) { var pos = Menu.Item(Menu.Name + ".combo.e-mode").GetValue <StringList>().SelectedIndex == 0 ? Utils.GetDashPosition( E, target, Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value) : Player.Position.Extend( Game.CursorPos, Math.Min(E.Range, Player.Position.Distance(Game.CursorPos))); if (!pos.Equals(Vector3.Zero)) { if (GetAmmoCount() == 1 && !pos.IsUnderTurret(false) || (!GameObjects.EnemyHeroes.Any(e => e.IsValidTarget() && Orbwalking.InAutoAttackRange(e)) && GameObjects.EnemyHeroes.Any( e => e.IsValidTarget() && pos.Distance(e.Position) < Orbwalking.GetRealAutoAttackRange(e)) && target.Health < Player.GetAutoAttackDamage(target) * 2)) { E.Cast(pos); } } } } if (useQ) { QLogic(Q.GetHitChance("combo")); } if (useW) { var target = TargetSelector.GetTarget(W); if (target != null) { var best = CPrediction.Circle(W, target, W.GetHitChance("combo")); if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero)) { W.Cast(best.CastPosition); } } } }