public static void ResetAttack(object e, OrbwalkerActionArgs args) { if (!(e is AIHeroClient)) { return; } var target = TargetSelector.GetTarget(300, DamageType.Physical); var champ = (AIHeroClient)e; var useW = HarassMenu["HarassW"].GetValue <MenuBool>().Enabled; var mana = HarassMenu["ManaQ"].GetValue <MenuSlider>().Value; var useQC = ComboMenu["ComboW"].GetValue <MenuBool>().Enabled; if (champ == null || champ.Type != GameObjectType.AIHeroClient || !champ.IsValid) { return; } if (target != null) { if (useW && W.IsReady() && Player.Instance.Distance(target) <= Player.Instance.GetRealAutoAttackRange() - 50 && _Player.ManaPercent > mana && Orbwalker.ActiveMode.HasFlag(OrbwalkerMode.Harass)) { W.Cast(); Orbwalker.CanAttack(); Player.IssueOrder(GameObjectOrder.AttackUnit, target); } if (useQC && W.IsReady() && Player.Instance.Distance(target) <= Player.Instance.GetRealAutoAttackRange() - 50 && Orbwalker.ActiveMode.HasFlag(OrbwalkerMode.Combo)) { W.Cast(); Orbwalker.CanAttack(); Player.IssueOrder(GameObjectOrder.AttackUnit, target); } } }
private static void ForcusAttack(Obj_AI_Hero target) { if (Me.IsDashing() || Me.SpellBook.IsCastingSpell || Me.SpellBook.IsAutoAttacking || target.IsValidAutoRange() && Orbwalker.CanAttack()) { return; } if (Game.TickCount - lastMoveChangedTime < 650 + Game.Ping || Game.TickCount - lastQTime < 650 + Game.Ping) { return; } var pos = MyPassiveManager.OrbwalkerPosition(target); if (!pos.IsZero) { OrbwalkerPoint = Me.ServerPosition.Extend(pos, Me.ServerPosition.Distance(pos) + 150); lastMoveChangedTime = Game.TickCount; } else { OrbwalkerPoint = Game.CursorPos; } }
private static void Game_OnUpdate(EventArgs args) { if (SetOrbWalkerTarget.Enabled && Orbwalker.ActiveMode <= OrbwalkerMode.Harass) { if (ObjectManager.Player.CanAttack || Orbwalker.CanAttack()) { var target = FSTargetSelector.GetFSTarget(ObjectManager.Player.GetCurrentAutoAttackRange()); if (target != null) { Orbwalker.Orbwalk(target, Game.CursorPos); } else { Orbwalker.Orbwalk(Orbwalker.GetTarget(), Game.CursorPos); } } else { ResetOrbwalker(); } } else { ResetOrbwalker(); } }
private static void Game_OnUpdate(EventArgs args) { if (!BadaoGangplankVariables.FleeKey.GetValue <MenuKeyBind>().Active) { return; } Orbwalker.Orbwalk(null, Game.CursorPos); if (BadaoMainVariables.Q.IsReady()) { foreach (var barrel in BadaoGangplankBarrels.QableBarrels()) { if (BadaoMainVariables.Q.Cast(barrel.Bottle) == CastStates.SuccessfullyCasted) { return; } } } if (Orbwalker.CanAttack()) { foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels()) { Orbwalker.AttackEnabled = false; Orbwalker.MoveEnabled = false; DelayAction.Add(100 + Game.Ping, () => { Orbwalker.AttackEnabled = true; Orbwalker.MoveEnabled = true; }); if (ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle)) { return; } } } }
private void Clearing() { bool useQ = Menu["farming"]["useq"].Enabled; bool useE = Menu["farming"]["usee"].Enabled; float hits = Menu["farming"]["hite"].As <MenuSlider>().Value; foreach (var minion in GetEnemyLaneMinionsTargetsInRange(E.Range)) { if (E.Ready && useE && minion.IsValidTarget(E.Range) && (GetEnemyLaneMinionsTargetsInRange(E.Range).Count >= hits)) { if (!Player.HasBuff("GarenE") && !Player.HasBuff("GarenQ")) { E.Cast(); } } if (Q.Ready && useQ && minion.IsValidTarget(250) && (Player.GetSpellDamage(minion, SpellSlot.Q)) > minion.Health) { if (!Player.HasBuff("GarenE")) { if (Player.GetAutoAttackDamage(minion) <= minion.Health || !Orbwalker.CanAttack()) { Q.Cast(); } } } } }
private static void LaneClearEvent() { if (LaneClearOption.HasEnouguMana()) { if (LaneClearOption.UseQ && Q.IsReady() && AxeCount < 2 && Orbwalker.CanAttack()) { var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(600) && x.IsMinion()).ToList(); if (minions.Any() && minions.Count >= 2) { Q.Cast(); } } if (LaneClearOption.GetSliderBool("LaneClearECount").Enabled&& E.IsReady()) { var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToList(); if (minions.Any() && minions.Count >= LaneClearOption.GetSliderBool("LaneClearECount").Value) { var eFarm = E.GetLineFarmLocation(minions); if (eFarm.MinionsHit >= LaneClearOption.GetSliderBool("LaneClearECount").Value) { E.Cast(eFarm.Position); } } } } }
private void Clear() { float perc = config["Lcsettings"].GetValue <MenuSlider>("minmana").Value / 100f; if (player.Mana < player.MaxMana * perc) { return; } if (Q.IsReady() && config["Lcsettings"].GetValue <MenuBool>("useqLC")) { var minions = GameObjects.Enemy.Where(m => (m.IsMinion || m.IsMonster) && Q.CanCast(m) && (Q.GetDamage(m) > m.Health || m.Health > player.GetAutoAttackDamage(m) * 5)) .OrderByDescending(m => Q.GetDamage(m) > m.Health) .ThenBy(m => m.Distance(player)); foreach (var mini in minions) { if (!Orbwalker.CanAttack() && mini.Distance(player) <= player.GetRealAutoAttackRange()) { Q.CastOnUnit(mini); return; } if (Orbwalker.CanMove() && !player.IsWindingUp && mini.Distance(player) > player.GetRealAutoAttackRange()) { Q.CastOnUnit(mini); return; } } } }
private static void LaneClear() { if (LaneClearOption.HasEnouguMana) { if (LaneClearOption.UseQ && Q.IsReady() && AxeCount < 2 && !Orbwalker.CanAttack())// TODO !Me.Spellbook.IsAutoAttacking) { var minions = MinionManager.GetMinions(Me.Position, 600); if (minions.Any() && minions.Count >= 2) { Q.Cast(); } } if (LaneClearOption.UseE && E.IsReady()) { var minions = MinionManager.GetMinions(Me.Position, E.Range); if (minions.Any()) { var eFarm = E.GetLineFarmLocation(minions, E.Width); if (eFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearECount")) { E.Cast(eFarm.Position); } } } } }
private void ConsiderW(AIHeroClient target) { if (!_menu.GetValue <bool>((Menu)menu.Item("Harras"), "w") || target == null) { return; } if (spellM.W.IsReady() && !Player.IsWindingUp && !Orbwalker.CanAttack() && target.Distance3D(Player) < Player.AttackRange) { var wPred = spellM.W.GetPrediction(target); var reqHS = HitChance.High; switch (_menu.GetValue <int>((Menu)menu.Item("Harras"), "minWHS")) { case 1: reqHS = HitChance.Low; break; case 2: reqHS = HitChance.Medium; break; case 3: reqHS = HitChance.High; break; } if (wPred != null && wPred.Hitchance >= reqHS) { spellM.W.Cast(wPred.CastPosition); } } }
public static void useQSmart(AIBaseClient target) { try { if (!Q.IsReady() || target.Path.Count() == 0 || !target.IsMoving) { return; } Vector2 nextEnemPath = target.Path[0].ToVector2(); var dist = player.Position.ToVector2().Distance(target.Position.ToVector2()); var distToNext = nextEnemPath.Distance(player.Position.ToVector2()); if (distToNext <= dist) { return; } var msDif = player.MoveSpeed - target.MoveSpeed; if (msDif <= 0 && !target.InAutoAttackRange() && Orbwalker.CanAttack()) { Q.Cast(target); } var reachIn = dist / msDif; if (reachIn > 4) { Q.Cast(target); } } catch (Exception) { throw; } }
private static void ForcusAttack(Obj_AI_Hero target) { if (Me.IsDashing() || Me.SpellBook.IsCastingSpell || Me.SpellBook.IsAutoAttacking || !Orbwalker.CanMove() || target.IsValidAutoRange() && Orbwalker.CanAttack()) { return; } if (Q.Ready || Game.TickCount - lastMoveChangedTime < 650 + Game.Ping || Game.TickCount - lastQTime < 650 + Game.Ping) { return; } var pos = MyPassiveManager.OrbwalkerPosition(target); //var path = Me.GetPath(pos); var orbwalkerPos = pos;//path.Length < 3 ? pos : path.Skip(path.Length / 2).FirstOrDefault(); if (!orbwalkerPos.IsZero) { OrbwalkerPoint = orbwalkerPos; Orbwalker.ForceTarget(target); lastMoveChangedTime = Game.TickCount; } else { OrbwalkerPoint = Game.CursorPos; } }
private async Task Attack(CancellationToken cancellationToken) { if (Orbwalker.CanAttack(Core.Target)) { Necr.Attack(Core.Target); } await Await.Delay(250, cancellationToken); }
private static void Harass() { if (HarassOption.HasEnouguMana()) { if (HarassOption.UseW && W.IsReady()) { var target = HarassOption.GetTarget(W.Range); if (target.IsValidTarget(W.Range) && target.DistanceToPlayer() > Q.Range) { var wPred = W.GetPrediction(target); if (wPred.Hitchance >= HitChance.High) { W.Cast(wPred.UnitPosition); } } } if (HarassOption.UseQ && Q.IsReady()) { var target = HarassOption.GetTarget(bigGunRange); if (target.IsValidTarget(bigGunRange) && Orbwalker.CanAttack()) { if (target.CountEnemyHeroesInRange(150) >= 2 && Me.Mana > R.Mana + Q.Mana * 2 + W.Mana && target.DistanceToPlayer() > Q.Range) { if (Orbwalker.CanAttack()) { Q.Cast(); } } if (target.DistanceToPlayer() > Q.Range && Me.Mana > R.Mana + Q.Mana * 2 + W.Mana) { if (Orbwalker.CanAttack()) { Q.Cast(); } } } else { if (Me.HasBuff("JinxQ") && Q.IsReady()) { Q.Cast(); } } } else if (Me.HasBuff("JinxQ") && Q.IsReady()) { Q.Cast(); } } }
private static void OnIssueOrder(Obj_AI_Base sender, Obj_AI_BaseIssueOrderEventArgs /*Obj_AI_BaseMissileClientDataEventArgs*/ Args) { if (!sender.IsMe) { return; } if (Args.OrderType != OrderType.AttackUnit || !E.Ready) { return; } if (Orbwalker.Mode != OrbwalkingMode.Combo && Orbwalker.Mode != OrbwalkingMode.Laneclear) { return; } var target = (AttackableUnit)Args.Target; if (target == null || !target.IsValidTarget()) { return; } if (!Orbwalker.CanAttack() || !target.IsValidTarget(Me.AttackRange + Me.BoundingRadius + target.BoundingRadius - 20)) { Args.ProcessEvent = false; return; } if (Orbwalker.Mode == OrbwalkingMode.Combo && ComboOption.UseE && ComboOption.GetBool("ComboEReset").Enabled&& target.Type == GameObjectType.obj_AI_Hero) { if (ELogic((Obj_AI_Hero)target)) { DelayAction.Queue(1, () => { //E.Cast(Me.ServerPosition.Extend(Args.Target.ServerPosition, E.Range - Args.Target.BoundingRadius)); Orbwalker.ResetAutoAttackTimer(); //Me.IssueOrder(OrderType.AttackUnit, target); }); } } else if (Orbwalker.Mode == OrbwalkingMode.Laneclear && JungleClearOption.HasEnouguMana() && JungleClearOption.UseE && target.IsMob()) { if (ELogic((Obj_AI_Minion)target)) { DelayAction.Queue(1, () => { // E.Cast(Me.ServerPosition.Extend(Args.Target.ServerPosition, E.Range - Args.Target.BoundingRadius)); Orbwalker.ResetAutoAttackTimer(); //Me.IssueOrder(OrderType.AttackUnit, target); }); } } }
//private static void OnGapcloser(AIHeroClient target, GapcloserArgs Args) //{ // if (W.IsReady() && target != null && target.IsValidTarget(W.Range)) // { // switch (Args.Type) // { // case SpellType.Melee: // if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100)) // { // var wPred = W.GetPrediction(target); // W.Cast(wPred.UnitPosition); // } // break; // case SpellType.Dash: // case SpellType.SkillShot: // case SpellType.Targeted: // { // var wPred = W.GetPrediction(target); // W.Cast(wPred.UnitPosition); // } // break; // } // } //} private static void OnBasicAttack(AIBaseClient sender, AIBaseClientProcessSpellCastEventArgs Args) { if (!sender.IsMe) { return; } if (!E.IsReady()) { return; } if (Orbwalker.ActiveMode != OrbwalkerMode.Combo && Orbwalker.ActiveMode != OrbwalkerMode.LaneClear) { return; } var target = (AttackableUnit)Args.Target; if (target == null || !target.IsValidTarget()) { return; } if (!Orbwalker.CanAttack() || Me.IsWindingUp || !target.IsValidTarget(Me.AttackRange + Me.BoundingRadius + target.BoundingRadius - 20)) { return; } if (Orbwalker.ActiveMode == OrbwalkerMode.Combo && ComboOption.UseE && ComboOption.GetBool("ComboEReset").Enabled&& target.Type == GameObjectType.AIHeroClient) { DelayAction.Add(0, () => { if (ELogic((AIHeroClient)target)) { Orbwalker.ResetAutoAttackTimer(); } }); } else if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && JungleClearOption.HasEnouguMana() && JungleClearOption.UseE && target is AIMinionClient) { var mob = (AIMinionClient)target; if (mob != null && mob.GetJungleType() != JungleType.Unknown && mob.GetJungleType() != JungleType.Small) { DelayAction.Add(0, () => { if (ELogic(mob)) { Orbwalker.ResetAutoAttackTimer(); } }); } } }
private static void JungleClear() { if (JungleClearOption.HasEnouguMana) { var mobs = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (JungleClearOption.UseE && E.IsReady()) { E.Cast(mob, true); } if (JungleClearOption.UseW && W.IsReady() && !Me.HasBuff("dravenfurybuff") && AxeCount > 0) { foreach ( var m in mobs.Where( x => x.DistanceToPlayer() <= 600 && !x.Name.ToLower().Contains("mini") && !x.Name.ToLower().Contains("crab") && x.MaxHealth > 1500 && x.Health > Me.GetAutoAttackDamage(x) * 2)) { if (m.IsValidTarget(600)) { W.Cast(); } } } if (JungleClearOption.UseQ && Q.IsReady() && AxeCount < 2 && !Orbwalker.CanAttack())//TODO IsAutoAttacking { var qmobs = MinionManager.GetMinions(600f, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (qmobs.Any()) { if (qmobs.Count >= 2) { Q.Cast(); } var qmob = qmobs.FirstOrDefault(); if (qmob != null && qmobs.Count == 1 && qmob.Health > Me.GetAutoAttackDamage(qmob) * 5) { Q.Cast(); } } } } } }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs Args) { if (!sender.IsMe || Args.Order != GameObjectOrder.AttackUnit || E.IsReady()) { return; } var target = (Obj_AI_Base)Args.Target; if (target == null) { return; } if (!Orbwalker.CanAttack() || target.DistanceToPlayer() > Me.AttackRange + Me.BoundingRadius - target.BoundingRadius + 15) { Args.Process = false; return; } if (BurstMenu.Get <MenuKeybind>("BurstKeys").Active&& target.ObjectType == GameObjectType.AIHeroClient) { if (!R.IsReady()) { Core.DelayAction(() => { if (ELogic(target)) { Orbwalker.ResetAutoAttackTimer(); } }, Game.Ping); } } else if (isComboMode && ComboOption.UseE && ComboOption.GetBool("ComboEAA")) { Core.DelayAction(() => { if (ELogic(target)) { Orbwalker.ResetAutoAttackTimer(); } }, Game.Ping); } else if (isJungleClearMode && JungleClearOption.HasEnouguMana && JungleClearOption.UseE) { Core.DelayAction(() => { if (ELogic(target)) { Orbwalker.ResetAutoAttackTimer(); } }, Game.Ping); } }
private void ConsiderQ(AIHeroClient target) { if (!_menu.GetValue <bool>((Menu)menu.Item("Harras"), "q") || target == null) { return; } if (spellM.Q.IsReady() && !Player.IsWindingUp && !Orbwalker.CanAttack()) { spellM.Q.Cast(); } }
public static double TotalSpellDamage(Obj_AI_Base target) { if (target == null || !target.IsValid()) { return(0); } SpellSlot[] slots = { SpellSlot.Q, SpellSlot.W, SpellSlot.E, SpellSlot.R }; double damage = ObjectManager.Me.Spellbook.Spells.Where(s => s.Slot.IsReady() && slots.Contains(s.Slot)).Sum(s => ObjectManager.Me.GetSpellDamage(target, s.Slot)); double autoAttackDamage = Orbwalker.CanAttack() ? ObjectManager.Me.GetAutoAttackDamage(target) : 0f; return(damage + autoAttackDamage); }
private void LogicQ() { if (LaneClear && !FishBoneActive && !Player.Spellbook.IsAutoAttack && Orbwalker.GetTarget() == null && Orbwalker.CanAttack() && Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQout").Enabled&& Player.Mana > RMANA + WMANA + EMANA + QMANA) { foreach (var minion in Cache.GetMinions(Player.PreviousPosition, bonusRange() + 30).Where( minion => !minion.InAutoAttackRange() && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion))) { var hpPred = HealthPrediction.GetPrediction(minion, 400, 70); if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5) { Orbwalker.ForceTarget = minion; Q.Cast(); return; } } } var t = TargetSelector.GetTarget(bonusRange() + 60); if (t.IsValidTarget()) { if (!FishBoneActive && (!t.InAutoAttackRange() || t.CountEnemyHeroesInRange(250) > 2) && Orbwalker.GetTarget() == null) { var distance = GetRealDistance(t); if (Combo && (Player.Mana > RMANA + WMANA + QMANA || Player.GetAutoAttackDamage(t) * 3 > t.Health)) { Q.Cast(); } else if (Harass && !Player.Spellbook.IsAutoAttack && Orbwalker.CanAttack() && Config[Player.CharacterName]["QConfig"].GetValue <MenuBool>("Qharass").Enabled&& !Player.IsUnderEnemyTurret() && Player.Mana > RMANA + WMANA + EMANA + QMANA + QMANA && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius) { Q.Cast(); } } } else if (!FishBoneActive && Combo && Player.Mana > RMANA + WMANA + QMANA + QMANA && Player.CountEnemyHeroesInRange(2000) > 0) { Q.Cast(); } else if (FishBoneActive && Combo && Player.Mana < RMANA + WMANA + QMANA + QMANA) { Q.Cast(); } else if (FishBoneActive && Combo && Player.CountEnemyHeroesInRange(2000) == 0) { Q.Cast(); } else if (FishBoneActive && LaneClear) { Q.Cast(); } }
private static void JungleClearEvent() { if (JungleClearOption.HasEnouguMana()) { var mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(E.Range) && x.GetJungleType() != JungleType.Unknown) .OrderByDescending(x => x.MaxHealth) .ToList(); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (JungleClearOption.UseE && E.IsReady() && mob != null && mob.IsValidTarget(E.Range)) { E.CastIfHitchanceEquals(mob, HitChance.Medium); } if (JungleClearOption.UseW && W.IsReady() && !Me.HasBuff("dravenfurybuff") && AxeCount > 0) { foreach ( var m in mobs.Where( x => x.DistanceToPlayer() <= 600 && !x.Name.ToLower().Contains("mini") && !x.Name.ToLower().Contains("crab") && x.MaxHealth > 1500 && x.Health > Me.GetAutoAttackDamage(x) * 2)) { if (m.IsValidTarget(600)) { W.Cast(); } } } if (JungleClearOption.UseQ && Q.IsReady() && AxeCount < 2 && Orbwalker.CanAttack()) { if (mobs.Count >= 2) { Q.Cast(); } if (mobs.Count == 1 && mob != null && mob.InAutoAttackRange() && mob.Health > Me.GetAutoAttackDamage(mob) * 5) { Q.Cast(); } } } } }
/* private void Orbwalker_PreAttack(object sender, PreAttackEventArgs e) * { * if (Orbwalker.Mode.Equals(OrbwalkingMode.Combo)) * { * if (Menu["combo"]["qset"]["qaa"].Enabled) * { * var target = GetBestEnemyHeroTargetInRange(Player.AttackRange); * * if (!target.IsValidTarget()) * { * return; * } * * if (Q.Ready && target.IsValidTarget(Q.Range)) * { * if (target != null) * { * * Q.CastOnUnit(target); * } * } * * } * } * }*/ public void OnProcessSpellCast(Obj_AI_Base sender, Obj_AI_BaseMissileClientDataEventArgs args) { if (sender.IsMe) { if (args.SpellSlot == SpellSlot.Q) { Player.IssueOrder(OrderType.MoveTo, Game.CursorPos); if (Orbwalker.CanAttack()) { Orbwalker.ResetAutoAttackTimer(); } } } }
public static void Orbwalk(AttackableUnit target = null, Vector3?position = null) { if (Orbwalker.CanAttack() && Orbwalker.AttackState) { var gTarget = target ?? Orbwalker.GetTarget(); if (gTarget.InAutoAttackRange()) { Orbwalker.Attack(gTarget); } } if (Orbwalker.CanMove() && Orbwalker.MovementState) { Orbwalker.Move(position.HasValue && position.Value.IsValid() ? position.Value : Game.CursorPos); } }
private bool GlaivesOfWisdomCast(Hero target) { var GlaivesOfWisdom = Main.GlaivesOfWisdom; var ModifierHurricanePike = Owner.HasModifier("modifier_item_hurricane_pike_range"); if (!GlaivesOfWisdom.IsReady || Owner.IsMuted() || Owner.IsSilenced() || !Config.AbilityToggler.Value.IsEnabled(GlaivesOfWisdom.ToString()) || (target.IsMagicImmune() && GlaivesOfWisdom.PiercesSpellImmunity != SpellPierceImmunityType.EnemiesYes)) { if (ModifierHurricanePike) { return(Orbwalker.Attack(target)); } return(false); } // GlaivesOfWisdom Autocast if (ModifierHurricanePike) { if (!GlaivesOfWisdom.Ability.IsAutoCastEnabled) { GlaivesOfWisdom.Ability.ToggleAutocastAbility(); } return(Orbwalker.Attack(target)); } else if (GlaivesOfWisdom.Ability.IsAutoCastEnabled) { GlaivesOfWisdom.Ability.ToggleAutocastAbility(); } // GlaivesOfWisdom if (Owner.Distance2D(target) < Owner.AttackRange(target) && Orbwalker.CanAttack(target)) { var time = Game.RawGameTime; if ((time - LastCastAttempt) > 0.1f) { GlaivesOfWisdom.UseAbility(target); LastCastAttempt = time; } return(true); } return(false); }
private static void Harass() { if (HarassOption.HasEnouguMana) { if (HarassOption.UseW && W.IsReady()) { var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName))); if (target.IsValidTarget(W.Range) && target.DistanceToPlayer() > Q.Range) { SpellManager.PredCast(W, target); } } if (HarassOption.UseQ && Q.IsReady()) { var target = TargetSelector.GetTarget(bigGunRange, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName))); if (target.IsValidTarget(bigGunRange) && Orbwalker.CanAttack()) { if (target.CountEnemiesInRange(150) >= 2 && Me.Mana > R.ManaCost + Q.ManaCost * 2 + W.ManaCost && target.DistanceToPlayer() > Q.Range) { Q.Cast(); } if (target.DistanceToPlayer() > Q.Range && Me.Mana > R.ManaCost + Q.ManaCost * 2 + W.ManaCost) { Q.Cast(); } } else { if (Me.HasBuff("JinxQ") && Q.IsReady()) { Q.Cast(); } } } else if (Me.HasBuff("JinxQ") && Q.IsReady()) { Q.Cast(); } } }
private static void JungleClearEvent() { if (JungleClearOption.HasEnouguMana()) { var mobs = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMob()).ToArray(); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (JungleClearOption.UseE && E.Ready && mob != null && mob.IsValidTarget(E.Range)) { E.Cast(mob); } if (JungleClearOption.UseW && W.Ready && !Me.HasBuff("dravenfurybuff") && AxeCount > 0) { foreach ( var m in mobs.Where( x => x.DistanceToPlayer() <= 600 && !x.Name.ToLower().Contains("mini") && !x.Name.ToLower().Contains("crab") && x.MaxHealth > 1500 && x.Health > Me.GetAutoAttackDamage(x) * 2)) { if (m.IsValidTarget(600)) { W.Cast(); } } } if (JungleClearOption.UseQ && Q.Ready && AxeCount < 2 && Orbwalker.CanAttack()) { if (mobs.Length >= 2) { Q.Cast(); } if (mobs.Length == 1 && mob != null && mob.IsValidAutoRange() && mob.Health > Me.GetAutoAttackDamage(mob) * 5) { Q.Cast(); } } } } }
private bool ImpetusCast(Hero target) { var Impetus = Main.Impetus; var ModifierHurricanePike = Owner.HasModifier("modifier_item_hurricane_pike_range"); if (!Impetus.IsReady || Owner.IsMuted() || Owner.IsSilenced() || !Config.AbilityToggler.Value.IsEnabled(Impetus.ToString())) { if (ModifierHurricanePike) { return(Orbwalker.Attack(target)); } return(false); } // Impetus Autocast if (ModifierHurricanePike) { if (!Impetus.Ability.IsAutoCastEnabled) { Impetus.Ability.ToggleAutocastAbility(); } return(Orbwalker.Attack(target)); } else if (Impetus.Ability.IsAutoCastEnabled) { Impetus.Ability.ToggleAutocastAbility(); } // Impetus if (Owner.Distance2D(target) < Owner.AttackRange(target) && Orbwalker.CanAttack(target)) { var time = Game.RawGameTime; if ((time - LastCastAttempt) > 0.1f) { Impetus.UseAbility(target); LastCastAttempt = time; } return(true); } return(false); }
public static void OnUpdate(EventArgs args) { //Printer.Print($"{Orbwalker.CanCancelAttack()} {Orbwalker.CanAttack()}"); if (!MenuManager.ComboIsActive) { // ReSharper disable once RedundantCheckBeforeAssignment if (Target != null) { Target = null; } return; } if (Target == null || !Target.IsValid || !Target.IsAlive) { Target = TargetSelector.ClosestToMouse(Me); return; } if (MenuManager.UseRazeInCombo && Target.IsValidRazeTarget() && !Me.IsInvisible() && (!Orbwalker.CanAttack() || Me.GetAttackRange() <= Me.Distance2D(Target))) { var r = Razes.OrderBy(x => Target.Distance2D(Prediction.InFront(Me, x.GetCastRange()))); foreach (var ability in r) { var razeStatus = Helper.RazeAimCasterTemp(ability, Target); //var razeStatus = Helper.RazeCaster(ability, Target); if (razeStatus) { break; } } /*if (!Helper.RazeCaster(RazeLow, Target)) * if (!Helper.RazeCaster(RazeNormal, Target)) * Helper.RazeCaster(RazeHigh, Target);*/ } if (!Target.HasModifier("modifier_abaddon_borrowed_time") && Me.CanAttack()) { Orbwalker.OrbwalkOn(Target, followTarget: MenuManager.OrbWalkType); } else if (!MoveSleeper.Sleeping) { MoveSleeper.Sleep(250); Me.Move(MenuManager.OrbWalkType ? Target.Position : Game.MousePosition); } }
private static void Combo() { var target = MyTargetSelector.GetTarget(R.Range, ComboOption.GetBool("ComboForcus").Enabled); if (target.IsValidTarget(R.Range) && !target.IsUnKillable()) { if (ComboOption.UseR && R.Ready && ComboOption.GetSlider("ComboRLimit").Value > GetRCount && target.IsValidTarget(R.Range) && target.HealthPercent() <= ComboOption.GetSlider("ComboRHP").Value&& (!ComboOption.GetBool("ComboROnlyOutAARange").Enabled || ComboOption.GetBool("ComboROnlyOutAARange").Enabled&& !target.IsValidAutoRange())) { var rPred = R.GetPrediction(target); if (rPred.HitChance >= HitChance.High) { R.Cast(rPred.CastPosition); } } if (ComboOption.UseQ && Q.Ready && target.IsValidTarget(Q.Range)) { var qPred = Q.GetPrediction(target); if (qPred.HitChance >= HitChance.Medium) { Q.Cast(qPred.CastPosition); } } if (ComboOption.UseE && E.Ready && target.IsValidTarget(E.Range)) { var ePred = E.GetPrediction(target); if (ePred.HitChance >= HitChance.High) { E.Cast(ePred.CastPosition); } } if (ComboOption.UseW && W.Ready && target.IsValidTarget(W.Range) && !target.IsValidAutoRange() && Orbwalker.CanAttack()) { W.Cast(); } } }
private static void JungleClear() { if (JungleClearOption.HasEnouguMana()) { var mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && x.GetJungleType() != JungleType.Unknown) .OrderByDescending(x => x.MaxHealth) .ToList(); if (mobs.Any()) { var bigMob = mobs.First(x => !x.Name.Contains("mini") && !x.Name.Contains("Crap")); if (bigMob != null && bigMob.IsValidTarget()) { if (JungleClearOption.UseQ && Q.IsReady() && bigMob.IsValidTarget(Q.Range) && (bigMob.DistanceToPlayer() > Me.GetRealAutoAttackRange(bigMob) || !Orbwalker.CanAttack())) { Q.CastIfHitchanceEquals(bigMob, HitChance.Medium); } if (JungleClearOption.UseE && E.IsReady() && bigMob.IsValidTarget()) { if (GetEDamageForMinion(bigMob) > bigMob.Health) { E.Cast(); } } } else { if (JungleClearOption.UseQ && Q.IsReady()) { var qFarm = Q.GetLineFarmLocation(mobs); if (qFarm.MinionsHit >= 2) { Q.Cast(qFarm.Position); } } } } } }