Пример #1
0
            public static void LastHit()
            {
                if (!MenuSettings.Keys.farmToggle.Active)
                {
                    return;
                }

                if (objPlayer.ManaPercent < MenuSettings.LastHit.MinMana.Value)
                {
                    return;
                }

                if (MenuSettings.LastHit.UseQ.Enabled && Q.IsReady())
                {
                    if (Variables.GameTimeTickCount - lastQTime < 1000)
                    {
                        return;
                    }

                    var minion = GameObjects.GetMinions(Q.Range)
                                 .Where(x => x.IsValidTarget(Q.Range) && HealthPrediction.GetPrediction(x, 950) * 0.9 < Q.GetDamage(x) && HealthPrediction.GetPrediction(x, 950) * 0.9 > 0)
                                 .OrderBy(x => x.IsMelee)
                                 .FirstOrDefault();

                    if (minion != null)
                    {
                        Q.Cast(minion);
                    }
                }
            }
Пример #2
0
        private void LastHitQ()
        {
            var targetQ =
                MinionManager.GetMinions(Q.Range)
                .Where(
                    m =>
                    m.Health > 5 && m.IsEnemy && m.Health < Q.GetDamage(m) && Q.CanCast(m) &&
                    HealthPrediction.GetPrediction(
                        m, (int)((player.Distance(m) / Q.Speed * 1000) + Q.Delay)) > 0);

            if (targetQ.Any() && LastAttackedminiMinion != null)
            {
                foreach (var target in
                         targetQ.Where(
                             m =>
                             m.NetworkId != LastAttackedminiMinion.NetworkId ||
                             (m.NetworkId == LastAttackedminiMinion.NetworkId &&
                              Variables.GameTimeTickCount - LastAttackedminiMinionTime > 700)))
                {
                    if (target.Distance(player) < player.GetRealAutoAttackRange(target) && !Orbwalker.CanAttack() &&
                        Orbwalker.CanMove())
                    {
                        Q.Cast(target);
                    }
                    //else if (target.Distance(player) > player.GetRealAutoAttackRange(target))
                    //{
                    //    if (Q.Cast(target).IsCasted())
                    //    {
                    //        Orbwalker.AddToBlackList(target.NetworkId);
                    //    }
                    //}
                }
            }
        }
Пример #3
0
        static void Lasthit()
        {
            if (!Q.IsReady() || !lasthit.check("LHQ"))
            {
                return;
            }

            var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range - 10) && x.IsMinion());//.OrderByDescending(x => x.Health);

            if (minions != null)
            {
                AIMinionClient besttarget = null;
                foreach (var minion in minions.Where(x => !x.IsDead && x.Health < QDamage(x) - 10 && Q.GetHealthPrediction(x) > 10))
                {
                    var Qpred = Q.GetPrediction(minion);

                    var collisions = Qpred.CollisionObjects.ToList();

                    if (collisions.Count() > 0 && !lasthit.check("LHQD"))
                    {
                        break;
                    }

                    else if (collisions.Count() <= 1 && minion.GetMinionType() == MinionTypes.Siege)
                    {
                        besttarget = minion;
                        break;
                    }
                    else if (collisions.Count() == 1 && collisions[0].Health < QDamage(collisions[0]) - 10 && Q.GetHealthPrediction(collisions[0]) > 0 &&
                             !(minion.GetMinionType() == MinionTypes.Siege && HealthPrediction.GetPrediction(minion, (int)(Q.CooldownTime * 1100)) <= 0))
                    {
                        besttarget = minion;
                        break;
                    }
                    else if (collisions.Count() > 1 && collisions[0].Health < QDamage(collisions[0]) - 10 && collisions[1].Health < QDamage(collisions[1]) - 10 &&
                             Q.GetHealthPrediction(collisions[0]) > 0 && Q.GetHealthPrediction(collisions[1]) > 0)
                    {
                        besttarget = minion;
                        break;
                    }
                    else if (collisions.Count() < 2)
                    {
                        besttarget = minion;
                    }
                }

                if (besttarget != null && Q.CanCast(besttarget) && Q.GetHealthPrediction(besttarget) > 10)
                {
                    //if (HealthPrediction.HasTurretAggro(besttarget) && )
                    Q.Cast(Q.GetPrediction(besttarget).CastPosition);
                }
            }
        }
