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)); } }
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 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); }
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 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)); } }
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); } } } }
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); } } } } }