protected override void Combo() { var single = false; var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady() && ResourceManager.Check("combo-e"); var r = _ultimate.IsActive(UltimateModeType.Combo) && R.IsReady(); var rTarget = TargetSelector.GetTarget(R); if (r) { if (!RLogic(UltimateModeType.Combo, rTarget)) { RLogicSingle(UltimateModeType.Combo); single = true; } } if (q) { Casting.TargetSkill(Q); } if (e) { if (GetEHits().Item1 > 0) { E.Cast(); } } if (rTarget != null && _ultimate.GetDamage(rTarget, UltimateModeType.Combo, single ? 1 : 5) > rTarget.Health) { ItemManager.UseComboItems(rTarget); SummonerManager.UseComboSummoners(rTarget); } }
protected override void OnPostUpdate() { if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && !Player.IsWindingUp && Menu.Item(Menu.Name + ".lasthit.q").GetValue <bool>() && Q.IsReady()) { var m = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly) .FirstOrDefault( e => e.HealthPercent <= 75 && (_lastAaMinion == null || e.NetworkId != _lastAaMinion.NetworkId || Game.Time > _lastAaMinionEndTime) && HealthPrediction.GetHealthPrediction(e, (int)(Q.Delay * 1000f)) < Q.GetDamage(e)); if (m != null) { Casting.TargetSkill(m, Q); } } if (_ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady()) { if (_ultimate.ShouldMove(UltimateModeType.Assisted)) { Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius); } var target = TargetSelector.GetTarget(R); if (target != null && !RLogic(UltimateModeType.Assisted, target)) { RLogicSingle(UltimateModeType.Assisted); } } if (_ultimate.IsActive(UltimateModeType.Auto) && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null && !RLogic(UltimateModeType.Auto, target)) { RLogicSingle(UltimateModeType.Auto); } } if (Menu.Item(Menu.Name + ".miscellaneous.e-auto").GetValue <bool>() && E.IsReady() && ResourceManager.Check("auto-e") && !Player.IsRecalling() && !Player.InFountain()) { var buff = GetEBuff(); if (buff == null || (buff.EndTime - Game.Time) <= Game.Ping / 2000f + 0.5f) { E.Cast(); } } }
private void SetupMenu() { try { SFXMenu = new Menu(Global.Name, "sfx", true); Menu = new Menu(Global.Prefix + Player.ChampionName, SFXMenu.Name + "." + Player.ChampionName, true); DrawingManager.AddToMenu(Menu.AddSubMenu(new Menu("Drawings", Menu.Name + ".drawing")), this); TargetSelector.AddToMenu(SFXMenu.AddSubMenu(new Menu("Target Selector", SFXMenu.Name + ".ts"))); Orbwalker = new Orbwalking.Orbwalker(SFXMenu.AddSubMenu(new Menu("Orbwalker", SFXMenu.Name + ".orb"))); KillstealManager.AddToMenu(SFXMenu.AddSubMenu(new Menu("Killsteal", SFXMenu.Name + ".killsteal"))); var itemMenu = SFXMenu.AddSubMenu(new Menu("Items", SFXMenu.Name + ".items")); TearStackManager.AddToMenu( itemMenu.AddSubMenu(new Menu("Tear Stacking", SFXMenu.Name + ".tear-stack." + Player.ChampionName)), Spells); ItemManager.AddToMenu(itemMenu, ItemFlags); SummonerManager.AddToMenu(SFXMenu.AddSubMenu(new Menu("Summoners", SFXMenu.Name + ".summoners"))); InfoMenu.AddToMenu(SFXMenu.AddSubMenu(new Menu("Info", SFXMenu.Name + ".info"))); DebugMenu.AddToMenu(SFXMenu, Spells); Menu.AddToMainMenu(); SFXMenu.AddToMainMenu(); try { AddToMenu(); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static bool Check(string uniqueId, Spell spell, Obj_AI_Hero hero) { try { if (hero == null || !Enabled(uniqueId)) { return(true); } var bestTarget = TargetSelector.GetTarget(spell); if (bestTarget == null || hero.NetworkId.Equals(bestTarget.NetworkId)) { return(true); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
protected void ItemsSummonersLogic(Obj_AI_Hero ultimateTarget, bool single = true) { try { var range = Math.Max( 600, Math.Max( SummonerManager.SummonerSpells.Where(s => s.CastType == CastType.Target).Max(s => s.Range), ItemManager.Items.Where( i => i.EffectFlags.HasFlag(EffectFlags.Damage) && i.Flags.HasFlag(ItemFlags.Offensive)) .Max(i => i.Range))); if (ultimateTarget == null || Ultimate == null || !ultimateTarget.IsValidTarget(range)) { var target = TargetSelector.GetTarget(range); if (target != null) { if (ItemManager.CalculateComboDamage(target) + SummonerManager.CalculateComboDamage(target) > target.Health) { ItemManager.UseComboItems(target); SummonerManager.UseComboSummoners(target); } } } else { if (Ultimate.GetDamage(ultimateTarget, UltimateModeType.Combo, single ? 1 : 5) > ultimateTarget.Health) { ItemManager.UseComboItems(ultimateTarget); SummonerManager.UseComboSummoners(ultimateTarget); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public static void TargetSkill(Spell spell) { TargetSkill(TargetSelector.GetTarget(spell), spell); }
public static void SkillShot(Spell spell, HitChance hitChance, bool boundingRadius = true, bool maxRange = true) { SkillShot(TargetSelector.GetTarget(spell), spell, hitChance); }