public static void Combo() { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); var target2 = TargetSelector.GetTarget(Q.Range / 2, TargetSelector.DamageType.Physical); if (target == null) { return; } if (R.IsReady() && Config.Item("useR").GetValue <bool>()) { R.Cast(); } if (target.IsValidTarget(Q.Range) && ObjectManager.Player.Spellbook.CanUseSpell((smiteSlot)) == SpellState.Ready && (smitetype() == "s5_summonersmiteplayerganker" || smitetype() == "s5_summonersmiteduel") && Config.Item("useSmite").GetValue <bool>()) { SmiteSlot(); ObjectManager.Player.Spellbook.CastSpell(smiteSlot, target); } if (Q.IsReady() && Config.Item("useQ").GetValue <bool>()) { Qlogic(); } if (E.IsReady() && Config.Item("useE").GetValue <bool>() && Orbwalking.InAutoAttackRange(target)) { E.Cast(); } else if (W.IsReady() && Orbwalking.InAutoAttackRange(target) && Config.Item("useW").GetValue <bool>()) { EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target); LeagueSharp.Common.Utility.DelayAction.Add(400, () => W.Cast()); W.Cast(); EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target); Orbwalking.ResetAutoAttackTimer(); } if (tiamatItem.IsReady() && target.IsValidTarget(tiamatItem.Range)) { tiamatItem.Cast(); } if (hydraItem.IsReady() && target.IsValidTarget(tiamatItem.Range)) { hydraItem.Cast(); } if (botrkItem.IsReady() && target.IsValidTarget(botrkItem.Range)) { botrkItem.Cast(target); } if (bilgeItem.IsReady() && target.IsValidTarget(bilgeItem.Range)) { bilgeItem.Cast(target); } if (GhostbladeItem.IsReady() && target.IsValidTarget(Q.Range)) { GhostbladeItem.Cast(); } if (randuinsItem.IsReady() && target.IsValidTarget(randuinsItem.Range)) { randuinsItem.Cast(); } //this was magnet, no need with new obwalker else if (target2.IsEnemy && target2.IsValidTarget() && !target2.IsMinion && !Player.Spellbook.IsAutoAttacking && !Orbwalking.InAutoAttackRange(target2)) { EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target2); LeagueSharp.Common.Utility.DelayAction.Add(400, () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target2)); EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target2); } }
private void LogicE() { var t2 = TargetSelector.GetTarget(950, TargetSelector.DamageType.Physical); var t = TargetSelector.GetTarget(1400, TargetSelector.DamageType.Physical); if (E.IsReady() && Player.Mana > RMANA + EMANA && Player.CountEnemiesInRange(260) > 0 && Player.Position.Extend(Game.CursorPos, E.Range).CountEnemiesInRange(500) < 3 && t.Position.Distance(Game.CursorPos) > t.Position.Distance(Player.Position)) { if (Config.Item("autoEwall").GetValue <bool>()) { FindWall(); } E.Cast(Player.Position.Extend(Game.CursorPos, E.Range), true); } else if (Player.Health > Player.MaxHealth * 0.4 && !Player.UnderTurret(true) && (Game.Time - OverKill > 0.4) && Player.Position.Extend(Game.CursorPos, E.Range).CountEnemiesInRange(700) < 3) { if (t.IsValidTarget() && Player.Mana > QMANA + EMANA + WMANA && t.Position.Distance(Game.CursorPos) + 300 < t.Position.Distance(Player.Position) && Q.IsReady() && Q.GetDamage(t) + E.GetDamage(t) > t.Health && !Orbwalking.InAutoAttackRange(t) && Q.WillHit(Player.Position.Extend(Game.CursorPos, E.Range), Q.GetPrediction(t).UnitPosition) ) { E.Cast(Player.Position.Extend(Game.CursorPos, E.Range), true); Program.debug("E kill Q"); } else if (t2.IsValidTarget() && t2.Position.Distance(Game.CursorPos) + 300 < t2.Position.Distance(Player.Position) && Player.Mana > EMANA + RMANA && Player.GetAutoAttackDamage(t2) + E.GetDamage(t2) > t2.Health && !Orbwalking.InAutoAttackRange(t2)) { var position = Player.Position.Extend(Game.CursorPos, E.Range); if (W.IsReady()) { W.Cast(position, true); } E.Cast(position, true); Program.debug("E kill aa"); OverKill = Game.Time; } else if (t.IsValidTarget() && Player.Mana > QMANA + EMANA + WMANA && t.Position.Distance(Game.CursorPos) + 300 < t.Position.Distance(Player.Position) && W.IsReady() && W.GetDamage(t) + E.GetDamage(t) > t.Health && !Orbwalking.InAutoAttackRange(t) && Q.WillHit(Player.Position.Extend(Game.CursorPos, E.Range), Q.GetPrediction(t).UnitPosition) ) { E.Cast(Player.Position.Extend(Game.CursorPos, E.Range), true); Program.debug("E kill W"); } } }
internal static void Execute() { if (Config.IsChecked("Combo.bR") && Spells.R.CanCast()) { var rTarget = TargetSelector.GetTarget(Spells.R.Range, TargetSelector.DamageType.Magical); if (rTarget != null) { Spells.R.CastIfWillHit(rTarget, Config.GetSliderValue("Combo.minR")); /*var rRectangle = new Geometry.Polygon.Rectangle( * ObjectManager.Player.Position, * ObjectManager.Player.Position.Extend(rTarget.Position, Spells.R.Range), * Spells.R.Width); * if ( * HeroManager.Enemies.Count( * enemy => * !enemy.IsDead && enemy.IsValid && !enemy.HasBuffOfType(BuffType.Invulnerability) * && rRectangle.IsInside(enemy.Position)) * >= Config.GetSliderValue("Combo.minR")) * { * Spells.R.Cast(rTarget); * }*/ } } if (Config.IsChecked("Combo.bFlashR") && Spells.R.CanCast() && Spells.Flash.CanCast()) { var rFlashTarget = TargetSelector.GetTarget(Spells.R.Range + 375, TargetSelector.DamageType.Magical); if (rFlashTarget != null) { var flashPos = ObjectManager.Player.Position.Extend(rFlashTarget.Position, 425); Spells.FlashR.UpdateSourcePosition(flashPos, flashPos); if (Spells.R.CountHits( HeroManager.Enemies.Where(x => !x.IsDead).Select(x => x.Position).ToList(), rFlashTarget.Position) >= Config.GetSliderValue("Combo.minFlashR")) { ObjectManager.Player.Spellbook.CastSpell(Spells.Flash.Slot, flashPos); LeagueSharp.Common.Utility.DelayAction.Add( Computed.RDelay.Next(60, 85), () => Spells.FlashR.Cast(rFlashTarget.Position)); } } } /*if (Config.IsChecked("Combo.bFlashR") && Spells.R.CanCast() && Spells.Flash.CanCast()) * { * var rFlashTarget = TargetSelector.GetTarget(Spells.R.Range + 400, TargetSelector.DamageType.Magical); * if (rFlashTarget != null) * { * var flashPos = ObjectManager.Player.Position.Extend(rFlashTarget.Position, 425); * var flashUltRectangle = new Geometry.Polygon.Rectangle( * flashPos, * flashPos.Extend(ObjectManager.Player.Position, -Spells.R.Range), * Spells.R.Width); * if ( * HeroManager.Enemies.Count( * enemy => * !enemy.HasBuffOfType(BuffType.Invulnerability) && !enemy.IsDead && enemy.IsValid * && flashUltRectangle.IsInside(enemy.Position)) * >= Config.GetSliderValue("Combo.minFlashR")) * { * ObjectManager.Player.Spellbook.CastSpell(Spells.Flash.Slot, flashPos); * LeagueSharp.Common.Utility.DelayAction.Add(Computed.RDelay.Next(50, 85), () => Spells.R.Cast(rFlashTarget)); * * For when mid animation flash is possible * Spells.R.Cast(flashPos); * Core.DelayAction( * () => Player.CastSpell(Spells.Flash.Slot, flashPos), * Computed.RDelay.Next(150, 250)); * * } * } * }*/ var target = TargetSelector.GetTarget(Spells.Q.Range, TargetSelector.DamageType.Magical); if (target == null) { return; } if (Config.IsChecked("Combo.bQ") && Spells.Q.CanCast() && target.Distance(ObjectManager.Player) < Spells.Q.Range) { Spells.Q.Cast(); } if (Config.IsChecked("Combo.bE") && Spells.E.CanCast()) { if (target.Path.Length == 0 || !target.IsMoving) { return; } var pathEndLoc = target.Path.OrderByDescending(x => x.Distance(target.Position)).FirstOrDefault(); var dist = ObjectManager.Player.Position.Distance(target.Position); var distToPath = pathEndLoc.Distance(ObjectManager.Player.Position); if (distToPath <= dist) { return; } var movspeedDif = ObjectManager.Player.MoveSpeed - target.MoveSpeed; if (movspeedDif <= 0 && !Orbwalking.InAutoAttackRange(target)) { Spells.E.Cast(); } var timeToReach = dist / movspeedDif; if (timeToReach > 2.5f) { Spells.E.Cast(); } } }
private static void Game_OnUpdate(EventArgs args) { if (!BadaoYasuoVariables.AssassinateKey.GetValue <KeyBind>().Active) { return; } var target = TargetSelector.GetSelectedTarget(); // orbwalk Orbwalking.Orbwalk((target.BadaoIsValidTarget() && Orbwalking.InAutoAttackRange(target)) ? target : null , Game.CursorPos, 90, 50, false, false); if (!target.BadaoIsValidTarget()) { return; } //QE if (BadaoYasuoHelper.CanCastSpell(target)) { if (BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing() && target.IsValidTarget(BadaoYasuoHelper.GetQRange())) { BadaoYasuoHelper.CastQ(target); } if (BadaoMainVariables.E.IsReady()) { BadaoYasuoHelper.CastE(target); } if (BadaoMainVariables.Q.IsReady() && ObjectManager.Player.IsDashing()) { var data = ObjectManager.Player.GetDashInfo(); if (BadaoYasuoHelper.Qstate() == 3 || (Utility.CountEnemiesInRange(data.EndPos.To3D(), 270) >= 2)) { BadaoYasuoHelper.CastQCone(target); } } } // R always if (BadaoMainVariables.R.IsReady() && target.BadaoIsValidTarget(BadaoMainVariables.R.Range) && BadaoYasuoHelper.IsOnAir(target)) { if (target.HasBuffOfType(BuffType.Knockback)) { BadaoMainVariables.R.Cast(target); } var buff = target.Buffs.Where(x => x.Type == BuffType.Knockup).MaxOrDefault(x => x.EndTime); if (buff != null && (buff.EndTime - Game.Time) * 1000 <= 200 + Game.Ping) { BadaoMainVariables.R.Cast(target); } } //stack Q if (BadaoYasuoVariables.ComboStackQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoHelper.Qstate() != 3 && !BadaoMainVariables.E.IsInRange(target)) { var Qtarget = BadaoYasuoHelper.GetETargets().FirstOrDefault(); if (Qtarget.IsValidTarget()) { BadaoMainVariables.Q.Cast(target); } } //gap close E if (BadaoMainVariables.E.IsReady() && target.Distance(ObjectManager.Player) > 475) { var Etargets = BadaoYasuoHelper.GetETargets(); var Etarget = Etargets.Where(x => x != null && BadaoYasuoHelper.GetEDashEnd(x).Distance(Game.CursorPos.To2D()) + 150 < ObjectManager.Player.Distance(Game.CursorPos)) .MinOrDefault(x => BadaoYasuoHelper.GetEDashEnd(x).Distance(Game.CursorPos.To2D())); if (Etarget != null) { BadaoMainVariables.E.Cast(Etarget); } } }
private Obj_AI_Hero GetTarget(Obj_AI_Base champion, float range, DamageType damageType) { Obj_AI_Hero bestTarget = null; var bestRatio = 0f; foreach (var hero in ObjectManager.Get <Obj_AI_Hero>()) { if (!hero.IsValidTarget() || IsInvulnerable(hero) || ((!(range < 0) || !Orbwalking.InAutoAttackRange(hero)) && !(champion.Distance(hero) < range))) { continue; } var damage = 0f; switch (damageType) { case DamageType.MAGICAL: damage = (float)ObjectManager.Player.CalcDamage(hero, Damage.DamageType.Magical, 100); break; case DamageType.PHYSICAL: damage = (float)ObjectManager.Player.CalcDamage(hero, Damage.DamageType.Physical, 100); break; case DamageType.TRUE: damage = 100; break; } var ratio = damage / (1 + hero.Health) * GetPriority(hero); if (ratio > bestRatio) { bestRatio = ratio; bestTarget = hero; } } return(bestTarget); }
private static void Farm(bool laneClear) { if (!Config.Item("EnabledFarm").GetValue <bool>()) { return; } if (!Orbwalking.CanMove(40)) { return; } var rangedMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + Q.Width + 30, MinionTypes.Ranged); var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + Q.Width + 30, MinionTypes.All); var rangedMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width + 30, MinionTypes.Ranged); var allMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width + 30, MinionTypes.All); var useQi = Config.Item("UseQFarm").GetValue <StringList>().SelectedIndex; var useWi = Config.Item("UseWFarm").GetValue <StringList>().SelectedIndex; var useEi = Config.Item("UseEFarm").GetValue <StringList>().SelectedIndex; var useQ = (laneClear && (useQi == 1 || useQi == 2)) || (!laneClear && (useQi == 0 || useQi == 2)); var useW = (laneClear && (useWi == 1 || useWi == 2)) || (!laneClear && (useWi == 0 || useWi == 2)); var useE = (laneClear && (useEi == 1 || useEi == 2)) || (!laneClear && (useEi == 0 || useEi == 2)); if (useQ && Q.IsReady()) { if (laneClear) { var fl1 = Q.GetCircularFarmLocation(rangedMinionsQ, Q.Width); var fl2 = Q.GetCircularFarmLocation(allMinionsQ, Q.Width); if (fl1.MinionsHit >= 3) { Q.Cast(fl1.Position); } else if (fl2.MinionsHit >= 2 || allMinionsQ.Count == 1) { Q.Cast(fl2.Position); } } else { foreach (var minion in allMinionsQ) { if (!Orbwalking.InAutoAttackRange(minion) && minion.Health < 0.75 * Player.GetSpellDamage(minion, SpellSlot.Q)) { Q.Cast(minion); } } } } if (useW && W.IsReady() && allMinionsW.Count > 3) { if (laneClear) { if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1) { //WObject var gObjectPos = GetGrabableObjectPos(false); if (gObjectPos.To2D().IsValid() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 150) { W.Cast(gObjectPos); } } else if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1) { var fl1 = Q.GetCircularFarmLocation(rangedMinionsW, W.Width); var fl2 = Q.GetCircularFarmLocation(allMinionsW, W.Width); if (fl1.MinionsHit >= 3 && W.IsInRange(fl1.Position.To3D())) { W.Cast(fl1.Position); } else if (fl2.MinionsHit >= 1 && W.IsInRange(fl2.Position.To3D()) && fl1.MinionsHit <= 2) { W.Cast(fl2.Position); } } } } }
private static void Game_OnGameUpdate(EventArgs args) { CheckChampionBuff(); //Update the combo and harass values. CClass.ComboActive = CClass.Config.Item("Orbwalk").GetValue <KeyBind>().Active; var harassExistsMana = ObjectManager.Player.MaxMana / 100 * Config.Item("HarassMana").GetValue <Slider>().Value; CClass.HarassActive = CClass.Config.Item("Farm").GetValue <KeyBind>().Active&& ObjectManager.Player.Mana >= harassExistsMana; CClass.ToggleActive = ObjectManager.Player.Mana >= harassExistsMana; var laneExistsMana = ObjectManager.Player.MaxMana / 100 * Config.Item("LaneClearMana").GetValue <Slider>().Value; CClass.LaneClearActive = CClass.Config.Item("LaneClear").GetValue <KeyBind>().Active & ObjectManager.Player.Mana >= laneExistsMana; CClass.Game_OnGameUpdate(args); UseSummoners(); var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex; //Items if ( !((CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && (useItemModes == 2 || useItemModes == 3)) || (CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && (useItemModes == 1 || useItemModes == 3)))) { return; } var botrk = Config.Item("BOTRK").GetValue <bool>(); var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>(); var sword = Config.Item("SWORD").GetValue <bool>(); var muramana = Config.Item("MURAMANA").GetValue <bool>(); var target = CClass.Orbwalker.GetTarget(); if (botrk) { if (target != null && target.Type == ObjectManager.Player.Type && target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 450) { var hasCutGlass = Items.HasItem(3144); var hasBotrk = Items.HasItem(3153); if (hasBotrk || hasCutGlass) { var itemId = hasCutGlass ? 3144 : 3153; var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk); if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth) { Items.UseItem(itemId, target); } } } } if (ghostblade && target != null && target.Type == ObjectManager.Player.Type && !ObjectManager.Player.HasBuff("ItemSoTD", true) && /*if Sword of the divine is not active */ Orbwalking.InAutoAttackRange(target)) { Items.UseItem(3142); } if (sword && target != null && target.Type == ObjectManager.Player.Type && !ObjectManager.Player.HasBuff("spectralfury", true) && /*if ghostblade is not active*/ Orbwalking.InAutoAttackRange(target)) { Items.UseItem(3131); } if (muramana && Items.HasItem(3042)) { if (target != null && CClass.ComboActive && target.Position.Distance(ObjectManager.Player.Position) < 1200) { if (!ObjectManager.Player.HasBuff("Muramana", true)) { Items.UseItem(3042); } } else { if (ObjectManager.Player.HasBuff("Muramana", true)) { Items.UseItem(3042); } } } }
public static void UpdateCombo() { //Q dash if (Q.IsReady() && Q1Combo) { var target = TargetSelect(Q.Range); if (target != null && !Orbwalking.InAutoAttackRange(target) && Orbwalking.CanMove(90)) { Q.Cast(target); } } //W if (W.IsReady() && WCombo && !Player.HasBuff("TalonRStealth")) { var target = TargetSelect(W.Range); if (target != null && Orbwalking.CanMove(90) && !(Orbwalking.CanAttack() && Orbwalking.InAutoAttackRange(target))) { W.Cast(target); } } //R1 if (R1IsReady() && RCombo) { var target = TargetSelect(R.Range); if (target != null && Orbwalking.CanMove(90) && (Orbwalking.InAutoAttackRange(target) || Q.IsReady())) { R.Cast(); } } }
private void LogicE() { var t = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Physical); var dashPosition = Player.Position.Extend(Game.CursorPos, E.Range); if (Program.Enemies.Any(target => target.IsValidTarget(270) && target.IsMelee)) { var dashPos = Dash.CastDash(); if (!dashPos.IsZero) { E.Cast(dashPos); } } if (t.IsValidTarget() && Player.HealthPercent > 40 && !Player.UnderTurret(true) && (Game.Time - OverKill > 0.3) && dashPosition.CountEnemiesInRange(900) < 3) { if (t.Distance(Game.CursorPos) + 300 < t.Position.Distance(Player.Position) && !Orbwalking.InAutoAttackRange(t)) { var dmgCombo = 0f; if (t.IsValidTarget(950)) { dmgCombo = (float)Player.GetAutoAttackDamage(t) + E.GetDamage(t); } if (Q.IsReady() && Player.Mana > QMANA + EMANA && Q.WillHit(dashPosition, Q.GetPrediction(t).UnitPosition)) { dmgCombo = Q.GetDamage(t); } if (W.IsReady() && Player.Mana > QMANA + EMANA + WMANA) { dmgCombo += W.GetDamage(t); } if (dmgCombo > t.Health && OktwCommon.ValidUlt(t)) { E.Cast(dashPosition); OverKill = Game.Time; Program.debug("E ks combo"); } } } }
private static void afterAttack(AttackableUnit unit, AttackableUnit target) { var t = TargetSelector.GetTarget(500, TargetSelector.DamageType.Physical); if (t.IsValidTarget() && Q.IsReady() && Q.GetDamage(t) + ObjectManager.Player.GetAutoAttackDamage(t) > t.Health && Orbwalking.InAutoAttackRange(t)) { Q.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range), true); } }
private static void Game_OnGameUpdate(EventArgs args) { ManaMenager(); if (Orbwalker.ActiveMode.ToString() == "Mixed" || Orbwalker.ActiveMode.ToString() == "LaneClear" || Orbwalker.ActiveMode.ToString() == "LastHit") { Farm = true; } else { Farm = false; } if (E.IsReady()) { CondemnCheck(ObjectManager.Player.ServerPosition); var t = TargetSelector.GetTarget(200, TargetSelector.DamageType.Physical); if (E.IsReady() && !Q.IsReady() && t.IsValidTarget() && t.IsMelee() && ObjectManager.Player.Health < ObjectManager.Player.MaxHealth * 0.3) { E.Cast(t, true); debug("E push"); } } if (Orbwalker.ActiveMode.ToString() == "Combo" && Q.IsReady()) { ManaMenager(); var t = TargetSelector.GetTarget(900, TargetSelector.DamageType.Physical); var t2 = TargetSelector.GetTarget(200, TargetSelector.DamageType.Physical); if (Q.IsReady() && ObjectManager.Player.CountEnemiesInRange(280) > 0 && ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range).CountEnemiesInRange(500) < 3 && t.Position.Distance(Game.CursorPos) > t.Position.Distance(ObjectManager.Player.Position)) { Q.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range), true); debug("Q escape"); } else if (t.IsValidTarget() && ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range).CountEnemiesInRange(700) < 3 && (t.CountEnemiesInRange(800) < 2 || ObjectManager.Player.GetAutoAttackDamage(t) * 3 > t.Health) && !Orbwalking.InAutoAttackRange(t) && ObjectManager.Player.Position.Distance(t.ServerPosition) > ObjectManager.Player.Position.Distance(t.Position) && t.Position.Distance(ObjectManager.Player.ServerPosition) < t.Position.Distance(ObjectManager.Player.Position)) { Q.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range), true); debug("Q run"); } if (E.IsReady() && Q.IsReady() && CondemnCheckE(ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range)) && ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range).CountEnemiesInRange(700) < 3) { Q.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, Q.Range), true); debug("Q + E codom"); } } if (R.IsReady() && Orbwalker.ActiveMode.ToString() == "Combo" && Config.Item("autoR").GetValue <bool>()) { if (ObjectManager.Player.CountEnemiesInRange(800f) > 2) { R.Cast(); } } PotionMenager(); }
private static void Game_OnUpdate(EventArgs args) { if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear) { return; } if (!BadaoGangplankVariables.LaneQ.GetValue <bool>()) { return; } foreach (AIMinionClient minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range).OrderBy(x => x.Health)) { if (minion.BadaoIsValidTarget() && BadaoMainVariables.Q.GetDamage(minion) >= minion.Health && !(Orbwalking.InAutoAttackRange(minion))) { BadaoMainVariables.Q.Cast(minion); } } }
private static void Game_OnGameUpdate(EventArgs args) { ManaMenager(); if (E.IsReady()) { if (Config.Item("smartE").GetValue <KeyBind>().Active) { Esmart = true; } if (Esmart && ObjectManager.Player.Position.Extend(Game.CursorPos, E.Range).CountEnemiesInRange(500) < 4) { E.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, E.Range), true); } } else { Esmart = false; } if (W.IsReady() && attackNow) { var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical); if (t.IsValidTarget()) { if (W.GetDamage(t) > t.Health && !Orbwalking.InAutoAttackRange(t)) { W.Cast(t, true, true); debug("W ks"); OverKill = Game.Time; return; } else if (W.GetDamage(t) + Q.GetDamage(t) > t.Health && ObjectManager.Player.Mana > QMANA + EMANA + RMANA) { W.Cast(t, true, true); } else if (Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Mana > RMANA + QMANA + EMANA + WMANA) { W.Cast(t, true, true); } else if (Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Mana > RMANA + WMANA + QMANA + 5 && !Orbwalking.InAutoAttackRange(t)) { W.Cast(t, true, true); } else if (Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Mana > RMANA + QMANA + WMANA && ObjectManager.Player.CountEnemiesInRange(300) > 0) { W.Cast(t, true, true); } else if (Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Mana > RMANA + WMANA + EMANA && ObjectManager.Player.Health < ObjectManager.Player.MaxHealth * 0.4) { W.Cast(t, true, true); } else if ((Orbwalker.ActiveMode.ToString() == "Combo" || Farm) && ObjectManager.Player.Mana > RMANA + QMANA + WMANA) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(Q.Range))) { if (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) || enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) || enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuffOfType(BuffType.Slow) || enemy.HasBuff("Recall")) { W.Cast(enemy, true, true); } } } } } if (E.IsReady() && Config.Item("autoE").GetValue <bool>() && attackNow) { var t = TargetSelector.GetTarget(E.Range + Q.Range, TargetSelector.DamageType.Physical); var t2 = TargetSelector.GetTarget(900f, TargetSelector.DamageType.Physical); if (ObjectManager.Player.Mana > RMANA + EMANA && ObjectManager.Player.CountEnemiesInRange(240) > 0 && ObjectManager.Player.Position.Extend(Game.CursorPos, E.Range).CountEnemiesInRange(500) < 3 && t.Position.Distance(Game.CursorPos) > t.Position.Distance(ObjectManager.Player.Position)) { E.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, E.Range), true); } else if (E.IsReady() && (Game.Time - OverKill > 0.4) && ObjectManager.Player.Position.Extend(Game.CursorPos, E.Range).CountEnemiesInRange(700) < 3 && Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Health > ObjectManager.Player.MaxHealth * 0.4 && !ObjectManager.Player.UnderTurret(true)) { if (t.IsValidTarget() && Q.IsReady() && ObjectManager.Player.Mana > RMANA + EMANA && Q.GetDamage(t) + ObjectManager.Player.GetAutoAttackDamage(t2) * 3 > t.Health && t.Position.Distance(Game.CursorPos) + 200 < t.Position.Distance(ObjectManager.Player.Position) && !Orbwalking.InAutoAttackRange(t) ) { E.Cast(Game.CursorPos, true); debug("E + aa + Q"); } else if (t2.IsValidTarget() && ObjectManager.Player.Mana > QMANA + RMANA && ObjectManager.Player.GetAutoAttackDamage(t2) * 2 > t2.Health && !Orbwalking.InAutoAttackRange(t2) && t2.Position.Distance(Game.CursorPos) + 200 < t2.Position.Distance(ObjectManager.Player.Position) ) { E.Cast(Game.CursorPos, true); debug("E + aa"); } } } if (Q.IsReady() && attackNow) { var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (t.IsValidTarget()) { if (Q.GetDamage(t) + ObjectManager.Player.GetAutoAttackDamage(t) > t.Health) { Q.Cast(t, true); OverKill = Game.Time; debug("Q ks"); } else if (Q.GetDamage(t) + R.GetDamage(t) > t.Health && R.IsReady()) { Q.Cast(t, true); debug("Q + R ks"); } else if (Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Mana > RMANA + QMANA && attackNow) { CastSpell(Q, t, Config.Item("Hit").GetValue <Slider>().Value); } else if (((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) && ObjectManager.Player.Mana > RMANA + EMANA + WMANA + QMANA + QMANA) && t.IsValidTarget(Q.Range - 100) && attackNow && Config.Item("haras" + t.BaseSkinName).GetValue <bool>()) { CastSpell(Q, t, Config.Item("Hit").GetValue <Slider>().Value); } else if ((Orbwalker.ActiveMode.ToString() == "Combo" || Farm) && ObjectManager.Player.Mana > RMANA + QMANA + EMANA && attackNow) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(Q.Range))) { if (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) || enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) || enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuffOfType(BuffType.Slow) || enemy.HasBuff("Recall")) { Q.Cast(enemy, true); } } } } else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && ObjectManager.Player.ManaPercentage() > Config.Item("Mana").GetValue <Slider>().Value&& Config.Item("farmQ").GetValue <bool>() && ObjectManager.Player.Mana > RMANA + QMANA + EMANA + WMANA) { var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range, MinionTypes.All); var Qfarm = Q.GetCircularFarmLocation(allMinionsQ, 200); if (Qfarm.MinionsHit > 3 && Q.IsReady()) { Q.Cast(Qfarm.Position); } } } var tar = TargetSelector.GetTarget(1800, TargetSelector.DamageType.Physical); if (Config.Item("useR").GetValue <KeyBind>().Active&& tar.IsValidTarget() && R.IsReady()) { R1.Cast(tar, true); } if (R.IsReady() && Config.Item("autoR").GetValue <bool>()) { bool cast = false; foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(target => target.IsValidTarget(R1.Range))) { if (ValidUlt(target)) { float predictedHealth = target.Health + target.HPRegenRate * 2; double Rdmg = R.GetDamage(target) + (R.GetDamage(target) * target.CountAlliesInRange(400) * 0.2); var collisionTarget = target; cast = true; PredictionOutput output = R.GetPrediction(target); Vector2 direction = output.CastPosition.To2D() - Player.Position.To2D(); direction.Normalize(); List <Obj_AI_Hero> enemies = ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget()).ToList(); foreach (var enemy in enemies) { if (enemy.SkinName == target.SkinName || !cast) { continue; } PredictionOutput prediction = R.GetPrediction(enemy); Vector3 predictedPosition = prediction.CastPosition; Vector3 v = output.CastPosition - Player.ServerPosition; Vector3 w = predictedPosition - Player.ServerPosition; double c1 = Vector3.Dot(w, v); double c2 = Vector3.Dot(v, v); double b = c1 / c2; Vector3 pb = Player.ServerPosition + ((float)b * v); float length = Vector3.Distance(predictedPosition, pb); if (length < (120 + enemy.BoundingRadius) && Player.Distance(predictedPosition) < Player.Distance(target.ServerPosition)) { cast = false; collisionTarget = enemy; } } if (cast && Rdmg > predictedHealth && target.IsValidTarget(R.Range) && (!Orbwalking.InAutoAttackRange(target) || ObjectManager.Player.Health < ObjectManager.Player.MaxHealth * 0.6)) { CastSpell(R, target, Config.Item("Hit").GetValue <Slider>().Value); debug("Rdmg"); } else if (cast && Rdmg * secoundDmgR > predictedHealth && target.IsValidTarget(R1.Range) && target.CountAlliesInRange(300) == 0 && (!Orbwalking.InAutoAttackRange(target) || ObjectManager.Player.Health < ObjectManager.Player.MaxHealth * 0.6)) { CastSpell(R1, target, Config.Item("Hit").GetValue <Slider>().Value); debug("Rdmg 0.7"); } else if (!cast && Rdmg * secoundDmgR > predictedHealth && target.IsValidTarget(GetRealDistance(collisionTarget) + 700)) { CastSpell(R1, target, Config.Item("Hit").GetValue <Slider>().Value); debug("Rdmg 0.7 collision"); } else if (cast && Config.Item("fastR").GetValue <bool>() && Rdmg > predictedHealth && Orbwalking.InAutoAttackRange(target) && Orbwalker.ActiveMode.ToString() == "Combo") { CastSpell(R, target, Config.Item("Hit").GetValue <Slider>().Value); debug("R fast"); } } } } PotionMenager(); if (Orbwalker.GetTarget() == null) { attackNow = true; } }
public static void Combo2() { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); // var target = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical); if (target == null) { return; } var dragon = ObjectManager.Get <Obj_AI_Minion>().First(it => it.IsValidTarget(Q.Range)); if (dragon.Spellbook.IsCastingSpell) { Q.CastOnUnit(dragon); } if (bilgeItem.IsReady() && target.IsValidTarget(bilgeItem.Range)) { bilgeItem.Cast(target); } if (GhostbladeItem.IsReady() && target.IsValidTarget(Q.Range)) { GhostbladeItem.Cast(); } if (target.IsValidTarget(Q.Range) && R.IsReady() && Config.Item("useR").GetValue <bool>()) { R.Cast(); } if (target.IsValidTarget(Q.Range) && Q.IsReady() && Config.Item("useQ").GetValue <bool>()) { Qlogic(); } if (target.IsValidTarget(Q.Range) && E.IsReady() && Config.Item("useE").GetValue <bool>()) { E.Cast(); } else if (target.IsValidTarget(Q.Range) && W.IsReady() && Orbwalking.InAutoAttackRange(target) && Config.Item("useW").GetValue <bool>()) { EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target); LeagueSharp.Common.Utility.DelayAction.Add(350, () => W.Cast()); EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target); Orbwalking.ResetAutoAttackTimer(); } if (tiamatItem.IsReady() && target.IsValidTarget(tiamatItem.Range)) { tiamatItem.Cast(); } if (hydraItem.IsReady() && target.IsValidTarget(tiamatItem.Range)) { hydraItem.Cast(); } if (botrkItem.IsReady() && target.IsValidTarget(botrkItem.Range)) { botrkItem.Cast(target); } if (randuinsItem.IsReady() && target.IsValidTarget(randuinsItem.Range)) { randuinsItem.Cast(); } }
private void Game_OnUpdate(EventArgs args) { _w.MinHitChance = MenuProvider.Champion.Misc.WSelectedHitchance; if (!ObjectManager.Player.IsDead) { if (Orbwalking.CanMove(100)) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (MenuProvider.Champion.Combo.UseQ) { if (_q.IsReadyPerfectly()) { if (ObjectManager.Player.CountEnemiesInRange(2000f) > 0) { var target = HeroManager.Enemies.Where( x => x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x, GetQRange))) .OrderByDescending(a => TargetSelector.GetPriority(a)) .FirstOrDefault(); if (target != null) { if (target.CountEnemiesInRange(200) >= MenuProvider.Champion.Combo.GetSliderValue( "Switch to Rocket If will hit enemy Number >=").Value) { QSwitch(true); } else { QSwitch( !target.IsValidTarget( ObjectManager.Player.GetRealAutoAttackRange(target, DefaultRange))); } } else { QSwitch(true); } } else { QSwitch(false); } } } if (MenuProvider.Champion.Combo.UseW) { if (ObjectManager.Player.CountEnemiesInRange(400f) == 0) { if (_w.IsReadyPerfectly()) { var target = TargetSelector.GetTargetNoCollision(_w); if (target.IsValidTarget(_w.Range)) { _w.Cast(target); } } } } if (MenuProvider.Champion.Combo.UseE) { if (_e.IsReadyPerfectly()) { var target = HeroManager.Enemies.Where( x => x.IsValidTarget(600) && _e.GetPrediction(x).Hitchance >= _e.MinHitChance && x.IsMoving) .OrderBy(x => x.Distance(ObjectManager.Player)) .FirstOrDefault(); if (target != null) { _e.Cast(target, false, true); } else { _e.CastWithExtraTrapLogic(); } } } if (MenuProvider.Champion.Combo.UseR) { if (_r.IsReadyPerfectly()) { if (_wCastTime + 1060 <= Environment.TickCount) { var target = HeroManager.Enemies.FirstOrDefault( x => !x.IsZombie && x.CountAlliesInRange(500) < 2 && HealthPrediction.GetHealthPrediction(x, 5000) > 0 && ObjectManager.Player.Distance(x) >= GetQRange && x.IsKillableAndValidTarget(GetRDamage(x), TargetSelector.DamageType.Physical, _r.Range) && _r.GetPrediction(x).Hitchance >= HitChance.High); if (target != null) { var prediction = _r.GetPrediction(target); var collision = Collision.GetCollision(new List <Vector3> { prediction.UnitPosition }, new PredictionInput { UseBoundingRadius = true, Unit = ObjectManager.Player, Delay = _r.Delay, Speed = _r.Speed, Radius = 200, CollisionObjects = new[] { CollisionableObjects.Heroes } }) .Any(x => x.NetworkId != target.NetworkId); if (!collision) { _r.Cast(target); } } } } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (MenuProvider.Champion.Harass.UseQ) { if (_q.IsReadyPerfectly()) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (ObjectManager.Player.CountEnemiesInRange(2000f) > 0) { var target = HeroManager.Enemies.Where( x => x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x, GetQRange))) .OrderByDescending(a => TargetSelector.GetPriority(a)) .FirstOrDefault(); QSwitch( !target.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange( target, DefaultRange))); } else { QSwitch(false); } } else { QSwitch(false); } } } else { QSwitch(false); } if (MenuProvider.Champion.Harass.UseW) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (ObjectManager.Player.CountEnemiesInRange(400f) == 0) { if (_w.IsReadyPerfectly()) { var target = TargetSelector.GetTargetNoCollision(_w); if (target.IsValidTarget(_w.Range)) { _w.Cast(target); } } } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { if (MenuProvider.Champion.Laneclear.UseQ) { if (_q.IsReadyPerfectly()) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { } else { QSwitch(false); } } } else { QSwitch(false); } //Jungleclear if (MenuProvider.Champion.Jungleclear.UseW) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (_w.IsReadyPerfectly()) { var target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth) .FirstOrDefault( x => x.IsValidTarget(600) && _w.GetPrediction(x).Hitchance >= _w.MinHitChance); if (target != null) { _w.Cast(target); } } } } break; } case Orbwalking.OrbwalkingMode.LastHit: { if (MenuProvider.Champion.Lasthit.UseQ) { if (_q.IsReadyPerfectly()) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Lasthit.IfMana)) { var target = MinionManager.GetMinions(float.MaxValue) .FirstOrDefault( x => x.IsKillableAndValidTarget( ObjectManager.Player.GetAutoAttackDamage(x, false) + _q.GetDamage(x), TargetSelector.DamageType.Physical) && x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x, GetQRange)) && !x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x, DefaultRange))); if (target != null) { QSwitch(true); if (Orbwalking.InAutoAttackRange(target)) { MenuProvider.Orbwalker.ForceTarget(target); } } else { QSwitch(false); } } else { QSwitch(false); } } } else { QSwitch(false); } break; } } if (MenuProvider.Champion.Misc.GetBoolValue("Auto R on Killable Target")) { if (_r.IsReadyPerfectly()) { if (_wCastTime + 1060 <= Environment.TickCount) { var target = HeroManager.Enemies.FirstOrDefault( x => !x.IsZombie && x.CountAlliesInRange(500) < 2 && HealthPrediction.GetHealthPrediction(x, 5000) > 0 && ObjectManager.Player.Distance(x) >= GetQRange && x.IsKillableAndValidTarget(GetRDamage(x), TargetSelector.DamageType.Physical, _r.Range) && _r.GetPrediction(x).Hitchance >= HitChance.High); if (target != null) { var prediction = _r.GetPrediction(target); var collision = Collision.GetCollision(new List <Vector3> { prediction.UnitPosition }, new PredictionInput { Unit = ObjectManager.Player, Delay = _r.Delay, Speed = _r.Speed, Radius = _r.Width, CollisionObjects = new[] { CollisionableObjects.Heroes } }) .Any(x => x.NetworkId != target.NetworkId); if (!collision) { _r.Cast(target); } } } } } if (MenuProvider.Champion.Misc.GetBoolValue("Auto E on Immobile Target")) { if (_e.IsReadyPerfectly()) { var target = HeroManager.Enemies.FirstOrDefault( x => x.IsValidTarget(_e.Range) && x.IsImmobileUntil() > 0.5f); if (target != null) { _e.Cast(target, false, true); } } } if (MenuProvider.Champion.Harass.AutoHarass) { if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo) { if (!ObjectManager.Player.IsRecalling()) { if (MenuProvider.Champion.Harass.UseW) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { var target = TargetSelector.GetTargetNoCollision(_w); if (target != null) { if (ObjectManager.Player.UnderTurret(true) ? !target.UnderTurret(true) : true) { _w.Cast(target); } } } } } } } } } }
public override void Game_OnGameUpdate(EventArgs args) { if (W.IsReady() && Program.Config.Item("UseWTH").GetValue <KeyBind>().Active) { if (ObjectManager.Player.HasBuff("Recall")) { return; } var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical); if (t != null) { W.Cast(t); } } //Combo if (ComboActive) { var useQ = Config.Item("UseQC" + Id).GetValue <bool>(); var useW = Config.Item("UseWC" + Id).GetValue <bool>(); var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical); if (useQ && Q.IsReady()) { if (!IsQActive && ObjectManager.Player.CountEnemiesInRange(Orbwalking.GetRealAutoAttackRange(t) + 350) > 0) { Q.Cast(); } else { Q.Cast(); } } if (useW && W.IsReady() && t.IsValidTarget()) { W.Cast(t); } var useR = Program.Config.SubMenu("Combo").Item("UseRC").GetValue <bool>(); if (useR && R.IsReady()) { var minRRange = Program.Config.SubMenu("Combo").Item("UseRCMinRange").GetValue <Slider>().Value; var maxRRange = Program.Config.SubMenu("Combo").Item("UseRCMaxRange").GetValue <Slider>().Value; t = TargetSelector.GetTarget(maxRRange, TargetSelector.DamageType.Physical); if (!t.IsValidTarget()) { return; } var aaDamage = Orbwalking.InAutoAttackRange(t) ? ObjectManager.Player.GetAutoAttackDamage(t, true) : 0; if (t.Health > aaDamage && t.Health <= ObjectManager.Player.GetSpellDamage(t, SpellSlot.R) && ObjectManager.Player.Distance(t) >= minRRange) { R.Cast(t); } } } //Harass if (HarassActive) { var target = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Physical); if (target == null) { return; } if (!IsQActive && Config.Item("UseQH" + Id).GetValue <bool>()) { Q.Cast(); } if (Config.Item("UseWH" + Id).GetValue <bool>() && W.IsReady()) { W.Cast(target); } } //Manual cast R if (Config.Item("RManualCast" + Id).GetValue <KeyBind>().Active) { var rTarget = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Physical); R.Cast(rTarget); } }
private static void Farm(bool laneClear) { if (!Orbwalking.CanMove(40)) { return; } if (Config.Item("ManaSliderFarm").GetValue <Slider>().Value > ObjectManager.Player.Mana / ObjectManager.Player.MaxMana * 100) { return; } var rangedMinions = MinionManager.GetMinions( ObjectManager.Player.ServerPosition, Q2.Range, MinionTypes.Ranged); var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q2.Range); var useQi = Config.Item("UseQFarm").GetValue <StringList>().SelectedIndex; var useWi = Config.Item("UseWFarm").GetValue <StringList>().SelectedIndex; var useEi = Config.Item("UseEFarm").GetValue <StringList>().SelectedIndex; var useQ = (laneClear && (useQi == 1 || useQi == 2)) || (!laneClear && (useQi == 0 || useQi == 2)); var useW = (laneClear && (useWi == 1 || useWi == 2)) || (!laneClear && (useWi == 0 || useWi == 2)); var useE = (laneClear && (useEi == 1 || useEi == 2)) || (!laneClear && (useEi == 0 || useEi == 2)); if (laneClear) { if (Q1.IsReady() && useQ) { var rangedLocation = Q2.GetCircularFarmLocation(rangedMinions); var location = Q2.GetCircularFarmLocation(allMinions); var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation; if (bLocation.MinionsHit > 0) { Q2.Cast(bLocation.Position.To3D()); } } if (W.IsReady() && useW) { var dmgpct = new[] { 25, 27.5, 30, 32.5, 35 }[W.Level - 1]; var killableTurret = ObjectManager.Get <Obj_AI_Turret>() .Find(x => x.IsEnemy && ObjectManager.Player.Distance(x.Position) <= W.Range && x.HealthPercent < dmgpct); if (killableTurret != null) { W.Cast(killableTurret.Position); } } if (E.IsReady() && useE) { var rangedLocation = E.GetCircularFarmLocation(rangedMinions, E.Width * 2); var location = E.GetCircularFarmLocation(allMinions, E.Width * 2); var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation; if (bLocation.MinionsHit > 2) { E.Cast(bLocation.Position.To3D()); } } } else { if (useQ && Q1.IsReady()) { foreach (var minion in allMinions) { if (!Orbwalking.InAutoAttackRange(minion)) { var Qdamage = ObjectManager.Player.GetSpellDamage(minion, SpellSlot.Q) * 0.75; if (Qdamage > Q1.GetHealthPrediction(minion)) { Q2.Cast(minion); } } } } if (E.IsReady() && useE) { var rangedLocation = E.GetCircularFarmLocation(rangedMinions, E.Width * 2); var location = E.GetCircularFarmLocation(allMinions, E.Width * 2); var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation; if (bLocation.MinionsHit > 2) { E.Cast(bLocation.Position.To3D()); } } } }
private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args) { if (!Enable) { return; } var mode = new Orbwalking.OrbwalkingMode[] { Orbwalking.OrbwalkingMode.Mixed, Orbwalking.OrbwalkingMode.Combo }; if (IsPickingCard && mode.Contains(Orbwalker.ActiveMode)) { args.Process = false; } else if (HasACard != "none" && !HeroManager.Enemies.Contains(args.Target) && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed) { args.Process = false; var target = TargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(Player), TargetSelector.DamageType.Magical); if (target.IsValidTarget() && !target.IsZombie) { EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target); } } else if (HasACard != "none" && HasRed && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) { args.Process = false; IDictionary <Obj_AI_Minion, int> creeps = new Dictionary <Obj_AI_Minion, int>(); foreach (var x in ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Team != Player.Team && x.Team != GameObjectTeam.Neutral && Orbwalking.InAutoAttackRange(x))) { creeps.Add(x, ObjectManager.Get <Obj_AI_Minion>().Count(y => y.Team != Player.Team && y.Team != GameObjectTeam.Neutral && y.IsValidTarget() && y.Distance(x.Position) <= 300)); } foreach (var x in ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Team == GameObjectTeam.Neutral && Orbwalking.InAutoAttackRange(x))) { creeps.Add(x, ObjectManager.Get <Obj_AI_Minion>().Count(y => y.Team == GameObjectTeam.Neutral && y.IsValidTarget() && y.Distance(x.Position) <= 300)); } var minion = creeps.OrderByDescending(x => x.Value).FirstOrDefault(); EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, minion.Key); } }
private void Game_OnGameUpdate(EventArgs args) { var dashPosition = Player.Position.Extend(Game.CursorPos, Q.Range); if (E.IsReady()) { var ksTarget = Player; foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(E.Range) && target.Path.Count() < 2)) { if (CondemnCheck(Player.ServerPosition, target) && Config.Item("stun" + target.ChampionName).GetValue <bool>()) { E.Cast(target); } else if (Q.IsReady() && Dash.IsGoodPosition(dashPosition) && Config.Item("QE", true).GetValue <bool>() && CondemnCheck(dashPosition, target)) { Q.Cast(dashPosition); Program.debug("Q + E"); } } } if (Program.LagFree(1) && Q.IsReady()) { if (Config.Item("autoQR", true).GetValue <bool>() && Player.HasBuff("vayneinquisition") && Player.CountEnemiesInRange(1500) > 0 && Player.CountEnemiesInRange(670) != 1) { var dashPos = Dash.CastDash(); if (!dashPos.IsZero) { Q.Cast(dashPos); } } if (Program.Combo && Config.Item("autoQ", true).GetValue <bool>() && !Config.Item("Qonly", true).GetValue <bool>()) { var t = TargetSelector.GetTarget(900, TargetSelector.DamageType.Physical); if (t.IsValidTarget() && !Orbwalking.InAutoAttackRange(t) && t.Position.Distance(Game.CursorPos) < t.Position.Distance(Player.Position) && !t.IsFacing(Player)) { var dashPos = Dash.CastDash(); if (!dashPos.IsZero) { Q.Cast(dashPos); } } } } if (Program.LagFree(2)) { AIHeroClient bestEnemy = null; foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(E.Range))) { if (target.IsValidTarget(250) && target.IsMelee) { if (Q.IsReady() && Config.Item("autoQ", true).GetValue <bool>()) { var dashPos = Dash.CastDash(true); if (!dashPos.IsZero) { Q.Cast(dashPos); } } else if (E.IsReady() && Player.Health < Player.MaxHealth * 0.4) { E.Cast(target); Program.debug("push"); } } if (bestEnemy == null) { bestEnemy = target; } else if (Player.Distance(target.Position) < Player.Distance(bestEnemy.Position)) { bestEnemy = target; } } if (Config.Item("useE", true).GetValue <KeyBind>().Active&& bestEnemy != null) { E.Cast(bestEnemy); } } if (Program.LagFree(3) && R.IsReady()) { if (Config.Item("autoR", true).GetValue <bool>()) { if (Player.CountEnemiesInRange(700) > 2) { R.Cast(); } else if (Program.Combo && Player.CountEnemiesInRange(600) > 1) { R.Cast(); } else if (Player.Health < Player.MaxHealth * 0.5 && Player.CountEnemiesInRange(500) > 0) { R.Cast(); } } } }
private static void Clear() { if (Q.IsReady() && clearq && Player.ManaPercent >= clearmana) { var farm = Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All)); if (farm.MinionsHit >= clearqhit) { Q.Cast(farm.Position); } } if (W.IsReady() && clearw) { var target = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Team != Player.Team && x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)); if (target.Any()) { if (!IsPickingCard && PickACard && Utils.GameTimeTickCount - cardtick >= 500 && Player.ManaPercent >= clearmana) { cardtick = Utils.GameTimeTickCount; W.Cast(); } if (IsPickingCard) { if (clearwmana > Player.Mana * 100 / Player.MaxMana) { if (BlueCard) { W.Cast(); } } else { switch (clearwcolor) { case 0: if (BlueCard) { W.Cast(); } break; case 1: if (RedCard) { W.Cast(); } break; } } } } } }
private void LogicQ() { foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(1600) && Q.GetDamage(enemy) + GetWDmg(enemy) > enemy.Health)) { if (enemy.IsValidTarget(R.Range)) { CastQ(enemy); } return; } if (MainMenu.Item("maxQ", true).GetValue <bool>() && (Q.Range < 1500) && Player.CountEnemiesInRange(AArange) == 0) { return; } var t = Orbwalker.GetTarget() as Obj_AI_Hero; if (!t.IsValidTarget()) { t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); } if (t.IsValidTarget()) { if (Q.IsCharging) { if (MainMenu.Item("fastQ", true).GetValue <bool>()) { Q.Cast(Q.GetPrediction(t).CastPosition); } if (GetQEndTime() > 2) { Program.CastSpell(Q, t); } else { Q.Cast(Q.GetPrediction(t).CastPosition); } return; } if ((OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && CanCast && !E.IsReady()) || !Orbwalking.InAutoAttackRange(t)) { if ((Program.Combo || (OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && Program.Harass)) && Player.Mana > RMANA + QMANA) { CastQ(t); } else if (Program.Harass && Player.Mana > RMANA + EMANA + QMANA + QMANA && MainMenu.Item("Harass" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras()) { CastQ(t); } else if (!Program.None && Player.Mana > RMANA + WMANA) { foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy))) { CastQ(enemy); } } } } else if (FarmSpells && MainMenu.Item("farmQ", true).GetValue <bool>() && Q.Range > 1500 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercent > MainMenu.Item("Mana", true).GetValue <Slider>().Value))) { var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range); var Qfarm = Q.GetLineFarmLocation(allMinionsQ, Q.Width); if (Qfarm.MinionsHit > 3 || (Q.IsCharging && Qfarm.MinionsHit > 0)) { Q.Cast(Qfarm.Position); } } }
public static void Combo() { var target = TargetSelector.GetTarget(SkillHandler.Q.Range, TargetSelector.DamageType.Magical); var dfg = ItemHandler.Dfg; if (Player.Distance(target) <= ItemHandler.Blade.Range && MenuHandler.WarwickConfig.Item("useBotrK").GetValue <bool>() && ItemHandler.Blade.IsReady()) { ItemHandler.Blade.Cast(target); } if (Player.Distance(target) <= ItemHandler.Bilgewater.Range && MenuHandler.WarwickConfig.Item("useBilge").GetValue <bool>() && ItemHandler.Bilgewater.IsReady()) { ItemHandler.Bilgewater.Cast(target); } if (Player.Distance(target) <= SkillHandler.Q.Range + 100 && MenuHandler.WarwickConfig.Item("useYoumuu").GetValue <bool>() && ItemHandler.Youmuu.IsReady()) { ItemHandler.Youmuu.Cast(); } if (Player.Distance(target) <= ItemHandler.Tiamat.Range && MenuHandler.WarwickConfig.Item("useTiamat").GetValue <bool>() && ItemHandler.Tiamat.IsReady()) { ItemHandler.Tiamat.Cast(); } if (Player.Distance(target) <= ItemHandler.Hydra.Range && MenuHandler.WarwickConfig.Item("useHydra").GetValue <bool>() && ItemHandler.Hydra.IsReady()) { ItemHandler.Hydra.Cast(); } if (Player.Distance(target) <= dfg.Range && MenuHandler.WarwickConfig.Item("useDfg").GetValue <bool>() && dfg.IsReady() && target.Health <= MathHandler.ComboDamage(target)) { dfg.Cast(target); } if (ItemHandler.IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(ItemHandler.IgniteSlot) == SpellState.Ready) { if (target.Health <= MathHandler.ComboDamage(target)) { Player.Spellbook.CastSpell(ItemHandler.IgniteSlot, target); } } if (MenuHandler.WarwickConfig.Item("notULT").GetValue <bool>() && target.InventoryItems.Equals(ItemHandler.Qss) || target.InventoryItems.Equals(ItemHandler.Mercurial)) { if (MenuHandler.WarwickConfig.Item("useR").GetValue <bool>() && target.Health <= MathHandler.ComboDamage(target) && Player.Distance(target) <= SkillHandler.R.Range && SkillHandler.R.IsReady()) { SkillHandler.R.Cast(target, Packeting()); } } if (MenuHandler.WarwickConfig.Item("useQ").GetValue <bool>() && Player.Distance(target) <= SkillHandler.Q.Range && SkillHandler.Q.IsReady()) { SkillHandler.Q.Cast(target, Packeting()); } if (MenuHandler.WarwickConfig.Item("useW").GetValue <bool>() && Orbwalking.InAutoAttackRange(target) && SkillHandler.W.IsReady()) { SkillHandler.W.Cast(target, Packeting()); } }
private void Game_OnUpdate(EventArgs args) { if (!ObjectManager.Player.IsDead) { if (Orbwalking.CanMove(100)) { switch (MenuProvider.Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: { if (MenuProvider.Champion.Combo.UseQ) { if (_q.IsReadyPerfectly()) { if (ObjectManager.Player.Mana - _q.ManaCost > _w.ManaCost) { if (!MenuProvider.Champion.Combo.GetBoolValue("Cast Q On Immobile Target Only")) { var target = TargetSelector.GetTarget(_q.Range, _q.DamageType); if (target != null) { _q.Cast(target, false, true); } } else { var target = HeroManager.Enemies.Where( x => x.IsValidTarget(_q.Range) && _q.GetPrediction(x).Hitchance >= HitChance.Immobile) .OrderByDescending(x => TargetSelector.GetPriority(x)) .FirstOrDefault(); if (target != null) { _q.Cast(target, false, true); } } } } } if (MenuProvider.Champion.Combo.UseW) { if (_w.IsReadyPerfectly()) { var target = TargetSelector.GetTarget(_w.Range, _w.DamageType); if (target != null) { if (MenuProvider.Champion.Combo.GetBoolValue("Use Blue Card if Mana is Low") ? ObjectManager.Player.Mana - _w.ManaCost < _q.ManaCost + _w.ManaCost : false) { PickACard(Cards.Blue); } else { PickACard(Cards.Gold); } } } } break; } case Orbwalking.OrbwalkingMode.Mixed: { if (MenuProvider.Champion.Harass.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (_q.IsReadyPerfectly()) { var target = TargetSelector.GetTarget(_q.Range, _q.DamageType); if (target != null) { _q.Cast(target, false, true); } } } } if (MenuProvider.Champion.Harass.UseW) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana)) { if (_w.IsReadyPerfectly()) { var target = TargetSelector.GetTarget(_w.Range, _w.DamageType); if (target != null) { PickACard(Cards.Blue); } } } } break; } case Orbwalking.OrbwalkingMode.LaneClear: { //Laneclear if (MenuProvider.Champion.Laneclear.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (_q.IsReadyPerfectly()) { var farm = _q.GetLineFarmLocation(MinionManager.GetMinions(_q.Range)); if (farm.MinionsHit >= 5) { _q.Cast(farm.Position); } } } } if (MenuProvider.Champion.Laneclear.UseW) { if (_w.IsReadyPerfectly()) { var minioncount = MinionManager.GetMinions(float.MaxValue) .Where(x => Orbwalking.InAutoAttackRange(x)) .Count(); if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana)) { if (minioncount >= 4) { PickACard(Cards.Red); } else if (minioncount >= 1) { PickACard(Cards.Blue); } } else { if (minioncount >= 1) { PickACard(Cards.Blue); } } } } //Jungleclear if (MenuProvider.Champion.Jungleclear.UseQ) { if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (_q.IsReadyPerfectly()) { var target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(); if (target != null) { _q.Cast(target); } } } } if (MenuProvider.Champion.Jungleclear.UseW) { if (_w.IsReadyPerfectly()) { var minionCount = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).Count(); if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana)) { if (minionCount >= 3) { PickACard(Cards.Red); } else if (minionCount >= 1) { PickACard(Cards.Blue); } } else if (minionCount >= 1) { PickACard(Cards.Blue); } } } break; } } } if (MenuProvider.Champion.Misc.UseKillsteal) { foreach (var target in HeroManager.Enemies.Where(x => x.IsValidTarget())) { if (target.IsKillableAndValidTarget(_q.GetDamage(target), TargetSelector.DamageType.Physical, _q.Range)) { _q.Cast(target, false, true); } } } if (MenuProvider.ChampionMenuInstance.Item("Pick A Card.Blue", true).GetValue <KeyBind>().Active) { PickACard(Cards.Blue); } if (MenuProvider.ChampionMenuInstance.Item("Pick A Card.Red", true).GetValue <KeyBind>().Active) { PickACard(Cards.Red); } if (MenuProvider.ChampionMenuInstance.Item("Pick A Card.Gold", true).GetValue <KeyBind>().Active) { PickACard(Cards.Gold); } } else { _cardiNeed = Cards.None; } if (Picking) { if (_cardiNeed != Cards.None) { if (_w.Instance.Name.ToLowerInvariant() == _cardiNeed.ToString().ToLowerInvariant() + "cardlock") { _cardiNeed = Cards.None; Utility.DelayAction.Add(100, () => _w.Cast()); } } } }
private static void Game_OnGameUpdate(EventArgs args) { //Obj_AI_Hero shen = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "shen"); //if (shen != null) //{ //} //var shenVorpalStar = HeroManager.Enemies.Find(e => e.Buffs.Any(b => b.Name.ToLower() == "shenvorpalstar" && e.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 65))); //if (shenVorpalStar != null) //{ // CClass.Orbwalker.ForceTarget(shenVorpalStar); //} //Obj_AI_Hero Tahm = HeroManager.Allies.Find(e => e.ChampionName.ToLower() == "Tahm"); //if (Tahm != null) //{ //} //var enemy = HeroManager.Enemies.Find(e => e.Buffs.Any(b => b.Name.ToLower() == "Tahmmark" && e.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 65))); //if (enemy != null) //{ // CClass.Orbwalker.ForceTarget(enemy); //} /*-------------------------------------------------------------*/ if (Items.HasItem(3139) || Items.HasItem(3140)) { CheckChampionBuff(); } //Update the combo and harass values. CClass.ComboActive = CClass.Config.Item("Orbwalk").GetValue <KeyBind>().Active; var vHarassManaPer = Config.Item("HarassMana").GetValue <Slider>().Value; CClass.HarassActive = CClass.Config.Item("Farm").GetValue <KeyBind>().Active&& ObjectManager.Player.ManaPercent >= vHarassManaPer; CClass.ToggleActive = ObjectManager.Player.ManaPercent >= vHarassManaPer && CClass.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo; var vLaneClearManaPer = HeroManager.Enemies.Find(e => e.IsValidTarget(2000) && !e.IsZombie) == null ? Config.Item("LaneMana.Alone").GetValue <Slider>().Value : Config.Item("LaneMana.Enemy").GetValue <Slider>().Value; CClass.LaneClearActive = CClass.Config.Item("LaneClear").GetValue <KeyBind>().Active&& ObjectManager.Player.ManaPercent >= vLaneClearManaPer && Config.Item("Lane.Enabled").GetValue <KeyBind>().Active; CClass.JungleClearActive = false; if (CClass.Config.Item("LaneClear").GetValue <KeyBind>().Active&& Config.Item("Jungle.Enabled").GetValue <KeyBind>().Active) { List <Obj_AI_Base> mobs = MinionManager.GetMinions(ObjectManager.Player.Position, 1000, MinionTypes.All, MinionTeam.Neutral); if (mobs.Count > 0) { var minMana = Config.Item("Jungle.Mana.Enemy").GetValue <Slider>().Value; if (mobs[0].SkinName.ToLower().Contains("baron") || mobs[0].SkinName.ToLower().Contains("dragon") || mobs[0].Team() == Jungle.GameObjectTeam.Neutral) { minMana = Config.Item("Jungle.Mana.BigBoys").GetValue <Slider>().Value; } else if (mobs[0].Team() == (Jungle.GameObjectTeam)ObjectManager.Player.Team) { minMana = Config.Item("Jungle.Mana.Ally").GetValue <Slider>().Value; } else if (mobs[0].Team() != (Jungle.GameObjectTeam)ObjectManager.Player.Team) { minMana = Config.Item("Jungle.Mana.Enemy").GetValue <Slider>().Value; } if (ObjectManager.Player.ManaPercent >= minMana) { CClass.JungleClearActive = true; } } } //CClass.JungleClearActive = CClass.Config.Item("LaneClear").GetValue<KeyBind>().Active && ObjectManager.Player.ManaPercent >= Config.Item("Jungle.Mana").GetValue<Slider>().Value; CClass.Game_OnGameUpdate(args); UseSummoners(); var useItemModes = Config.Item("UseItemsMode").GetValue <StringList>().SelectedIndex; //Items if ( !((CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && (useItemModes == 2 || useItemModes == 3)) || (CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && (useItemModes == 1 || useItemModes == 3)))) { return; } var botrk = Config.Item("BOTRK").GetValue <bool>(); var ghostblade = Config.Item("GHOSTBLADE").GetValue <bool>(); var sword = Config.Item("SWORD").GetValue <bool>(); var muramana = Config.Item("MURAMANA").GetValue <bool>(); var target = CClass.Orbwalker.GetTarget() as Obj_AI_Base; var smiteReady = (SmiteSlot != SpellSlot.Unknown && ObjectManager.Player.Spellbook.CanUseSpell(SmiteSlot) == SpellState.Ready); if (smiteReady && CClass.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { Smiteontarget(target as Obj_AI_Hero); } if (botrk) { if (target != null && target.Type == ObjectManager.Player.Type && target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 550) { var hasCutGlass = Items.HasItem(3144); var hasBotrk = Items.HasItem(3153); if (hasBotrk || hasCutGlass) { var itemId = hasCutGlass ? 3144 : 3153; var damage = ObjectManager.Player.GetItemDamage(target, Damage.DamageItems.Botrk); if (hasCutGlass || ObjectManager.Player.Health + damage < ObjectManager.Player.MaxHealth) { Items.UseItem(itemId, target); } } } } if (ghostblade && target != null && target.Type == ObjectManager.Player.Type && !ObjectManager.Player.HasBuff("ItemSoTD", true) && /*if Sword of the divine is not active */ Orbwalking.InAutoAttackRange(target)) { Items.UseItem(3142); } if (sword && target != null && target.Type == ObjectManager.Player.Type && !ObjectManager.Player.HasBuff("spectralfury", true) && /*if ghostblade is not active*/ Orbwalking.InAutoAttackRange(target)) { Items.UseItem(3131); } if (muramana && Items.HasItem(3042)) { if (target != null && CClass.ComboActive && target.Position.Distance(ObjectManager.Player.Position) < 1200) { if (!ObjectManager.Player.HasBuff("Muramana", true)) { Items.UseItem(3042); } } else { if (ObjectManager.Player.HasBuff("Muramana", true)) { Items.UseItem(3042); } } } }
private static void Farm() { var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _bq.Range); var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range); var useQ = getCheckBoxItem(farmMenu, "UseQLane"); var useW = getCheckBoxItem(farmMenu, "UseWLane"); var useE = getCheckBoxItem(farmMenu, "UseELane"); if (_q.IsReady() && useQ && !IsBurrowed()) { if ( allMinionsQ.Where(m => m.LSDistance(_player.Position) <= _q.Range) .Count(x => _q.GetDamage(x) > x.Health) >= 0) { _q.Cast(); } } if (_bq.IsReady() && useQ && IsBurrowed()) { if (allMinions.Where(m => m.LSDistance(_player.Position) <= _bq.Range).Count(x => BqDamage(x) > x.Health) >= 0) { _bq.Cast(allMinions.FirstOrDefault()); } else { foreach (var minion in allMinions) { if (minion.Health < 0.75 * _player.LSGetSpellDamage(minion, SpellSlot.Q) && minion.LSIsValidTarget(_bq.Range)) { _bq.Cast(minion); } } } } if (_e.IsReady() && useE && !IsBurrowed()) { foreach (var minione in allMinions) { if (minione.Health < EDamage(minione) && !Qactive(_player)) { _e.Cast(minione); } } } foreach (var minion in allMinions) { if (useW && !IsBurrowed() && !_q.IsReady() && !_e.IsReady() && Orbwalking.InAutoAttackRange(minion) && !minion.HasBuff("RekSaiKnockupImmune") && !Qactive(_player)) { _w.Cast(); } if (IsBurrowed() && _bw.IsReady() && useW && minion.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(_player))) { _bw.Cast(); } } }
private static void Game_OnUpdate(EventArgs args) { if (Player.IsDead) { return; } foreach (var entry in rPoint) { var timestamp = entry.Key; if (Game.Time - timestamp > 4f) { rPoint.Remove(timestamp); break; } } if (RootMenu.Item("useflee").GetValue <KeyBind>().Active) { Orbwalking.Orbwalk(null, Game.CursorPos); UseE(Game.CursorPos, false); } if (RootMenu.Item("useskin").GetValue <bool>()) { //Player.SetSkin(Player.BaseSkinName, RootMenu.Item("skinid").GetValue<Slider>().Value); } if (RootMenu.Item("r33").GetValue <bool>()) { var rtarget = HeroManager.Enemies.FirstOrDefault(x => x.HasBuff(RBuffName)); if (rtarget != null && rtarget.IsValidTarget() && !rtarget.IsZombie) { if (Orbwalking.InAutoAttackRange(rtarget)) { TargetSelector.SetTarget(rtarget); Orbwalker.ForceTarget(rtarget); } } } if (IsDashing || OnWall) { return; } if (RootMenu.Item("usecombo").GetValue <KeyBind>().Active) { Combo(); } if (RootMenu.Item("useclear").GetValue <KeyBind>().Active) { if (Player.Mana / Player.MaxMana * 100 > RootMenu.Item("clearmana").GetValue <Slider>().Value) { Clear(); } } if (RootMenu.Item("useharass").GetValue <KeyBind>().Active) { if (Player.Mana / Player.MaxMana * 100 > RootMenu.Item("harassmana").GetValue <Slider>().Value) { Harass(); } } tt = Player.CountAlliesInRange(1500) > 1 && Player.CountEnemiesInRange(1350) > 2 || Player.CountEnemiesInRange(1200) > 2; }
private static void Game_OnGameUpdate(EventArgs args) { ManaMenager(); if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) { Farm = true; } else { Farm = false; } if (Orbwalker.GetTarget() == null) { attackNow = true; } if (E.IsReady()) { var qCd = Q.Instance.CooldownExpires - Game.Time; //W.Cast(ObjectManager.Player); ManaMenager(); var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); if (t.IsValidTarget()) { var qDmg = Q.GetDamage(t); var eDmg = E.GetDamage(t); if (eDmg > t.Health) { E.Cast(t); } else if (eDmg + qDmg > t.Health && ObjectManager.Player.Mana > EMANA + QMANA) { CastSpell(E, t, Config.Item("Hit").GetValue <Slider>().Value); } else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && ObjectManager.Player.Mana > EMANA + QMANA * 2 && qCd < 0.5f) { CastSpell(E, t, Config.Item("Hit").GetValue <Slider>().Value); } else if (Farm && ObjectManager.Player.Mana > RMANA + EMANA + QMANA * 5 && Config.Item("autoE").GetValue <bool>()) { CastSpell(E, t, Config.Item("Hit").GetValue <Slider>().Value); } else if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo || Farm) && ObjectManager.Player.Mana > RMANA + WMANA + EMANA) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(E.Range))) { if (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) || enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) || enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuffOfType(BuffType.Slow) || enemy.HasBuff("Recall")) { E.Cast(enemy, true); } } } } } if (W.IsReady() && Config.Item("urf").GetValue <bool>() && Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None) { W.Cast(); } if (Q.IsReady()) { ManaMenager(); foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(Q2.Range))) { if (enemy.HasBuff("urgotcorrosivedebuff") && (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo || Farm)) { Q2.Cast(enemy.ServerPosition); if ((ObjectManager.Player.Mana > EMANA + QMANA * 4 || Q.GetDamage(enemy) * 3 > enemy.Health) && !Orbwalking.InAutoAttackRange(enemy) && W.IsReady()) { W.Cast(); } } } var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (ObjectManager.Player.CountEnemiesInRange(Q.Range - 200) == 0) { t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); } else { t = TargetSelector.GetTarget(Q.Range - 200, TargetSelector.DamageType.Physical); } if (t.IsValidTarget()) { var qDmg = Q.GetDamage(t); var eDmg = E.GetDamage(t); if (t.IsValidTarget(W.Range) && qDmg + eDmg > t.Health) { Q.Cast(t, true); } else if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && ObjectManager.Player.Mana > RMANA + QMANA) { CastSpell(Q, t, Config.Item("Hit").GetValue <Slider>().Value); } else if ((Farm && ObjectManager.Player.Mana > RMANA + EMANA + QMANA + WMANA) && !ObjectManager.Player.UnderTurret(true)) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(Q.Range))) { CastSpell(Q, enemy, Config.Item("Hit").GetValue <Slider>().Value); } } else if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo || Farm) && ObjectManager.Player.Mana > RMANA + QMANA + EMANA) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(Q.Range))) { if (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) || enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) || enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuffOfType(BuffType.Slow) || enemy.HasBuff("Recall")) { Q.Cast(enemy, true); } } } } if ((Game.Time - lag > 0.1) && Farm && attackNow && Config.Item("farmQ").GetValue <bool>() && ObjectManager.Player.Mana > RMANA + EMANA + WMANA + QMANA * 3) { farmQ(); lag = Game.Time; } else if ((Game.Time - OverFarm > 4.1) && !Farm && Config.Item("stack").GetValue <bool>() && !ObjectManager.Player.HasBuff("Recall") && ObjectManager.Player.Mana > ObjectManager.Player.MaxMana * 0.95 && Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo && !t.IsValidTarget() && (Items.HasItem(Tear) || Items.HasItem(Manamune))) { Q.Cast(ObjectManager.Player); OverFarm = Game.Time; } } PotionMenager(); var tr = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical); if (Config.Item("useR").GetValue <KeyBind>().Active&& tr.IsValidTarget()) { R.Cast(tr); } if (R.IsReady() && ObjectManager.Player.HealthPercentage() >= Config.Item("Rhp").GetValue <Slider>().Value) { R.Range = 400 + 150 * R.Level; foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(target => target.IsValidTarget(R.Range))) { if (!target.HasBuffOfType(BuffType.PhysicalImmunity) && !target.HasBuffOfType(BuffType.SpellImmunity) && !target.HasBuffOfType(BuffType.SpellShield)) { if (ObjectManager.Player.UnderTurret(false) && !ObjectManager.Player.UnderTurret(true) && Config.Item("autoR").GetValue <bool>() && target.CountEnemiesInRange(700) < 2 + ObjectManager.Player.CountAlliesInRange(700)) { R.Cast(target); } } } } }
private static void Laneclear() { var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range, MinionTypes.All); var allMinionsR = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _r.Range, MinionTypes.All); var rangedMinionsR = MinionManager.GetMinions( ObjectManager.Player.ServerPosition, _q.Range + _q.Width + 30, MinionTypes.Ranged); var useW = _config.Item("UseWL").GetValue <bool>(); var useQ = _config.Item("UseQL").GetValue <bool>(); var useE = _config.Item("UseEL").GetValue <bool>(); var useR = _config.Item("UseRL").GetValue <bool>(); var rLimL = _config.Item("RlimL").GetValue <Slider>().Value; foreach (var minion in allMinionsQ) { if (_q.IsReady() && useQ) { if (allMinionsQ.Count >= 3) { _q.Cast(minion); } else if (!Orbwalking.InAutoAttackRange(minion) && minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.Q)) { _q.Cast(minion); } } } if (useW && _w.IsReady() && allMinionsQ.Count >= 3) { _w.Cast(); } if (_e.IsReady() && useE) { var fl2 = _e.GetLineFarmLocation(allMinionsQ, _e.Width); if (fl2.MinionsHit >= 3) { _e.Cast(fl2.Position); } else { foreach (var minion in allMinionsQ) { if (!Orbwalking.InAutoAttackRange(minion) && minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.E)) { _e.Cast(minion); } } } } if (_r.IsReady() && useR && GetBuffStacks() < rLimL) { var fl1 = _r.GetCircularFarmLocation(rangedMinionsR, _r.Width); var fl2 = _r.GetCircularFarmLocation(allMinionsR, _r.Width); if (fl1.MinionsHit >= 3) { _r.Cast(fl1.Position); } else if (fl2.MinionsHit >= 2 || allMinionsQ.Count == 1) { _r.Cast(fl2.Position); } else { foreach (var minion in allMinionsR) { if (!Orbwalking.InAutoAttackRange(minion) && minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.R)) { _r.Cast(minion); } } } } }
public override void Game_OnGameUpdate(EventArgs args) { if (ObjectManager.Player.IsDead) { xAttackLeft = 0; return; } if (Game.Time > xPassiveUsedTime + 3 && xAttackLeft == 1) { xAttackLeft = 0; } if (Program.misc["Passive"].Cast <CheckBox>().CurrentValue&& xAttackLeft > 0) { return; } AIHeroClient t; if (Q.IsReady() && Program.harass["UseQTH"].Cast <KeyBind>().CurrentValue&& ToggleActive) { if (ObjectManager.Player.HasBuff("Recall")) { return; } t = TargetSelector.GetTarget(Q.Range, DamageType.Physical); if (t != null) { Q.CastOnUnit(t); } } if (Q.IsReady() && Program.harass["UseQExtendedTH"].Cast <KeyBind>().CurrentValue&& ToggleActive) { if (ObjectManager.Player.HasBuff("Recall")) { return; } t = TargetSelector.GetTarget(Q.Range, DamageType.Physical); if (t.LSIsValidTarget() && QMinion(t).LSIsValidTarget()) { if (ObjectManager.Player.LSDistance(t) > Q.Range) { Q.CastOnUnit(QMinion(t)); } } } if ((!ComboActive && !HarassActive)) { return; } var useQExtended = Program.combo["UseQExtendedC"].Cast <ComboBox>().CurrentValue; if (useQExtended != 0) { switch (useQExtended) { case 1: { t = TargetSelector.GetTarget(Q2.Range, DamageType.Physical); var tx = QMinion(t); if (tx.LSIsValidTarget()) { if (!Orbwalking.InAutoAttackRange(t)) { Q.CastOnUnit(tx); } } break; } case 2: { var enemy = HeroManager.Enemies.Find(e => e.LSIsValidTarget(Q2.Range) && !e.IsZombie); if (enemy != null) { var tx = QMinion(enemy); if (tx.LSIsValidTarget()) { Q.CastOnUnit(tx); } } break; } } } // Auto turn off Ghostblade Item if Ultimate active if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level > 0) { Program.MenuActivator["GHOSTBLADE"].Cast <CheckBox>().CurrentValue = (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LucianR"); } //if (useQExtended && Q.IsReady()) //{ // var t = TargetSelector.GetTarget(Q2.Range, DamageType.Physical); // if (t.LSIsValidTarget() && QMinion.LSIsValidTarget()) // { // if (!Orbwalking.InAutoAttackRange(t)) // Q.CastOnUnit(QMinion); // } //} t = TargetSelector.GetTarget(W.Range, DamageType.Physical); if (!t.LSIsValidTarget()) { return; } var useQ = Program.combo["UseQC"].Cast <CheckBox>().CurrentValue; if (useQ && Q.IsReady()) { if (t.LSIsValidTarget(Q.Range)) { Q.CastOnUnit(t); //Orbwalking.ResetAutoAttackTimer(); } } var useW = Program.combo["UseQC"].Cast <CheckBox>().CurrentValue; if (useW && W.CanCast(t)) { if (t.Health <= W.GetDamage(t) || t.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 65)) { W.Cast(t.Position); } } var useE = Program.combo["UseEC"].Cast <ComboBox>().CurrentValue; if (useE != 0 && E.IsReady()) { if (t.LSDistance(ObjectManager.Player.Position) > Orbwalking.GetRealAutoAttackRange(null) && t.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + E.Range - 100) && E.IsPositionSafe(t.Position.LSTo2D())) { E.Cast(t.Position); //Orbwalking.ResetAutoAttackTimer(); } else if (E.IsPositionSafe(Game.CursorPos.LSTo2D())) { E.Cast(Game.CursorPos); //Orbwalking.ResetAutoAttackTimer(); } //Orbwalker.ForcedTarget =(t); //if (t.LSIsValidTarget(Q.Range)) //{ // E.Cast(Game.CursorPos); //} } }
private void LogicW() { var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical); if (t.IsValidTarget()) { if (Program.Combo && Player.Mana > WMANA + RMANA + EMANA && (Player.GetAutoAttackDamage(t) * 2 < t.Health || !Orbwalking.InAutoAttackRange(t))) { Program.CastSpell(W, t); } else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA + EMANA) { foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy))) { W.Cast(enemy, true); } } } }