Ejemplo n.º 1
0
        private static void Harass()
        {
            var target = TargetSelector.GetTarget(Qe.Range, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            qpred.From  = Qe.GetPrediction(target).CastPosition;
            qpred1.From = Q.GetPrediction(target).CastPosition;
            if (!Ismelee())
            {
                if (Q.IsReady() && E.IsReady() && Player.Mana >
                    Player.Spellbook.GetSpell(SpellSlot.E).SData.Mana + Player.Spellbook.GetSpell(SpellSlot.Q).SData.Mana &&
                    getCheckBoxItem(MenuConfig.harass, "useqhr"))
                {
                    Qe.Cast(qpred.From);
                }

                if (Q.IsReady() && target.LSIsValidTarget(Q.Range) && (!E.IsReady() || Player.Mana <
                                                                       Player.Spellbook.GetSpell(SpellSlot.E).SData.Mana +
                                                                       Player.Spellbook.GetSpell(SpellSlot.Q).SData.Mana) &&
                    getCheckBoxItem(MenuConfig.harass, "useqhr"))
                {
                    Q.Cast(qpred1.From);
                }
            }
            else
            {
                if (Q.IsReady() && getCheckBoxItem(MenuConfig.harass, "useqhm"))
                {
                    Q.Cast(target);
                }
            }
        }
Ejemplo n.º 2
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Qe.Range, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var prede = Q.GetPrediction(target);
            var pred  = Qe.GetPrediction(target);

            if (pred.CollisionObjects.Count() >= 1)
            {
                return;
            }

            qpred.From  = Qe.GetPrediction(target).CastPosition;
            qpred1.From = Q.GetPrediction(target).CastPosition;

            if (Q.IsReady() && E.IsReady() && getCheckBoxItem(MenuConfig.combo, "useqcr") &&
                Player.Mana >
                Player.Spellbook.GetSpell(SpellSlot.E).SData.Mana + Player.Spellbook.GetSpell(SpellSlot.Q).SData.Mana)
            {
                Qe.Cast(qpred.From);
            }

            if ((Q.IsReady() && !E.IsReady()) || (Q.IsReady() && E.IsReady() && Player.Mana <
                                                  Player.Spellbook.GetSpell(SpellSlot.E).SData.Mana + Player.Spellbook.GetSpell(SpellSlot.Q).SData.Mana))
            {
                if (Player.LSDistance(target) < Q.Range && getCheckBoxItem(MenuConfig.combo, "useqcr"))
                {
                    Q.Cast(qpred1.From);
                }
            }
        }
Ejemplo n.º 3
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Qe.Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var prede = Q.GetPrediction(target);
            var pred  = Qe.GetPrediction(target);

            if (pred.CollisionObjects.Count >= 1)
            {
                return;
            }

            qpred.From  = Qe.GetPrediction(target).CastPosition;
            qpred1.From = Q.GetPrediction(target).CastPosition;

            if (Q.IsReady() && E.IsReady() && GetBool("useqcr", typeof(bool)) &&
                Player.Mana >
                Player.Spellbook.GetSpell(SpellSlot.E).ManaCost + Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost)
            {
                Qe.Cast(qpred.From);
            }

            if ((Q.IsReady() && !E.IsReady()) || (Q.IsReady() && E.IsReady() && Player.Mana <
                                                  Player.Spellbook.GetSpell(SpellSlot.E).ManaCost + Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost))
            {
                if (Player.Distance(target) < Q.Range && GetBool("useqcr", typeof(bool)))
                {
                    Q.Cast(qpred1.From);
                }
            }
        }
Ejemplo n.º 4
0
        public static void UseQe(Obj_AI_Base target)
        {
            if (!Q.IsReady() || !E.IsReady() || target == null)
            {
                return;
            }
            var sPos = Prediction.GetPrediction(target, Q.Delay + E.Delay).UnitPosition;

            if (ObjectManager.Player.Distance(sPos, true) > Math.Pow(E.Range, 2))
            {
                var orb = ObjectManager.Player.ServerPosition + Vector3.Normalize(sPos - ObjectManager.Player.ServerPosition) * E.Range;
                Qe.Delay = Q.Delay + E.Delay + ObjectManager.Player.Distance(orb) / E.Speed;
                var pos = Qe.GetPrediction(target);
                if (pos.Hitchance >= HitChance.High)
                {
                    UseQe2(target, orb);
                }
            }
            else
            {
                Q.Width = 40f;
                var pos = Q.GetPrediction(target, true);
                Q.Width = 125f;
                if (pos.Hitchance >= HitChance.VeryHigh)
                {
                    UseQe2(target, pos.UnitPosition);
                }
            }
        }
Ejemplo n.º 5
0
        public static void UseQe2(Obj_AI_Base target, Vector3 pos)
        {
            if (target == null || !(ObjectManager.Player.Distance(pos, true) <= Math.Pow(E.Range, 2)))
            {
                return;
            }

            var sp = pos + Vector3.Normalize(ObjectManager.Player.ServerPosition - pos) * 100f;
            var ep = pos + Vector3.Normalize(pos - ObjectManager.Player.ServerPosition) * 592;

            Qe.Delay = Q.Delay + E.Delay + ObjectManager.Player.ServerPosition.Distance(pos) / E.Speed;
            Qe.UpdateSourcePosition(pos);
            var pPo = Qe.GetPrediction(target).UnitPosition.To2D().ProjectOn(sp.To2D(), ep.To2D());

            if (!pPo.IsOnSegment ||
                !(pPo.SegmentPoint.Distance(target, true) <= Math.Pow(Qe.Width + target.BoundingRadius, 2)))
            {
                return;
            }

            var delay = 280 - (int)(ObjectManager.Player.Distance(pos) / 2.5) + Config.Item("q.e.delay").GetValue <Slider>().Value;

            LeagueSharp.Common.Utility.DelayAction.Add(Math.Max(0, delay), () => E.Cast(pos));
            Qe.LastCastAttemptT = Environment.TickCount;
            Q.Cast(pos);
            UseE(target);
        }
