Пример #1
0
        private static void UseItems(Obj_AI_Base target)
        {
            var PlayerServerPosition = Player.ServerPosition.To2D();
            var targetServerPosition = target.ServerPosition.To2D();

            if (HDR.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= HDR.Range)
            {
                HDR.Cast();
            }
            if (TIA.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= TIA.Range)
            {
                TIA.Cast();
            }
            if (BKR.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= BKR.Range)
            {
                BKR.Cast(target);
            }
            if (YOU.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= YOU.Range)
            {
                YOU.Cast(target);
            }
            if (BWC.IsReady() && Vector2.Distance(PlayerServerPosition, targetServerPosition) <= BWC.Range)
            {
                BWC.Cast(target);
            }
        }
Пример #2
0
        private static void JungleClear()
        {
            var pos = new List <Vector2>();
            List <Obj_AI_Base> mobs = MinionManager.GetMinions(
                Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.Health);

            foreach (Obj_AI_Base minion in mobs)
            {
                if (minion != null)
                {
                    pos.Add(minion.Position.To2D());
                }
                // Orbwalker.SetAttacks(!(Q.IsReady() || W.IsReady() || E.IsReady()) || TIA.IsReady() || HDR.IsReady());
                // Normal Farms
                if (Q.IsReady() && minion.IsValidTarget() && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= Q.Range &&
                    Config.Item("UseQFarm").GetValue <bool>())
                {
                    Orbwalker.SetAttack(false);
                    Q.Cast(minion);
                    Orbwalker.SetAttack(true);
                }
                if (W.IsReady() && minion.IsValidTarget() && Wnorm && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= W.Range &&
                    Config.Item("UseWFarm").GetValue <bool>() && (pos.Any()))
                {
                    MinionManager.FarmLocation pred = MinionManager.GetBestLineFarmLocation(pos, 70, 1025);

                    W.Cast(pred.Position);
                }
                if (E.IsReady() && minion.IsValidTarget() && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= E.Range &&
                    Config.Item("UseEFarm").GetValue <bool>() && (pos.Any()))
                {
                    MinionManager.FarmLocation pred = MinionManager.GetBestCircularFarmLocation(pos, 300, 600);
                    E.Cast(pred.Position);
                }
                //Evolved

                if (W.IsReady() && minion.IsValidTarget() && Wevolved && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= WE.Range &&
                    Config.Item("UseWFarm").GetValue <bool>() && (pos.Any()))
                {
                    MinionManager.FarmLocation pred = MinionManager.GetBestLineFarmLocation(pos, 70, 1025);

                    W.Cast(pred.Position);
                }
                if (Config.Item("UseItems").GetValue <bool>())
                {
                    if (HDR.IsReady() && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= HDR.Range)
                    {
                        HDR.Cast();
                        // Items.UseItem(3077, ObjectManager.Player);
                    }
                    if (TIA.IsReady() && Vector3.Distance(Player.ServerPosition, minion.ServerPosition) <= TIA.Range)
                    {
                        TIA.Cast();
                    }
                }
            }
        }
