protected override void OnPostUpdate() { if (HeroListManager.Enabled("r-immobile") && R.IsReady()) { var target = GameObjects.EnemyHeroes.FirstOrDefault( t => t.IsValidTarget(R.Range) && HeroListManager.Check("r-immobile", t) && BestTargetOnlyManager.Check("r-immobile", R, t) && Utils.IsImmobile(t)); if (target != null) { Casting.SkillShot(target, R, HitChance.VeryHigh); } } if (W.Level > _wLevel) { _wLevel = W.Level; W.Range = Player.AttackRange + Player.BoundingRadius + GameObjects.EnemyHeroes.Select(e => e.BoundingRadius).DefaultIfEmpty(50).Average() + 20f * _wLevel; } if (R.Level > _rLevel) { _rLevel = R.Level; R.Range = 900f + 300f * _rLevel; } }
protected override void OnPostUpdate() { if (Q.IsReady()) { var target = GameObjects.EnemyHeroes.OrderBy(e => e.Distance(Player)) .Where(e => Q.IsInRange(e)) .FirstOrDefault(t => HeroListManager.Check("q-immobile", t) && Utils.IsImmobile(t)); if (target != null) { Q.Cast(target.Position); } } }
private float CalcUltimateDamage(Obj_AI_Hero target, float resMulti, bool rangeCheck) { try { if (target == null) { return(0); } float damage = 0; if (R.IsReady() && (!rangeCheck || R.IsInRange(target))) { var rMana = R.ManaCost * resMulti; if (rMana <= Player.Mana) { var waves = 10 + R.Level * 2 - 2; if (target.Distance(Player) < 250) { waves -= 4; } if (!Utils.IsImmobile(target)) { waves -= 3; if (!Utils.IsSlowed(target)) { waves -= 2; } } waves = Math.Max(3, waves); if (Player.Position.IsUnderTurret(false)) { waves = target.Distance(Player) > Orbwalking.GetAttackRange(target) * 1.2f ? 1 : 0; } damage += R.GetDamage(target) * waves; } } return(damage); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(0); }
/// <summary> /// Post update /// </summary> protected override void OnPostUpdate() { // Assisted Ultimate if (_ultimateManager.IsActive(UltimateModeType.Assisted) && R.IsReady()) { if (_ultimateManager.ShouldMove(UltimateModeType.Assisted)) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } if (!CastUltimate(UltimateModeType.Assisted, TargetSelector.GetTarget(R))) { CastUltimateSingle(UltimateModeType.Assisted); } } // Auto Ultimate if (_ultimateManager.IsActive(UltimateModeType.Auto) && R.IsReady()) { if (!CastUltimate(UltimateModeType.Auto, TargetSelector.GetTarget(R))) { CastUltimateSingle(UltimateModeType.Auto); } } // E Immobile targets if (HeroListManager.Enabled("e-immobile") && E.IsReady()) { var target = GameObjects.EnemyHeroes.FirstOrDefault(t => t.IsValidTarget(E.Range) && HeroListManager.Check("e-immobile", t) && BestTargetOnlyManager.Check("e-immobile", E, t) && Utils.IsImmobile(t) ); if (target != null) { E.Cast(target); } } }
protected override void Flee() { if (Menu.Item(Menu.Name + ".flee.e").GetValue <bool>() && E.IsReady()) { var enemy = GameObjects.EnemyHeroes.Where(e => e.IsValidTarget() && !Utils.IsSlowed(e) && !Utils.IsImmobile(e)) .OrderBy(e => e.Distance(Player)) .FirstOrDefault(); if (enemy != null) { Casting.SkillShot(enemy, E, HitChance.High); } } }
protected override void OnPostUpdate() { if (Ultimate.IsActive(UltimateModeType.Flash) && R.IsReady() && SummonerManager.Flash.IsReady()) { if (Ultimate.ShouldMove(UltimateModeType.Flash)) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } var targets = Targets.Where( t => t.Distance(Player) < (R.Range + R.Width + SummonerManager.Flash.Range) * 1.5f && !t.IsDashing() && (t.IsFacing(Player) ? t.Distance(Player) : R.GetPrediction(t).UnitPosition.Distance(Player.Position)) > R.Range); var backwards = Menu.Item(Menu.Name + ".ultimate.backwards").GetValue <bool>(); foreach (var target in targets) { var flashPos = Player.Position.Extend(target.Position, SummonerManager.Flash.Range); var maxHits = GetMaxRHits(HitChance.High, flashPos); if (maxHits.Item1.Count > 0) { var castPos = backwards ? Player.Position.Extend(maxHits.Item2, -(Player.Position.Distance(maxHits.Item2) * 2)) : Player.Position.Extend(maxHits.Item2, Player.Position.Distance(maxHits.Item2)); if (Ultimate.Check(UltimateModeType.Flash, maxHits.Item1)) { if (R.Cast(castPos)) { Utility.DelayAction.Add(300 + Game.Ping / 2, () => SummonerManager.Flash.Cast(flashPos)); } } else if (Ultimate.ShouldSingle(UltimateModeType.Flash)) { if ( maxHits.Item1.Where(hit => Ultimate.CheckSingle(UltimateModeType.Flash, hit)) .Any(hit => R.Cast(castPos))) { Utility.DelayAction.Add(300 + Game.Ping / 2, () => SummonerManager.Flash.Cast(flashPos)); } } } } } if (Ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady()) { if (Ultimate.ShouldMove(UltimateModeType.Assisted)) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } if (!RLogic(UltimateModeType.Assisted, R.GetHitChance("combo"))) { RLogicSingle(UltimateModeType.Assisted, R.GetHitChance("combo"), false); } } if (Ultimate.IsActive(UltimateModeType.Auto) && R.IsReady()) { if (!RLogic(UltimateModeType.Auto, R.GetHitChance("combo"))) { RLogicSingle(UltimateModeType.Auto, R.GetHitChance("combo")); } } if (HeroListManager.Enabled("w-immobile") && W.IsReady()) { var target = Targets.FirstOrDefault( t => HeroListManager.Check("w-immobile", t) && BestTargetOnlyManager.Check("w-immobile", W, t) && Utils.IsImmobile(t)); if (target != null) { Casting.SkillShot(target, W, HitChance.High); } } }
public static void UseFleeItems() { if (_menu == null || !_menu.Item(_menu.Name + ".enabled").GetValue <bool>()) { return; } try { foreach (var item in Items.Where( i => i.Flags.HasFlag(ItemFlags.Flee) && _menu.Item(_menu.Name + "." + i.Name + ".flee").GetValue <bool>() && i.Item.IsOwned() && i.Item.IsReady() && i.Item.IsOwned() && i.Item.IsReady() && ObjectManager.Player.CountEnemiesInRange(i.Range) >= _menu.Item(_menu.Name + "." + i.Name + ".min-enemies-range").GetValue <Slider>().Value&& ObjectManager.Player.HealthPercent <= _menu.Item(_menu.Name + "." + i.Name + ".player-health-below").GetValue <Slider>().Value&& ObjectManager.Player.HealthPercent >= _menu.Item(_menu.Name + "." + i.Name + ".player-health-above").GetValue <Slider>().Value)) { if (item.CastType != CastType.Self) { var lItem = item; var localItem = item; foreach (var enemy in GameObjects.EnemyHeroes.Where( t => t.IsValidTarget() && !Invulnerable.Check(t) && t.HealthPercent <= _menu.Item(_menu.Name + "." + lItem.Name + ".target-health-below") .GetValue <Slider>() .Value&& t.HealthPercent >= _menu.Item(_menu.Name + "." + lItem.Name + ".target-health-above") .GetValue <Slider>() .Value) .OrderByDescending( t => t.Position.Distance(ObjectManager.Player.Position, true) < Math.Pow(localItem.Range, 2))) { if (!Utils.IsImmobile(enemy) && !Utils.IsSlowed(enemy)) { switch (localItem.CastType) { case CastType.Target: localItem.Item.Cast(enemy); break; case CastType.Position: var prediction = Prediction.GetPrediction( enemy, localItem.Delay, localItem.Radius, localItem.Speed); if (prediction.Hitchance >= HitChance.Medium) { localItem.Item.Cast(prediction.CastPosition); } break; } } } } else { if (ObjectManager.Player.CountEnemiesInRange(item.Range) > _menu.Item(_menu.Name + "." + item.Name + ".min-enemies-range").GetValue <Slider>().Value) { item.Item.Cast(); } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected override void OnPostUpdate() { if (UltimateManager.Flash() && R.IsReady() && SummonerManager.Flash.IsReady()) { if (Menu.Item(Menu.Name + ".ultimate.flash.move-cursor").GetValue <bool>()) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } var targets = Targets.Where( t => t.Distance(Player) < R.Range + SummonerManager.Flash.Range && !t.IsDashing() && (t.IsFacing(Player) ? (t.Distance(Player)) : (Prediction.GetPrediction(t, R.Delay + 0.3f).UnitPosition.Distance(Player.Position))) > R.Range * 1.025f); foreach (var target in targets) { var min = Menu.Item(Menu.Name + ".ultimate.flash.min").GetValue <Slider>().Value; var flashPos = Player.Position.Extend(target.Position, SummonerManager.Flash.Range); var pred = Prediction.GetPrediction( new PredictionInput { Aoe = true, Collision = false, CollisionObjects = new[] { CollisionableObjects.YasuoWall }, From = flashPos, RangeCheckFrom = flashPos, Delay = R.Delay + 0.3f, Range = R.Range, Speed = R.Speed, Radius = R.Width, Type = R.Type, Unit = target }); if (pred.Hitchance >= R.GetHitChance("combo")) { R.UpdateSourcePosition(flashPos, flashPos); var hits = GameObjects.EnemyHeroes.Where(enemy => R.WillHit(enemy, pred.CastPosition)).ToList(); if (UltimateManager.Check( UltimateModeType.Combo, min, hits, hero => CalcComboDamage( hero, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true))) { if ( R.Cast( Player.Position.Extend( pred.CastPosition, -(Player.Position.Distance(pred.CastPosition) * 2)), true)) { Utility.DelayAction.Add(300, () => SummonerManager.Flash.Cast(flashPos)); } } else if (Menu.Item(Menu.Name + ".ultimate.flash.single").GetValue <bool>()) { if (UltimateManager.Check( UltimateModeType.Combo, 1, hits, hero => CalcComboDamage( hero, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true))) { var cDmg = CalcComboDamage( target, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true); if (cDmg - 20 >= target.Health) { if ( R.Cast( Player.Position.Extend( pred.CastPosition, -(Player.Position.Distance(pred.CastPosition) * 2)), true)) { Utility.DelayAction.Add(300, () => SummonerManager.Flash.Cast(flashPos)); } } } } R.UpdateSourcePosition(); } } } if (UltimateManager.Assisted() && R.IsReady()) { if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>()) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } if ( !RLogic( R.GetHitChance("combo"), Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady())) { if (Menu.Item(Menu.Name + ".ultimate.assisted.single").GetValue <bool>()) { RLogicSingle( R.GetHitChance("combo"), Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), false); } } } if (UltimateManager.Auto() && R.IsReady()) { if ( !RLogic( R.GetHitChance("combo"), Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), UltimateModeType.Auto)) { if (Menu.Item(Menu.Name + ".ultimate.auto.single").GetValue <bool>()) { RLogicSingle( R.GetHitChance("combo"), Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(), Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()); } } } if (HeroListManager.Enabled("w-immobile") && W.IsReady()) { var target = Targets.FirstOrDefault(t => HeroListManager.Check("w-immobile", t) && Utils.IsImmobile(t)); if (target != null) { Casting.SkillShot(target, W, W.GetHitChance("harass")); } } }