private static void OnDash(object obj, Dash.DashArgs Args) { var riven = Args.Unit as Obj_AI_Hero; if (riven == null || riven.Team == ObjectManager.GetLocalPlayer().Team || riven.ChampionName != "Riven" || !riven.IsValid) { return; } if (Menu["Block" + riven.ChampionName.ToLower()]["BlockSpell" + SpellSlot.Q.ToString()] != null && Menu["Block" + riven.ChampionName.ToLower()]["BlockSpell" + SpellSlot.Q.ToString()].Enabled) { RivenDashPos = Args.EndPos; } }
private static void OnDash(AIBaseClient sender, Dash.DashArgs Args) { var riven = sender as AIHeroClient; if (riven == null || riven.Team == ObjectManager.Player.Team || riven.CharacterName != "Riven" || !riven.IsValid) { return; } if (Menu["Block" + riven.CharacterName.ToLower()]["BlockSpell" + SpellSlot.Q.ToString()] != null && Menu["Block" + riven.CharacterName.ToLower()]["BlockSpell" + SpellSlot.Q.ToString()].GetValue <MenuBool>().Enabled) { RivenDashPos = Args.EndPos; } }
private static void OnDash(object obj, Dash.DashArgs Args) { var riven = obj as AIHeroClient; if (riven == null || riven.Team == ObjectManager.Player.Team || riven.CharacterName != "Riven" || !riven.IsValid) { return; } if (Menu["Block" + riven.CharacterName.ToLower()]["BlockSpell" + SpellSlot.Q.ToString()] != null && Menu["Block" + riven.CharacterName.ToLower()]["BlockSpell" + SpellSlot.Q.ToString()]) { RivenDashPos = Args.EndPos; } }
/// <summary> /// Fired on an incoming dash. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnDash(object sender, Dash.DashArgs args) { var heroSender = args.Unit as Obj_AI_Hero; if (heroSender == null || !heroSender.IsEnemy || Invulnerable.Check(heroSender, DamageType.Magical)) { return; } if (SpellClass.Q.Ready && UtilityClass.Player.Distance(args.EndPos) <= SpellClass.Q.Range && MenuClass.Spells["q"]["combo"].As <MenuBool>().Enabled) { SpellClass.Q.Cast(args.EndPos); } }
protected override void OnDash(object sender, Dash.DashArgs e) { if (this.Config["Misc"]["AntiDash"].Enabled) { if (e.Unit.IsValidTarget()) { if (e.EndPos.Distance(Player) <= E.Range) { var pred = E.GetPrediction(e.Unit); if (pred != null && pred.HitChance >= E.HitChance) { E.Cast(pred.CastPosition); } } } } }
private static void OnDash(object sender, Dash.DashArgs e) { if (e.Unit.IsMe) { if (Orbwalker.ActiveMode == OrbwalkerMode.Orbwalk || Orbwalker.ActiveMode == OrbwalkerMode.Hybrid) { var prioritized = menu["combo.settings"]["combo.prioritize"].GetValue <MenuList>(); var target = TargetSelector.GetTarget(spells[Spells.E].Range); if (target == null || !target.IsValidTarget()) { return; } switch (prioritized.Index) { case 0: if (spells[Spells.Q].IsReady() && Player.Distance(target) < spells[Spells.Q].Range + 0x32) { spells[Spells.Q].Cast(); } break; case 1: if (spells[Spells.W].IsReady() && Vector3.Distance(Player.ServerPosition, target.ServerPosition) < spells[Spells.W].Range * 0x1 / 0x3) { spells[Spells.W].Cast(); } break; case 2: if (spells[Spells.E].IsReady() && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= LeapRange) { spells[Spells.E].Cast(target); } break; } ItemHandler(target); } } else { return; } }
/// <summary> /// Fired on an incoming gapcloser. /// </summary> /// <param name="sender">The object.</param> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnGapcloser(object sender, Dash.DashArgs args) { if (UtilityClass.Player.IsDead) { return; } var gapSender = (Obj_AI_Hero)args.Unit; if (gapSender == null || !gapSender.IsEnemy || Invulnerable.Check(gapSender, DamageType.Magical, false)) { return; } /// <summary> /// The Anti-Gapcloser E Logic. /// </summary> if (SpellClass.E.Ready && args.EndPos.Distance(UtilityClass.Player.ServerPosition) < SpellClass.E.Range && MenuClass.Spells["e"]["gapcloser"].As <MenuBool>().Enabled) { if (args.EndPos.Distance(UtilityClass.Player.ServerPosition) >= 200) { SpellClass.E.Cast(args.EndPos); } else { SpellClass.E.Cast(gapSender.ServerPosition); } } /// <summary> /// The Anti-Gapcloser W Logic. /// </summary> if (SpellClass.W.Ready && args.EndPos.Distance(UtilityClass.Player.ServerPosition) < SpellClass.W.Range && MenuClass.Spells["w"]["gapcloser"].As <MenuBool>().Enabled) { SpellClass.W.Cast((Vector3)args.EndPos, (Vector3)args.EndPos.Extend(args.StartPos, 200f)); } }
private void OnDash(AIBaseClient sender, Dash.DashArgs args) { if (sender.IsEnemy && args.EndPos.DistanceToPlayer() <= 100) { if (MiscWAntiGapcloser.Enabled && _w.IsReady()) { if (args.EndTick - Variables.TickCount > 100) { _q.Cast(args.EndPos); Utility.DelayAction.Add(50, () => CastW(Player.Position.Extend(sender.Position, -knoclback_distance))); } else { CastW(Player.Position.Extend(sender.Position, -knoclback_distance)); } return; } } }
public void OnGapcloser(object sender, Dash.DashArgs args) { if (Player.IsDead) { return; } var gapSender = (Obj_AI_Hero)args.Unit; if (gapSender == null || !gapSender.IsEnemy) { return; } /// <summary> /// The Anti-Gapcloser E. /// </summary> if (Q.Ready && Champions.Nami.MenuClass.miscmenu["antigapq"].Enabled) { var playerPos = Player.ServerPosition; if (args.EndPos.Distance(playerPos) <= 200) { var prediction = Q.GetPrediction(gapSender); Q.Cast(prediction.CastPosition); } else { var bestAlly = GameObjects.AllyHeroes .Where(a => a.IsValidTarget(Q.Range, true) && args.EndPos.Distance(a.ServerPosition) <= 200) .OrderBy(o => o.Distance(args.EndPos)) .FirstOrDefault(); if (bestAlly != null) { var prediction = Q.GetPrediction(gapSender); Q.Cast(prediction.CastPosition); } } } }
/// <summary> /// Fired on an incoming gapcloser. /// </summary> /// <param name="sender">The object.</param> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnGapcloser(object sender, Dash.DashArgs args) { if (UtilityClass.Player.IsDead) { return; } var gapSender = (Obj_AI_Hero)args.Unit; if (gapSender == null || !gapSender.IsEnemy || !gapSender.IsMelee) { return; } /// <summary> /// The Anti-Gapcloser W. /// </summary> if (SpellClass.W.Ready && MenuClass.Spells["w"]["gapcloser"].As <MenuBool>().Enabled) { var playerPos = UtilityClass.Player.ServerPosition; if (args.EndPos.Distance(playerPos) <= 200) { SpellClass.W.Cast(playerPos.Extend(args.StartPos, -SpellClass.W.Range)); return; } } /// <summary> /// The Anti-Gapcloser R. /// </summary> if (SpellClass.R.Ready && MenuClass.Spells["r"]["gapcloser"].As <MenuBool>().Enabled) { var playerPos = UtilityClass.Player.ServerPosition; if (args.EndPos.Distance(playerPos) <= 200) { SpellClass.R.CastOnUnit(gapSender); } } }
private static void Dashing(AIBaseClient sender, Dash.DashArgs args) { if (sender != myhero) { return; } if (myhero.Mana == 0) { i++; } if (myhero.HasBuff("RengarQ")) { i++; } dash = true; DelayAction.Add(args.Duration, () => dash = false); var newtarget = TargetSelector.GetTarget(2000); switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: if ((C_IQAA || !C_QAA) && C_Q) { _DashQ(newtarget); } else if (C_QAA && C_Q && !C_IQAA) { DelayAction.Add(args.Duration, () => _DashQ(newtarget)); } if (C_E && i < 4) { _EDashCast(newtarget); } break; case OrbwalkerMode.LaneClear: break; } }
/// <summary> /// Fired on an incoming dash. /// </summary> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnDash(Dash.DashArgs args) { var heroSender = args.Sender as AIHeroClient; if (heroSender == null || !heroSender.IsEnemy() || Invulnerable.Check(heroSender, DamageType.Magical, false)) { return; } if (heroSender.CharName.Equals("Kalista")) { return; } var endPos = args.EndPosition; var playerPos = UtilityClass.Player.Position; if (!heroSender.IsValidTarget(SpellClass.E.Range) && endPos.DistanceToPlayer() > SpellClass.E.Range) { return; } if (SpellClass.E.Ready && MenuClass.E["emode"].Value != 2 && MenuClass.E["whitelist"][heroSender.CharName.ToLower()].Enabled) { const int condemnPushDistance = 410; for (var i = UtilityClass.Player.BoundingRadius; i < condemnPushDistance; i += 10) { if (!endPos.Extend(playerPos, -i).IsWall()) { continue; } SpellClass.E.CastOnUnit(heroSender); } } }
/// <summary> /// Fired on an incoming dash. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnDash(object sender, Dash.DashArgs args) { var heroSender = args.Unit as Obj_AI_Hero; if (heroSender == null || !heroSender.IsEnemy || Invulnerable.Check(heroSender, DamageType.Magical, false)) { return; } if (heroSender.ChampionName.Equals("Kalista")) { return; } var endPos = (Vector3)args.EndPos; var playerPos = UtilityClass.Player.ServerPosition; if (!heroSender.IsValidTarget(SpellClass.E.Range) && endPos.Distance(playerPos) > SpellClass.E.Range) { return; } if (SpellClass.E.Ready && MenuClass.Spells["e"]["emode"].As <MenuList>().Value != 2 && MenuClass.Spells["e"]["whitelist"][heroSender.ChampionName.ToLower()].Enabled) { const int condemnPushDistance = 410; for (var i = UtilityClass.Player.BoundingRadius; i < condemnPushDistance; i += 10) { if (!endPos.Extend(playerPos, -i).IsWall(true)) { continue; } UtilityClass.CastOnUnit(SpellClass.E, heroSender); } } }
/// <summary> /// Fired on an incoming gapcloser. /// </summary> /// <param name="sender">The object.</param> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnGapcloser(object sender, Dash.DashArgs args) { if (UtilityClass.Player.IsDead) { return; } var gapSender = (Obj_AI_Hero)args.Unit; if (gapSender == null || !gapSender.IsEnemy || !gapSender.IsMelee) { return; } var playerPos = UtilityClass.Player.ServerPosition; if (args.EndPos.Distance(playerPos) <= 200) { /// <summary> /// The Anti-Gapcloser Q. /// </summary> if (SpellClass.Q.Ready && MenuClass.Spells["q"]["gapcloser"].As <MenuBool>().Enabled) { SpellClass.Q.Cast(UtilityClass.Player.ServerPosition.Extend(args.StartPos, -300f)); return; } /// <summary> /// The Anti-Gapcloser E. /// </summary> if (SpellClass.E.Ready && !Invulnerable.Check(gapSender, DamageType.Magical, false) && MenuClass.Spells["e"]["gapcloser"].As <MenuBool>().Enabled) { SpellClass.E.CastOnUnit(gapSender); } } }
private static void DashOnHeroDashed(object sender, Dash.DashArgs dashArgs) { if (dashArgs.Unit is Obj_AI_Hero) { var nearestBarrel = BarrelManager.GetNearestBarrel(dashArgs.EndPos.To3D()); if (nearestBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel); if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, dashArgs.EndPos.To3D()))) { //If any of the chained barrels will hit, cast Q on best barrel. var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { SpellManager.Q.Cast(barrelToQ.Object); } else if (barrelToQ.Object.Distance(Player) <= Player.AttackRange && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) { Orbwalker.Implementation.Attack(barrelToQ.Object); } return; } } else { //No chained barrels will hit, so let's chain them. var bestChainPosition = BarrelManager.GetBestChainPosition(dashArgs.EndPos.To3D(), nearestBarrel); if (bestChainPosition != Vector3.Zero && dashArgs.EndPos.Distance(Player) <= SpellManager.E.Range && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain) { Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red); SpellManager.E.Cast(bestChainPosition); } } } } }
public void OnGapcloser(object sender, Dash.DashArgs args) { if (Player.IsDead) { return; } var gapSender = (Obj_AI_Hero)args.Unit; if (gapSender == null || !gapSender.IsEnemy) { return; } if (E.Ready && Menu["Misc"]["antigapclose"].Enabled) { var playerPos = Player.ServerPosition; if (args.EndPos.Distance(playerPos) <= 200) { E.Cast(gapSender); } else { var bestAlly = GameObjects.AllyHeroes .Where(a => a.IsValidTarget(Q.Range, true) && args.EndPos.Distance(a.ServerPosition) <= 200) .OrderBy(o => o.Distance(args.EndPos)) .FirstOrDefault(); if (bestAlly != null) { E.Cast(gapSender); } } } }
/// <summary> /// Called when [gapcloser]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> protected virtual void OnGapcloser(object sender, Dash.DashArgs e) { return; }
protected abstract void OnDash(object sender, Dash.DashArgs e);
public static void AntiGapcloser(object sender, Dash.DashArgs e) { throw new NotImplementedException(); }
/// <summary> /// Fired on an incoming gapcloser. /// </summary> /// <param name="sender">The object.</param> /// <param name="args">The <see cref="Dash.DashArgs" /> instance containing the event data.</param> public void OnGapcloser(object sender, Dash.DashArgs args) { if (UtilityClass.Player.IsDead) { return; } var gapSender = (Obj_AI_Hero)args.Unit; if (gapSender == null) { return; } /// <summary> /// The On-Dash E Logics. /// </summary> if (SpellClass.E.Ready) { /// <summary> /// The Anti-Gapcloser E. /// </summary> if (gapSender.IsEnemy && MenuClass.Spells["e"]["gapcloser"].As <MenuBool>().Enabled) { var playerPos = UtilityClass.Player.ServerPosition; if (args.EndPos.Distance(playerPos) <= 200) { SpellClass.E.CastOnUnit(UtilityClass.Player); } else { var bestAlly = GameObjects.AllyHeroes .Where(a => !a.IsMe && a.IsValidTarget(SpellClass.E.Range, true) && args.EndPos.Distance(a.ServerPosition) <= 200) .MinBy(o => o.MaxHealth); if (bestAlly != null) { SpellClass.E.CastOnUnit(bestAlly); } } } if (MenuClass.Spells["r"]["aoe"] != null && MenuClass.Spells["r"]["aoe"].As <MenuSliderBool>().Enabled) { return; } /// <summary> /// The E Engager Logic. /// </summary> if (gapSender.IsAlly && gapSender.IsValidTarget(SpellClass.E.Range, true) && MenuClass.Spells["e"]["engager"].As <MenuBool>().Enabled) { if (GameObjects.EnemyHeroes.Count(t => !Invulnerable.Check(t, DamageType.Magical, false) && t.IsValidTarget(SpellClass.R.Width - SpellClass.R.Delay * t.BoundingRadius, false, false, (Vector3)args.EndPos)) >= MenuClass.Spells["r"]["aoe"]?.As <MenuSliderBool>().Value&& MenuClass.Spells["e"]["engagerswhitelist"][gapSender.ChampionName.ToLower()].As <MenuBool>().Enabled) { SpellClass.E.CastOnUnit(gapSender); } } } }