Ejemplo n.º 6
0
 public static void UseE(Obj_AI_Base target)
 {
     if (target == null)
     {
         return;
     }
     foreach (var orb in OrbManager.GetOrbs(true).Where(orb => orb.To2D().IsValid() && ObjectManager.Player.Distance(orb, true) < Math.Pow(E.Range, 2)))
     {
         var sp = orb.To2D() + Vector2.Normalize(ObjectManager.Player.ServerPosition.To2D() - orb.To2D()) * 100f;
         var ep = orb.To2D() + Vector2.Normalize(orb.To2D() - ObjectManager.Player.ServerPosition.To2D()) * 592;
         Qe.Delay = E.Delay + ObjectManager.Player.Distance(orb) / E.Speed;
         Qe.UpdateSourcePosition(orb);
         var pPo = Qe.GetPrediction(target).UnitPosition.To2D();
         if (pPo.Distance(sp, ep, true, true) <= Math.Pow(Qe.Width + target.BoundingRadius, 2))
         {
             E.Cast(orb);
         }
     }
 }
Ejemplo n.º 7
0
        private static void Harass()
        {
            var target = TargetSelector.GetTarget(Qe.Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            qpred.From  = Qe.GetPrediction(target).CastPosition;
            qpred1.From = Q.GetPrediction(target).CastPosition;
            if (!Ismelee())
            {
                if (Q.IsReady() && E.IsReady() && Player.Mana >
                    Player.Spellbook.GetSpell(SpellSlot.E).ManaCost + Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost &&
                    GetBool("useqhr", typeof(bool)))
                {
                    Qe.Cast(qpred.From);
                }

                if (Q.IsReady() && target.IsValidTarget(Q.Range) && (!E.IsReady() || Player.Mana <
                                                                     Player.Spellbook.GetSpell(SpellSlot.E).ManaCost +
                                                                     Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost) &&
                    GetBool("useqhr", typeof(bool)))
                {
                    Q.Cast(qpred1.From);
                }
            }
            else
            {
                if (Q.IsReady() && GetBool("useqhm", typeof(bool)))
                {
                    Q.Cast(target);
                }
                if (W.IsReady() && GetBool("usewhm", typeof(bool)) && target.Distance(Player) < W.Range)
                {
                    W.Cast();
                }
            }
        }
Ejemplo n.º 8
0
        private static void Harass()
        {
            if (ObjectManager.Player.ManaPercent < Config.Item("harass.mana").GetValue <Slider>().Value)
            {
                return;
            }

            if (Config.Item("disable.harass.under.turret").GetValue <bool>())
            {
                if (ObjectManager.Get <Obj_AI_Turret>().Any(x => ObjectManager.Player.Distance(x) < x.AttackRange && x.Team != ObjectManager.Player.Team))
                {
                    return;
                }
            }

            if (Q.IsReady() && Config.Item("q.harass").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= HikiChance("q.hit.chance")))
                {
                    Q.Cast(enemy);
                }
            }
            if (W.IsReady() && Config.Item("w.harass").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range + W.Width) && W.GetPrediction(x).Hitchance >= HikiChance("w.hit.chance")))
                {
                    Helper.UseW(enemy, enemy);
                }
            }
            if (Q.IsReady() && E.IsReady() && Config.Item("qe.harass").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Qe.Range) && Qe.GetPrediction(x).Hitchance >= HikiChance("qe.hit.chance")))
                {
                    Helper.UseQe(enemy);
                }
            }
        }
Ejemplo n.º 9
0
        private static void Combo()
        {
            if (Q.IsReady() && Config.Item("q.combo").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= HikiChance("q.hit.chance")))
                {
                    Q.Cast(enemy);
                }
            }
            if (W.IsReady() && Config.Item("w.combo").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range + W.Width) && W.GetPrediction(x).Hitchance >= HikiChance("w.hit.chance")))
                {
                    Helper.UseW(enemy, enemy);
                }
            }
            if (Q.IsReady() && E.IsReady() && Config.Item("qe.combo").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Qe.Range) && Qe.GetPrediction(x).Hitchance >= HikiChance("qe.hit.chance")))
                {
                    Helper.UseQe(enemy);
                }
            }

            if (R.IsReady() && Config.Item("r.combo").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range) && !Helper.BuffCheck(x) &&
                                                                Config.Item("r.combo." + x.ChampionName).GetValue <bool>()))
                {
                    if (enemy.Health < R.GetDamage(enemy))
                    {
                        R.CastOnUnit(enemy);
                        R.LastCastAttemptT = Environment.TickCount;
                    }
                }
            }

            if (IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready && Config.Item("use.ignite").GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Player.Spellbook.GetSpell(IgniteSlot).SData.CastRange) &&
                                                                x.Health < Q.GetDamage(x) + W.GetDamage(x)))
                {
                    Player.Spellbook.CastSpell(IgniteSlot, enemy);
                }
            }
        }