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 (q && Q.IsReady()) { QLogic(); } if (e && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { ELogic(target, E.GetHitChance("combo")); } } 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")); } } } }
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)); } }
protected override void Harass() { if (!ResourceManager.Check("harass")) { return; } var q = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>(); var e = Menu.Item(Menu.Name + ".harass.e").GetValue <bool>(); if (q && Q.IsReady()) { QLogic(); } if (e && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { ELogic(target, E.GetHitChance("harass")); } } }
protected override void OnPostUpdate() { 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"), TargetSelector.GetTarget(R))) { RLogicSingle(UltimateModeType.Assisted, R.GetHitChance("combo")); } } if (Ultimate.IsActive(UltimateModeType.Auto) && R.IsReady()) { if (!RLogic(UltimateModeType.Auto, R.GetHitChance("combo"), TargetSelector.GetTarget(R))) { RLogicSingle(UltimateModeType.Auto, R.GetHitChance("combo")); } } }
private void QLogic() { try { var target = TargetSelector.GetTarget(Q.Range); if (target != null) { Q.CastOnUnit(target); } else if (Menu.Item(Menu.Name + ".miscellaneous.extended-q").GetValue <bool>()) { target = TargetSelector.GetTarget(Q1); if (target != null) { var heroPositions = (from t in GameObjects.EnemyHeroes where t.IsValidTarget(Q1.Range) let prediction = Q.GetPrediction(t) select new CPrediction.Position(t, prediction.UnitPosition)).Where( t => t.UnitPosition.Distance(Player.Position) < Q1.Range).ToList(); if (heroPositions.Any()) { var minions = MinionManager.GetMinions( Q1.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.None); if (minions.Any(m => m.IsMoving) && !heroPositions.Any(h => HasPassiveDebuff(h.Hero))) { return; } var outerMinions = minions.Where(m => m.Distance(Player) > Q.Range).ToList(); var innerPositions = minions.Where(m => m.Distance(Player) < Q.Range).ToList(); foreach (var minion in innerPositions) { var lMinion = minion; var coneBuff = new Geometry.Polygon.Sector( minion.Position, Player.Position.Extend(minion.Position, Player.Distance(minion) + Q.Range * 0.5f), (float)(40 * Math.PI / 180), Q1.Range - Q.Range); var coneNormal = new Geometry.Polygon.Sector( minion.Position, Player.Position.Extend(minion.Position, Player.Distance(minion) + Q.Range * 0.5f), (float)(60 * Math.PI / 180), Q1.Range - Q.Range); foreach (var enemy in heroPositions.Where( m => m.UnitPosition.Distance(lMinion.Position) < Q1.Range - Q.Range)) { if (coneBuff.IsInside(enemy.Hero) && HasPassiveDebuff(enemy.Hero)) { Q.CastOnUnit(minion); return; } if (coneNormal.IsInside(enemy.UnitPosition)) { var insideCone = outerMinions.Where(m => coneNormal.IsInside(m.Position)).ToList(); if (!insideCone.Any() || enemy.UnitPosition.Distance(minion.Position) < insideCone.Select( m => m.Position.Distance(minion.Position) - m.BoundingRadius) .DefaultIfEmpty(float.MaxValue) .Min()) { Q.CastOnUnit(minion); return; } } } } } } } } 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); }