Beispiel #1
0
        private static void LaneClear()
        {
            if (Human() && Player.ManaPercent <= getSliderItem(laneClearMenu, "laneclear.mana"))
            {
                return;
            }
            var minions = MinionManager.GetMinions(Player.ServerPosition, W.Range).FirstOrDefault();

            if (minions == null)
            {
                return;
            }

            if (Human())
            {
                if (Q.IsReady() && getCheckBoxItem(laneClearMenu, "laneclear.q") && minions.LSDistance(Player.Position) <= Q.Range)
                {
                    Q.CastOnUnit(minions);
                }

                if (W.IsReady() && getCheckBoxItem(laneClearMenu, "laneclear.w"))
                {
                    W.Cast(minions);
                }
            }
            else
            {
                if (Q.IsReady() && getCheckBoxItem(laneClearMenu, "laneclear.q.spider") && minions.LSDistance(Player.Position) <= Q1.Range)
                {
                    Q1.CastOnUnit(minions);
                }
            }
        }
Beispiel #2
0
        private static void LaneClear()
        {
            if (Human() && Player.ManaPercent <= Config.Item("laneclear.mana").GetValue <Slider>().Value)
            {
                return;
            }
            var minions = MinionManager.GetMinions(Player.ServerPosition, W.Range).FirstOrDefault();

            if (minions == null)
            {
                return;
            }

            if (Human())
            {
                if (Q.IsReady() && Config.Item("laneclear.q").GetValue <bool>() && minions.Distance(Player.Position) <= Q.Range)
                {
                    Q.CastOnUnit(minions);
                }

                if (W.IsReady() && Config.Item("laneclear.w").GetValue <bool>())
                {
                    W.Cast(minions);
                }
            }
            else
            {
                if (Q.IsReady() && Config.Item("laneclear.q.spider").GetValue <bool>() && minions.Distance(Player.Position) <= Q1.Range)
                {
                    Q1.CastOnUnit(minions);
                }
            }
        }
