示例#1
0
文件: Program.cs 项目: geramz/PortAIO
        private static void LogicE()
        {
            if (Player.Mana > RMANA + EMANA && getCheckBoxItem(eMenu, "autoE") && Game.Time - grabTime > 1)
            {
                foreach (
                    var enemy in
                    Program.Enemies.Where(enemy => enemy.LSIsValidTarget(E.Range) && !OktwCommon.CanMove(enemy)))
                {
                    E.Cast(enemy.Position);
                    return;
                }
                if (!Program.LagFree(1))
                {
                    return;
                }

                if (getCheckBoxItem(eMenu, "telE"))
                {
                    var trapPos = OktwCommon.GetTrapPos(E.Range);
                    if (!trapPos.IsZero)
                    {
                        E.Cast(trapPos);
                    }
                }

                if (Program.Combo && Player.IsMoving && getCheckBoxItem(eMenu, "comboE") &&
                    Player.Mana > RMANA + EMANA + WMANA)
                {
                    var t = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                    if (t.LSIsValidTarget(E.Range) && E.GetPrediction(t).CastPosition.LSDistance(t.Position) > 200 &&
                        (int)E.GetPrediction(t).Hitchance == 5)
                    {
                        E.CastIfWillHit(t, 2);
                        if (t.HasBuffOfType(BuffType.Slow))
                        {
                            Program.CastSpell(E, t);
                        }
                        else
                        {
                            if (E.GetPrediction(t).CastPosition.LSDistance(t.Position) > 200)
                            {
                                if (Player.Position.LSDistance(t.ServerPosition) > Player.Position.LSDistance(t.Position))
                                {
                                    if (t.Position.LSDistance(Player.ServerPosition) <
                                        t.Position.LSDistance(Player.Position))
                                    {
                                        Program.CastSpell(E, t);
                                    }
                                }
                                else
                                {
                                    if (t.Position.LSDistance(Player.ServerPosition) >
                                        t.Position.LSDistance(Player.Position))
                                    {
                                        Program.CastSpell(E, t);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
示例#2
0
        private void LogicQ()
        {
            foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(1600) && Q.GetDamage(enemy) + GetWDmg(enemy) > enemy.Health))
            {
                if (enemy.IsValidTarget(R.Range))
                {
                    CastQ(enemy);
                }
                return;
            }

            if (Config.Item("maxQ").GetValue <bool>() && (Q.Range < 1500) && Player.CountEnemiesInRange(AArange) == 0)
            {
                return;
            }

            var t = Orbwalker.GetTarget() as Obj_AI_Hero;

            if (!t.IsValidTarget())
            {
                t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            }

            if (t.IsValidTarget())
            {
                if (Q.IsCharging)
                {
                    if (Config.Item("fastQ").GetValue <bool>())
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }

                    if (GetQEndTime() > 2)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    return;
                }

                if ((OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && CanCast && !E.IsReady()) || !Orbwalking.InAutoAttackRange(t))
                {
                    if ((Program.Combo || (OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && Program.Farm)) && Player.Mana > RMANA + QMANA)
                    {
                        CastQ(t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        CastQ(t);
                    }
                    else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            CastQ(enemy);
                        }
                    }
                }
            }
            else if (Q.Range > 1500 && Player.CountEnemiesInRange(1450) == 0 && Program.LaneClear && (Q.IsCharging || (Player.ManaPercentage() > Config.Item("Mana").GetValue <Slider>().Value&& Config.Item("farmQ").GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA)))
            {
                var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > 3 || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
示例#3
0
        void Combo()
        {
            var comboQ = _menu["Combo"]["comboQ"].GetValue <MenuList>().Index;
            var comboW = _menu["Combo"]["comboW"].GetValue <MenuBool>();
            var comboE = _menu["Combo"]["comboE"].GetValue <MenuBool>();
            var comboR = _menu["Combo"]["comboR"].GetValue <MenuSlider>().Value;

            if (comboQ > 0 && _spellQ.IsReady())
            {
                if (_spellR.IsReady() && comboR > 0)
                {
                    int          maxTargetsHit      = 0;
                    AIBaseClient unitMostTargetsHit = null;

                    foreach (AIBaseClient unit in ObjectManager.Get <AIBaseClient>().Where(x => x.IsValidTarget(_spellQ.Range) && _spellQ.GetPrediction(x).Hitchance >= HitChance.High)) //causes troubles?
                    {
                        int targetsHit = unit.CountEnemyHeroesInRange((int)_spellR.Range);                                                                                               //unitposition might not reflect where you land with Q

                        if (targetsHit > maxTargetsHit || (unitMostTargetsHit != null && targetsHit >= maxTargetsHit && unit.Type == GameObjectType.AIHeroClient))
                        {
                            maxTargetsHit      = targetsHit;
                            unitMostTargetsHit = unit;
                        }
                    }

                    if (maxTargetsHit >= comboR)
                    {
                        CastQ(unitMostTargetsHit);
                    }
                }

                AIHeroClient target1 = TargetSelector.GetTarget(_spellQ.Range, DamageType.Magical);
                if (!target1.IsValidTarget())
                {
                    return;
                }
                if (comboQ == 1 || (comboQ == 2 && _spellQ.IsReady() && target1.IsValidTarget(_spellQ.Range) && _spellQ.GetPrediction(target1).Hitchance >= HitChance.High))
                {
                    _spellQ.CastIfHitchanceEquals(target1, HitChance.High);
                }
            }


            if (comboW && _spellW.IsReady())
            {
                var target = TargetSelector.GetTarget(_spellW.Range, DamageType.Magical);

                if (target != null)
                {
                    var enoughMana = GetManaPercent() >= _menu["Combo"]["comboWPercent"].GetValue <MenuSlider>().Value;

                    if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1)
                    {
                        if (Player.Distance(target.Position) <= _spellW.Range && enoughMana)
                        {
                            _comboW = true;
                            _spellW.Cast();
                        }
                    }
                    else if (!enoughMana)
                    {
                        RegulateWState(true);
                    }
                }
                else
                {
                    RegulateWState();
                }
            }
            if (comboE && _spellE.IsReady())
            {
                CastE(Program.Helper.EnemyTeam.OrderBy(x => x.Distance(Player)).FirstOrDefault());
            }
        }
示例#4
0
        internal static void Execute()
        {
            if (Config.IsChecked(Config.ComboMenu, "bR") && Spells.R.CanCast())
            {
                var rTarget = TargetSelector.GetTarget(Spells.R.Range, DamageType.Magical);
                if (rTarget != null)
                {
                    var rRectangle = new Geometry.Polygon.Rectangle(
                        Player.Instance.Position,
                        Player.Instance.Position.Extend(rTarget, Spells.R.Range).To3D(),
                        Spells.R.Width);
                    if (
                        EntityManager.Heroes.Enemies.Count(
                            enemy =>
                            rRectangle.IsInside(Prediction.Position.PredictUnitPosition(enemy, 200)) &&
                            !enemy.HasBuffOfType(BuffType.Invulnerability) && !enemy.IsDead && enemy.IsValid)
                        >= Config.GetSliderValue(Config.ComboMenu, "minR"))
                    {
                        Spells.R.Cast(rTarget);
                    }
                }
            }

            if (Config.IsChecked(Config.ComboMenu, "bFlashR") && Spells.R.CanCast() && Spells.Flash.CanCast())
            {
                var rFlashTarget = TargetSelector.GetTarget(Spells.R.Range + 400, DamageType.Magical);
                if (rFlashTarget != null)
                {
                    var flashPos          = Player.Instance.Position.Extend(rFlashTarget, 425).To3D();
                    var flashUltRectangle = new Geometry.Polygon.Rectangle(
                        flashPos,
                        flashPos.Extend(Player.Instance.Position, -Spells.R.Range).To3D(),
                        Spells.R.Width);
                    if (
                        EntityManager.Heroes.Enemies.Count(
                            enemy =>
                            flashUltRectangle.IsInside(Prediction.Position.PredictUnitPosition(enemy, 200)) &&
                            !enemy.HasBuffOfType(BuffType.Invulnerability) && !enemy.IsDead && enemy.IsValid)
                        >= Config.GetSliderValue(Config.ComboMenu, "minFlashR"))
                    {
                        Player.CastSpell(Spells.Flash.Slot, flashPos);
                        Core.DelayAction(() => Spells.R.Cast(rFlashTarget), Computed.RDelay.Next(50, 85));

                        /* For when mid animation flash is possible
                         * Spells.R.Cast(flashPos);
                         * Core.DelayAction(
                         *  () => Player.CastSpell(Spells.Flash.Slot, flashPos),
                         *  Computed.RDelay.Next(150, 250));
                         */
                    }
                }
            }

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

            if (target == null)
            {
                return;
            }

            if (Config.IsChecked(Config.ComboMenu, "bQ") && Spells.Q.CanCast())
            {
                Spells.Q.Cast();
            }

            if (Config.IsChecked(Config.ComboMenu, "bE") && Spells.E.CanCast())
            {
                if (target.Path.Length == 0 || !target.IsMoving)
                {
                    return;
                }

                var pathEndLoc = target.Path.OrderByDescending(x => x.Distance(target)).FirstOrDefault();
                var dist       = Player.Instance.Position.Distance(target.Position);
                var distToPath = pathEndLoc.Distance(Player.Instance.Position);
                if (distToPath <= dist)
                {
                    return;
                }

                var movspeedDif = Player.Instance.MoveSpeed - target.MoveSpeed;
                if (movspeedDif <= 0 && !Player.Instance.IsInAutoAttackRange(target))
                {
                    Spells.E.Cast();
                }

                var timeToReach = dist / movspeedDif;
                if (timeToReach > 2.5f)
                {
                    Spells.E.Cast();
                }
            }
        }
示例#5
0
        private static void ComboLogic()
        {
            if (IsCastingR)
            {
                return;
            }

            var target = TargetSelector.GetTarget(Q.Range + 50, DamageType.Mixed);

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

            var Qready = Combo["Q"].Cast <CheckBox>().CurrentValue&& Q.IsReady() && target.IsValidTarget(Q.Range);
            var Wready = Combo["W"].Cast <CheckBox>().CurrentValue&& W.IsReady() && target.IsValidTarget(W.Range) &&
                         W.GetPrediction(target).HitChance >= HitChance.High;
            var Eready    = Combo["E"].Cast <CheckBox>().CurrentValue&& E.IsReady() && target.IsValidTarget(E.Range);
            var Rfinready = Combo["RFinisher"].Cast <CheckBox>().CurrentValue&& R.IsReady() && target.IsValidTarget(R.Range);
            var Rcomready = Combo["RCombo"].Cast <CheckBox>().CurrentValue&& R.IsReady() && target.IsValidTarget(R.Range);
            var RTurret   = Combo["RTurret"].Cast <CheckBox>().CurrentValue&& R.IsReady() && target.IsValidTarget(R.Range) && target.IsUnderTurret() &&
                            !target.IsUnderHisturret() && !target.IsUnderEnemyturret();

            if (Wready)
            {
                W.Cast(target);
            }

            if (Qready && (Q.GetPrediction(target).HitChance >= HitChance.High || target.IsCC()))
            {
                Q.Cast(target);
            }

            if (Eready)
            {
                E.Cast(target);
            }

            if (!Combo["DontUlt" + target.BaseSkinName].Cast <CheckBox>().CurrentValue)
            {
                if (Misc["blockR"].Cast <CheckBox>().CurrentValue&& Player.Instance.IsUnderEnemyturret())
                {
                    return;
                }

                if (Rcomready && GetDamage(target) >= Prediction.Health.GetPrediction(target, R.CastDelay))
                {
                    R.Cast(target);
                }

                if (Rfinready && R.GetDamage(target) >= Prediction.Health.GetPrediction(target, R.CastDelay))
                {
                    R.Cast(target);
                }

                if (RTurret)
                {
                    R.Cast(target);
                }
            }
        }
示例#6
0
        public override void GameOnUpdate(EventArgs args)
        {
            if (GetValue <KeyBind>("CastR").Active)
            {
                Vector3 searchPos;

                if (ObjectManager.Player.Distance(Game.CursorPos) < R.Range - 300f)
                {
                    searchPos = Game.CursorPos;
                }
                else
                {
                    searchPos = ObjectManager.Player.Position +
                                Vector3.Normalize(Game.CursorPos - ObjectManager.Player.Position) * (R.Range - 300f);
                }

                var rTarget =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(hero => hero.IsValidTarget(R.Range) && hero.Distance(searchPos) < 300f)
                    .OrderByDescending(TargetSelector.GetPriority)
                    .First();

                if (rTarget != null && R.IsReady())
                {
                    R.Cast(rTarget);
                }
            }

            if (GetValue <KeyBind>("UseQ2C").Active)
            {
                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                CastSpellQ();
            }

            Obj_AI_Hero t;

            if (E.IsReady() && GetValue <KeyBind>("UseETH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t != null)
                {
                    E.Cast(t, false, true);
                }
            }

            if (!ComboActive && !HarassActive)
            {
                return;
            }

            var useQ = GetValue <StringList>("UseQ" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseRC");

            t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget(Q.Range) && t.Health <= CalcQDamage + CalcWDamage)
            {
                CastSpellQ();
            }

            switch (useQ.SelectedIndex)
            {
            case 1:
            {
                CastSpellQ();
                break;
            }

            case 2:
            {
                if (EnemyWStackCount(t) > 2 || W.Level == 0)
                {
                    CastSpellQ();
                }
                break;
            }
            }

            if (useE && E.IsReady())
            {
                t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget(E.Range))
                {
                    E.Cast(t, false, true);
                }
            }

            if (useR && R.IsReady())
            {
                t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget(R.Range) && t.Health <= ObjectManager.Player.GetSpellDamage(t, SpellSlot.R) - 30f)
                {
                    R.Cast(t);
                }
            }
        }
示例#7
0
        static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range + Q.Width, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            var useQ = Config.Item("UseQCombo").GetValue <bool>();
            var useW = Config.Item("UseWCombo").GetValue <bool>();
            var useE = Config.Item("UseECombo").GetValue <bool>();
            var useR = Config.Item("UseRCombo").GetValue <bool>();

            var minRTargets = Config.Item("UseRNCombo").GetValue <StringList>().SelectedIndex + 1;

            if (useW && WIsReady)
            {
                CastW(1);
            }

            if (LeagueSharp.Common.Utility.CountEnemiesInRange((int)(Q.Range + R.Width)) <= 1)
            {
                if (useR && GetComboDamage(target) > target.Health && RIsReady)
                {
                    CastR(minRTargets, true);
                }

                if (useQ && QIsReady)
                {
                    CastQ(target);
                }

                if (useE && EIsReady)
                {
                    foreach (var ally in HeroManager.Allies.Where(h => h.IsValidTarget(E.Range, false)))
                    {
                        if (ally.Position.CountEnemiesInRange(300) >= 1)
                        {
                            E.CastOnUnit(ally, true);
                        }

                        CastE(ally, 1);
                    }
                }
            }
            else
            {
                if (useR && RIsReady)
                {
                    if (BallManager.BallPosition.CountEnemiesInRange(800) > 1)
                    {
                        var rCheck = GetHits(R);
                        var pk     = 0;
                        var k      = 0;
                        if (rCheck.Item1 >= 2)
                        {
                            foreach (var hero in rCheck.Item2)
                            {
                                var comboDamage = GetComboDamage(hero);
                                if ((hero.Health - comboDamage) < 0.4 * hero.MaxHealth || comboDamage >= 0.4 * hero.MaxHealth)
                                {
                                    pk++;
                                }

                                if ((hero.Health - comboDamage) < 0)
                                {
                                    k++;
                                }
                            }

                            if (rCheck.Item1 >= BallManager.BallPosition.CountEnemiesInRange(800) || pk >= 2 ||
                                k >= 1)
                            {
                                if (rCheck.Item1 >= minRTargets)
                                {
                                    R.Cast(Player.ServerPosition, true);
                                }
                            }
                        }
                    }

                    else if (GetComboDamage(target) > target.Health)
                    {
                        CastR(minRTargets, true);
                    }
                }

                if (useQ && QIsReady)
                {
                    var qLoc = GetBestQLocation(target);
                    if (qLoc.Item1 > 1)
                    {
                        Q.Cast(qLoc.Item2, true);
                    }
                    else
                    {
                        CastQ(target);
                    }
                }

                if (useE && EIsReady)
                {
                    if (BallManager.BallPosition.CountEnemiesInRange(800) <= 2)
                    {
                        CastE(Player, 1);
                    }
                    else
                    {
                        CastE(Player, 2);
                    }

                    foreach (var ally in HeroManager.Allies.Where(h => h.IsValidTarget(E.Range, false)))
                    {
                        if (ally.Position.CountEnemiesInRange(300) >= 2)
                        {
                            E.CastOnUnit(ally, true);
                        }
                    }
                }
            }
        }
示例#8
0
文件: Jinx.cs 项目: dsaiman/Marksman
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Q.IsReady())
            {
                var activeQ = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Level *25 + 650;
                var t       = TargetSelector.GetTarget(activeQ, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget() && ObjectManager.Player.Distance(t) > Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    if (!FishBoneActive)
                    {
                        Q.Cast();
                        Orbwalker.ForceTarget(t);
                        return;
                    }
                }
                if (!t.IsValidTarget() || ObjectManager.Player.Distance(t) < Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    if (FishBoneActive)
                    {
                        Q.Cast();
                        return;
                    }
                }
            }

            var autoEi = GetValue <bool>("AutoEI");
            var autoEs = GetValue <bool>("AutoES");
            var autoEd = GetValue <bool>("AutoED");

            if (autoEs || autoEi || autoEd)
            {
                foreach (
                    var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(E.Range - 150)))
                {
                    if (autoEs && E.IsReady() && enemy.HasBuffOfType(BuffType.Slow))
                    {
                        var castPosition =
                            Prediction.GetPrediction(
                                new PredictionInput
                        {
                            Unit   = enemy,
                            Delay  = 0.7f,
                            Radius = 120f,
                            Speed  = 1750f,
                            Range  = 900f,
                            Type   = SkillshotType.SkillshotCircle,
                        }).CastPosition;


                        if (GetSlowEndTime(enemy) >= (Game.Time + E.Delay + 0.5f))
                        {
                            E.Cast(castPosition);
                        }
                    }

                    if (autoEi && E.IsReady() &&
                        (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) ||
                         enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) ||
                         enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuff("zhonyasringshield") ||
                         enemy.HasBuff("Recall")))
                    {
                        E.CastIfHitchanceEquals(enemy, HitChance.High);
                    }

                    if (autoEd && E.IsReady() && enemy.IsDashing())
                    {
                        E.CastIfHitchanceEquals(enemy, HitChance.Dashing);
                    }
                }
            }


            if (GetValue <KeyBind>("CastR").Active&& R.IsReady())
            {
                var t = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R) > t.Health)
                    {
                        //R.Cast(target);
                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                    }
                }
            }

            /*
             * if (GetValue<bool>("SwapQ") && FishBoneActive &&
             *  (LaneClearActive ||
             *   (HarassActive && TargetSelector.GetTarget(675f + QAddRange, TargetSelector.DamageType.Physical) == null)))
             * {
             *  Q.Cast();
             * }
             */

            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseRC");

            if (useW && W.IsReady())
            {
                var t    = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                var minW = GetValue <Slider>("MinWRange").Value;

                if (t.IsValidTarget() && GetRealDistance(t) >= minW)
                {
                    if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            /*
             * if (useQ)
             * {
             *  foreach (var t in
             *      ObjectManager.Get<Obj_AI_Hero>()
             *          .Where(t => t.IsValidTarget(GetRealPowPowRange(t) + QAddRange + 20f)))
             *  {
             *      var swapDistance = GetValue<bool>("SwapDistance");
             *      var swapAoe = GetValue<bool>("SwapAOE");
             *      var distance = GetRealDistance(t);
             *      var powPowRange = GetRealPowPowRange(t);
             *
             *      if (swapDistance && Q.IsReady())
             *      {
             *          if (distance > powPowRange && !FishBoneActive)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *          else if (distance < powPowRange && FishBoneActive)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *      }
             *
             *      if (swapAoe && Q.IsReady())
             *      {
             *          if (distance > powPowRange && PowPowStacks > 2 && !FishBoneActive && CountEnemies(t, 150) > 1)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *      }
             *  }
             * }
             *
             */
            if (useR && R.IsReady())
            {
                var checkRok = GetValue <bool>("ROverKill");
                var minR     = GetValue <Slider>("MinRRange").Value;
                var maxR     = GetValue <Slider>("MaxRRange").Value;
                var t        = TargetSelector.GetTarget(maxR, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget())
                {
                    var distance = GetRealDistance(t);

                    if (!checkRok)
                    {
                        if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R, 1) > t.Health)
                        {
                            R.CastIfHitchanceEquals(t, HitChance.High, false);
                            //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                        }
                    }
                    else if (distance > minR)
                    {
                        var aDamage     = ObjectManager.Player.GetAutoAttackDamage(t);
                        var wDamage     = ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);
                        var rDamage     = ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);
                        var powPowRange = GetRealPowPowRange(t);

                        if (distance < (powPowRange + QAddRange) && !(aDamage * 3.5 > t.Health))
                        {
                            if (!W.IsReady() || !(wDamage > t.Health) || W.GetPrediction(t).CollisionObjects.Count > 0)
                            {
                                if (CountAlliesNearTarget(t, 500) <= 3)
                                {
                                    if (rDamage > t.Health /*&& !ObjectManager.Player.IsAutoAttacking &&
                                                            * !ObjectManager.Player.IsChanneling*/)
                                    {
                                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                                        //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                                    }
                                }
                            }
                        }
                        else if (distance > (powPowRange + QAddRange))
                        {
                            if (!W.IsReady() || !(wDamage > t.Health) || distance > W.Range ||
                                W.GetPrediction(t).CollisionObjects.Count > 0)
                            {
                                if (CountAlliesNearTarget(t, 500) <= 3)
                                {
                                    if (rDamage > t.Health /*&& !ObjectManager.Player.IsAutoAttacking &&
                                                            * !ObjectManager.Player.IsChanneling*/)
                                    {
                                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                                        //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
示例#9
0
        /// <summary>
        ///     Does the combo.
        /// </summary>
        private static void DoCombo()
        {
            var useQCombo       = Menu.Item("UseQCombo").IsActive();
            var useQSlowedCombo = Menu.Item("UseQSlowedCombo").IsActive();
            var useWCombo       = Menu.Item("UseWCombo").IsActive();
            var useECombo       = Menu.Item("UseECombo").IsActive();
            var useRCombo       = Menu.Item("UseRCombo").IsActive();
            var useRComboMode   = Menu.Item("UseRComboMode").GetValue <StringList>().SelectedIndex;
            var spellWeaveCombo = Menu.Item("SpellWeaveCombo").IsActive();

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

            if (!target.IsValidTarget())
            {
                if (HeroManager.Enemies.Any(x => R.IsInRange(x)) && useRComboMode == 2 && R.IsReady())
                {
                    R.Cast(target);
                }

                return;
            }

            if (useQCombo && Q.IsReady())
            {
                if (spellWeaveCombo)
                {
                    if (!target.HasPassive())
                    {
                        if (useQSlowedCombo && target.HasBuffOfType(BuffType.Slow))
                        {
                            CastQ(target);
                        }
                        else if (!useQSlowedCombo)
                        {
                            CastQ(target);
                        }
                    }
                }
                else
                {
                    CastQ(target);
                }
            }

            if (useWCombo && W.IsReady())
            {
                W.Cast(Game.CursorPos);
            }

            if (useECombo && E.IsReady())
            {
                CastE(target);
            }

            if (!useRCombo || !R.IsReady())
            {
                return;
            }

            // ReSharper disable once SwitchStatementMissingSomeCases
            switch (useRComboMode)
            {
            case 0:
                R.Cast(target);
                break;

            case 1:
                if (R.IsKillable(target))
                {
                    R.Cast(target);
                }
                break;
            }
        }
示例#10
0
        private static void ExecuteCombo()
        {
            if (!_e.IsReady())
            {
                return;
            }

            comboFinished = false;

            Obj_AI_Base t;
            var         cdQEx = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).CooldownExpires;
            var         cdWEx = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).CooldownExpires;
            var         cdEEx = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).CooldownExpires;

            var cdQ = Game.Time < cdQEx ? cdQEx - Game.Time : 0;
            var cdW = Game.Time < cdWEx ? cdWEx - Game.Time : 0;
            var cdE = Game.Time < cdEEx ? cdEEx - Game.Time : 0;

            if (LBcomboType == ComboType.qr && _q.IsReady())
            {
                t = TargetSelector.GetTarget(_q.Range, DamageType.Magical);
                if (t == null)
                {
                    return;
                }

                _q.Cast(t);
                _r.Cast(t);
            }

            if (LBcomboType == ComboType.ComboWR && _w.IsReady())
            {
                t = TargetSelector.GetTarget(_w.Range, DamageType.Magical);
                if (t == null)
                {
                    return;
                }

                if (!lbw)
                {
                    _w.Cast(t);
                }
                _r.Cast(t);
            }

            if (LBcomboType == ComboType.ComboER && _e.IsReady())
            {
                t = TargetSelector.GetTarget(_e.Range, DamageType.Magical);
                if (t == null)
                {
                    return;
                }

                _e.Cast(t);
                _r.Cast(t);
            }
            comboFinished = true;

            t = TargetSelector.GetTarget(_q.Range, DamageType.Magical);
            UserSummoners(t);
        }
示例#11
0
文件: Jinx.cs 项目: dsaiman/Marksman
        public override void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            if ((ComboActive || HarassActive) && unit.IsMe && (target is Obj_AI_Hero))
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));

                if (useW && W.IsReady())
                {
                    var t    = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                    var minW = GetValue <Slider>("MinWRange").Value;

                    if (t.IsValidTarget() && GetRealDistance(t) >= minW)
                    {
                        if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                }

                if (useQ)
                {
                    foreach (var t in
                             ObjectManager.Get <Obj_AI_Hero>()
                             .Where(t => t.IsValidTarget(GetRealPowPowRange(t) + QAddRange + 20f)))
                    {
                        var swapDistance = GetValue <bool>("SwapDistance");
                        var swapAoe      = GetValue <bool>("SwapAOE");
                        var distance     = GetRealDistance(t);
                        var powPowRange  = GetRealPowPowRange(t);

                        if (swapDistance && Q.IsReady())
                        {
                            if (distance > powPowRange && !FishBoneActive)
                            {
                                if (Q.Cast())
                                {
                                    return;
                                }
                            }
                            else if (distance < powPowRange && FishBoneActive)
                            {
                                if (Q.Cast())
                                {
                                    return;
                                }
                            }
                        }

                        if (swapAoe && Q.IsReady())
                        {
                            if (distance > powPowRange && PowPowStacks > 2 && !FishBoneActive &&
                                CountEnemies(t, 150) > 1)
                            {
                                if (Q.Cast())
                                {
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
示例#12
0
        private static void Combo()
        {
            var cdQEx = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).CooldownExpires;
            var cdWEx = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).CooldownExpires;
            var cdEEx = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).CooldownExpires;

            var cdQ = Game.Time < cdQEx ? cdQEx - Game.Time : 0;
            var cdW = Game.Time < cdWEx ? cdWEx - Game.Time : 0;
            var cdE = Game.Time < cdEEx ? cdEEx - Game.Time : 0;

            var t = TargetSelector.GetTarget(_q.Range * 2, DamageType.Magical);

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

            if (LBcomboKillable == ComboKillable.WithoutW && !lbw)
            {
                _w.Cast(t.ServerPosition);
            }

            if (_r.IsReady())
            {
                if (LBcomboType == ComboType.Auto)
                {
                    if (_q.Level > _w.Level)
                    {
                        if (_q.IsReady())
                        {
                            ExecuteCombo();
                        }
                    }
                    else
                    {
                        if (_w.IsReady())
                        {
                            ExecuteCombo();
                        }
                    }
                }
                else if ((LBcomboType == ComboType.qr && _q.IsReady()) ||
                         (LBcomboType == ComboType.ComboWR && _w.IsReady()) ||
                         (LBcomboType == ComboType.ComboER && _e.IsReady()))
                {
                    ExecuteCombo();
                }
                else
                {
                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancChaosOrbM") // R-Q
                    {
                        t = TargetSelector.GetTarget(_q.Range, DamageType.Magical);
                        if (t.IsValidTarget(_q.Range) &&
                            t.Health < GetRQDamage + QDamage(t))
                        {
                            _r.Cast(t);
                        }
                    }
                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancSlideM") // R-W
                    {
                        t = TargetSelector.GetTarget(_w.Range, DamageType.Magical);
                        if (t.IsValidTarget(_w.Range) &&
                            t.Health < GetRQDamage + QDamage(t))
                        {
                            _r.Cast(t);
                        }
                        ObjectManager.Player.Spellbook.CastSpell(SpellSlot.R, t, false);
                    }
                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancSoulShackleM") // R-E
                    {
                        t = TargetSelector.GetTarget(_e.Range, DamageType.Magical);
                        if (t.IsValidTarget(_e.Range) &&
                            t.Health < GetRQDamage + QDamage(t))
                        {
                            var pred = _e.GetPrediction(t);
                            if (pred.HitChance >= Ehitchance)
                            {
                                var predictE = Prediction.Position.PredictLinearMissile(t, _e.Range, 55, 250, 1600, 0);
                                _r.Cast(predictE.CastPosition);
                            }
                        }
                    }
                    comboFinished = true;
                }
                return;
            }

            if (_q.IsReady() && t.IsValidTarget(_q.Range) && comboFinished)
            {
                if (LBcomboType == ComboType.qr)
                {
                    if (!_r.IsReady())
                    {
                        _q.Cast(t);
                    }
                }
                else
                {
                    _q.Cast(t);
                }
            }

            if (_w.IsReady() && t.IsValidTarget(_w.Range) && !lbw && comboFinished)
            {
                if (LBcomboType == ComboType.ComboWR)
                {
                    if (!_r.IsReady())
                    {
                        _w.Cast(t);
                    }
                }
                else
                {
                    _w.Cast(t);
                }
            }

            if (_e.IsReady() && t.IsValidTarget(_e.Range) && comboFinished)
            {
                if (LBcomboType == ComboType.ComboER)
                {
                    if (!_r.IsReady())
                    {
                        var pred = _e.GetPrediction(t);
                        if (pred.HitChance >= Ehitchance)
                        {
                            var predictE = Prediction.Position.PredictLinearMissile(t, _e.Range, 55, 250, 1600, 0);
                            _e.Cast(predictE.CastPosition);
                        }
                    }
                }
                else
                {
                    var pred = _e.GetPrediction(t);
                    if (pred.HitChance >= Ehitchance && ObjectManager.Player.Distance(t) < _w.Range)
                    {
                        var predictE = Prediction.Position.PredictLinearMissile(t, _e.Range, 55, 250, 1600, 0);
                        _e.Cast(predictE.CastPosition);
                    }
                }
            }

            if (t != null && ignite != SpellSlot.Unknown &&
                ObjectManager.Player.Spellbook.CanUseSpell(ignite) == SpellState.Ready)
            {
                if (ObjectManager.Player.Distance(t) < 650 &&
                    ObjectManager.Player.GetSummonerSpellDamage(t, DamageLibrary.SummonerSpells.Ignite) >= t.Health)
                {
                    ObjectManager.Player.Spellbook.CastSpell(ignite, t);
                }
            }
        }
示例#13
0
        private static void Game_OnDraw(EventArgs args)
        {
            if (comboMenu["2chainzz"].Cast <KeyBind>().CurrentValue)
            {
                Drawing.DrawText(Drawing.Width * 0.45f, Drawing.Height * 0.78f, Color.Red, "Double Stun Active!");
            }

            if (comboMenu["wqre"].Cast <KeyBind>().CurrentValue)
            {
                Drawing.DrawText(Drawing.Width * 0.45f, Drawing.Height * 0.78f, Color.Red, "Gapclose Combo Active!");
            }
            var t          = TargetSelector.GetTarget(_w.Range * 2, DamageType.Physical);
            var xComboText = "Combo Kill";

            if (t.IsValidTarget(_w.Range))
            {
                if (t.Health < GetComboDamage(t))
                {
                    LBcomboKillable = ComboKillable.OneShot;
                    Drawing.DrawText(t.HPBarPosition.X + 145, t.HPBarPosition.Y + 20, Color.Red, xComboText);
                }
            }

            else if (t.IsValidTarget(_w.Range * 2 - 30))
            {
                if (t.Health < GetComboDamage(t) - ObjectManager.Player.GetSpellDamage(t, SpellSlot.W))
                {
                    LBcomboKillable = ComboKillable.WithoutW;
                    xComboText      = "Jump + " + xComboText;
                    Drawing.DrawText(t.HPBarPosition.X + 145, t.HPBarPosition.Y + 20, Color.Beige, xComboText);
                }
            }

            var xtextx = "You need to be lvl 6 LUL";

            if (Player.Level < 6 && comboMenu["wqre"].Cast <KeyBind>().CurrentValue)
            {
                Drawing.DrawText(Player.HPBarPosition.X + 145, Player.HPBarPosition.Y + 20, Color.LightGreen, xtextx);
            }

            if (drawMenu["drawQ"].Cast <CheckBox>().CurrentValue&& _q.IsReady())
            {
                Circle.Draw(SharpDX.Color.Purple, 700, ObjectManager.Player.Position);
            }

            if (drawMenu["drawW"].Cast <CheckBox>().CurrentValue&& _w.IsReady())
            {
                Circle.Draw(SharpDX.Color.Purple, 600, ObjectManager.Player.Position);
            }
            if (drawMenu["drawE"].Cast <CheckBox>().CurrentValue&& _e.IsReady())
            {
                Circle.Draw(SharpDX.Color.Purple, 950, ObjectManager.Player.Position);
            }

            var heropos = Drawing.WorldToScreen(ObjectManager.Player.Position);

            if (drawMenu["showcombo"].Cast <CheckBox>().CurrentValue)
            {
                if (comboMenu["combomode"].Cast <ComboBox>().CurrentValue == 0)
                {
                    Drawing.DrawText(heropos.X - 15, heropos.Y + 40, System.Drawing.Color.White, "Selected Prio: Auto");
                }
                if (comboMenu["combomode"].Cast <ComboBox>().CurrentValue == 1)
                {
                    Drawing.DrawText(heropos.X - 15, heropos.Y + 40, System.Drawing.Color.White, "Selected Prio: Q + R");
                }
                if (comboMenu["combomode"].Cast <ComboBox>().CurrentValue == 2)
                {
                    Drawing.DrawText(heropos.X - 15, heropos.Y + 40, System.Drawing.Color.White, "Selected Prio: W + R");
                }
                if (comboMenu["combomode"].Cast <ComboBox>().CurrentValue == 3)
                {
                    Drawing.DrawText(heropos.X - 15, heropos.Y + 40, System.Drawing.Color.White, "Selected Prio: E + R");
                }
            }
        }
示例#14
0
        private static void Game_OnTick(EventArgs args)
        {
            if (ksMenu["ksq"].Cast <CheckBox>().CurrentValue&& _q.IsReady())
            {
                var QTarget = TargetSelector.GetTarget(_q.Range, DamageType.Magical);
                if (QTarget == null)
                {
                    return;
                }
                if (QTarget.Health <= QDamage(QTarget))
                {
                    _q.Cast(QTarget);
                    return;
                }
            }
            if (ksMenu["ksw"].Cast <CheckBox>().CurrentValue&& _w.IsReady() &&
                ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "LeblancSlide")
            {
                var WTarget = TargetSelector.GetTarget(_w.Range, DamageType.Magical);
                if (WTarget == null)
                {
                    return;
                }
                if (WTarget.Health <= WDamage(WTarget))
                {
                    _w.Cast(WTarget.ServerPosition);
                    return;
                }
            }
            if (ksMenu["kse"].Cast <CheckBox>().CurrentValue&& _e.IsReady())
            {
                var ETarget = TargetSelector.GetTarget(_e.Range, DamageType.Magical);
                if (ETarget == null)
                {
                    return;
                }
                if (ETarget.Health <= EDamage(ETarget))
                {
                    var pred = _e.GetPrediction(ETarget);
                    if (pred.HitChance == Ehitchance)
                    {
                        var predictE = Prediction.Position.PredictLinearMissile(ETarget, _e.Range, 55, 250, 1600, 0);
                        _e.Cast(predictE.CastPosition);
                    }
                    return;
                }
            }
            if (ksMenu["ksqr"].Cast <CheckBox>().CurrentValue&& _r.IsReady() &&
                ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancChaosOrbM")
            {
                var QTarget = TargetSelector.GetTarget(_q.Range, DamageType.Magical);
                if (QTarget == null)
                {
                    return;
                }
                if (QTarget.Health <= RQDamage(QTarget))
                {
                    _r.Cast(QTarget);
                    return;
                }
            }
            if (ksMenu["kswr"].Cast <CheckBox>().CurrentValue&& _r.IsReady() &&
                ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancSlideM")
            {
                var WTarget = TargetSelector.GetTarget(_w.Range, DamageType.Magical);
                if (WTarget == null)
                {
                    return;
                }
                if (WTarget.Health <= WDamage(WTarget))
                {
                    _r.Cast(WTarget.ServerPosition);
                    return;
                }
            }

            if (ksMenu["kswr"].Cast <CheckBox>().CurrentValue&& _r.IsReady() && _e.IsReady())
            {
                var WTarget = TargetSelector.GetTarget(_w.Range, DamageType.Magical);
                if (WTarget == null)
                {
                    return;
                }
                if (WTarget.Health <= WDamage(WTarget) * 2)
                {
                    _w.Cast(WTarget.ServerPosition);
                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancSlideM")
                    {
                        _r.Cast(WTarget.ServerPosition);
                    }
                    return;
                }
            }
            if (ksMenu["kser"].Cast <CheckBox>().CurrentValue&& _r.IsReady() &&
                ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Name == "LeblancSoulShackleM")
            {
                var ETarget = TargetSelector.GetTarget(_e.Range, DamageType.Magical);
                if (ETarget == null)
                {
                    return;
                }
                if (ETarget.Health <= ObjectManager.Player.GetSpellDamage(ETarget, SpellSlot.E))
                {
                    var pred = _e.GetPrediction(ETarget);
                    if (pred.HitChance == HitChance.Low)
                    {
                        _r.Cast(ETarget);
                    }
                }
            }
        }
示例#15
0
        private static void Combo()
        {
            AIHeroClient target = TargetSelector.GetTarget(E.Range * 2);

            if (target == null)
            {
                return;
            }
            //castHydra(target);
            bool hasIgnite   = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  FuryQ       = Damage.GetSpellDamage(player, target, SpellSlot.Q) * 0.5;
            var  FuryW       = Damage.GetSpellDamage(player, target, SpellSlot.W) * 0.5;
            var  eDmg        = Damage.GetSpellDamage(player, target, SpellSlot.E);
            var  combodamage = ComboDamage(target);

            if (hasIgnite &&
                player.GetSummonerSpellDamage(target, SummonerSpell.Ignite) > target.Health)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (player.Distance(target) > E.Range && E.IsReady() && (W.IsReady() || Q.IsReady()) && lastE.Equals(0) &&
                config["csettings"].GetValue <MenuBool>("usee"))
            {
                var closeGapTarget = GameObjects.EnemyMinions
                                     .Where(m => m.IsValidTarget(E.Range) && m.Distance(target.Position) < Q.Range - 400)
                                     .OrderByDescending(m => countMinionsInrange(m.Position, Q.Range))
                                     .FirstOrDefault();
                if (closeGapTarget != null)
                {
                    if ((canBeOpWIthQ(closeGapTarget.Position) || fury) && !rene)
                    {
                        if (E.CanCast(closeGapTarget))
                        {
                            E.Cast(closeGapTarget.Position);
                            lastE = System.Environment.TickCount;
                            return;
                        }
                    }
                }
            }
            if (config["csettings"].GetValue <MenuBool>("useq") && Q.CanCast(target) && !renw && !player.IsDashing() &&
                checkFuryMode(SpellSlot.Q, target))
            {
                Q.Cast();
            }
            var distance = player.Distance(target.Position);

            if (config["csettings"].GetValue <MenuBool>("usee") && lastE.Equals(0) && E.CanCast(target) &&
                (eDmg > target.Health ||
                 (((W.IsReady() && canBeOpWIthQ(target.Position) && !rene) ||
                   (distance > target.Distance(player.Position.Extend(target.Position, E.Range)) - distance)))))
            {
                E.Cast(target.Position);
                lastE = System.Environment.TickCount;
                return;
            }
            if (config["csettings"].GetValue <MenuBool>("usee") && checkFuryMode(SpellSlot.E, target) && !lastE.Equals(0) &&
                (eDmg + player.GetAutoAttackDamage(target) > target.Health ||
                 (((W.IsReady() && canBeOpWIthQ(target.Position) && !rene) ||
                   (distance < target.Distance(player.Position.Extend(target.Position, E.Range)) - distance) ||
                   player.Distance(target) > E.Range - 100))))
            {
                var time = System.Environment.TickCount - lastE;
                if (time > 3600f || combodamage > target.Health || (player.Distance(target) > E.Range - 100))
                {
                    E.Cast(target.Position);
                    lastE = 0;
                }
            }

            if ((player.Health * 100 / player.MaxHealth) <= config["csettings"].GetValue <MenuSlider>("user").Value&&
                config["csettings"].GetValue <MenuSlider>("userindanger").Value <= player.CountEnemyHeroesInRange(R.Range))
            {
                R.Cast();
            }
        }
示例#16
0
        private void Game_OnUpdate(EventArgs args)
        {
            _q2.UpdateSourcePosition(ObjectManager.Player.Pet.Position, ObjectManager.Player.Pet.Position);

            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                        case Orbwalking.OrbwalkingMode.Combo:
                        {
                            if (MenuProvider.Champion.Combo.UseQ)
                                if (_q.IsReadyPerfectly())
                                {
                                    QLogic(false);
                                }

                            if (MenuProvider.Champion.Combo.UseW)
                                if (_w.IsReadyPerfectly())
                                {
                                    var target =
                                        HeroManager.Enemies.Where(
                                            x =>
                                                x.IsValidTarget(_w.Range) &&
                                                MenuProvider.ChampionMenuInstance.Item(
                                                    "Combo.W Targets." + x.ChampionName, true).GetValue<bool>())
                                            .OrderByDescending(x => TargetSelector.GetPriority(x))
                                            .FirstOrDefault();

                                    if (target != null)
                                    {
                                        _w.CastOnUnit(target);
                                    }
                                    else
                                    {
                                        if (_w.IsReadyPerfectly())
                                        {
                                            if (ObjectManager.Player.CountEnemiesInRange(1000f) >= 1)
                                                _w.Cast(ObjectManager.Player);
                                        }
                                    }
                                }

                            if (MenuProvider.Champion.Combo.UseE)
                                if (_e.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);

                                    if (target != null)
                                    {
                                        _e.CastOnUnit(target);
                                    }
                                }

                            if (_r.IsReadyPerfectly())
                            {
                                foreach (var target in HeroManager.Allies.Where(x => x.IsValidTarget(_r.Range, false)))
                                {
                                    if (target.CountEnemiesInRange(350) >=
                                        MenuProvider.Champion.Combo.GetSliderValue("Use R if Will Hit (Airborne) >=")
                                            .Value)
                                        _r.CastOnUnit(target);
                                }
                            }
                            break;
                        }
                        case Orbwalking.OrbwalkingMode.Mixed:
                        {
                            if (MenuProvider.Champion.Harass.UseQ)
                                if (_q.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        QLogic(false);
                                    }

                            if (MenuProvider.Champion.Harass.UseE)
                                if (_e.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);

                                        if (target != null)
                                        {
                                            _e.CastOnUnit(target);
                                        }
                                    }

                            break;
                        }
                        case Orbwalking.OrbwalkingMode.LaneClear:
                        {
                            //Laneclear
                            if (MenuProvider.Champion.Laneclear.UseQ)
                                if (_q.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                    {
                                        var farmLocation = _q.GetLineFarmLocation(MinionManager.GetMinions(_q.Range));

                                        if (farmLocation.MinionsHit >= 4)
                                        {
                                            _q.Cast(farmLocation.Position);
                                        }
                                    }

                            //Jungleclear
                            if (MenuProvider.Champion.Jungleclear.UseQ)
                                if (_q.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                    {
                                        var farmLocation =
                                            _q.GetLineFarmLocation(MinionManager.GetMinions(600, MinionTypes.All,
                                                MinionTeam.Neutral, MinionOrderTypes.MaxHealth));

                                        if (farmLocation.MinionsHit >= 1)
                                        {
                                            _q.Cast(farmLocation.Position);
                                        }
                                    }

                            if (MenuProvider.Champion.Jungleclear.UseE)
                                if (_e.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                    {
                                        var target =
                                            MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                MinionOrderTypes.MaxHealth).FirstOrDefault();

                                        if (target != null)
                                        {
                                            _e.CastOnUnit(target);
                                        }
                                    }
                            break;
                        }
                    }

                    if (MenuProvider.Champion.Harass.AutoHarass)
                        if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo &&
                            MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Mixed)
                            if (!ObjectManager.Player.IsRecalling())
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    if (MenuProvider.Champion.Harass.UseQ)
                                        if (_q.IsReadyPerfectly())
                                            QLogic(false);

                                    if (MenuProvider.Champion.Harass.UseE)
                                        if (_e.IsReadyPerfectly())
                                        {
                                            var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                            if (target != null)
                                                _e.CastOnUnit(target);
                                        }
                                }
                }

                if (MenuProvider.Champion.Misc.UseKillsteal)
                {
                    if (_q.IsReadyPerfectly())
                    {
                        QLogic(true);
                    }

                    foreach (var target in HeroManager.Enemies)
                    {
                        if (_e.IsReadyPerfectly())
                        {
                            if (target.IsKillableAndValidTarget(_e.GetDamage(target), _e.DamageType, _e.Range))
                            {
                                _e.CastOnUnit(target);
                            }
                        }
                    }
                }

                if (MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.Auto R", true).GetValue<bool>())
                {
                    if (_r.IsReadyPerfectly())
                        if (MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.ForMe", true).GetValue<bool>())
                        {
                            if (ObjectManager.Player.HealthPercent <=
                                MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.Health", true)
                                    .GetValue<Slider>()
                                    .Value)
                                if (ObjectManager.Player.CountEnemiesInRange(800f) >= 2)
                                    _r.CastOnUnit(ObjectManager.Player);
                        }

                    if (_r.IsReadyPerfectly())
                    {
                        foreach (
                            var target in
                                HeroManager.Allies.Where(
                                    x =>
                                        x.IsValidTarget(_r.Range, false) && !x.IsZombie && !x.IsMe &&
                                        x.CountEnemiesInRange(800f) >= 2 &&
                                        MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.For" + x.ChampionName, true)
                                            .GetValue<bool>() &&
                                        x.HealthPercent <
                                        MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.Health", true)
                                            .GetValue<Slider>()
                                            .Value).OrderBy(x => x.Health))
                        {
                            if (_r.CastOnUnit(target))
                            {
                                break;
                            }
                        }
                    }
                }
            }
        }
示例#17
0
        private static void Harass()
        {
            AIHeroClient target = TargetSelector.GetTarget(E.Range);

            if (target == null)
            {
                return;
            }
            switch (config["Hsettings"].GetValue <MenuList>("useCH").SelectedValue) // "Use harass combo", "E-furyQ-Eback if possible", "Basic"
            {
            case "E-furyQ-Eback if possible":
                if (Q.IsReady() && E.IsReady() && lastE.Equals(0) && fury && !rene)
                {
                    if (config["Hsettings"].GetValue <MenuBool>("donteqwebtower") &&
                        player.Position.Extend(target.Position, E.Range).IsUnderEnemyTurret())
                    {
                        return;
                    }
                    var closeGapTarget = GameObjects.EnemyMinions.Where(m => m.IsValidTarget(E.Range) && m.Distance(target.Position) < Q.Range - 40)
                                         .OrderByDescending(i => countMinionsInrange(i.Position, Q.Range))
                                         .FirstOrDefault();
                    if (closeGapTarget != null)
                    {
                        lastEpos = player.Position;
                        EnsoulSharp.SDK.Utility.DelayAction.Add(4100, () => lastEpos = new Vector3());
                        E.Cast(closeGapTarget.Position);
                        lastE = System.Environment.TickCount;
                        return;
                    }
                    else
                    {
                        lastEpos = player.Position;
                        EnsoulSharp.SDK.Utility.DelayAction.Add(4100, () => lastEpos = new Vector3());
                        E.Cast(target.Position);
                        lastE = System.Environment.TickCount;
                        return;
                    }
                }
                if (player.Distance(target) < player.GetRealAutoAttackRange(target) && Q.IsReady() &&
                    E.IsReady() && E.IsReady())
                {
                    Orbwalker.ForceTarget = target;
                }
                return;

            case "Use harass combo":
                if (Q.IsReady() && W.IsReady() && !rene && E.CanCast(target))
                {
                    if (config["Hsettings"].GetValue <MenuBool>("donteqwebtower") &&
                        player.Position.Extend(target.Position, E.Range).IsUnderEnemyTurret())
                    {
                        return;
                    }
                    if (E.CastIfHitchanceEquals(target, HitChance.High))
                    {
                        lastE = System.Environment.TickCount;
                    }
                }
                if (rene && E.CanCast(target) && !lastE.Equals(0) && System.Environment.TickCount - lastE > 3600)
                {
                    E.CastIfHitchanceEquals(target, HitChance.High);
                }
                if (player.Distance(target) < player.GetRealAutoAttackRange(target) && Q.IsReady() &&
                    E.IsReady() && E.IsReady())
                {
                    Orbwalker.ForceTarget = target;
                }
                return;

            default:
                break;
            }

            if (config["Hsettings"].GetValue <MenuBool>("useqH") && Q.CanCast(target))
            {
                Q.Cast();
            }

            if (config["Hsettings"].GetValue <MenuList>("useCH").SelectedValue == "Use harass combo" && !lastE.Equals(0) && rene &&
                !Q.IsReady() && !renw)
            {
                if (lastEpos.IsValid())
                {
                    E.Cast(player.Position.Extend(lastEpos, 350f));
                }
            }
        }
示例#18
0
 private static void Game_OnGameUpdate(EventArgs args)
 {
     ManaMenager();
     PotionMenager();
     if (Q.IsReady())
     {
         var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
         if (t.IsValidTarget())
         {
             var qDmg = Q.GetDamage(t) * 1.9;
             if (Orbwalking.InAutoAttackRange(t))
             {
                 qDmg = qDmg + ObjectManager.Player.GetAutoAttackDamage(t) * 3;
             }
             if (qDmg > t.Health)
             {
                 Q.Cast(t, true);
             }
             else if (Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.Mana > RMANA + QMANA)
             {
                 CastSpell(Q, t, Config.Item("Hit").GetValue <Slider>().Value);
             }
             else if (((Orbwalker.ActiveMode.ToString() == "Mixed" || Orbwalker.ActiveMode.ToString() == "LaneClear")) && Config.Item("haras" + t.BaseSkinName).GetValue <bool>())
             {
                 if (ObjectManager.Player.Mana > RMANA + WMANA + QMANA + QMANA && t.Path.Count() > 1)
                 {
                     CastSpell(Q, t, Config.Item("Hit").GetValue <Slider>().Value);
                 }
                 else if (ObjectManager.Player.Mana > ObjectManager.Player.MaxMana * 0.9)
                 {
                     CastSpell(Q, t, Config.Item("Hit").GetValue <Slider>().Value);
                 }
                 else if (ObjectManager.Player.Mana > RMANA + WMANA + QMANA + QMANA)
                 {
                     Q.CastIfWillHit(t, 2, true);
                 }
             }
             if (ObjectManager.Player.Mana > RMANA + QMANA + WMANA && Q.IsReady())
             {
                 foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(Q.Range)))
                 {
                     if (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) ||
                         enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) ||
                         enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuffOfType(BuffType.Slow) || enemy.HasBuff("Recall"))
                     {
                         Q.Cast(enemy, true);
                     }
                     else
                     {
                         Q.CastIfHitchanceEquals(enemy, HitChance.Immobile, true);
                     }
                 }
             }
         }
     }
     if (R.IsReady() && Orbwalker.ActiveMode.ToString() == "Combo" && Config.Item("autoR").GetValue <bool>())
     {
         var t = TargetSelector.GetTarget(800, TargetSelector.DamageType.Physical);
         if (ObjectManager.Player.CountEnemiesInRange(800f) > 2)
         {
             R.Cast();
         }
         else if (t.IsValidTarget() && Orbwalker.GetTarget() == null && Orbwalker.ActiveMode.ToString() == "Combo" && ObjectManager.Player.GetAutoAttackDamage(t) * 2 > t.Health && !Q.IsReady() && t.CountEnemiesInRange(800) < 3)
         {
             R.Cast();
         }
     }
 }
