private static void Combo() { var useQ = Menu.Item("useQ").GetValue <bool>(); var useW = Menu.Item("useW").GetValue <bool>(); var useE = Menu.Item("useE").GetValue <bool>(); var useR = Menu.Item("useR").GetValue <bool>(); var minQRange = Menu.Item("minQRange").GetValue <Slider>().Value; var useEStun = Menu.Item("useEStun").GetValue <bool>(); var useQGapclose = Menu.Item("useQGapclose").GetValue <bool>(); var useWBeforeQ = Menu.Item("useWBeforeQ").GetValue <bool>(); var procSheen = Menu.Item("procSheen").GetValue <bool>(); var useIgnite = Menu.Item("useIgnite").GetValue <bool>(); var useRGapclose = Menu.Item("useRGapclose").GetValue <bool>(); var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical); if (target == null && useQGapclose) { var minionQ = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidTarget()) .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health) .FirstOrDefault( x => x.Distance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) < Q.Range); if (minionQ != null) { Q.CastOnUnit(minionQ, Packets); return; } if (useRGapclose) { var minionR = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidTarget()) .Where(x => x.Distance(Player) < Q.Range) // Use Q.Range so we follow up with a Q .Where(x => x.CountEnemiesInRange(Q.Range) >= 1) .FirstOrDefault( x => x.Health - Player.GetSpellDamage(x, SpellSlot.R) < Player.GetSpellDamage(x, SpellSlot.Q)); if (minionR != null) { R.Cast(minionR, Packets); } } } if (!target.IsValidTarget()) { return; } if (Botrk.IsReady()) { Botrk.Cast(target); } if (Cutlass.IsReady()) { Cutlass.Cast(target); } if (Omen.IsReady() && Omen.IsInRange(target) && target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player)) { Omen.Cast(); } if (useIgnite && target != null && target.IsValidTarget(600) && (IgniteSlot.IsReady() && Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health)) { Player.Spellbook.CastSpell(IgniteSlot, target); } if (useWBeforeQ) { if (useW && W.IsReady()) { W.Cast(Packets); } if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange) { Q.CastOnUnit(target, Packets); } } else { if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange) { Q.CastOnUnit(target, Packets); } if (useW && W.IsReady()) { W.Cast(Packets); } } if (useEStun) { if (target.CanStunTarget() && useE && E.IsReady()) { E.Cast(target, Packets); } } else { if (useE && E.IsReady()) { E.Cast(target, Packets); } } if (useR && R.IsReady() && !UltActivated) { R.Cast(target, Packets); } // Get target that is in the R range var rTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical); if (useR && UltActivated) { if (!procSheen) { return; } // Fire Ult if player is out of AA range, with Q not up or not in range if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player)) { R.Cast(rTarget, Packets); } else { if (!HasSheenBuff) { R.Cast(rTarget, Packets); } } } else { R.Cast(rTarget, Packets); } }
/// <summary> /// Does the combo. /// </summary> private static void Combo() { var useQ = getCheckBoxItem(comboMenu, "useQ"); var useW = getCheckBoxItem(comboMenu, "useW"); var useE = getCheckBoxItem(comboMenu, "useE"); var useR = getCheckBoxItem(comboMenu, "useR"); var minQRange = getSliderItem(comboMenu, "minQRange"); var useEStun = getCheckBoxItem(comboMenu, "useEStun"); var useQGapclose = getCheckBoxItem(comboMenu, "useQGapclose"); var useWBeforeQ = getCheckBoxItem(comboMenu, "useWBeforeQ"); var procSheen = getCheckBoxItem(comboMenu, "procSheen"); var useIgnite = getCheckBoxItem(comboMenu, "useIgnite"); var useRGapclose = getCheckBoxItem(comboMenu, "useRGapclose"); var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical); if (target == null && useQGapclose) { /** var minionQ = * ObjectManager.Get<Obj_AI_Minion>() * .Where(x => x.LSIsValidTarget()) * .Where(x => Player.LSGetSpellDamage(x, SpellSlot.Q) > x.Health) * .FirstOrDefault( * x => * x.LSDistance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) < * Q.Range);*/ var minionQ = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly) .FirstOrDefault( x => Q.IsKillable(x) && Q.IsInRange(x) && x.LSDistance(HeroManager.Enemies.OrderBy(y => y.LSDistance(Player)).FirstOrDefault()) < Player.LSDistance(HeroManager.Enemies.OrderBy(z => z.LSDistance(Player)).FirstOrDefault())); if (minionQ != null && Player.Mana > Q.ManaCost * 2) { Q.CastOnUnit(minionQ); return; } if (useRGapclose) { var minionR = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.LSIsValidTarget() && x.LSDistance(Player) < Q.Range && x.LSCountEnemiesInRange(Q.Range) >= 1) .FirstOrDefault( x => x.Health - Player.LSGetSpellDamage(x, SpellSlot.R) < Player.LSGetSpellDamage(x, SpellSlot.Q)); if (minionR != null) { R.Cast(minionR); } } } // Get target that is in the R range var rTarget = TargetSelector.GetTarget(R.Range, DamageType.Physical); if (useR && UltActivated && rTarget.LSIsValidTarget()) { if (procSheen) { // Fire Ult if player is out of AA range, with Q not up or not in range if (target.LSDistance(Player) > Orbwalking.GetRealAutoAttackRange(Player)) { R.Cast(rTarget); } else { if (!HasSheenBuff) { R.Cast(rTarget); } } } else { R.Cast(rTarget); } } if (!target.LSIsValidTarget()) { return; } if (Botrk.IsReady()) { Botrk.Cast(target); } if (Cutlass.IsReady()) { Cutlass.Cast(target); } if (Omen.IsReady() && Omen.IsInRange(target) && target.LSDistance(Player) > Orbwalking.GetRealAutoAttackRange(Player)) { Omen.Cast(); } if (useIgnite && target != null && target.LSIsValidTarget(600) && (IgniteSlot.IsReady() && Player.GetSummonerSpellDamage(target, LeagueSharp.Common.Damage.SummonerSpell.Ignite) > target.Health)) { Player.Spellbook.CastSpell(IgniteSlot, target); } if (useWBeforeQ) { if (useW && W.IsReady()) { W.Cast(); } if (useQ && Q.IsReady() && target.LSDistance(Player.ServerPosition) > minQRange) { Q.CastOnUnit(target); } } else { if (useQ && Q.IsReady() && target.LSDistance(Player.ServerPosition) > minQRange) { Q.CastOnUnit(target); } if (useW && W.IsReady()) { W.Cast(); } } if (useEStun) { if (target.CanStunTarget() && useE && E.IsReady()) { E.Cast(target); } } else { if (useE && E.IsReady()) { E.Cast(target); } } if (useR && R.IsReady() && !UltActivated) { R.Cast(target); } }