Пример #4
0
        private void LogicQ()
        {
            if (LaneClear && !FishBoneActive && !Player.Spellbook.IsAutoAttack && Orbwalker.GetTarget() == null && Orbwalker.CanAttack() && Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQout").Enabled&& Player.Mana > RMANA + WMANA + EMANA + QMANA)
            {
                foreach (var minion in Cache.GetMinions(Player.PreviousPosition, bonusRange() + 30).Where(
                             minion => !minion.InAutoAttackRange() && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = HealthPrediction.GetPrediction(minion, 400, 70);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForceTarget = minion;
                        Q.Cast();
                        return;
                    }
                }
            }

            var t = TargetSelector.GetTarget(bonusRange() + 60);

            if (t.IsValidTarget())
            {
                if (!FishBoneActive && (!t.InAutoAttackRange() || t.CountEnemyHeroesInRange(250) > 2) && Orbwalker.GetTarget() == null)
                {
                    var distance = GetRealDistance(t);
                    if (Combo && (Player.Mana > RMANA + WMANA + QMANA || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Harass && !Player.Spellbook.IsAutoAttack && Orbwalker.CanAttack() && Config[Player.CharacterName]["QConfig"].GetValue <MenuBool>("Qharass").Enabled&& !Player.IsUnderEnemyTurret() && Player.Mana > RMANA + WMANA + EMANA + QMANA + QMANA && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Combo && Player.Mana > RMANA + WMANA + QMANA + QMANA && Player.CountEnemyHeroesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Combo && Player.Mana < RMANA + WMANA + QMANA + QMANA)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Combo && Player.CountEnemyHeroesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && LaneClear)
            {
                Q.Cast();
            }
        }
Пример #5
0
        private void Game_OnUpdate()
        {
            if (MenuGUI.IsChatOpen() || Player.IsDead)
            {
                return;
            }

            if (Player.IsDead)
            {
                return;
            }

            if (Menu["misc"]["stealthrecall"].Enabled)
            {
                Player.SpellBook.CastSpell(SpellSlot.Recall);
            }

            if (Menu["misc"]["ebeforedeath"].Enabled &&
                E.Ready &&
                HealthPrediction.GetPrediction(ObjectManager.GetLocalPlayer(), (int)(Game.ClockTime + 1000.0)) <=
                50.0f)
            {
                E.Cast();
            }

            if (Menu["combo"]["usee"].Enabled && E.Ready)
            {
                var target = TargetSelector.GetTarget(1100);
                if (target == null)
                {
                    return;
                }

                double baseDamage = Utility.CalculateEDamage(target);

                if (ObjectManager.Get <Obj_AI_Hero>().Any(x => x.IsValidTarget(1100) && baseDamage > x.Health))
                {
                    E.Cast();
                }
            }

            switch (Orbwalker.Mode)
            {
            case OrbwalkingMode.Combo:
                OnCombo();
                break;
            }
        }
Пример #6
0
        private static void QLastHit(AIBaseClient minion)
        {
            bool castQ = ((keyLinks["waveUseQLH"].GetValue <MenuKeyBind>().Active) || boolLinks["waveUseQ"].GetValue <MenuBool>() && keyLinks["waveActive"].GetValue <MenuKeyBind>().Active);

            if (castQ)
            {
                var distance   = player.Distance(minion);
                var t          = 250 + (int)distance / 2;
                var predHealth = HealthPrediction.GetPrediction(minion, t, 0);
                // Console.WriteLine(" Distance: " + distance + " timer : " + t + " health: " + predHealth);
                if (predHealth > 0 && Q.IsKillable(minion))
                {
                    Q.Cast(minion);
                }
            }
        }
Пример #7
0
        private static void Jungleclear(IEnumerable <AIMinionClient> minions)
        {
            if (minions != null && myhero.ManaPercent > slider(jungleclear, "JMIN"))
            {
                if (jungleclear.check("JQ") && Q.IsReady())
                {
                    foreach (var x in minions.Where(x => Q.GetHealthPrediction(x) > 0))
                    {
                        if (comb(jungleclear, "JQMODE") == 0 && x.Name.Contains("Mini"))
                        {
                            continue;
                        }

                        Q.Cast(Q.GetPrediction(x).CastPosition);
                    }
                    ;
                }

                if (jungleclear.check("JW") && W.IsReady())
                {
                    if (minions.Count() == 1)
                    {
                        var target = minions.FirstOrDefault();

                        if (jungleclear.check("JQ") && W.GetDamage(target) > HealthPrediction.GetPrediction(target, 750, 0) - 10)
                        {
                            return;
                        }

                        if (target.Health > myhero.GetAutoAttackDamage(target) * 2)
                        {
                            W.Cast(W.GetPrediction(target).CastPosition);
                        }
                    }
                    else
                    {
                        var pred = W.GetCircularFarmLocation(minions.ToList());

                        if (pred.MinionsHit > 0 && W.Cast(pred.Position))
                        {
                            return;
                        }
                    }
                }
            }
        }
Пример #8
0
        private static void QLastHit(AIBaseClient minion)
        {
            var  allMinionsQ = GameObjects.GetMinions(player.Position, Q.Range, MinionTypes.All, MinionTeam.Enemy);
            bool castQ       = ((WaveClear["waveUseQLH"].GetValue <MenuBool>()) || WaveClear["waveUseQ"].GetValue <MenuBool>() && WaveClear["waveActive"].GetValue <MenuBool>());

            if (castQ)
            {
                var distance   = Extensions.Distance(player, minion);
                var useQ       = WaveClear["waveUseQLH"].GetValue <MenuBool>();
                var t          = 250 + (int)distance / 2;
                var predHealth = HealthPrediction.GetPrediction(minion, t, 0);

                if (useQ &&
                    minion.Health < 0.90 * player.GetSpellDamage(minion, SpellSlot.Q) && predHealth > 0)
                {
                    Q.Cast(minion);
                }
            }
        }
Пример #9
0
        public void Execute()
        {
            #region OnUpdate

            if (ObjectManager.Get <Obj_AI_Hero>().Any(x => x.IsValidTarget(1100) && x.GetPoisonDamage() > x.Health))
            {
                Variables.Spells[SpellSlot.E].Cast();
            }

            if (Variables.Menu["com.itwitch.misc"]["ebeforedeath"].Enabled &&
                ObjectManager.GetLocalPlayer().HealthPercent() < 5 &&
                GameObjects.EnemyHeroes.Any(x => x.HasBuffOfType(BuffType.Poison)) &&
                _healthPrediction.GetPrediction(ObjectManager.GetLocalPlayer(), (int)(Game.ClockTime + 1000.0)) <=
                50.0f)
            {
                Variables.Spells[SpellSlot.E].Cast();
            }

            #endregion

            #region Orbwalking Combo Mode

            if (Variables.Orbwalker.GetActiveMode() != Orbwalker.Implementation.Combo)
            {
                return;
            }

            if (Variables.Menu["com.itwitch.combo"]["eSlider"].Value > 0)
            {
                var target = GameObjects.EnemyHeroes.FirstOrDefault(x => x.HasBuffOfType(BuffType.Poison));

                if (target != null && target.IsValidTarget(Variables.Spells[SpellSlot.E].Range) &&
                    Variables.Menu["com.itwitch.combo"]["eSlider"].Value >=
                    target.GetBuffCount("TwitchExpungeMarker"))
                {
                    Variables.Spells[SpellSlot.E].Cast();
                }
            }
            //DONE auto ks logic - DONE
            //DONE auto expunge at x stacks - DONE

            #endregion
        }
Пример #10
0
        private static void OnNonKillables(object sender, NonKillableMinionEventArgs args)
        {
            if (!Configs.Laneclear.EBool.Enabled || !E.IsReady())
            {
                return;
            }

            var minion = args.Target as AIMinionClient;

            if (minion == null)
            {
                return;
            }
            if (EDamage(minion) >= minion.Health - GameObjects.Player.CalculateDamage(minion, DamageType.Physical, 1) &&
                Extension.HasRendBuff(minion, E.Range))
            {
                if (HealthPrediction.GetPrediction(minion, 250) > 0)
                {
                    E.Cast();
                }
            }
        }
        public static void AfterAttack(object sender, OrbwalkerActionArgs args)
        {
            if (args.Type != OrbwalkerType.AfterAttack)
            {
                return;
            }
            //var targets = GameObjects.AllGameObjects.Where(i => !i.IsAlly && !i.IsMe && !i.IsDead);
            //foreach(var target in targets)
            //{
            if (!Program.Q.IsReady())
            {
                return;
            }
            if (args.Target.IsValidTarget(800) &&
                (Orbwalker.ActiveMode == OrbwalkerMode.Combo ||
                 !Program.MainMenu.GetMenuBool("Combo Settings", "OnlyQinCombo") == true))
            {
                var tg = args.Target as AIHeroClient;
                if (tg == null)
                {
                    return;
                }
                var mode           = Program.MainMenu.GetMenuList("Combo Settings", "QMode");
                var tumblePosition = Game.CursorPos;
                switch (mode)
                {
                case "PRADA":
                    tumblePosition = tg.GetTumblePos();
                    break;

                default:
                    tumblePosition = Game.CursorPos;
                    break;
                }

                Tumble.Cast(tumblePosition);
            }

            var ms = ObjectManager.Get <AIMinionClient>().Where(minion => minion.NetworkId != minion.NetworkId && minion.IsEnemy && minion.IsValidTarget(615));

            if (ms != null)
            {
                foreach (var m in ms)
                {
                    if (!m.IsValidTarget(800))
                    {
                        return;
                    }
                    if (m != null && Program.MainMenu.GetMenuBool("Laneclear Settings", "QLastHit") == true &&
                        ObjectManager.Player.ManaPercent >=
                        Program.MainMenu.GetMenuSlider("Laneclear Settings", "QLastHitMana") &&
                        Orbwalker.ActiveMode == OrbwalkerMode.LastHit ||
                        Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                    {
                        var dashPosition = Game.CursorPos;
                        var mode         = Program.MainMenu.GetMenuList("Combo Settings", "QMode");
                        switch (mode)
                        {
                        case "PRADA":
                            dashPosition = m.GetTumblePos();
                            break;

                        default:
                            dashPosition = Game.CursorPos;
                            break;
                        }

                        if (m.Team == GameObjectTeam.Neutral)
                        {
                            Program.Q.Cast(dashPosition);
                        }
                        foreach (var minion in ObjectManager.Get <AIMinionClient>().Where(minion =>
                                                                                          m.NetworkId != minion.NetworkId && minion.IsEnemy && minion.IsValidTarget(615)))
                        {
                            if (minion == null)
                            {
                                break;
                            }
                            var time = (int)(ObjectManager.Player.AttackCastDelay * 1000) + Game.Ping / 2 + 1000 *
                                       (int)Math.Max(0,
                                                     ObjectManager.Player.Distance(minion) - ObjectManager.Player.BoundingRadius) /
                                       (int)ObjectManager.Player.BasicAttack.MissileSpeed;
                            var predHealth = HealthPrediction.GetPrediction(minion, time);
                            if (predHealth < ObjectManager.Player.GetAutoAttackDamage(minion) + Program.Q.GetDamage(minion) &&
                                predHealth > 0)
                            {
                                Program.Q.Cast(dashPosition, true);
                            }
                        }
                    }
                }
            }
        }
Пример #12
0
        private static void Misc()
        {
            if (misc.check("KSR") && R.IsReady())
            {
                foreach (var hero in GameObjects.EnemyHeroes.Where(x => x.GetRealHealth(DamageType.Magical) < myhero.GetSpellDamage(x, SpellSlot.R) && R.CanCast(x) && !x.HaveSpellShield()).OrderByDescending(x => x.ChampionsKilled))
                {
                    if (hero != null)
                    {
                        R.Cast(hero);
                    }
                }
            }

            var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (target != null && target.IsValidTarget())
            {
                if (misc.check("KSQ") && Q.CanCast(target) && QDamage(target) > target.Health)
                {
                    var pred = Q.GetSPrediction(target);

                    //if (pred.HitChance >= hitQ) Q.Cast(pred.CastPosition);
                    Q.Cast(pred.CastPosition);
                }

                if (misc.check("KSW") && W.CanCast(target) && WDamage(target) > target.Health)
                {
                    var pred = W.GetSPrediction(target);

                    if (pred.HitChance >= hitW)
                    {
                        W.Cast(pred.CastPosition);
                    }
                }



                if (Ignite != null && misc.check("autoign") && Ignite.IsReady() && target.IsValidTarget(Ignite.Range) &&
                    myhero.GetSummonerSpellDamage(target, SummonerSpell.Ignite) > target.Health)
                {
                    Ignite.Cast(target);
                }
            }

            if (misc.check("KSJ") && W.IsReady() && GameObjects.JungleLegendary.Any())
            {
                var lmob = GameObjects.JungleLegendary.Where(x => x.IsValidTarget(W.Range) && HealthPrediction.GetPrediction(x, 1000) > 0 && myhero.GetSpellDamage(x, SpellSlot.W) > HealthPrediction.GetPrediction(x, 1000)).FirstOrDefault();

                if (lmob != null && W.IsInRange(lmob.Position))
                {
                    W.Cast(lmob.Position);
                }
            }

            if (misc.check("AUTOPOT") && !myhero.HasBuffOfType(BuffType.Heal) && myhero.HealthPercent <= slider(misc, "POTMIN"))
            {
                if (Items.CanUseItem(myhero, Potion.Id))
                {
                    Potion.Cast();
                }

                else if (Items.CanUseItem(myhero, Biscuit.Id))
                {
                    Biscuit.Cast();
                }

                else if (Items.CanUseItem(myhero, RPotion.Id))
                {
                    RPotion.Cast();
                }

                else if (Items.CanUseItem(myhero, CPotion.Id))
                {
                    CPotion.Cast();
                }
            }
            //myhero.SetSkin(comb(misc, "skinID"));
        }
Пример #13
0
        private void LogicQ()
        {
            var torb = Orbwalker.GetTarget();

            if (torb == null || torb.Type != GameObjectType.AIHeroClient)
            {
                if (Config["QConfig"].GetValue <MenuBool>("Qminion"))
                {
                    var t = TargetSelector.GetTarget(Q.Range + 300);
                    if (t.IsValidTarget())
                    {
                        var pos = Prediction.GetFastUnitPosition(t, 0.1f);
                        //GameObjects.EnemyMinions.Where(m => m.Distance(pos) <= 300 && m.IsValidTarget(Q.Range)).OrderBy(x => x.Distance(t)).FirstOrDefault();
                        var minion = GameObjects.EnemyMinions.Where(m => m.Distance(pos) <= 300 && m.IsValidTarget(Q.Range)).OrderBy(x => x.Distance(t)).FirstOrDefault();
                        if (minion.IsValidTarget())
                        {
                            if (t.Health < GetQdmg(t))
                            {
                                Q.CastOnUnit(minion);
                            }
                            if (Combo && Player.Mana > RMANA + EMANA)
                            {
                                Q.CastOnUnit(minion);
                            }
                            else if (Farm && Config["QConfig"].GetValue <MenuBool>("harrasQ") && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                            {
                                Q.CastOnUnit(minion);
                            }
                        }
                    }
                }
            }
            else if (!Orbwalker.CanAttack() && !Player.Spellbook.IsAutoAttack)
            {
                var t = torb as AIHeroClient;
                if (t.Health < GetQdmg(t) + GetWdmg(t))
                {
                    Q.CastOnUnit(t);
                }
                if (Combo && Player.Mana > RMANA + QMANA)
                {
                    Q.CastOnUnit(t);
                }
                else if (Farm && Config["QConfig"].GetValue <MenuBool>("harrasQ") && Player.Mana > RMANA + QMANA + WMANA + EMANA)
                {
                    Q.CastOnUnit(t);
                }
            }
            if (LaneClear && Player.ManaPercent > Config["Farm"].GetValue <MenuSlider>("Mana").Value&& Config["Farm"].GetValue <MenuBool>("farmQ"))
            {
                var minionList = MinionManager.GetMinions(Player.Position, Q.Range);

                if (minionList.Count >= Config["Farm"].GetValue <MenuSlider>("LCminions").Value)
                {
                    var minionAttack = minionList.FirstOrDefault(x => Q.GetDamage(x) > HealthPrediction.GetPrediction(x, 300));
                    if (minionAttack.IsValidTarget())
                    {
                        Q.CastOnUnit(minionAttack);
                    }
                }
            }
        }
Пример #14
0
        private static void Clear()
        {
            var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion());

            var mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range));

            var lMobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && x.GetJungleType() == JungleType.Legendary);

            var bMobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && x.GetJungleType() == JungleType.Large);

            System.Collections.Generic.IEnumerable <AIMinionClient> targets;

            if (minions.Any())
            {
                targets = minions;
            }
            else if (bMobs.Any())
            {
                targets = bMobs;
            }
            else if (lMobs.Any())
            {
                targets = lMobs;
            }
            else
            {
                targets = mobs;
            }

            if (targets == null)
            {
                return;
            }

            if (comb(laneclear, "lq") > 0 && Q.IsReady())
            {
                if (comb(laneclear, "lq") == 1)
                {
                    var target = targets.Where(x => x.Health > myhero.GetAutoAttackDamage(x) + 10).OrderByDescending(x => HealthPrediction.GetPrediction(x, x.qtt())).FirstOrDefault();
                    Q.Cast(target);
                }
                else
                {
                    var target = targets.Where(x => x != null && HealthPrediction.GetPrediction(x, x.qtt()) > 30 && HealthPrediction.GetPrediction(x, x.qtt()) < Q.GetDamage(x)).OrderByDescending(x => HealthPrediction.GetPrediction(x, x.qtt())).FirstOrDefault();

                    if (target == null || ((Orbwalker.GetTarget() == target as AttackableUnit || Orbwalker.LastTarget == target as AttackableUnit) &&
                                           (HealthPrediction.GetPrediction(target, target.qtt()) <= myhero.GetAutoAttackDamage(target) || target.UnderAllyTurret())))
                    {
                        goto lol2;
                    }

                    Q.Cast(target);
                }
            }

lol2:
            var min = slider(laneclear, "lwmin");

            if (laneclear.check("lw") && W.IsReady() && targets.Where(x => x.Health > 20 && W.IsInRange(x)).Count() >= min)
            {
                W.Collision = true;
                foreach (var minion in targets.Where(x => x != null && HealthPrediction.GetPrediction(x, x.qtt()) > 0))
                {
                    var pred = W.GetPrediction(minion as AIBaseClient);

                    if (pred.CollisionObjects.Where(x => x.IsMinion && !x.IsAlly).Count() >= min)
                    {
                        W.Cast(pred.CastPosition);
                    }
                }
                W.Collision = false;
            }

            if (laneclear.check("lr") && myhero.HasBuff("AnnieRController"))
            {
                if (myhero.GetBuff("AnnieRController").EndTime - Game.Time < 0.5f)
                {
                    return;                                                                //prevents throwing null exceptions before the end of R controller
                }
                var target = targets.OrderByDescending(x => x.Health).FirstOrDefault(x => x as AttackableUnit != Orbwalker.GetTarget());
                if (target != null)
                {
                    R.CastOnUnit(target);
                }
                Game.Print(true);
            }
        }
Пример #15
0
        private static void Farm(bool laneClear)
        {
            if (!Config["Farm"].GetValue <MenuBool>("EnabledFarm"))
            {
                return;
            }
            var allMinions    = GameObjects.Minions.Where(x => x.IsValidTarget(Q.Range + W.Width)).Cast <AIBaseClient>().ToList();
            var rangedMinions = GameObjects.Minions.Where(x => x.IsValidTarget(Q.Range + W.Width) && x.IsRanged).Cast <AIBaseClient>().ToList();

            var useQi = Config["Farm"].GetValue <MenuList>("UseQFarm").SelectedValue;
            var useWi = Config["Farm"].GetValue <MenuList>("UseWFarm").SelectedValue;
            var useEi = Config["Farm"].GetValue <MenuList>("UseWFarm").SelectedValue;

            var useQ = (laneClear && (useQi == "LaneClear" || useQi == "Both")) || (!laneClear && (useQi == "Freeze" || useQi == "Both"));
            var useW = (laneClear && (useWi == "LaneClear" || useWi == "Both")) || (!laneClear && (useWi == "Freeze" || useWi == "Both"));
            var useE = (laneClear && (useEi == "LaneClear" || useEi == "Both")) || (!laneClear && (useEi == "Freeze" || useEi == "Both"));

            if (useQ && Q.IsReady())
            {
                if (useW)
                {
                    var qLocation    = Q.GetCircularFarmLocation(allMinions, W.Range);
                    var q2Location   = Q.GetCircularFarmLocation(rangedMinions, W.Range);
                    var bestLocation = (qLocation.MinionsHit > q2Location.MinionsHit + 1) ? qLocation : q2Location;

                    if (bestLocation.MinionsHit > 0)
                    {
                        Q.Cast(bestLocation.Position, true);
                        return;
                    }
                }
                else
                {
                    foreach (var minion in allMinions.Where(m => !m.InAutoAttackRange()))
                    {
                        if (HealthPrediction.GetPrediction(minion, Math.Max((int)(minion.Position.Distance(BallManager.BallPosition) / Q.Speed * 1000) - 100, 0)) < 50)
                        {
                            Q.Cast(minion.Position, true);
                            return;
                        }
                    }
                }
            }

            if (useW && W.IsReady())
            {
                var n = 0;
                var d = 0;
                foreach (var m in allMinions)
                {
                    if (m.Distance(BallManager.BallPosition) <= W.Range)
                    {
                        n++;
                        if (W.GetDamage(m) > m.Health)
                        {
                            d++;
                        }
                    }
                }
                if (n >= 3 || d >= 2)
                {
                    W.Cast(Player.Position, true);
                    return;
                }
            }

            if (useE && E.IsReady())
            {
                if (E.GetLineFarmLocation(allMinions).MinionsHit >= 3)
                {
                    E.CastOnUnit(Player, true);
                    return;
                }
            }
        }
Пример #16
0
        protected override void SemiR()
        {
            if (RootMenu["combo"]["wflash"].GetValue <MenuKeyBind>().Active)
            {
                var target = Extensions.GetBestEnemyHeroTargetInRange(W.Range + 410);
                var Flash  = ObjectManager.Player.GetSpellSlot("SummonerFlash");
                if (W.IsReady())
                {
                    if (Flash != SpellSlot.Unknown && ObjectManager.Player.Spellbook.GetSpell(Flash).IsReady)
                    {
                        var ummm = W.GetPrediction(target);
                        Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosCenter);
                        if (target.IsValidTarget())
                        {
                            if (target.Distance(Player) > W.Range)
                            {
                                if (ObjectManager.Player.Spellbook.CastSpell(Flash, (target.Position)))
                                {
                                    W.Cast(ummm.CastPosition);
                                }
                            }
                        }
                    }
                }
            }

            if (RootMenu["combo"]["engage"].GetValue <MenuKeyBind>().Active)
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosCenter);
                var target = Extensions.GetBestEnemyHeroTargetInRange(E.Range + W.Range);

                if (!target.IsValidTarget())
                {
                    return;
                }

                foreach (var en in ObjectManager.Get <AIBaseClient>())
                {
                    if (!en.IsDead)
                    {
                        if (en.Distance(Player) < E.Range + W.Range && en.IsAlly && !en.IsMe)
                        {
                            if (target != null && target.Distance(en) <= 580)
                            {
                                if (en.Distance(Player) < E.Range)
                                {
                                    if (E.Mana + W.Mana < Player.Mana)
                                    {
                                        if (en != null && delayyyyyyyyy <= Variables.TickCount)
                                        {
                                            E.CastOnUnit(en);
                                        }
                                        if (Player.HasBuff("rakanerecast"))
                                        {
                                            if (target.IsValidTarget(W.Range))
                                            {
                                                var pred = W.GetPrediction(target);
                                                if (pred.Hitchance >= HitChance.High)
                                                {
                                                    W.Cast(pred.CastPosition, true);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            var bestAllies = GameObjects.AllyHeroes
                             .Where(t =>
                                    t.Distance(ObjectManager.Player) < SupportAIO.Common.Champion.E.Range)
                             .OrderBy(o => o.Health);

            foreach (var ally in bestAllies)
            {
                if (E.IsReady() &&
                    ally.IsValidTarget(E.Range) &&
                    ally.CountEnemyHeroesInRange(800f) > 0 &&
                    HealthPrediction.GetPrediction(ally, 250 + Game.Ping) <=
                    ally.MaxHealth / 4)
                {
                    E.CastOnUnit(ally);
                }
            }
            if (RootMenu["flee"]["key"].GetValue <MenuKeyBind>().Active)
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosCenter);
                if (RootMenu["flee"]["user"])
                {
                    R.Cast();
                }
                if (RootMenu["flee"]["usee"])
                {
                    foreach (var en in ObjectManager.Get <AIBaseClient>())
                    {
                        if (!en.IsDead)
                        {
                            if (en.Distance(Game.CursorPosCenter) < 200 && en.IsAlly && !en.IsMe &&
                                en.Distance(Player) <= E.Range)
                            {
                                E.CastOnUnit(en);
                            }
                        }
                    }
                }
            }
        }
Пример #17
0
        private void Combo()
        {
            AIHeroClient target = TargetSelector.GetTarget(1100);

            if (target == null || target.IsInvulnerable || target.IsMagicalImmune == 1)
            {
                return;
            }
            //if (config.Item("useItems"))
            //{
            //    ItemHandler.UseItems(target, config, ComboDamage(target));
            //}
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config["csettings"].GetValue <MenuBool>("useIgnite") && ignitedmg > target.Health && hasIgnite &&
                !DaoHungAIO.Helpers.Extensions.CheckCriticalBuffs(target) &&
                ((target.Distance(player) > player.GetRealAutoAttackRange() &&
                  (!Q.IsReady() || Q.Mana < player.Mana)) || player.HealthPercent < 35))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.CanCast(target))
            {
                if (config["csettings"].GetValue <MenuBool>("useqLimit"))
                {
                    if (player.CountEnemyHeroesInRange(Q.Range) == 1 && config["csettings"].GetValue <MenuBool>("useq") &&
                        (target.Distance(player) > player.GetRealAutoAttackRange() ||
                         (Q.GetDamage(target) > target.Health) &&
                         (player.HealthPercent < 50 || player.CountAllyHeroesInRange(900) > 0)))
                    {
                        if (Q.CastOnUnit(target))
                        {
                            HandleECombo();
                        }
                    }
                    if ((player.CountEnemyHeroesInRange(Q.Range) > 1 && config["csettings"].GetValue <MenuBool>("useqSec") &&
                         Q.GetDamage(target) > target.Health) || player.HealthPercent <35f ||
                                                                                       target.Distance(player)> player.GetRealAutoAttackRange())
                    {
                        if (Q.CastOnUnit(target))
                        {
                            HandleECombo();
                        }
                    }
                }
                else
                {
                    if (Q.CastOnUnit(target))
                    {
                        HandleECombo();
                    }
                }
            }
            if (R.IsReady() && config["csettings"].GetValue <MenuBool>("user"))
            {
                if (player.CountEnemyHeroesInRange(Q.Range) >= config["csettings"].GetValue <MenuSlider>("userMin").Value)
                {
                    R.Cast();
                }
                //if (config["csettings"].GetValue<MenuBool>("userDmg") &&
                //    HealthPrediction.GetPrediction(player, 100, 70, HealthPrediction.HealthPredictionType.Simulated)  <= player.Health * 0.3f &&
                //    player.Distance(target) < 450f)
                //{
                //    R.Cast();
                //}
            }
            if (config["csettings"].GetValue <MenuBool>("useeAA") && !Eactive &&
                HealthPrediction.GetPrediction(player, 100, 70, HealthPrediction.HealthPredictionType.Simulated) < player.Health - target.GetAutoAttackDamage(player))
            {
                E.Cast();
            }
            if (Eactive)
            {
                if (E.IsReady() && target.IsValidTarget() && target.IsMagicalImmune != 1 &&
                    ((Prediction.GetFastUnitPosition(target, 0.1f).Distance(player.Position) >
                      player.GetRealAutoAttackRange() && target.Distance(player.Position) <= E.Range) ||
                     config["csettings"].GetValue <MenuBool>("useeStun")))
                {
                    E.Cast();
                }
            }
            else
            {
                if (config["csettings"].GetValue <MenuBool>("useeStun") &&
                    Prediction.GetFastUnitPosition(target, 0.1f).Distance(player.Position) <
                    player.GetRealAutoAttackRange() && player.Distance(player.Position) <= E.Range)
                {
                    E.Cast();
                }
            }
        }
Пример #18
0
        static void Clear()
        {
            var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q1.Range) && x.IsMinion());

            var mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q1.Range));

            var lMobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q1.Range) && x.GetJungleType() == JungleType.Legendary);

            var bMobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q1.Range) && x.GetJungleType() == JungleType.Large);

            IEnumerable <AIMinionClient> targets;

            if (minions.Any())
            {
                targets = minions;
            }
            else if (lMobs.Any())
            {
                targets = lMobs;
            }
            else if (bMobs.Any())
            {
                targets = bMobs;
            }
            else
            {
                targets = mobs;
            }

            if (targets.Any())
            {
                if (laneclear.check("LQ") && Q1.IsReady() && !(laneclear.check("LQCLOSE") && !targets.Any(x => x.DistanceToPlayer() < 350)))
                {
                    foreach (var minion in targets)
                    {
                        SpellPrediction.PredictionOutput pred = null;

                        if (minion.DistanceToPlayer() < Q2.Range)
                        {
                            if (HealthPrediction.GetPrediction(minion, 250) < 5)
                            {
                                continue;
                            }

                            pred = Q2.GetPrediction(minion, true);
                            Q2.Cast(pred.CastPosition);
                        }
                        else
                        {
                            if (HealthPrediction.GetPrediction(minion, minion.qtt(Q1.Speed, 250)) < 5)
                            {
                                continue;
                            }

                            pred = Q2.GetPrediction(minion);
                            Q1.Cast(pred.CastPosition);
                        }
                    }
                }

                if (laneclear.check("LW") && W.IsReady() && targets.Count(x => x.DistanceToPlayer() < W.Range) > slider(laneclear, "LWMIN"))
                {
                    W.Cast();
                }

                if (laneclear.check("LE") && E.IsReady() && targets.Where(x => x.DistanceToPlayer() < E.Range).Count() > slider(laneclear, "LEMIN"))
                {
                    foreach (var minion in targets)
                    {
                        if (myhero.Position.Extend(minion.Position, E.Range + 400f).IsUnderEnemyTurret())
                        {
                            continue;
                        }
                        var pred = E.GetPrediction(minion, false, -1, CollisionObjects.Minions);

                        if (pred.CollisionObjects.Count() > slider(laneclear, "LEMIN"))
                        {
                            E.Cast(minion);
                        }
                    }
                }
            }
        }