示例#19
0
文件: Jayce.cs 项目: 568123745/CN-1
        private void UseSpells(bool useQ, bool useW, bool useE, bool useQ2, bool useW2, bool useE2, bool useR, String source)
        {
            var qTarget  = TargetSelector.GetTarget(_qCharge.Range, TargetSelector.DamageType.Physical);
            var q2Target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Physical);
            var e2Target = TargetSelector.GetTarget(E2.Range, TargetSelector.DamageType.Physical);

            //mana manager for harass
            var mana        = menu.Item("manaH", true).GetValue <Slider>().Value;
            var manaPercent = Player.Mana / Player.MaxMana * 100;

            //Main Combo
            if (source == "Combo")
            {
                if (qTarget != null)
                {
                    if (useQ && _canQcd == 0 && Player.Distance(qTarget) <= _qCharge.Range && !_hammerTime)
                    {
                        CastQCannon(qTarget, useE);
                        return;
                    }
                }

                if (_hammerTime)
                {
                    if (q2Target != null)
                    {
                        if (useW2 && Player.Distance(q2Target) <= 300 && W.IsReady())
                        {
                            W.Cast();
                        }

                        if (useQ2 && Player.Distance(q2Target) <= Q2.Range + q2Target.BoundingRadius && Q2.IsReady())
                        {
                            Q2.Cast(q2Target, packets());
                        }
                    }
                    if (e2Target != null)
                    {
                        if (useE2 && ECheck(e2Target, useQ, useW) && Player.Distance(e2Target) <= E2.Range + e2Target.BoundingRadius && E2.IsReady())
                        {
                            E2.Cast(q2Target, packets());
                        }
                    }
                }

                var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);
                if (itemTarget != null)
                {
                    var dmg = GetComboDamage(itemTarget);
                    ActiveItems.Target = itemTarget;

                    //see if killable
                    if (dmg > itemTarget.Health - 50)
                    {
                        ActiveItems.KillableTarget = true;
                    }

                    ActiveItems.UseTargetted = true;
                }

                //form switch check
                if (useR)
                {
                    SwitchFormCheck(q2Target, useQ, useW, useQ2, useW2, useE2);
                }
            }
            else if (source == "Harass" && manaPercent > mana)
            {
                if (qTarget != null)
                {
                    if (useQ && _canQcd == 0 && Player.Distance(qTarget) <= _qCharge.Range && !_hammerTime)
                    {
                        CastQCannon(qTarget, useE);
                        return;
                    }
                }
                if (_hammerTime)
                {
                    if (q2Target != null)
                    {
                        if (useW2 && Player.Distance(q2Target) <= 300 && W.IsReady())
                        {
                            W.Cast();
                        }

                        if (useQ2 && Player.Distance(q2Target) <= Q2.Range + q2Target.BoundingRadius && Q2.IsReady())
                        {
                            Q2.Cast(q2Target, packets());
                        }
                    }

                    if (e2Target != null)
                    {
                        if (useE2 && Player.Distance(q2Target) <= E2.Range + e2Target.BoundingRadius && E2.IsReady())
                        {
                            E2.Cast(q2Target, packets());
                        }
                    }
                }

                //form switch check
                if (useR && q2Target != null)
                {
                    SwitchFormCheck(q2Target, useQ, useW, useQ2, useW2, useE2);
                }
            }
        }