Beispiel #3
0
        private static void JungleClear()
        {
            var jungleMinions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                         MinionOrderTypes.MaxHealth);

            foreach (var minion in jungleMinions)
            {
                if (Human())
                {
                    if (Q.IsReady())
                    {
                        Q.CastOnUnit(minion);
                    }

                    if (W.IsReady())
                    {
                        if (W.GetPrediction(minion).CollisionObjects.Count >= 1)
                        {
                            W.Cast(minion);
                        }

                        else
                        {
                            W.Cast(minion);
                        }
                    }

                    if (!Q.IsReady() && !W.IsReady() && R.IsReady())
                    {
                        R.Cast();
                    }
                }
                else
                {
                    if (Q1.IsReady())
                    {
                        Q1.CastOnUnit(minion);
                    }

                    if (realcdSQ > 1 && realcdSW > 1 && !Player.HasBuff("EliseSpiderW") && R.IsReady())
                    {
                        if (realcdQ < 1 || realcdW < 1)
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Beispiel #4
0
        private static void Killsteal()
        {
            foreach (
                var enemy in HeroManager.Enemies.Where(e => e.LSIsValidTarget() && e.LSDistance(Player.Position) <= E.Range)
                )
            {
                if (Human())
                {
                    if (getCheckBoxItem(ksMenu, "qKSH") && getCheckBoxItem(ksMenu, "wKSH") && Q.IsReady() &&
                        W.IsReady())
                    {
                        if (enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy) + W.GetDamage(enemy))
                        {
                            W.Cast(enemy);
                            Q.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKSH"))
                    {
                        if (Q.IsReady() && enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy))
                        {
                            Q.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKS") && getCheckBoxItem(ksMenu, "switchKS"))
                    {
                        if (realcdSQ == 0 && enemy.LSDistance(Player.Position) <= Q1.Range &&
                            enemy.Health <= Q1.GetDamage(enemy, 1))
                        {
                            if (R.IsReady())
                            {
                                R.Cast();
                                Q1.CastOnUnit(enemy);
                            }
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "wKSH"))
                    {
                        if (W.IsReady() && enemy.LSDistance(Player.Position) <= W.Range &&
                            enemy.Health <= W.GetDamage(enemy))
                        {
                            W.Cast(enemy);
                            return;
                        }
                    }
                }
                else if (!Human())
                {
                    if (getCheckBoxItem(ksMenu, "qKSH") && getCheckBoxItem(ksMenu, "wKSH") && realcdW == 0 &&
                        realcdQ == 0)
                    {
                        if (enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy) + W.GetDamage(enemy))
                        {
                            R.Cast();
                            W.Cast(enemy);
                            Q.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKS"))
                    {
                        if (Q1.IsReady() && enemy.LSDistance(Player.Position) <= Q1.Range &&
                            enemy.Health <= Q1.GetDamage(enemy, 1))
                        {
                            Q1.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKSH") && getCheckBoxItem(ksMenu, "switchKS"))
                    {
                        if (realcdQ == 0 && enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy))
                        {
                            if (R.IsReady())
                            {
                                R.Cast();
                                Q.CastOnUnit(enemy);
                            }
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "wKSH") && getCheckBoxItem(ksMenu, "switchKS"))
                    {
                        if (realcdW == 0 && enemy.LSDistance(Player.Position) <= W.Range &&
                            enemy.Health <= W.GetDamage(enemy))
                        {
                            if (R.IsReady())
                            {
                                R.Cast();
                                W.Cast(enemy);
                            }
                            return;
                        }
                    }
                }
            }
        }
Beispiel #5
0
        private static void Harass()
        {
            if (Human() && Player.ManaPercent <= getSliderItem(harassMenu, "harassMana"))
            {
                return;
            }
            var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (!target.LSIsValidTarget())
            {
                return;
            }

            if (Human())
            {
                if (W.IsReady() && getCheckBoxItem(harassMenu, "wHarassH") &&
                    target.LSDistance(Player.Position) <= W.Range)
                {
                    var wprediction = W.GetPrediction(target);

                    switch (wprediction.Hitchance)
                    {
                    case HitChance.Medium:
                    case HitChance.High:
                    case HitChance.VeryHigh:
                    case HitChance.Immobile:

                        W.Cast(wprediction.CastPosition);
                        break;

                    case HitChance.Collision:

                        var colliding = wprediction.CollisionObjects.OrderBy(o => o.LSDistance(Player, true)).ToList();
                        if (colliding.Count > 0)
                        {
                            if (colliding[0].LSDistance(target, true) <= 25000 ||
                                colliding[0].Type == GameObjectType.AIHeroClient)
                            {
                                W.Cast(wprediction.CastPosition);
                            }
                            else if (colliding[0].Type != GameObjectType.AIHeroClient &&
                                     colliding[0].LSDistance(target, true) > 25000 && R.IsReady() && realcdSQ <= 1 &&
                                     target.LSDistance(Player.Position) <= Q1.Range + 200 && getCheckBoxItem(harassMenu, "rComboHarass"))
                            {
                                var       playerPosition = ObjectManager.Player.Position.LSTo2D();
                                var       direction      = ObjectManager.Player.Direction.LSTo2D().LSPerpendicular();
                                const int distance       = 600;
                                const int stepSize       = 40;

                                for (var step = 0f; step < 360; step += stepSize)
                                {
                                    var currentAngel      = step * (float)Math.PI / 180;
                                    var currentCheckPoint = playerPosition +
                                                            distance * direction.LSRotated(currentAngel);

                                    var collision =
                                        Collision.GetCollision(new List <Vector3> {
                                        currentCheckPoint.To3D()
                                    },
                                                               new PredictionInput {
                                        Delay = 0.25f, Radius = 200, Speed = 1000
                                    });

                                    if (collision.Count == 0)
                                    {
                                        Q.CastOnUnit(target);
                                        W.Cast(currentCheckPoint);
                                        R.Cast();
                                        //if (Q.IsReady() && Config.Item("qHarassH").GetValue<bool>() &&
                                        //    target.LSDistance(Player.Position) <= Q.Range)
                                        //{
                                        //
                                        //}
                                    }
                                }
                            }
                        }
                        break;
                    }
                }


                if (E.IsReady() && getCheckBoxItem(harassMenu, "eHarassH") &&
                    target.LSDistance(Player.Position) <= E.Range)
                {
                    var eprediction = E.GetPrediction(target);
                    switch (eprediction.Hitchance)
                    {
                    case HitChance.VeryHigh:
                    case HitChance.Immobile:

                        E.Cast(eprediction.CastPosition);
                        break;

                    case HitChance.Collision:
                        var colliding = eprediction.CollisionObjects.OrderBy(o => o.LSDistance(Player, true)).ToList();
                        if (colliding.Count >= 1 && colliding[0].Type == GameObjectType.AIHeroClient)
                        {
                            E.Cast(eprediction.CastPosition);
                        }
                        break;
                    }
                }

                if (Q.IsReady() && getCheckBoxItem(harassMenu, "qHarassH") &&
                    target.LSDistance(Player.Position) <= Q.Range)
                {
                    Q.CastOnUnit(target);
                }

                if (getCheckBoxItem(harassMenu, "rHarass") && !Q.IsReady() && !W.IsReady() && !E.IsReady() &&
                    R.IsReady() && target.LSDistance(Player.Position) <= Q1.Range)
                {
                    if (realcdSQ == 0 || realcdSW == 0 || realcdSE == 0)
                    {
                        R.Cast();
                    }
                }
            }
            else
            {
                if (Q1.IsReady() && getCheckBoxItem(harassMenu, "qHarass") &&
                    target.LSDistance(Player.Position) <= Q1.Range)
                {
                    Q1.CastOnUnit(target);
                }

                if (E1.IsReady() && getCheckBoxItem(harassMenu, "eHarass") &&
                    target.LSDistance(Player.Position) <= E1.Range &&
                    target.LSDistance(Player.Position) >= getSliderItem(harassMenu, "eMinHarass"))
                {
                    E1.CastOnUnit(target);
                }

                if (getCheckBoxItem(harassMenu, "rHarass") && !Q.IsReady() && !W.IsReady() && !E.IsReady() && R.IsReady())
                {
                    if (!Player.HasBuff("EliseSpiderW") || target.LSDistance(Player.Position) >= Player.AttackRange + 100)
                    {
                        if (realcdQ == 0 || realcdW == 0 || realcdE == 0)
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }