Esempio n. 1
0
        void JungleClear(AttackableUnit target)
        {
            var tg = target as Obj_AI_Minion;

            if (tg != null && !HasPassive && Orbwalker.CanMove())
            {
                if (tg.IsHPBarRendered && tg.CharData.BaseSkinName.Contains("SRU") &&
                    !tg.CharData.BaseSkinName.Contains("Mini"))
                {
                    if (EJg && E.IsReady())
                    {
                        var pos = Deviate(ObjectManager.Player.Position.ToVector2(), tg.Position.ToVector2(), this.GetHugAngle())
                                  .ToVector3();
                        if (pos.IsUnderEnemyTurret() && !ObjectManager.Player.IsUnderEnemyTurret())
                        {
                            return;
                        }
                        E.Cast(pos);
                        return;
                    }
                    if (QJg && Q.IsReady())
                    {
                        Q.Cast(tg);
                        return;
                    }
                    if (WJg && W.IsReady())
                    {
                        var pred = W.GetPrediction(tg);
                        W.Cast(pred.UnitPosition);
                        return;
                    }
                }
            }
        }
Esempio n. 2
0
        public override void OnUpdate(EventArgs args)
        {
            base.OnUpdate(args);

            if (E.IsReady())
            {
                this.ELogic();
            }
            if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Q.IsReady() && Orbwalker.CanMove())
            {
                foreach (var enemy in ValidTargets.Where(e => e.Distance(ObjectManager.Player) < 900))
                {
                    var pred = Q.GetPrediction(enemy);
                    if (pred.Hitchance >= HitChance.High && !pred.CollisionObjects.Any())
                    {
                        Q.Cast(pred.UnitPosition);
                    }
                }
            }

            #region Orbwalk On Minions
            if (OrbwalkOnMinions && Orbwalker.ActiveMode == OrbwalkingMode.Combo && ValidTargets.Count(e => e.InAutoAttackRange()) == 0 && ObjectManager.Player.InventoryItems.Any(i => (int)i.IData.Id == 3085))
            {
                var minion =
                    GameObjects.EnemyMinions.Where(m => m.InAutoAttackRange()).OrderBy(m => m.Health).FirstOrDefault();
                if (minion != null)
                {
                    ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
                }
            }
            #endregion Orbwalk On Minions
        }
Esempio n. 3
0
        private static void Clear()
        {
            var targetW  = GameObjects.GetMinions(Player.Position, WRange() + 100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
            var targetW2 = GameObjects.Jungle.Where(x => x.IsValidTarget(WRange() + 100)).OrderBy(x => x.MaxHealth).ToList <AIBaseClient>().FirstOrDefault();

            if (targetW != null && InWRange(targetW) && W.IsReady() && Orbwalker.CanMove() && UseWClear)
            {
                W.Cast();
                return;
            }
            if (targetW2 != null && InWRange(targetW2) && W.IsReady() && Orbwalker.CanMove() && UseWClear)
            {
                W.Cast();
                return;
            }
            if (targetW != null && InWRange(targetW) && E.IsReady() && Orbwalker.CanMove() && UseEClear)
            {
                E.Cast(targetW.Position);
                return;
            }
            if (targetW2 != null && InWRange(targetW2) && E.IsReady() && Orbwalker.CanMove() && UseEClear)
            {
                E.Cast(targetW2.Position);
                return;
            }
        }
Esempio n. 4
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);
                    //    }
                    //}
                }
            }
        }
        private static void Clear()
        {
            var targetW  = MinionManager.GetMinions(Player.Position, WRange() + 100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health).FirstOrDefault();
            var targetW2 = MinionManager.GetMinions(Player.Position, WRange() + 100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault();

            if (targetW != null && InWRange(targetW) && W.IsReady() && Orbwalker.CanMove() && UseWClear)
            {
                W.Cast();
                return;
            }
            if (targetW2 != null && InWRange(targetW2) && W.IsReady() && Orbwalker.CanMove() && UseWClear)
            {
                W.Cast();
                return;
            }
            if (targetW != null && InWRange(targetW) && E.IsReady() && Orbwalker.CanMove() && UseEClear)
            {
                E.Cast(targetW.Position);
                return;
            }
            if (targetW2 != null && InWRange(targetW2) && E.IsReady() && Orbwalker.CanMove() && UseEClear)
            {
                E.Cast(targetW2.Position);
                return;
            }
        }
Esempio n. 6
0
        private static void ForcusAttack(Obj_AI_Hero target)
        {
            if (Me.IsDashing() || Me.SpellBook.IsCastingSpell || Me.SpellBook.IsAutoAttacking ||
                !Orbwalker.CanMove() || target.IsValidAutoRange() && Orbwalker.CanAttack())
            {
                return;
            }

            if (Q.Ready || Game.TickCount - lastMoveChangedTime < 650 + Game.Ping || Game.TickCount - lastQTime < 650 + Game.Ping)
            {
                return;
            }

            var pos = MyPassiveManager.OrbwalkerPosition(target);
            //var path = Me.GetPath(pos);
            var orbwalkerPos = pos;//path.Length < 3 ? pos : path.Skip(path.Length / 2).FirstOrDefault();

            if (!orbwalkerPos.IsZero)
            {
                OrbwalkerPoint = orbwalkerPos;
                Orbwalker.ForceTarget(target);
                lastMoveChangedTime = Game.TickCount;
            }
            else
            {
                OrbwalkerPoint = Game.CursorPos;
            }
        }
Esempio n. 7
0
        private void Clear()
        {
            float perc = config["Lcsettings"].GetValue <MenuSlider>("minmana").Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            if (Q.IsReady() && config["Lcsettings"].GetValue <MenuBool>("useqLC"))
            {
                var minions =
                    GameObjects.Enemy.Where(m => (m.IsMinion || m.IsMonster) && Q.CanCast(m) && (Q.GetDamage(m) > m.Health || m.Health > player.GetAutoAttackDamage(m) * 5))
                    .OrderByDescending(m => Q.GetDamage(m) > m.Health)
                    .ThenBy(m => m.Distance(player));
                foreach (var mini in minions)
                {
                    if (!Orbwalker.CanAttack() && mini.Distance(player) <= player.GetRealAutoAttackRange())
                    {
                        Q.CastOnUnit(mini);
                        return;
                    }
                    if (Orbwalker.CanMove() && !player.IsWindingUp &&
                        mini.Distance(player) > player.GetRealAutoAttackRange())
                    {
                        Q.CastOnUnit(mini);
                        return;
                    }
                }
            }
        }
Esempio n. 8
0
        private void Farm()
        {
            if (!Orbwalker.CanMove())
            {
                return;
            }

            List <AIBaseClient> allMinionsQ = GameObjects.GetMinions(Player.Position, Q.Range,
                                                                     MinionTypes.All, MinionTeam.Enemy);
            List <AIBaseClient> allMinionsE = GameObjects.GetMinions(Player.Position, E.Range,
                                                                     MinionTypes.All, MinionTeam.Enemy);

            var useQ = menu.Item("UseQFarm").GetValue <MenuBool>();
            var useE = menu.Item("UseEFarm").GetValue <MenuBool>();

            if (useQ && allMinionsQ.Count > 0)
            {
                Q.Cast(allMinionsQ[0]);
            }

            if (useE && allMinionsE.Count > 0)
            {
                E.Cast(allMinionsE[0]);
            }
        }
Esempio n. 9
0
 public static bool CanHarras()
 {
     if (!Player.IsWindingUp && !Player.IsUnderEnemyTurret() && Orbwalker.CanMove())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 10
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (LagFree(0))
            {
                SetMana();
                Jungle();
            }

            if (LagFree(1) && (R.IsReady() || IsCastingR) && Config["RConfig"].GetValue <MenuBool>("autoR"))
            {
                LogicR();
            }
            //Chat.Print(")
            //Chat.Print(R.Instance.Name);
            //Chat.Print(R.Instance.SData.Name);
            //Chat.Print(R.Name);
            if (Config["RConfig"].GetValue <MenuKeyBind>("useR").Active)
            {
                Orbwalker.MovementState = false;
                Orbwalker.AttackState   = false;
                return;
            }
            else
            {
                Orbwalker.MovementState = true;
                Orbwalker.AttackState   = true;
            }


            if (LagFree(4) && E.IsReady() && Orbwalker.CanMove())
            {
                LogicE();
            }

            if (LagFree(2) && Q.IsReady() && Config["QConfig"].GetValue <MenuBool>("autoQ"))
            {
                LogicQ();
            }

            if (LagFree(3) && W.IsReady() && !Player.Spellbook.IsAutoAttack && Config["WConfig"].GetValue <MenuBool>("autoW"))
            {
                LogicW();
            }

            Combo     = Orbwalker.ActiveMode == OrbwalkerMode.Combo;
            Farm      = (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear) || Orbwalker.ActiveMode == OrbwalkerMode.Harass;
            None      = Orbwalker.ActiveMode == OrbwalkerMode.None;
            LaneClear = Orbwalker.ActiveMode == OrbwalkerMode.LaneClear;
            tickIndex++;
            if (tickIndex > 4)
            {
                tickIndex = 0;
            }
        }
Esempio n. 11
0
        public static void slayMaderDuker(AIBaseClient target)
        {
            try
            {
                if (target == null)
                {
                    return;
                }
                if (MasterSharp.Config.Item("useSmite").GetValue <MenuBool>())
                {
                    useSmiteOnTarget(target);
                }

                if (target.Distance(player) < 500)
                {
                    sumItems.cast(SummonerItems.ItemIds.Ghostblade);
                }
                if (target.Distance(player) < 300)
                {
                    sumItems.cast(SummonerItems.ItemIds.Hydra);
                }
                if (target.Distance(player) < 300)
                {
                    sumItems.cast(SummonerItems.ItemIds.Tiamat);
                }
                if (target.Distance(player) < 300)
                {
                    sumItems.cast(SummonerItems.ItemIds.Cutlass, target);
                }
                if (target.Distance(player) < 500 && (player.Health / player.MaxHealth) * 100 < 85)
                {
                    sumItems.cast(SummonerItems.ItemIds.BotRK, target);
                }

                if (MasterSharp.Config.Item("useQ").GetValue <MenuBool>() && (Orbwalker.CanMove() || Q.IsKillable(target)))
                {
                    useQSmart(target);
                }
                if (MasterSharp.Config.Item("useE").GetValue <MenuBool>())
                {
                    useESmart(target);
                }
                if (MasterSharp.Config.Item("useR").GetValue <MenuBool>())
                {
                    useRSmart(target);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Esempio n. 12
0
        private void Harass()
        {
            AIHeroClient target = TargetSelector.GetTarget(1100);
            float        perc   = config["Hsettings"].GetValue <MenuSlider>("minmanaH").Value / 100f;

            if (player.Mana < player.MaxMana * perc || target == null)
            {
                return;
            }
            if (config["Hsettings"].GetValue <MenuBool>("useqH") && Orbwalker.CanMove() && !player.IsWindingUp &&
                Q.CanCast(target))
            {
                Q.CastOnUnit(target);
            }
        }
Esempio n. 13
0
        private void LogicW()
        {
            if (Player.Mana > RMANA + WMANA)
            {
                var w = Config[Player.CharacterName]["WConfig"];

                if (w.GetValue <MenuBool>("autoW").Enabled)
                {
                    foreach (var enemy in GameObjects.EnemyHeroes.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy) && !enemy.HasBuff("caitlynyordletrapinternal")))
                    {
                        W.Cast(enemy);
                    }
                }

                if (w.GetValue <MenuBool>("telE").Enabled)
                {
                    var trapPos = OktwCommon.GetTrapPos(W.Range);
                    if (!trapPos.IsZero)
                    {
                        W.Cast(trapPos);
                    }
                }

                if (!Orbwalker.CanMove(40, false))
                {
                    return;
                }

                if ((int)(Game.Time * 10) % 2 == 0 && w.GetValue <MenuBool>("bushW2").Enabled)
                {
                    if (Player.Spellbook.GetSpell(SpellSlot.W).Ammo == new int[] { 0, 3, 3, 4, 4, 5 }[W.Level] && Player.CountEnemyHeroesInRange(1000) == 0)
                    {
                        var points = OktwCommon.CirclePoints(8, W.Range, Player.Position);
                        foreach (var point in points)
                        {
                            if (NavMesh.IsWallOfGrass(point, 0) || point.IsUnderEnemyTurret())
                            {
                                if (!OktwCommon.CirclePoints(8, 150, point).Any(x => x.IsWall()))
                                {
                                    W.Cast(point);
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 14
0
        public static void Orbwalk(AttackableUnit target = null, Vector3?position = null)
        {
            if (Orbwalker.CanAttack() && Orbwalker.AttackState)
            {
                var gTarget = target ?? Orbwalker.GetTarget();
                if (gTarget.InAutoAttackRange())
                {
                    Orbwalker.Attack(gTarget);
                }
            }

            if (Orbwalker.CanMove() && Orbwalker.MovementState)
            {
                Orbwalker.Move(position.HasValue && position.Value.IsValid() ? position.Value : Game.CursorPos);
            }
        }
Esempio n. 15
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (Player.IsRecalling())
            {
                return;
            }

            if (Config[Player.CharacterName]["RConfig"].GetValue <MenuKeyBind>("useR").Active&& R.IsReady())
            {
                var t = TargetSelector.GetTarget(R.Range);
                if (t.IsValidTarget())
                {
                    R.CastOnUnit(t);
                }
            }

            if (LagFree(0))
            {
                SetMana();
                R.Range = (500 * R.Level) + 1500;
            }

            var orbT = Orbwalker.GetTarget() as AIHeroClient;

            if (orbT != null && orbT.Health - OktwCommon.GetIncomingDamage(orbT) < Player.GetAutoAttackDamage(orbT) * 2)
            {
                return;
            }

            if (LagFree(1) && E.IsReady() && Orbwalker.CanMove(40, false))
            {
                LogicE();
            }
            if (LagFree(2) && W.IsReady() && Orbwalker.CanMove(40, false))
            {
                LogicW();
            }
            if (LagFree(3) && Q.IsReady() && Orbwalker.CanMove(40, false) && Config[Player.CharacterName]["QConfig"].GetValue <MenuBool>("autoQ2").Enabled)
            {
                LogicQ();
            }
            if (LagFree(4) && R.IsReady() && Config[Player.CharacterName]["RConfig"].GetValue <MenuBool>("autoR").Enabled&& !Player.IsUnderEnemyTurret() && Game.Time - QCastTime > 1)
            {
                LogicR();
            }
        }
Esempio n. 16
0
        private void LastHit()
        {
            if (!Orbwalker.CanMove())
            {
                return;
            }

            List <AIBaseClient> allMinionsE = GameObjects.GetMinions(Player.Position, E.Range,
                                                                     MinionTypes.All, MinionTeam.Enemy);

            if (allMinionsE.Count > 0 && E.IsReady())
            {
                foreach (var minion in allMinionsE)
                {
                    if (E.IsKillable(minion))
                    {
                        E.Cast(minion);
                    }
                }
            }
        }
Esempio n. 17
0
 public static void fastharass()
 {
     if (W.IsReady() && Orbwalker.CanMove())
     {
         var targets = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget() && !x.IsZombie && InWRange(x));
         if (targets.Any())
         {
             W.Cast();
             return;
         }
     }
     if (E.IsReady() && Orbwalker.CanMove())
     {
         var target = TargetSelector.GetTarget(325 + Player.AttackRange + 70);
         if (target.IsValidTarget() && !target.IsZombie)
         {
             E.Cast(target.Position);
             return;
         }
     }
 }
Esempio n. 18
0
        private static void Farm()
        {
            if (!Orbwalker.CanMove())
            {
                return;
            }

            var rangedMinionsE = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(E.Range + E.Width) && m.IsRanged).Cast <AIBaseClient>().ToList();
            var allMinionsW    = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(W.Range)).Cast <AIBaseClient>().ToList();

            var useQ = Config["Farm"].GetValue <MenuBool>("UseQFarm");
            var useW = Config["Farm"].GetValue <MenuBool>("UseWFarm");
            var useE = Config["Farm"].GetValue <MenuBool>("UseEFarm");


            if (useQ && allMinionsW.Count > 0 && Q.Instance.ToggleState == 0 && Q.IsReady())
            {
                Q.Cast(allMinionsW[0]);
            }

            if (useW && W.IsReady())
            {
                var wPos = W.GetLineFarmLocation(allMinionsW);
                if (wPos.MinionsHit >= 3)
                {
                    W.Cast(wPos.Position);
                }
            }

            if (useE && E.IsReady())
            {
                var ePos = E.GetCircularFarmLocation(rangedMinionsE);
                if (ePos.MinionsHit >= 3)
                {
                    E.Cast(ePos.Position);
                }
            }
        }
Esempio n. 19
0
        private static void Combo()
        {
            AIHeroClient target = TargetSelector.GetTarget(E.Range, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (GameObjects.Player.HealthPercent < mainMenu["Combo"].GetValue <MenuSlider>("wBelow").Value&& mainMenu["Combo"].GetValue <MenuBool>("Wuse").Enabled &&
                GameObjects.Player.CountEnemyHeroesInRange(500) > 0)
            {
                W.Cast();
            }
            //if (R.IsReady()&& mainMenu["Combo"].GetValue<MenuBool>("Ruse").Enabled)
            //{
            //    var Rtarget =
            //        GameObjects.EnemyHeroes.FirstOrDefault(e => e.HealthPercent < 50 && e.CountAllyHeroesInRange(660) > 0);
            //    if (Rtarget != null)
            //    {
            //        R.CastIfWillHit(Rtarget, 2);
            //    }
            //}
            var barrels =
                GetBarrels()
                .Where(
                    o =>
                    o.IsValid && !o.IsDead && o.Distance(GameObjects.Player) < 1600 && o.SkinName == "GangplankBarrel" &&
                    o.GetBuff("gangplankebarrellife").Caster.IsMe)
                .ToList();

            if (Q.IsReady() &&
                E.IsReady())
            {
                var Qbarrels = GetBarrels().Where(o => o.Distance(GameObjects.Player) < Q.Range && KillableBarrel(o));
                foreach (var Qbarrel in Qbarrels)
                {
                    if (Qbarrel.Distance(target) < BarrelExplosionRange)
                    {
                        continue;
                    }
                    var point =
                        GetBarrelPoints(Qbarrel.Position)
                        .Where(
                            p =>
                            p.IsValid() && !p.IsWall() && p.Distance(GameObjects.Player.Position) < E.Range &&
                            p.Distance(Prediction.GetPrediction(target, GetQTime(Qbarrel)).UnitPosition) <
                            BarrelExplosionRange && savedBarrels.Count(b => b.barrel.Position.Distance(p) < BarrelExplosionRange) < 1)
                        .OrderBy(p => p.Distance(target.Position))
                        .FirstOrDefault();
                    if (point != null && !justE)
                    {
                        E.Cast(point);
                        DelayAction.Add(1, () => Q.CastOnUnit(Qbarrel));
                        return;
                    }
                }
            }

            var minBarrel = mainMenu["Combo"].GetValue <MenuSlider>("minBarrel").Value;

            if (E.IsReady() && GameObjects.Player.Distance(target) < E.Range &&
                target.Health > Q.GetDamage(target) + GameObjects.Player.GetAutoAttackDamage(target) && Orbwalker.CanMove() &&
                minBarrel < E.Instance.Ammo)
            {
                CastE(target, barrels);
            }


            var meleeRangeBarrel =
                barrels.FirstOrDefault(
                    b =>
                    b.Health < 2 && b.Distance(GameObjects.Player) < GameObjects.Player.GetRealAutoAttackRange(b) &&
                    b.CountEnemyHeroesInRange(BarrelExplosionRange) > 0);

            if (meleeRangeBarrel != null)
            {
                Orbwalker.ForceTarget = meleeRangeBarrel;
            }
            if (Q.IsReady())
            {
                if (barrels.Any())
                {
                    var detoneateTargetBarrels = barrels.Where(b => b.Distance(GameObjects.Player) < Q.Range);

                    if (detoneateTargetBarrels.Any())
                    {
                        foreach (var detoneateTargetBarrel in detoneateTargetBarrels)
                        {
                            if (!KillableBarrel(detoneateTargetBarrel))
                            {
                                continue;
                            }
                            if (
                                detoneateTargetBarrel.Distance(
                                    Prediction.GetPrediction(target, GetQTime(detoneateTargetBarrel)).UnitPosition) <
                                BarrelExplosionRange &&
                                target.Distance(detoneateTargetBarrel.Position) < BarrelExplosionRange)
                            {
                                Q.CastOnUnit(detoneateTargetBarrel);
                                return;
                            }
                            var detoneateTargetBarrelSeconds =
                                barrels.Where(b => b.Distance(detoneateTargetBarrel) < BarrelConnectionRange);
                            if (detoneateTargetBarrelSeconds.Any())
                            {
                                foreach (var detoneateTargetBarrelSecond in detoneateTargetBarrelSeconds)
                                {
                                    if (
                                        detoneateTargetBarrelSecond.Distance(
                                            Prediction.GetPrediction(
                                                target, GetQTime(detoneateTargetBarrel) + 0.15f).UnitPosition) <
                                        BarrelExplosionRange &&
                                        target.Distance(detoneateTargetBarrelSecond.Position) < BarrelExplosionRange)
                                    {
                                        Q.CastOnUnit(detoneateTargetBarrel);
                                        return;
                                    }
                                }
                            }
                        }
                    }

                    if (2 > 1)
                    {
                        var enemies =
                            GameObjects.EnemyHeroes.Where(e => e.IsValidTarget() && e.Distance(GameObjects.Player) < 600)
                            .Select(e => Prediction.GetPrediction(e, 0.25f));
                        var enemies2 =
                            GameObjects.EnemyHeroes.Where(e => e.IsValidTarget() && e.Distance(GameObjects.Player) < 600)
                            .Select(e => Prediction.GetPrediction(e, 0.35f));
                        if (detoneateTargetBarrels.Any())
                        {
                            foreach (var detoneateTargetBarrel in detoneateTargetBarrels)
                            {
                                if (!KillableBarrel(detoneateTargetBarrel))
                                {
                                    continue;
                                }
                                var enemyCount =
                                    enemies.Count(
                                        e =>
                                        e.UnitPosition.Distance(detoneateTargetBarrel.Position) <
                                        BarrelExplosionRange);
                                if (enemyCount >= 1 &&
                                    detoneateTargetBarrel.CountEnemyHeroesInRange(BarrelExplosionRange) >=
                                    1)
                                {
                                    Q.CastOnUnit(detoneateTargetBarrel);
                                    return;
                                }
                                var detoneateTargetBarrelSeconds =
                                    barrels.Where(b => b.Distance(detoneateTargetBarrel) < BarrelConnectionRange);
                                if (detoneateTargetBarrelSeconds.Any())
                                {
                                    foreach (var detoneateTargetBarrelSecond in detoneateTargetBarrelSeconds)
                                    {
                                        if (enemyCount +
                                            enemies2.Count(
                                                e =>
                                                e.UnitPosition.Distance(detoneateTargetBarrelSecond.Position) <
                                                BarrelExplosionRange) >=
                                            1 &&
                                            detoneateTargetBarrelSecond.CountEnemyHeroesInRange(BarrelExplosionRange) >=
                                            1)
                                        {
                                            Q.CastOnUnit(
                                                detoneateTargetBarrel);
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                if (Q.CanCast(target))
                {
                    CastQonHero(target, barrels);
                }
            }
        }
Esempio n. 20
0
        private void Combo()
        {
            AIHeroClient target = getTarget();

            if (target == null)
            {
                return;
            }
            if (config["Combo"].GetValue <MenuBool>("usee") && player.HasBuff("KennenLightningRush") &&
                player.Health > target.Health && !target.IsUnderEnemyTurret() && target.Distance(Game.CursorPos) < 250f)
            {
                Orbwalker.MovementState = false;
                player.IssueOrder(GameObjectOrder.MoveTo, target);
            }
            bool hasIgnite   = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  combodamage = ComboDamage(target);
            var  ignitedmg   = (float)player.GetSummonerSpellDamage(target, SummonerSpell.Ignite);

            if (config["Combo"].GetValue <MenuBool>("useIgnite") && ignitedmg > target.Health && hasIgnite &&
                !Q.CanCast(target) && !W.IsReady())
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }

            if (config["Combo"].GetValue <MenuBool>("useq") && Q.CanCast(target) && Orbwalker.CanMove() &&
                !target.IsDashing())
            {
                if (Program.IsSPrediction)
                {
                    Q.SPredictionCast(target, HitChance.High);
                }
                else
                {
                    Q.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
            if (config["Combo"].GetValue <MenuBool>("usew") && W.IsReady())
            {
                if (player.HasBuff("KennenShurikenStorm"))
                {
                    if (GameObjects.EnemyHeroes.Count(e => e.Distance(player) < R.Range && MarkOfStorm(e) > 0) ==
                        player.CountEnemyHeroesInRange(R.Range))
                    {
                        W.Cast();
                    }
                }
                else if (W.Range > player.Distance(target) && MarkOfStorm(target) > 0)
                {
                    W.Cast();
                }
            }
            if (config["Combo"].GetValue <MenuBool>("usee") && !target.IsUnderEnemyTurret() && E.IsReady() &&
                (player.Distance(target) < 80 ||
                 (!player.HasBuff("KennenLightningRush") && !Q.CanCast(target) &&
                  config["Combo"].GetValue <MenuSlider>("useemin").Value < player.Health / player.MaxHealth * 100 &&
                  MarkOfStorm(target) > 0)))
            {
                E.Cast();
            }

            if (R.IsReady() && !player.HasBuffOfType(BuffType.Snare) &&
                (config["Combo"].GetValue <MenuSlider>("user").Value <=
                 player.CountEnemyHeroesInRange(config["Combo"].GetValue <MenuSlider>("userrange").Value) ||
                 (config["Combo"].GetValue <MenuBool>("usertarget") &&
                  player.CountEnemyHeroesInRange(config["Combo"].GetValue <MenuSlider>("userrange").Value) == 1 &&
                  combodamage + player.GetAutoAttackDamage(target) * 3 > target.Health && !Q.CanCast(target) &&
                  player.Distance(target) < config["Combo"].GetValue <MenuSlider>("userrange").Value)) ||
                (config["Combo"].GetValue <MenuSlider>("userLow").Value <=
                 GameObjects.EnemyHeroes.Count(
                     e =>
                     e.IsValidTarget(config["Combo"].GetValue <MenuSlider>("userrange").Value) &&
                     e.HealthPercent < 75)))
            {
                R.Cast();
            }
        }
Esempio n. 21
0
 private static void Combo()
 {
     if (Q.IsReady() && Orbwalker.CanMove() && QGap && !Player.IsDashing())
     {
         var target = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget()).OrderByDescending(x => 1 - x.Distance(Player.Position)).FirstOrDefault();
         if (!Player.IsDashing() && Variables.GameTimeTickCount - cQ >= 1000 && target.IsValidTarget())
         {
             if (Prediction.GetFastUnitPosition(Player, 100).Distance(target.Position) <= Player.Distance(target.Position))
             {
                 Q.Cast(Game.CursorPosRaw);
             }
             return;
         }
     }
     if (W.IsReady() && Orbwalker.CanMove())
     {
         var targets = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget() && !x.IsZombie && InWRange(x));
         if (targets.Any())
         {
             W.Cast();
             return;
         }
     }
     if (E.IsReady() && Orbwalker.CanMove() && Ecombo)
     {
         var target = TargetSelector.GetTarget(325 + Player.AttackRange + 70);
         if (target.IsValidTarget() && !target.IsZombie)
         {
             E.Cast(target.Position);
             return;
         }
     }
     if (R.IsReady())
     {
         if (R.Instance.Name == R1name)
         {
             if (Rcomboalways)
             {
                 var target = TargetSelector.GetTarget(325 + Player.AttackRange + 70);
                 if (target.IsValidTarget() && !target.IsZombie && E.IsReady())
                 {
                     R.Cast();
                     return;
                 }
                 else
                 {
                     var targetR = TargetSelector.GetTarget(200 + Player.BoundingRadius + 70);
                     if (targetR.IsValidTarget() && !targetR.IsZombie)
                     {
                         R.Cast();
                         return;
                     }
                 }
             }
             if (RcomboKillable)
             {
                 var targetR = TargetSelector.GetTarget(200 + Player.BoundingRadius + 70);
                 if (targetR.IsValidTarget() && !targetR.IsZombie && basicdmg(targetR) <= targetR.Health && totaldame(targetR) >= targetR.Health)
                 {
                     R.Cast();
                     return;
                 }
                 if (targetR.IsValidTarget() && !targetR.IsZombie && Player.CountEnemyHeroesInRange(800) >= 2)
                 {
                     R.Cast();
                     return;
                 }
             }
         }
         else if (R.Instance.Name == R2name)
         {
             if (R2comboKS)
             {
                 var targets = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(R.Range) && !x.IsZombie);
                 foreach (var target in targets)
                 {
                     if (target.Health < Rdame(target, target.Health))
                     {
                         R.Cast(target);
                     }
                     return;
                 }
             }
             if (R2comboMaxdmg)
             {
                 var targets = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(R.Range) && !x.IsZombie);
                 foreach (var target in targets)
                 {
                     if (target.Health / target.MaxHealth <= 0.25)
                     {
                         R.Cast(target);
                     }
                     return;
                 }
             }
             //if (R2BadaoStyle && !Q.IsReady())
             //{
             //    var target = TargetSelector.GetTarget(R.Range);
             //    if (target.IsValidTarget() && !target.IsZombie)
             //    {
             //        R.Cast(target);
             //        return;
             //    }
             //}
             var targethits = TargetSelector.GetTarget(R.Range);
             if (targethits.IsValidTarget() && !targethits.IsZombie)
             {
                 R.CastIfWillHit(targethits, 4);
             }
             return;
         }
     }
 }
Esempio n. 22
0
        public override void OnUpdate(EventArgs args)
        {
            if (ObjectManager.Player.IsCastingInterruptableSpell())
            {
                return;
            }

            if (this.SemiAutoRKey.Active)
            {
                if (ObjectManager.Player.CountEnemyHeroesInRange(1300) > 0)
                {
                    var ultTarget = TargetSelector.GetTarget(R);
                    if (ultTarget != null && ultTarget.IsHPBarRendered)
                    {
                        this.pressedR = true;
                        var rPred = R.GetPrediction(ultTarget);
                        if (rPred.Hitchance >= HitChance.High)
                        {
                            R.Cast(rPred.UnitPosition);
                        }
                        return;
                    }
                }
                else
                {
                    R.Cast(Game.CursorPos);
                }
            }
            if (Variables.TickCount - this.ECastTime > 300)
            {
                if (!HasPassive && Orbwalker.CanMove(45f, false))
                {
                    if (Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                    {
                        if (E.IsReady() && this.UseEMode.SelectedValue != "Never")
                        {
                            var target = TargetSelector.GetTarget(875, DamageType.Physical);
                            if (target != null && target.IsHPBarRendered)
                            {
                                var dist = target.Distance(ObjectManager.Player);
                                if (dist > 500 && Game.CursorPos.Distance(target.Position) < ObjectManager.Player.Position.Distance(target.Position))
                                {
                                    var pos = ObjectManager.Player.ServerPosition.Extend(
                                        target.ServerPosition, Math.Abs(dist - 500));
                                    if (!IsDangerousPosition(pos))
                                    {
                                        if (pos.IsUnderEnemyTurret() && !ObjectManager.Player.IsUnderEnemyTurret())
                                        {
                                            return;
                                        }
                                        return;
                                    }
                                }
                                else
                                {
                                    if (ELogic(target))
                                    {
                                        return;
                                    }
                                }
                            }
                        }
                        var qtar = TargetSelector.GetTarget(Q);
                        if (qtar != null && qtar.IsHPBarRendered)
                        {
                            if (Q.IsReady())
                            {
                                if (QLogic(qtar))
                                {
                                    return;
                                }
                            }
                            if (W.IsReady())
                            {
                                if (WLogic(qtar))
                                {
                                    return;
                                }
                            }
                        }
                        else
                        {
                            this.QExHarass();
                        }
                    }
                    if (Orbwalker.ActiveMode != OrbwalkingMode.None && Orbwalker.ActiveMode != OrbwalkingMode.Combo)
                    {
                        this.QExHarass();
                    }
                }
            }
            if (UsePassiveOnEnemy && HasPassive)
            {
                var tg = TargetSelector.GetTarget(ObjectManager.Player.AttackRange, DamageType.Physical);
                if (tg != null && tg.IsHPBarRendered)
                {
                    Orbwalker.ForceTarget = tg;
                    return;
                }
            }
            else
            {
                Orbwalker.ForceTarget = null;
            }
        }
Esempio n. 23
0
 public static bool CanHarras()
 {
     if (!ObjectManager.Player.IsWindingUp && !ObjectManager.Player.IsUnderEnemyTurret() && Orbwalker.CanMove(50, false) && !ShouldWait())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 24
0
        private static void Farm(bool laneClear)
        {
            if (!Config["Farm"].GetValue <MenuBool>("EnabledFarm"))
            {
                return;
            }

            if (Player.ManaPercent < Config["Farm"].GetValue <MenuSlider>("Lane.Mana").Value)
            {
                return;
            }
            if (!Orbwalker.CanMove())
            {
                return;
            }
            GameObjects.EnemyMinions.Where(m => m.IsValidTarget(Q.Range + Q.Width + 30) && m.IsRanged).Cast <AIBaseClient>().ToList();
            var rangedMinionsQ = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(Q.Range + Q.Width + 30) && m.IsRanged).Cast <AIBaseClient>().ToList();
            var allMinionsQ    = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(Q.Range + Q.Width + 30)).Cast <AIBaseClient>().ToList();
            var rangedMinionsW = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(W.Range + W.Width + 30) && m.IsRanged).Cast <AIBaseClient>().ToList();
            var allMinionsW    = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(W.Range + W.Width + 30)).Cast <AIBaseClient>().ToList();

            var useQi = Config["Farm"].GetValue <MenuList>("UseQFarm").SelectedValue;
            var useWi = 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"));

            if (useQ && Q.IsReady())
            {
                if (laneClear)
                {
                    var fl1 = Q.GetCircularFarmLocation(rangedMinionsQ, Q.Width);
                    var fl2 = Q.GetCircularFarmLocation(allMinionsQ, Q.Width);

                    if (fl1.MinionsHit >= 3)
                    {
                        Q.Cast(fl1.Position);
                    }

                    else if (fl2.MinionsHit >= 2 || allMinionsQ.Count == 1)
                    {
                        Q.Cast(fl2.Position);
                    }
                }
                else
                {
                    foreach (
                        var minion in
                        allMinionsQ.Where(
                            minion =>
                            !minion.InAutoAttackRange() && minion.Health < 0.75 * Q.GetDamage(minion)))
                    {
                        Q.Cast(minion);
                    }
                }
            }

            if (useW && W.IsReady() && allMinionsW.Count() > 3)
            {
                if (laneClear)
                {
                    if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1)
                    {
                        //WObject
                        var gObjectPos = GetGrabableObjectPos(false);

                        if (gObjectPos.ToVector2().IsValid())
                        {
                            W.Cast(gObjectPos);
                        }
                    }
                    else if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1)
                    {
                        var fl1 = Q.GetCircularFarmLocation(rangedMinionsW, W.Width);
                        var fl2 = Q.GetCircularFarmLocation(allMinionsW, W.Width);

                        if (fl1.MinionsHit >= 3 && W.IsInRange(fl1.Position.ToVector3()))
                        {
                            W.Cast(fl1.Position);
                        }

                        else if (fl2.MinionsHit >= 1 && W.IsInRange(fl2.Position.ToVector3()) && fl1.MinionsHit <= 2)
                        {
                            W.Cast(fl2.Position);
                        }
                    }
                }
            }
        }
Esempio n. 25
0
 public static bool CanHarass()
 {
     return(!Player.IsWindingUp && !Player.IsUnderEnemyTurret() && Orbwalker.CanMove(50, false));
 }
Esempio n. 26
0
        public override async Task ExecuteAsync(CancellationToken token)
        {
            try
            {
                var target = targetSelector.Active.GetTargets().FirstOrDefault(x => x.IsValidTarget()) as Hero;

                if (target == null || !menu.AntiBladeMail && target.HasModifier("modifier_item_blade_mail_reflect"))
                {
                    if (Orbwalker.CanMove())
                    {
                        Orbwalker.Move(Game.MousePosition);
                    }

                    return;
                }
                if (target != null && target.IsAlive && !Owner.IsVisibleToEnemies && !menu.LockTarget || menu.LockTarget)
                {
                    Orbwalker.OrbwalkTo(target);
                }
                else
                {
                    if (Orbwalker.CanMove())
                    {
                        Orbwalker.Move(Game.MousePosition);
                    }
                }
                if (target != null && target.IsAlive && Owner.IsVisibleToEnemies)
                {
                    var Son = EntityManager <Unit> .Entities.Where(x => x.NetworkName == "CDOTA_Unit_Broodmother_Spiderling").ToList();

                    for (int i = 0; i < Son.Count(); i++)
                    {
                        if (Son[i].Distance2D(target) <= 2000 && Utils.SleepCheck(Son[i].Handle.ToString() + "Sons"))//&& Utils.SleepCheck(Son[i].Handle.ToString() + "Sons")
                        {
                            Son[i].Attack(target);
                            //Utils.Sleep(350, Son[i].Handle.ToString() + "Sons");
                        }
                    }
                    for (int i = 0; i < Son.Count(); i++)
                    {
                        if (Son[i].Distance2D(target) >= 2000 && Utils.SleepCheck(Son[i].Handle.ToString() + "Sons"))
                        {
                            Son[i].Move(Game.MousePosition);
                            //Utils.Sleep(350, Son[i].Handle.ToString() + "Sons");
                        }
                    }
                }

                var me      = ObjectManager.LocalHero;
                var linkens = target.Modifiers.Any(x => x.Name == "modifier_item_spheretarget") || target.Inventory.Items.Any(x => x.Name == "item_sphere");
                var enemies = ObjectManager.GetEntities <Hero>().Where(hero => hero.IsAlive && !hero.IsIllusion && hero.IsVisible && hero.Team != me.Team).ToList();
                if (target != null && target.IsAlive && !target.IsIllusion && me.Distance2D(target) <= 2000)
                {
                    var W   = abilities.W;
                    var web = EntityManager <Unit> .Entities.Where(unit => unit.NetworkName == "CDOTA_Unit_Broodmother_Web").ToList();

                    var SpinWeb = GetClosestToWeb(web, me);
                    if (menu.AbilityTogglerItem.Value.IsEnabled(W.Ability.Name) && W.CanBeCasted && !W.Ability.IsHidden)
                    {
                        if ((me.Distance2D(SpinWeb) >= 900) && me.Distance2D(target) <= 800 && Utils.SleepCheck(SpinWeb.Handle.ToString() + "SpideWeb"))
                        {
                            W.UseAbility(target.Predict(1100));
                            //await Task.Delay(W.GetCastDelay(), token);
                            Utils.Sleep(300, SpinWeb.Handle.ToString() + "SpideWeb");
                        }
                    }


                    if (!target.IsMagicImmune())
                    {
                        var Q = abilities.Q;
                        if (menu.AbilityTogglerItem.Value.IsEnabled(Q.Ability.Name) && Q.CanBeCasted && !Q.Ability.IsHidden && !target.IsMagicImmune() && Owner.Distance2D(target) <= 600)
                        {
                            Q.UseAbility(target);
                            await Task.Delay(Q.GetCastDelay(target), token);
                        }
                        var R = abilities.R;
                        if (menu.AbilityTogglerItem.Value.IsEnabled(R.Ability.Name) && R.CanBeCasted && target.IsValidTarget() && Owner.Distance2D(target) <= 350)
                        {
                            R.UseAbility();
                            await Task.Delay(R.GetCastDelay(), token);
                        }

                        var orchid = me.GetItemById(ItemId.item_orchid) ??
                                     me.GetItemById(ItemId.item_bloodthorn);
                        if (orchid != null &&
                            orchid.CanBeCasted() &&
                            !linkens &&
                            orchid.CanHit(target) &&
                            Utils.SleepCheck("orchid") && me.Distance2D(target) <= 1000)
                        {
                            orchid.UseAbility(target);
                            Utils.Sleep(250, "orchid");
                        }
                        var sheep = me.GetItemById(ItemId.item_sheepstick);
                        if (sheep != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(sheep.ToString()) &&
                            sheep.CanBeCasted() &&
                            !linkens &&
                            sheep.CanHit(target) &&
                            Utils.SleepCheck("sheep") && me.Distance2D(target) <= 600)
                        {
                            sheep.UseAbility(target);
                            Utils.Sleep(250, "sheep");
                        }
                        var Soul = me.GetItemById(ItemId.item_soul_ring);
                        if (Soul != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(Soul.ToString()) &&
                            Owner.Health / Owner.MaximumHealth <= 0.5 &&
                            Owner.Mana <= Q.ManaCost &&
                            Soul.CanBeCasted())
                        {
                            Soul.UseAbility();
                        }
                        var shiva = me.GetItemById(ItemId.item_shivas_guard);
                        if (shiva != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(shiva.ToString()) &&
                            shiva.CanBeCasted() &&
                            shiva.CanHit(target) && Utils.SleepCheck("shiva") &&
                            me.Distance2D(target) <= 600)
                        {
                            shiva.UseAbility();
                            //await Task.Delay(shiva.GetCastDelay(), token);
                            Utils.Sleep(250, "shiva");
                        }
                        var mom = me.GetItemById(ItemId.item_mask_of_madness);
                        if (mom != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(mom.ToString()) &&
                            mom.CanBeCasted() && Utils.SleepCheck("mom") &&
                            me.Distance2D(target) <= 700)
                        {
                            mom.UseAbility();
                            Utils.Sleep(250, "mom");
                        }
                        var medall = me.GetItemById(ItemId.item_solar_crest) ??
                                     me.GetItemById(ItemId.item_medallion_of_courage);
                        if (medall != null &&
                            medall.CanBeCasted() && Utils.SleepCheck("medall") &&
                            me.Distance2D(target) <= 500)
                        {
                            medall.UseAbility(target);
                            Utils.Sleep(250, "Medall");
                        }
                        var abyssal = me.GetItemById(ItemId.item_abyssal_blade);
                        if (abyssal != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(abyssal.ToString()) &&
                            abyssal.CanBeCasted() && Utils.SleepCheck("abyssal") &&
                            me.Distance2D(target) <= 400)
                        {
                            abyssal.UseAbility(target);
                            Utils.Sleep(250, "abyssal");
                        }
                        var halberd = me.GetItemById(ItemId.item_heavens_halberd);
                        if (halberd != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(halberd.ToString()) &&
                            halberd.CanBeCasted() && Utils.SleepCheck("halberd") &&
                            me.Distance2D(target) <= 700)
                        {
                            halberd.UseAbility(target);
                            Utils.Sleep(250, "halberd");
                        }
                        var mjollnir = me.GetItemById(ItemId.item_mjollnir);
                        if (mjollnir != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(mjollnir.ToString()) &&
                            mjollnir.CanBeCasted() && Utils.SleepCheck("mjollnir") &&
                            me.Distance2D(target) <= 600)
                        {
                            mjollnir.UseAbility(Owner);
                            Utils.Sleep(250, "mjollnir");
                        }
                        var satanic = me.GetItemById(ItemId.item_satanic);
                        if (satanic != null &&
                            menu.ItemTogglerItem.Value.IsEnabled(satanic.ToString()) &&
                            Owner.Health / Owner.MaximumHealth <= 0.4 &&
                            satanic.CanBeCasted() && Utils.SleepCheck("Satanic") &&
                            me.Distance2D(target) <= 300)
                        {
                            satanic.UseAbility();
                            Utils.Sleep(250, "Satanic");
                        }

                        if ((!Owner.CanAttack() || Owner.Distance2D(target) >= 0) && Owner.NetworkActivity != NetworkActivity.Attack &&
                            Owner.Distance2D(target) <= 600 && Utils.SleepCheck("Move"))
                        {
                            Orbwalker.Move(target.Predict(500));
                            //Utils.Sleep(390, "Move");
                        }
                        if (Owner.Distance2D(target) <= Owner.AttackRange + 100 && (!Owner.IsAttackImmune() || !target.IsAttackImmune()) &&
                            Owner.NetworkActivity != NetworkActivity.Attack && Owner.CanAttack() && Utils.SleepCheck("attack"))
                        {
                            Orbwalker.Attack(target);
                            // Utils.Sleep(160, "attack");
                        }
                    }
                }
                await Task.Delay(290, token);
            }
            catch (TaskCanceledException)
            {
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }
        }
Esempio n. 27
0
        private void Harass()
        {
            if (config["LastHit"].GetValue <MenuBool>("useqLH") && Q.IsReady())
            {
                LastHitQ();
            }
            AIHeroClient target = getTarget();

            if (target == null)
            {
                return;
            }
            if (config["Harass"].GetValue <MenuBool>("useqLC") && Q.CanCast(target) && Orbwalker.CanMove() &&
                !target.IsDashing())
            {
                Q.Cast(target);
            }
            if (config["Harass"].GetValue <MenuBool>("usewLC") && W.IsReady() && W.Range < player.Distance(target) &&
                target.HasBuff("kennenmarkofstorm"))
            {
                W.Cast();
            }
        }
Esempio n. 28
0
        private static void Farm(bool laneClear)
        {
            if (!Orbwalker.CanMove())
            {
                return;
            }
            if (Config.Item("ManaSliderFarm").GetValue <MenuSlider>().Value >
                ObjectManager.Player.Mana / ObjectManager.Player.MaxMana * 100)
            {
                return;
            }

            var rangedMinions = GameObjects.GetMinions(
                ObjectManager.Player.Position, Q2.Range, MinionTypes.Ranged);
            var allMinions = GameObjects.GetMinions(ObjectManager.Player.Position, Q2.Range);

            var useQi = Array.IndexOf(Config.Item("UseQFarm").GetValue <MenuList>().Items, Config.Item("UseQFarm").GetValue <MenuList>().SelectedValue);
            var useWi = Array.IndexOf(Config.Item("UseWFarm").GetValue <MenuList>().Items, Config.Item("UseWFarm").GetValue <MenuList>().SelectedValue);
            var useEi = Array.IndexOf(Config.Item("UseEFarm").GetValue <MenuList>().Items, Config.Item("UseEFarm").GetValue <MenuList>().SelectedValue);
            var useQ  = (laneClear && (useQi == 1 || useQi == 2)) || (!laneClear && (useQi == 0 || useQi == 2));
            var useW  = (laneClear && (useWi == 1 || useWi == 2)) || (!laneClear && (useWi == 0 || useWi == 2));
            var useE  = (laneClear && (useEi == 1 || useEi == 2)) || (!laneClear && (useEi == 0 || useEi == 2));

            if (laneClear)
            {
                if (Q1.IsReady() && useQ)
                {
                    var rangedLocation = Q2.GetCircularFarmLocation(rangedMinions);
                    var location       = Q2.GetCircularFarmLocation(allMinions);

                    var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation;

                    if (bLocation.MinionsHit > 0)
                    {
                        Q2.Cast(bLocation.Position.ToVector3());
                    }
                }

                if (W.IsReady() && useW)
                {
                    var dmgpct = new[] { 25, 27.5, 30, 32.5, 35 }[W.Level - 1];

                    var killableTurret =
                        ObjectManager.Get <AITurretClient>()
                        .Find(x => x.IsEnemy && ObjectManager.Player.Distance(x.Position) <= W.Range && x.HealthPercent < dmgpct);
                    if (killableTurret != null)
                    {
                        W.Cast(killableTurret.Position);
                    }
                }

                if (E.IsReady() && useE)
                {
                    var rangedLocation = E.GetCircularFarmLocation(rangedMinions, E.Width * 2);
                    var location       = E.GetCircularFarmLocation(allMinions, E.Width * 2);

                    var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation;

                    if (bLocation.MinionsHit > 2)
                    {
                        E.Cast(bLocation.Position.ToVector3());
                    }
                }
            }
            else
            {
                if (useQ && Q1.IsReady())
                {
                    foreach (var minion in allMinions)
                    {
                        if (!minion.InAutoAttackRange())
                        {
                            var Qdamage = ObjectManager.Player.GetSpellDamage(minion, SpellSlot.Q) * 0.75;

                            if (Qdamage > Q1.GetHealthPrediction(minion))
                            {
                                Q2.Cast(minion);
                            }
                        }
                    }
                }

                if (E.IsReady() && useE)
                {
                    var rangedLocation = E.GetCircularFarmLocation(rangedMinions, E.Width * 2);
                    var location       = E.GetCircularFarmLocation(allMinions, E.Width * 2);

                    var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation;

                    if (bLocation.MinionsHit > 2)
                    {
                        E.Cast(bLocation.Position.ToVector3());
                    }
                }
            }
        }
Esempio n. 29
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            Orbwalker.MovementState = true;
            if (player.HasBuff("KennenLightningRush"))
            {
                Orbwalker.AttackState = false;
            }
            else
            {
                Orbwalker.AttackState = true;
            }
            AIHeroClient target = getTarget();

            switch (Orbwalker.ActiveMode)
            {
            case OrbwalkerMode.Combo:
                Combo();
                break;

            case OrbwalkerMode.Harass:
                Harass();
                break;

            case OrbwalkerMode.LaneClear:
                Clear();
                break;

            case OrbwalkerMode.LastHit:
                LastHit();
                break;

            default:
                break;
            }
            if (target == null)
            {
                return;
            }
            var data = ObjectManager.Player;

            if (data != null && player.HasBuff("KennenShurikenStorm") &&
                (config["Misc"].GetValue <MenuSlider>("Minhelath").Value > player.Health / player.MaxHealth * 100 ||
                 (config["Misc"].GetValue <MenuSlider>("Minhelath").Value > 0)))
            {
                if (player.HasItem((int)ItemId.Stopwatch) && player.CanUseItem((int)ItemId.Stopwatch))
                {
                    player.UseItem((int)ItemId.Stopwatch);
                }
                if (player.HasItem((int)ItemId.Wooglets_Witchcap) && player.CanUseItem((int)ItemId.Wooglets_Witchcap))
                {
                    player.UseItem((int)ItemId.Wooglets_Witchcap);
                }
                if (player.HasItem((int)ItemId.Zhonyas_Hourglass) && player.CanUseItem((int)ItemId.Zhonyas_Hourglass))
                {
                    player.UseItem((int)ItemId.Zhonyas_Hourglass);
                }
            }
            if (config["Misc"].GetValue <MenuBool>("autoq"))
            {
                if (Q.CanCast(target) && !target.IsDashing() &&
                    (MarkOfStorm(target) > 1 || (MarkOfStorm(target) > 0 && player.Distance(target) < W.Range)))
                {
                    Q.Cast(target);
                }
            }
            if (config["Misc"].GetValue <MenuBool>("autow") && W.IsReady() && MarkOfStorm(target) > 1 &&
                !player.HasBuff("KennenShurikenStorm"))
            {
                if (player.Distance(target) < W.Range)
                {
                    W.Cast();
                }
            }
            if (config["Misc"]["autoQ"].GetValue <MenuKeyBind>("KenAutoQ").Active&& Q.IsReady() &&
                config["Misc"]["autoQ"].GetValue <MenuSlider>("KenminmanaaQ").Value < player.ManaPercent &&
                Orbwalker.ActiveMode != OrbwalkerMode.Combo && Orbwalker.CanMove() &&
                !player.IsUnderEnemyTurret())
            {
                if (target != null && Q.CanCast(target) && target.IsValidTarget())
                {
                    Q.CastIfHitchanceEquals(
                        target, (HitChance)config["Misc"]["autoQ"].GetValue <MenuSlider>("qHit").Value);
                }
            }
        }
Esempio n. 30
0
        void QLogic()
        {
            var targets = ValidTargets.Where(x => x.IsHPBarRendered && x.Health < Q.GetDamage(x) && x.IsValidTarget(Q.Range) && !x.IsZombie);

            if (targets != null && targets.Any())
            {
                foreach (var target in targets)
                {
                    if (target == null)
                    {
                        continue;
                    }
                    if (target.Health < Q.GetDamage(target) &&
                        (!target.HasBuff("Undying Rage") &&
                         !target.HasBuff("JudicatorIntervention")))
                    {
                        var pred = Q.GetPrediction(target);
                        if (pred.Hitchance >= HitChance.High && !pred.CollisionObjects.Any())
                        {
                            Q.Cast(pred.UnitPosition);
                        }
                    }
                }
            }
            if (Orbwalker.ActiveMode != OrbwalkingMode.None)
            {
                if (Q.IsReady())
                {
                    var qtarget = TargetSelector.GetTarget(Q);
                    if (qtarget != null && qtarget.IsHPBarRendered)
                    {
                        var pred = Q.GetPrediction(qtarget);
                        if (Q.IsReady() && UseQ && pred.Hitchance >= HitChance.High && !pred.CollisionObjects.Any())
                        {
                            Q.Cast(pred.UnitPosition);
                            return;
                        }
                    }
                }
            }

            if (Orbwalker.CanMove() && QFarm && ObjectManager.Player.ManaPercent > QMana &&
                (Orbwalker.ActiveMode == OrbwalkingMode.LaneClear || Orbwalker.ActiveMode == OrbwalkingMode.LastHit))
            {
                var minion =
                    GameObjects.EnemyMinions.FirstOrDefault(
                        m =>
                        m.Position.Distance(ObjectManager.Player.Position) < 550 &&
                        m.Health < ObjectManager.Player.GetAutoAttackDamage(m) &&
                        Health.GetPrediction(m, (int)((Game.Ping / 2) + ObjectManager.Player.AttackCastDelay * 1000))
                        < 1 && Health.GetPrediction(m, (int)((Game.Ping / 2) + 250)) > 1);
                if (minion != null)
                {
                    var pred = Q.GetPrediction(minion);
                    if (!pred.CollisionObjects.Any(o => o is Obj_AI_Minion))
                    {
                        Q.Cast(pred.UnitPosition);
                    }
                }
            }
        }