示例#20
0
 private void LogicR()
 {
     if (RMissile == null)
     {
         var t = TargetSelector.GetTarget(R.Range + 400, TargetSelector.DamageType.Magical);
         if (t.IsValidTarget())
         {
             if (R.GetDamage(t) > t.Health)
             {
                 R.Cast(t, true, true);
             }
             else if (Player.Mana > RMANA + EMANA && E.GetDamage(t) * 2 + R.GetDamage(t) > t.Health)
             {
                 R.Cast(t, true, true);
             }
             if (Player.Mana > RMANA + EMANA + QMANA + WMANA && Program.Combo)
             {
                 R.Cast(t, true, true);
             }
         }
         if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmR", true).GetValue <bool>())
         {
             var allMinions = Cache.GetMinions(Player.ServerPosition, R.Range);
             var farmPos    = R.GetCircularFarmLocation(allMinions, Rwidth);
             if (farmPos.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
             {
                 R.Cast(farmPos.Position);
             }
         }
     }
     else
     {
         if (Program.LaneClear && Config.Item("farmR", true).GetValue <bool>())
         {
             var allMinions = Cache.GetMinions(RMissile.Position, Rwidth);
             var mobs       = Cache.GetMinions(RMissile.Position, Rwidth, MinionTeam.Neutral);
             if (mobs.Count > 0)
             {
                 if (!Config.Item("jungleR", true).GetValue <bool>())
                 {
                     R.Cast();
                 }
             }
             else if (allMinions.Count > 0)
             {
                 if (allMinions.Count < 2 || Player.ManaPercent < Config.Item("Mana", true).GetValue <Slider>().Value)
                 {
                     R.Cast();
                 }
                 else if (Player.ManaPercent < Config.Item("Mana", true).GetValue <Slider>().Value)
                 {
                     R.Cast();
                 }
             }
             else
             {
                 R.Cast();
             }
         }
         else if (!Program.None && (RMissile.Position.CountEnemiesInRange(470) == 0 || Player.Mana < EMANA + QMANA))
         {
             R.Cast();
         }
     }
 }
示例#21
0
        //-------------------------------------------Game_OnTick----------------------------------------------

        static void Game_OnTick(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }

            Orbwalker.ValidAzirSoldiers.RemoveAll(it => it.Health > 0 || it.Distance(Player) >= 1300);

            if (!R.IsReady() || Player.CountEnemiesInRange(1100) == 0)
            {
                WhyIDidThatAddonInsec = false;
            }

            R.Width = 133 * (3 + R.Level);

            if (Menu["HU3"].Cast <KeyBind>().CurrentValue)
            {
                switch (Menu["HU3Mode"].Cast <Slider>().CurrentValue)
                {
                case 1:
                    EloBuddy.Player.DoEmote(Emote.Joke);
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    break;

                case 2:
                    EloBuddy.Player.DoEmote(Emote.Taunt);
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    break;

                case 3:
                    EloBuddy.Player.DoEmote(Emote.Dance);
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    break;

                case 4:
                    EloBuddy.Player.DoEmote(Emote.Laugh);
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    break;

                default:
                    break;
                }
            }

            if (R.IsReady() && Game.Time - LastQTime > 0.1f && Game.Time - LastQTime < 1)
            {
                Player.Spellbook.CastSpell(SpellSlot.R, CursorCorrectRange(R.Range));
            }

            if (WhyIDidThatAddonInsec)
            {
                Orbwalker.DisableAttacking = true; Orbwalker.DisableMovement = true;
            }
            else
            {
                Orbwalker.DisableAttacking = false; Orbwalker.DisableMovement = false;
            }

            if (Zhonya.IsReady() && Menu["UseZhonya?"].Cast <CheckBox>().CurrentValue&& Player.HealthPercent <= Menu["ZhonyaHealth"].Cast <Slider>().CurrentValue&& EntityManager.Heroes.Enemies.Any(it => it.Distance(Player) <= it.GetAutoAttackRange() && it.IsValidTarget()))
            {
                Zhonya.Cast();
            }

            if (Player.CountEnemiesInRange(1000) > 0)
            {
                Modes.SaveAlly();
            }

            Target = TargetSelector.GetTarget(W.Range + Q.Range, DamageType.Magical);

            //---------------------------------------------Smite Usage---------------------------------------------

            if (Smite != null)
            {
                if (Smite.IsReady() && Menu["Use Smite?"].Cast <CheckBox>().CurrentValue)
                {
                    Obj_AI_Minion Mob = EntityManager.MinionsAndMonsters.GetJungleMonsters(Player.Position, Smite.Range).FirstOrDefault();

                    if (Mob != default(Obj_AI_Minion))
                    {
                        bool kill = GetSmiteDamage() >= Mob.Health;

                        if (kill)
                        {
                            if ((Mob.Name.Contains("SRU_Dragon") || Mob.Name.Contains("SRU_Baron")))
                            {
                                Smite.Cast(Mob);
                            }
                            else if (Mob.Name.StartsWith("SRU_Red") && Menu["Red?"].Cast <CheckBox>().CurrentValue)
                            {
                                Smite.Cast(Mob);
                            }
                            else if (Mob.Name.StartsWith("SRU_Blue") && Menu["Blue?"].Cast <CheckBox>().CurrentValue)
                            {
                                Smite.Cast(Mob);
                            }
                            else if (Mob.Name.StartsWith("SRU_Murkwolf") && Menu["Wolf?"].Cast <CheckBox>().CurrentValue)
                            {
                                Smite.Cast(Mob);
                            }
                            else if (Mob.Name.StartsWith("SRU_Krug") && Menu["Krug?"].Cast <CheckBox>().CurrentValue)
                            {
                                Smite.Cast(Mob);
                            }
                            else if (Mob.Name.StartsWith("SRU_Gromp") && Menu["Gromp?"].Cast <CheckBox>().CurrentValue)
                            {
                                Smite.Cast(Mob);
                            }
                            else if (Mob.Name.StartsWith("SRU_Razorbeak") && Menu["Raptor?"].Cast <CheckBox>().CurrentValue)
                            {
                                Smite.Cast(Mob);
                            }
                        }
                    }
                }
            }

            //-----------------------------------------------Auto Ignite----------------------------------------

            if (Menu["Auto Ignite"].Cast <CheckBox>().CurrentValue&& Ignite != null)
            {
                if (Ignite.IsReady())
                {
                    var IgniteEnemy = EntityManager.Heroes.Enemies.FirstOrDefault(it => DamageLibrary.GetSummonerSpellDamage(Player, it, DamageLibrary.SummonerSpells.Ignite) >= it.Health - 30);

                    if (IgniteEnemy != null)
                    {
                        if ((IgniteEnemy.Distance(Player) >= 300 || Player.HealthPercent <= 40))
                        {
                            Ignite.Cast(IgniteEnemy);
                        }
                    }
                }
            }

            //----------------------------------------------------KS----------------------------------------------

            if (Menu["KS"].Cast <CheckBox>().CurrentValue&& Player.CountEnemiesInRange(W.Range + Q.Range) > 0)
            {
                Modes.KS();
            }

            //---------------------------------------------Flee Key-----------------------------------------------

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee) && E.IsReady())
            {
                Modes.Flee();
            }

            //--------------------------------------------Orbwalker Modes-------------------------------------------

            if (Target != null)
            {
                if (Target.IsValidTarget())
                {
                    Modes.UpdateVariables();

                    if (R.IsReady() && Player.Mana >= GetFuckingInsecMana)
                    {
                        //--------------------------------------------------Insec--------------------------------------------

                        if (Menu["Insec"].Cast <KeyBind>().CurrentValue)
                        {
                            Insec(Target, Game.CursorPos);
                        }

                        //--------------------------------------------------WhyInsec------------------------------------------

                        else if (Menu["WhyInsec"].Cast <KeyBind>().CurrentValue)
                        {
                            WhyInsec(Target, Game.CursorPos);
                        }
                    }

                    //---------------------------------------------------Combo--------------------------------------------

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                    {
                        Modes.Combo();
                    }

                    //---------------------------------------------------Mixed--------------------------------------------

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) && Player.ManaPercent >= Menu["Harass, Mana %"].Cast <Slider>().CurrentValue)
                    {
                        Modes.Harass();
                    }
                }

                else
                {
                    Target = null;
                }
            }

            //---------------------------------------------------JungleClear--------------------------------------------

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) && Player.ManaPercent >= Menu["JungleClear, Mana %"].Cast <Slider>().CurrentValue)
            {
                Modes.JungleClear();
            }

            //---------------------------------------------------LaneClear--------------------------------------------

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && Player.ManaPercent >= Menu["LaneClear, Mana %"].Cast <Slider>().CurrentValue)
            {
                Modes.LaneClear();
            }

            return;
        }