Пример #19
0
        private void afterAttack(AttackableUnit unit, AttackableUnit target)
        {
            var q = Config[Player.CharacterName]["QConfig"] as Menu;
            var t = target as AIHeroClient;

            if (t != null)
            {
                if (Config[Player.CharacterName]["EConfig"].GetValue <MenuBool>("Eks").Enabled)
                {
                    var incomingDMG = OktwCommon.GetIncomingDamage(t, 0.3f, false);
                    if (incomingDMG > t.Health)
                    {
                        return;
                    }

                    var dmgE = E.GetDamage(t) + incomingDMG;

                    if (GetWStacks(t) == 1)
                    {
                        dmgE += Wdmg(t);
                    }

                    if (dmgE > t.Health)
                    {
                        E.Cast(t);
                    }
                }

                if (Q.IsReady() && !None && Config[Player.CharacterName]["QConfig"].GetValue <MenuBool>("autoQ").Enabled&& (GetWStacks(t) == q.GetValue <MenuSlider>("Qstack").Value - 1 || Player.HasBuff("vayneinquisition")))
                {
                    var dashPos = Dash.CastDash(true);
                    if (!dashPos.IsZero)
                    {
                        Q.Cast(dashPos);
                    }
                }
            }

            var m = target as AIMinionClient;

            if (m != null && Q.IsReady() && LaneClear && Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQ").Enabled)
            {
                var dashPosition = Player.Position.Extend(Game.CursorPos, Q.Range);
                if (!Dash.IsGoodPosition(dashPosition))
                {
                    return;
                }

                if (Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQjungle").Enabled&& m.Team == GameObjectTeam.Neutral)
                {
                    Q.Cast(dashPosition, true);
                }

                if (Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQ").Enabled)
                {
                    foreach (var minion in Cache.GetMinions(dashPosition, 0).Where(minion => m.NetworkId != minion.NetworkId))
                    {
                        var time       = (int)(Player.AttackCastDelay * 1000) + Game.Ping / 2 + 1000 * (int)Math.Max(0, Player.Distance(minion) - Player.BoundingRadius) / (int)Player.BasicAttack.MissileSpeed;
                        var predHealth = HealthPrediction.GetPrediction(minion, time);
                        if (predHealth < Player.GetAutoAttackDamage(minion) + Q.GetDamage(minion) && predHealth > 0)
                        {
                            Q.Cast(dashPosition, true);
                        }
                    }
                }
            }
        }