Пример #3
0
        private static void KillSteal()
        {
            Obj_AI_Hero target = HeroList
                                 .Where(x => x.IsValidTarget() && x.Distance(Player.Position) < 1000f && !x.IsZombie)
                                 .MinOrDefault(x => x.Health);

            var usePacket = Config.Item("usePackets").GetValue <bool>();

            if (target != null)
            {
                if (Config.Item("UseIgnite").GetValue <bool>() && IgniteSlot != SpellSlot.Unknown &&
                    Player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
                {
                    double igniteDmg = Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
                    if (igniteDmg > target.Health)
                    {
                        Player.Spellbook.CastSpell(IgniteSlot, target);
                        return;
                    }
                }

                if (Config.Item("autoescape").GetValue <bool>() && !ishealthy())
                {
                    var ally =
                        HeroList.Where(h => h.HealthPercent > 50 && h.CountEnemiesInRange(400) == 0 && !PointUnderEnemyTurret(h.ServerPosition)).FirstOrDefault();
                    if (ally != null && ally.IsValid)
                    {
                        E.Cast(ally.ServerPosition);
                        return;
                    }
                    var objAiturret = EnemyTurretPositions.Where(x => Vector3.Distance(Player.ServerPosition, x) <= 900f);
                    if (objAiturret.Any() || Player.CountEnemiesInRange(500) >= 1)
                    {
                        var bestposition = Player.ServerPosition.Extend(NexusPosition, E.Range);
                        E.Cast(bestposition, usePacket);
                        return;
                    }
                }

                if (Config.Item("UseQKs").GetValue <bool>() && Q.IsReady() &&
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= Q.Range)
                {
                    double QDmg = GetQDamage(target);
                    if (!Jumping && target.Health <= QDmg)
                    {
                        Q.Cast(target, usePacket);
                        return;
                    }
                }

                if (Config.Item("UseEKs").GetValue <bool>() && E.IsReady() &&
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range && Vector3.Distance(Player.ServerPosition, target.ServerPosition) > Q.Range)
                {
                    double EDmg = Player.GetSpellDamage(target, SpellSlot.E);
                    if (!Jumping && target.Health < EDmg)
                    {
                        Utility.DelayAction.Add(
                            Game.Ping + Config.Item("EDelay").GetValue <Slider>().Value, delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValid && !target.IsDead)
                            {
                                E.Cast(pred.CastPosition, usePacket);
                                return;
                            }
                        });
                    }
                }

                if (W.IsReady() && Wnorm && Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range &&
                    Config.Item("UseWKs").GetValue <bool>())
                {
                    double WDmg = Player.GetSpellDamage(target, SpellSlot.W);
                    if (target.Health <= WDmg)
                    {
                        var pred = W.GetPrediction(target);
                        if (pred.Hitchance >= HitChance.Medium)
                        {
                            W.Cast(pred.CastPosition);
                            return;
                        }
                    }
                }

                if (W.IsReady() && Wevolved &&
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range &&
                    Config.Item("UseWKs").GetValue <bool>())
                {
                    double           WDmg = Player.GetSpellDamage(target, SpellSlot.W);
                    PredictionOutput pred = W.GetPrediction(target);
                    if (target.Health <= WDmg && pred.Hitchance > HitChance.Medium)
                    {
                        CastWE(target, pred.UnitPosition.To2D());
                        return;
                    }

                    if (pred.Hitchance >= HitChance.Collision)
                    {
                        List <Obj_AI_Base> PCollision = pred.CollisionObjects;
                        var x =
                            PCollision.Where(PredCollisionChar => PredCollisionChar.Distance(target) <= 30)
                            .FirstOrDefault();
                        if (x != null)
                        {
                            W.Cast(x.Position, Config.Item("usePackets").GetValue <bool>());
                            return;
                        }
                    }
                }


                // Mixed's EQ KS
                if (Q.IsReady() && E.IsReady() &&
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= E.Range + Q.Range &&
                    Config.Item("UseEQKs").GetValue <bool>())
                {
                    double QDmg = GetQDamage(target);
                    double EDmg = Player.GetSpellDamage(target, SpellSlot.E);
                    if ((target.Health <= QDmg + EDmg))
                    {
                        Utility.DelayAction.Add(Config.Item("EDelay").GetValue <Slider>().Value, delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValidTarget() && !target.IsZombie)
                            {
                                E.Cast(pred.CastPosition);
                                return;
                            }
                        });
                    }
                }

                // MIXED EW KS
                if (W.IsReady() && E.IsReady() && Wnorm &&
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition) <= W.Range + E.Range &&
                    Config.Item("UseEWKs").GetValue <bool>())
                {
                    double WDmg = Player.GetSpellDamage(target, SpellSlot.W);
                    if (target.Health <= WDmg)
                    {
                        Utility.DelayAction.Add(Config.Item("EDelay").GetValue <Slider>().Value, delegate
                        {
                            PredictionOutput pred = E.GetPrediction(target);
                            if (target.IsValid && !target.IsDead)
                            {
                                E.Cast(pred.CastPosition);
                                return;
                            }
                        });
                    }
                }


                if (TIA.IsReady() &&
                    Vector2.Distance(Player.ServerPosition.To2D(), target.ServerPosition.To2D()) <= TIA.Range &&
                    Config.Item("UseTiaKs").GetValue <bool>())
                {
                    double tiamatdmg = Player.GetItemDamage(target, Damage.DamageItems.Tiamat);
                    if (target.Health <= tiamatdmg)
                    {
                        TIA.Cast();
                        return;
                    }
                }
                if (HDR.IsReady() &&
                    Vector2.Distance(Player.ServerPosition.To2D(), target.ServerPosition.To2D()) <= HDR.Range &&
                    Config.Item("UseTiaKs").GetValue <bool>())
                {
                    double hydradmg = Player.GetItemDamage(target, Damage.DamageItems.Hydra);
                    if (target.Health <= hydradmg)
                    {
                        HDR.Cast();
                        return;
                    }
                }
            }
        }