示例#22
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                if (target.IsValidTarget(_q.Range))
                                {
                                    _q.SPredictionCast(target, _q.MinHitChance);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                if (target != null)
                                {
                                    if (ConfigMenu.SelectedPrediction.SelectedIndex == 0)
                                    {
                                        _w.SPredictionCast(target, _w.MinHitChance);
                                    }
                                    else
                                    {
                                        _w.Cast(target, false, true);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.CountEnemiesInRange(700) == 0)
                                {
                                    var killableTarget =
                                        HeroManager.Enemies.FirstOrDefault(
                                            x =>
                                            !Orbwalking.InAutoAttackRange(x) &&
                                            x.IsKillableAndValidTarget(_r.GetDamage(x),
                                                                       TargetSelector.DamageType.Magical, _r.Range) &&
                                            _r.GetPrediction(x).Hitchance >= _r.MinHitChance);
                                    if (killableTarget != null)
                                    {
                                        _r.Cast(killableTarget, false, true);
                                    }
                                    _r.CastIfWillHit(TargetSelector.GetTarget(_r.Range, _r.DamageType), 3);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                    if (target.IsValidTarget(_q.Range))
                                    {
                                        _q.SPredictionCast(target, _q.MinHitChance);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                    if (target != null)
                                    {
                                        _w.Cast(target, false, true);
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(_q.Range)
                                        .OrderBy(x => x.Health)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical, _q.Range) &&
                                            _q.GetPrediction(x).Hitchance >= _q.MinHitChance);
                                    if (target != null)
                                    {
                                        _q.Cast(target);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsValidTarget(600) &&
                                            _q.GetPrediction(x).Hitchance >= _q.MinHitChance);
                                    if (target != null)
                                    {
                                        _q.Cast(target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }

                    if (MenuProvider.Champion.Harass.AutoHarass)
                    {
                        if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
                        {
                            if (!ObjectManager.Player.IsRecalling())
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    if (MenuProvider.Champion.Harass.UseQ)
                                    {
                                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                        {
                                            var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                            if (target != null)
                                            {
                                                if (ObjectManager.Player.UnderTurret(true)
                                                    ? !target.UnderTurret(true)
                                                    : true)
                                                {
                                                    _q.Cast(target);
                                                }
                                            }
                                        }
                                    }
                                }

                                if (_w.IsReadyPerfectly())
                                {
                                    if (MenuProvider.Champion.Harass.UseW)
                                    {
                                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                        {
                                            var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                            if (target != null)
                                            {
                                                if (ObjectManager.Player.UnderTurret(true)
                                                    ? !target.UnderTurret(true)
                                                    : true)
                                                {
                                                    _w.Cast(target);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
示例#23
0
        public static void Execute()
        {
            #region Ignite

            if (Program.Ignite != null && Program.Ignite.IsReady())
            {
                var ignitableEnemies =
                    EntityManager.Heroes.Enemies.Where(
                        t =>
                        t.IsValidTarget(Program.Ignite.Range) && !t.HasUndyingBuff() &&
                        Extension.DamageLibrary.CalculateDamage(t, false, false, false, false, true) >= t.Health);
                var igniteEnemy = TargetSelector.GetTarget(ignitableEnemies, DamageType.True);

                if (igniteEnemy != null)
                {
                    if (Program.Ignite != null && UseIgnite)
                    {
                        if (Program.Ignite.IsInRange(igniteEnemy))
                        {
                            Program.Ignite.Cast(igniteEnemy);
                        }
                    }
                }
            }

            #endregion

            if (Player.Instance.IsUnderTurret())
            {
                return;
            }

            var killableEnemies =
                EntityManager.Heroes.Enemies.Where(
                    t =>
                    t.IsValidTarget() && !t.HasUndyingBuff() &&
                    Extension.DamageLibrary.CalculateDamage(t, UseQ, UseW, UseE, UseQr, false) >= t.Health);
            var target = TargetSelector.GetTarget(killableEnemies, DamageType.Magical);

            if (target == null)
            {
                return;
            }

            if (UseQ &&
                target.Health <= Extension.DamageLibrary.CalculateDamage(target, true, false, false, false, false))
            {
                CastQ(target);
            }

            else if (UseW &&
                     target.Health <=
                     Extension.DamageLibrary.CalculateDamage(target, false, true, false, false, false))
            {
                CastW(target, true);
            }

            else if (UseE &&
                     target.Health <=
                     Extension.DamageLibrary.CalculateDamage(target, false, false, true, false, false))
            {
                CastE(target);
            }

            else if (target.Health <=
                     Extension.DamageLibrary.CalculateDamage(target, false, false, false, true, false))
            {
                CastR(target, true);
            }

            else if (UseQ && UseW &&
                     target.Health <=
                     Extension.DamageLibrary.CalculateDamage(target, true, true, false, false, false))
            {
                if (!Program.Q.IsReady() || !Program.W.IsReady())
                {
                    return;
                }

                CastQ(target);
                Core.DelayAction(() =>
                {
                    if (!target.IsDead &&
                        Extension.DamageLibrary.CalculateDamage(target, false, true, false, false, false) >=
                        target.Health)
                    {
                        CastW(target, true);
                        Core.DelayAction(() =>
                        {
                            if (target.IsDead &&
                                Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                            {
                                ResetW = true;
                            }
                        }, Program.W.CastDelay);
                    }
                }, Program.Q.CastDelay);
            }

            else if (UseQ && (UseQr || UseWr || UseEr) &&
                     target.Health <=
                     Extension.DamageLibrary.CalculateDamage(target, true, false, false, true, false))
            {
                if (!Program.Q.IsReady() || !Program.RReturn.IsReady())
                {
                    return;
                }

                CastQ(target);
                Core.DelayAction(() =>
                {
                    if (!target.IsDead)
                    {
                        CastR(target, UseReturn2);
                    }
                }, Program.Q.CastDelay);
            }

            else if (UseQ && UseW && UseE &&
                     target.Health <=
                     Extension.DamageLibrary.CalculateDamage(target, true, true, true, false, false))
            {
                if (!Program.Q.IsReady() || !Program.W.IsReady() || !Program.E.IsReady())
                {
                    return;
                }

                CastQ(target);
                Core.DelayAction(() =>
                {
                    if (!target.IsDead)
                    {
                        CastW(target, false);
                        Core.DelayAction(() =>
                        {
                            if (!target.IsDead)
                            {
                                CastE(target);
                                ResetW = UseReturn;
                            }
                            else if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() ==
                                     "leblancslidereturn")
                            {
                                ResetW = UseReturn;
                            }
                        }, Program.W.CastDelay);
                    }
                }, Program.Q.CastDelay);
            }

            else
            {
                if (!Program.Q.IsReady() || !Program.W.IsReady() || !Program.E.IsReady() ||
                    !Program.QUltimate.IsReady())
                {
                    return;
                }

                CastQ(target);
                Core.DelayAction(() =>
                {
                    if (!target.IsDead &&
                        Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() ==
                        "leblancchaosorbm")
                    {
                        CastR(target, false);
                        Core.DelayAction(() =>
                        {
                            if (!target.IsDead &&
                                Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() ==
                                "leblancslide")
                            {
                                CastW(target, false);
                                Core.DelayAction(() =>
                                {
                                    if (!target.IsDead)
                                    {
                                        CastE(target);
                                        ResetW = UseReturn;
                                    }
                                    else if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() ==
                                             "leblancslidereturn")
                                    {
                                        ResetW = UseReturn;
                                    }
                                }, Program.W.CastDelay);
                            }
                        }, Program.QUltimate.CastDelay);
                    }
                }, Program.Q.CastDelay);
            }
        }
示例#24
0
        private static void OnUpdate(EventArgs args)
        {
            if (player.IsDead)
            {
                return;
            }

            qTarget = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            wTarget = TargetSelector.GetTarget(W.Range, DamageType.Magical);
            eTarget = TargetSelector.GetTarget(E.Range, DamageType.Magical);

            var flags = Orbwalker.ActiveModesFlags;
            if (flags.HasFlag(Orbwalker.ActiveModes.Combo) && menuIni.Get<CheckBox>("Combo").CurrentValue)
            {
                Orbwalker.DisableAttacking = ComboMenu.Get<CheckBox>("CUse_AA").CurrentValue && player.Mana > Q.Handle.SData.Mana * 3;
                if (MiscMenu.Get<CheckBox>("SaveR").CurrentValue && player.Mana - (SaveR() / 3) - 30 > R.Handle.SData.Mana && player.Level >= 6
                    && R.IsLearned)
                {
                    Combo();
                }

                if (!MiscMenu.Get<CheckBox>("SaveR").CurrentValue || player.Level < 6 && !R.IsLearned || player.IsZombie)
                {
                    Combo();
                }
            }

            if (flags.HasFlag(Orbwalker.ActiveModes.LaneClear) && menuIni.Get<CheckBox>("LaneClear").CurrentValue)
            {
                Orbwalker.DisableAttacking = false;
                if (MiscMenu.Get<CheckBox>("SaveR").CurrentValue && player.Mana - (SaveR() / 3) > R.Handle.SData.Mana && player.Level >= 6
                    && R.IsLearned)
                {
                    LaneClear();
                }

                if (!MiscMenu.Get<CheckBox>("SaveR").CurrentValue || player.Level < 6 && !R.IsLearned)
                {
                    LaneClear();
                }
            }

            if (flags.HasFlag(Orbwalker.ActiveModes.JungleClear) && menuIni.Get<CheckBox>("JungleClear").CurrentValue)
            {
                Orbwalker.DisableAttacking = false;
                if (MiscMenu.Get<CheckBox>("SaveR").CurrentValue && player.Level >= 6 && R.IsLearned
                    && player.Mana - (SaveR() / 3) > R.Handle.SData.Mana)
                {
                    JungleClear();
                }

                if (!MiscMenu.Get<CheckBox>("SaveR").CurrentValue || player.Level < 6 && !R.IsLearned)
                {
                    JungleClear();
                }
            }

            if (flags.HasFlag(Orbwalker.ActiveModes.Harass) && menuIni.Get<CheckBox>("Harass").CurrentValue)
            {
                Orbwalker.DisableAttacking = HarassMenu.Get<CheckBox>("HUse_AA").CurrentValue && Player.Instance.Mana < Q.Handle.SData.Mana * 3;

                if (MiscMenu.Get<CheckBox>("SaveR").CurrentValue && player.Level >= 6 && R.IsLearned
                    && player.Mana - (SaveR() / 2) > R.Handle.SData.Mana)
                {
                    Harass();
                }

                if (!MiscMenu.Get<CheckBox>("SaveR").CurrentValue || player.Level < 6 && !R.IsLearned)
                {
                    Harass();
                }
            }

            if (flags.HasFlag(Orbwalker.ActiveModes.LastHit) && menuIni.Get<CheckBox>("LastHit").CurrentValue)
            {
                if (LaneMenu.Get<CheckBox>("LAA").CurrentValue
                    && (Q.IsReady() || ObjectManager.Player.ManaPercent >= LaneMenu.Get<Slider>("LHQPercent").CurrentValue))
                {
                    Orbwalker.DisableAttacking = true;
                }
                else
                {
                    Orbwalker.DisableAttacking = false;
                }

                if (MiscMenu.Get<CheckBox>("SaveR").CurrentValue && player.Level >= 6 && R.IsLearned
                    && player.Mana - (SaveR() / 3) > R.Handle.SData.Mana)
                {
                    LastHit();
                }

                if (!MiscMenu.Get<CheckBox>("SaveR").CurrentValue || player.Level < 6 && !R.IsLearned)
                {
                    LastHit();
                }
            }

            if (MiscMenu.Get<CheckBox>("DeadCast").CurrentValue)
            {
                if (ObjectManager.Player.IsZombie && !Combo())
                {
                    LaneClear();
                }
            }

            if (menuIni.Get<CheckBox>("KillSteal").CurrentValue)
            {
                Ks();
            }

            if (menuIni.Get<CheckBox>("Ultimate").CurrentValue && UltMenu.Get<ComboBox>("UltMode").CurrentValue == 0
                && UltMenu.Get<CheckBox>("UltKS").CurrentValue && (R.IsLearned && R.IsReady()))
            {
                Ult();
            }
        }
示例#25
0
        void Combo()
        {
            var comboQ = _menu.Item("comboQ" + Player.ChampionName).GetValue <StringList>().SelectedIndex;
            var comboW = _menu.Item("comboW" + Player.ChampionName).GetValue <bool>();
            var comboE = _menu.Item("comboE" + Player.ChampionName).GetValue <bool>();
            var comboR = _menu.Item("comboR" + Player.ChampionName).GetValue <Slider>().Value;

            if (comboQ > 0 && _spellQ.IsReady())
            {
                if (_spellR.IsReady() && comboR > 0) //search unit that provides most targets hit by ult. prioritize hero target unit
                {
                    int         maxTargetsHit      = 0;
                    Obj_AI_Base unitMostTargetsHit = null;

                    foreach (Obj_AI_Base unit in ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsValidTarget(_spellQ.Range) && _spellQ.GetPrediction(x).Hitchance >= HitChance.High)) //causes troubles?
                    {
                        int targetsHit = unit.CountEnemiesInRange((int)_spellR.Range);                                                                                                 //unitposition might not reflect where you land with Q

                        if (targetsHit > maxTargetsHit || (unitMostTargetsHit != null && targetsHit >= maxTargetsHit && unit.Type == GameObjectType.obj_AI_Hero))
                        {
                            maxTargetsHit      = targetsHit;
                            unitMostTargetsHit = unit;
                        }
                    }

                    if (maxTargetsHit >= comboR)
                    {
                        CastQ(unitMostTargetsHit);
                    }
                }

                Obj_AI_Base target = TargetSelector.GetTarget(_spellQ.Range, TargetSelector.DamageType.Magical);

                if (target != null)
                {
                    if (comboQ == 1 || (comboQ == 2 && !Orbwalking.InAutoAttackRange(target)))
                    {
                        CastQ(target);
                    }
                }
            }

            if (comboW && _spellW.IsReady())
            {
                var target = TargetSelector.GetTarget(_spellW.Range, TargetSelector.DamageType.Magical);

                if (target != null)
                {
                    var enoughMana = GetManaPercent() >= _menu.Item("comboWPercent" + Player.ChampionName).GetValue <Slider>().Value;

                    if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1)
                    {
                        if (Player.Distance(target.ServerPosition) <= _spellW.Range && enoughMana)
                        {
                            _comboW = true;
                            _spellW.Cast();
                        }
                    }
                    else if (!enoughMana)
                    {
                        RegulateWState(true);
                    }
                }
                else
                {
                    RegulateWState();
                }
            }

            if (comboE && _spellE.IsReady())
            {
                CastE(Program.Helper.EnemyTeam.OrderBy(x => x.Distance(Player)).FirstOrDefault());
            }
        }
示例#26
0
        protected override void Game_OnGameUpdate(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }

            SmartKs();

            if (Menu.Item("FarmT", true).GetValue <KeyBind>().Active)
            {
                Harass();
            }

            if (Menu.Item("wAtk", true).GetValue <bool>())
            {
                AutoAtk();
            }

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

            case Orbwalking.OrbwalkingMode.Mixed:
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                Farm();
                JungleClear();
                break;

            case Orbwalking.OrbwalkingMode.Flee:
                Escape();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            case Orbwalking.OrbwalkingMode.Freeze:
                break;

            case Orbwalking.OrbwalkingMode.CustomMode:
                break;

            case Orbwalking.OrbwalkingMode.None:
                if (Menu.Item("insec", true).GetValue <KeyBind>().Active)
                {
                    Orbwalking.MoveTo(Game.CursorPos);

                    _insecTarget = TargetSelector.GetSelectedTarget();

                    if (_insecTarget != null)
                    {
                        if (_insecTarget.HasBuffOfType(BuffType.Knockup) ||
                            _insecTarget.HasBuffOfType(BuffType.Knockback))
                        {
                            if (Player.ServerPosition.Distance(_insecTarget.ServerPosition) < 200)
                            {
                                R2.Cast(InsecPosition);
                            }
                        }

                        Insec();
                    }
                }
                else
                {
                    InsecPosition = new Vector3(0, 0, 0);
                }

                if (Menu.Item("qeCombo", true).GetValue <KeyBind>().Active)
                {
                    var soldierTarget = TargetSelector.GetTarget(900, TargetSelector.DamageType.Magical);

                    Orbwalking.MoveTo(Game.CursorPos);

                    CastQe(soldierTarget, "Null");
                }
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#27
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (Orbwalking.CanMove(20))
            {
                var starget = TargetSelector.GetSelectedTarget();
                switch (Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Flee:
                    break;

                case Orbwalking.OrbwalkingMode.LastHit:
                {
                    if (Menu.Item("LHQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = MinionManager.GetMinions(Q.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(Q.GetDamage(x), Q.DamageType, Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                            if (target != null)
                            {
                                if (Player.Position.Distance(target.Position) > 125f)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.Mixed:
                {
                    if (Menu.Item("HQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= Q.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    Q.Cast(starget);
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTargetNoCollision(Q);
                                if (target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }

                    if (Player.HealthPercent >= Menu.Item("MB").GetValue <Slider>().Value)
                    {
                        if (Menu.Item("HW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                if (starget != null)
                                {
                                    if (!starget.IsZombie)
                                    {
                                        if (Player.Position.Distance(starget.Position) <= W.Range + 20f && W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                                else
                                {
                                    var target = TargetSelector.GetTarget(W.Range + 20f, W.DamageType);
                                    if (target != null)
                                    {
                                        if (W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    if (Menu.Item("LCQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = MinionManager.GetMinions(Q.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(Q.GetDamage(x), Q.DamageType, Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                            if (target != null)
                            {
                                Q.Cast(target);
                            }
                        }
                    }

                    if (Menu.Item("JCQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth)
                                         .FirstOrDefault(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                            if (target != null)
                            {
                                Q.Cast(target);
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (Menu.Item("CQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= Q.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    Q.Cast(starget);
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTargetNoCollision(Q);
                                if (target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }

                    if (Player.HealthPercent >= Menu.Item("MB").GetValue <Slider>().Value)
                    {
                        if (Menu.Item("CW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                if (starget != null)
                                {
                                    if (!starget.IsZombie)
                                    {
                                        if (Player.Position.Distance(starget.Position) <= W.Range + 20f && W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                                else
                                {
                                    var target = TargetSelector.GetTarget(W.Range + 20f, W.DamageType);
                                    if (target != null)
                                    {
                                        if (W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.None:
                    break;
                }

                if (Menu.Item("CR").GetValue <bool>())
                {
                    if (Player.HealthPercent <= Menu.Item("CH").GetValue <Slider>().Value)
                    {
                        if (R.IsReadyPerfectly())
                        {
                            R.Cast();
                        }
                    }
                }

                if (Menu.Item("MA").GetValue <bool>())
                {
                    if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                    {
                        var target = MinionManager.GetMinions(W.Range).FirstOrDefault(x => x.IsValidTarget(W.Range));
                        var t      = MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(W.Range));

                        if (target == null && t == null)
                        {
                            if (W.Instance.ToggleState != 1)
                            {
                                W.Cast();
                            }
                        }
                    }
                    else
                    {
                        if (starget != null)
                        {
                            if (starget.Position.Distance(Player.Position) >= 599.5f)
                            {
                                if (W.Instance.ToggleState != 1)
                                {
                                    W.Cast();
                                }
                            }
                        }
                        else
                        {
                            var target = TargetSelector.GetTarget(float.MaxValue, W.DamageType);
                            if (target != null)
                            {
                                if (target.Position.Distance(Player.Position) >= 599.5f)
                                {
                                    if (W.Instance.ToggleState != 1)
                                    {
                                        W.Cast();
                                    }
                                }
                            }
                            else
                            {
                                if (W.Instance.ToggleState != 1)
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }
                }
            }

            if (Player.HealthPercent < Menu.Item("MB").GetValue <Slider>().Value)
            {
                if (W.Instance.ToggleState != 1)
                {
                    W.Cast();
                }
            }

            KillSteal();
        }
示例#28
0
        private static void Game_OnTick(EventArgs args)
        {
            if (FlagCreateTick != 0 && FlagCreateTick + 8500 < Game.Time * 1000)
            {
                FlagCreateTick = 0;
                FlagPos        = Vector3.Zero;
            }

            CurrentTarget = TargetSelector.GetTarget(SpellManager.E.Range, DamageType.Physical);

            CachedAntiGapclosers.RemoveAll(x => Game.Time * 1000 > x.Tick + 850);
            CachedInterruptibleSpells.RemoveAll(x => Game.Time * 1000 > x.Tick + 8000);

            if (Config.InterrupterMenu.Enabled)
            {
                var processSpellCastCache = CachedInterruptibleSpells.FirstOrDefault();

                if (processSpellCastCache != null)
                {
                    var enemy = processSpellCastCache.Sender;

                    if (!enemy.Spellbook.IsCastingSpell && !enemy.Spellbook.IsCharging && !enemy.Spellbook.IsChanneling)
                    {
                        CachedInterruptibleSpells.Remove(processSpellCastCache);
                    }
                }
            }
            foreach (
                var x in
                EntityManager.Heroes.Enemies.Where(
                    x => (x.IsDead || DangerousSpellsActive.Any(index => Game.Time * 1000 > index.Tick + 5000 || !x.IsReady(index.SpellSlot) || !(Player.Instance.CountEnemiesInRange(2000) <= index.IfEnemiesNear))) &&
                    DangerousSpellsActive.Exists(key => key.Champion == x.Hero)))
            {
                foreach (var enemy in DangerousSpellsActive.Where(index => index.Champion == x.Hero))
                {
                    switch (enemy.DangerLevel)
                    {
                    case DangerousSpells.SpellDangerLevel.Extreme:
                    {
                        DangerLevel -= 75;
                        break;
                    }

                    case DangerousSpells.SpellDangerLevel.High:
                    {
                        DangerLevel -= 50;
                        break;
                    }

                    case DangerousSpells.SpellDangerLevel.Medium:
                    {
                        DangerLevel -= 25;
                        break;
                    }

                    case DangerousSpells.SpellDangerLevel.Low:
                    {
                        DangerLevel -= 12;
                        break;
                    }

                    default:
                    {
                        break;
                    }
                    }
                }
                DangerousSpellsActive.RemoveAll(index => index.Champion == x.Hero);
            }

            foreach (
                var enemy in
                EntityManager.Heroes.Enemies.Where(
                    client =>
                    client.IsValidTarget(2000) && CachedDangerousSpells.ContainsKey(client.Hero) &&
                    !DangerousSpellsActive.Exists(x => x.Champion == client.Hero)))
            {
                var dangerousspell = DangerousSpells.DangerousSpellsDictionary.FirstOrDefault(x => x.Key == enemy.Hero);

                if (enemy.IsReady(dangerousspell.Value.SpellSlot) &&
                    Player.Instance.CountEnemiesInRange(2000) <= dangerousspell.Value.IfEnemiesNear)
                {
                    switch (dangerousspell.Value.DangerLevel)
                    {
                    case DangerousSpells.SpellDangerLevel.Extreme:
                    {
                        DangerLevel += 75;
                        break;
                    }

                    case DangerousSpells.SpellDangerLevel.High:
                    {
                        DangerLevel += 50;
                        break;
                    }

                    case DangerousSpells.SpellDangerLevel.Medium:
                    {
                        DangerLevel += 25;
                        break;
                    }

                    case DangerousSpells.SpellDangerLevel.Low:
                    {
                        DangerLevel += 12;
                        break;
                    }

                    default:
                    {
                        break;
                    }
                    }
                    DangerousSpellsActive.Add(new DangerousSpells.DangerousSpell(enemy.Hero,
                                                                                 dangerousspell.Value.SpellSlot, dangerousspell.Value.IfEnemiesNear,
                                                                                 dangerousspell.Value.DangerLevel, (int)Game.Time * 1000));
                }
            }
        }
示例#29
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            //Combo
            if (Player.Distance(target) <= Q.Range && Q.IsReady() && (Config.Item("UseQCombo").GetValue <bool>()))
            {
                Q.Cast(target);
            }
            if (W.IsReady() && (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1) && (Config.Item("UseWCombo").GetValue <bool>()))
            {
                if (Player.ServerPosition.Distance(target.Position) < W.Range)
                {
                    W.Cast();
                }
            }
            if (W.IsReady() && (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 2) && (Config.Item("UseWCombo").GetValue <bool>()))
            {
                if (Player.ServerPosition.Distance(target.Position) > W.Range)
                {
                    W.Cast();
                }
            }
            if (Player.Distance(target) <= E.Range && E.IsReady() && (Config.Item("UseECombo").GetValue <bool>()))
            {
                E.Cast();
            }
            if (Config.Item("UseItems").GetValue <bool>())
            {
                if (Player.Distance(target) <= RDO.Range)
                {
                    RDO.Cast(target);
                }
                if (Player.Distance(target) <= HYD.Range)
                {
                    HYD.Cast(target);
                }
                if (Player.Distance(target) <= DFG.Range)
                {
                    DFG.Cast(target);
                }
                if (Player.Distance(target) <= BOTK.Range)
                {
                    BOTK.Cast(target);
                }
                if (Player.Distance(target) <= CUT.Range)
                {
                    CUT.Cast(target);
                }
                if (Player.Distance(target) <= 125f)
                {
                    YOY.Cast();
                }
                if (Player.Distance(target) <= TYM.Range)
                {
                    TYM.Cast(target);
                }
            }
            if (Config.Item("AutoR").GetValue <bool>())
            {
                if (GetNumberHitByR(target) >= Config.Item("CountR").GetValue <Slider>().Value)
                {
                    R.Cast(target, Config.Item("Packet").GetValue <bool>());
                }
            }
        }
示例#30
0
        private static void ItemUse()
        {
            var Target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

            if (Target == null)
            {
                return;
            }

            var Borke   = Item.Blade_of_the_Ruined_King.GetItem();
            var Youmeng = Item.Youmuus_Ghostblade.GetItem();
            var Blige   = Item.Bilgewater_Cutlass.GetItem();

            if (Menu.Item("nightmoon.item.youmeng").GetValue <bool>())
            {
                if (Youmeng.IsReady() && Youmeng.IsOwned(Player))
                {
                    if (Target.IsValidTarget(E.Range))
                    {
                        Youmeng.Cast();

                        if (Menu.Item("nightmoon.q.youmeng").GetValue <bool>() && CanCastQ() && Youmeng.Cast())
                        {
                            Q.Cast();
                        }
                    }

                    if (Player.CountEnemiesInRange(1200) < 2 && Menu.Item("nightmoon.item.youmeng.dush").GetValue <bool>())
                    {
                        Youmeng.Cast();

                        if (Menu.Item("nightmoon.q.youmeng").GetValue <bool>() && CanCastQ() && Youmeng.Cast())
                        {
                            Q.Cast();
                        }
                    }
                }
            }


            if (Menu.Item("nightmoon.item.blige").GetValue <bool>())
            {
                if (Blige.IsInRange(Target))
                {
                    if (Target.HealthPercent <= Menu.Item("nightmoon.item.blige.enemyhp").GetValue <Slider>().Value)
                    {
                        Blige.Cast(Target);
                    }
                }
            }

            if (Menu.Item("nightmoon.item.borke").GetValue <bool>())
            {
                if (Borke.IsReady() && Borke.IsOwned(Player))
                {
                    if (Borke.IsInRange(Target))
                    {
                        if (Target.HealthPercent <= Menu.Item("nightmoon.item.borke.enemyhp").GetValue <Slider>().Value)
                        {
                            Borke.Cast(Target);
                        }

                        if (Player.HealthPercent <= Menu.Item("nightmoon.item.borke.mehp").GetValue <Slider>().Value)
                        {
                            Borke.Cast(Target);
                        }
                    }
                }
            }
        }