Пример #1
0
        public static void MainCombo()
        {
            SH.Orbwalk(Target);
            if (Queuer.Queue.Count > 0)
            {
                return;
            }

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

            var comboRDmg = DamageHandler.GetComboDmg(true, Target);
            var comboNoR  = DamageHandler.GetComboDmg(false, Target);

            if (SH.Spells[SpellSlot.R].IsReady() &&
                !CH.RState && MenuHandler.GetMenuBool("CR") &&
                (MenuHandler.Config.Item("forcedR").GetValue <KeyBind>().Active ||
                 comboNoR <Target.Health && comboRDmg> Target.Health))
            {
                if (MenuHandler.GetMenuBool("CREWHQ") && SH.Spells[SpellSlot.Q].IsReady() &&
                    SH.Spells[SpellSlot.W].IsReady() && SH.Spells[SpellSlot.E].IsReady() &&
                    Target.IsValidTarget(325 + SpellHandler.QRange))
                {
                    Queuer.Add("R");
                    Queuer.Add("E", Target.Position);
                    Queuer.Add("AA");
                    Queuer.Add("W");
                    Queuer.Add("Hydra");
                    Queuer.Add("AA");
                    AddQaa(true);
                    return;
                }

                if (MenuHandler.GetMenuBool("CREWH") && SH.Spells[SpellSlot.E].IsReady() &&
                    SH.Spells[SpellSlot.W].IsReady() && Target.IsValidTarget(325 + SpellHandler.WRange))
                {
                    Queuer.Add("R");
                    Queuer.Add("E", Target.Position);
                    Queuer.Add("AA");
                    Queuer.Add("W");
                    Queuer.Add("Hydra");
                    return;
                }

                if (MenuHandler.GetMenuBool("CREAAHQ") && SH.Spells[SpellSlot.Q].IsReady() &&
                    SH.Spells[SpellSlot.E].IsReady() && Target.IsValidTarget(325 + SpellHandler.QRange))
                {
                    Queuer.Add("R");
                    Queuer.Add("E", Target.Position);
                    Queuer.Add("AA");
                    Queuer.Add("Hydra");
                    AddQaa(true);
                    return;
                }

                if (MenuHandler.GetMenuBool("CRWAAHQ") && SH.Spells[SpellSlot.Q].IsReady() &&
                    SH.Spells[SpellSlot.W].IsReady() && Target.IsValidTarget(SpellHandler.QRange))
                {
                    Queuer.Add("R");
                    Queuer.Add("W");
                    Queuer.Add("AA");
                    Queuer.Add("Hydra");
                    AddQaa(true);
                    return;
                }

                if (MenuHandler.GetMenuBool("CR1CC") && SH.Spells[SpellSlot.R].IsReady())
                {
                    Queuer.Add("R");
                    return;
                }
            }

            if (MenuHandler.GetMenuBool("CR2") && SH.Spells[SpellSlot.R].IsReady() && CH.RState)
            {
                if (MenuHandler.GetMenuBool("CR2WQ") && SH.Spells[SpellSlot.Q].IsReady() &&
                    SH.Spells[SpellSlot.W].IsReady() &&
                    SpellHandler.Spells[SpellSlot.R].GetDamage(Target) +
                    SpellHandler.Spells[SpellSlot.W].GetDamage(Target) +
                    SpellHandler.Spells[SpellSlot.Q].GetDamage(Target) > Target.Health)
                {
                    Queuer.Add("R2", Target);
                    Queuer.Add("W");
                    AddQaa(true);
                    return;
                }

                if (MenuHandler.GetMenuBool("CR2W") && SH.Spells[SpellSlot.W].IsReady() &&
                    SpellHandler.Spells[SpellSlot.R].GetDamage(Target) +
                    SpellHandler.Spells[SpellSlot.W].GetDamage(Target) > Target.Health)
                {
                    Queuer.Add("R2", Target);
                    Queuer.Add("W");
                    return;
                }

                if (MenuHandler.GetMenuBool("CR2Q") && SH.Spells[SpellSlot.Q].IsReady() &&
                    SpellHandler.Spells[SpellSlot.R].GetDamage(Target) +
                    SpellHandler.Spells[SpellSlot.Q].GetDamage(Target) > Target.Health)
                {
                    Queuer.Add("R2", Target);
                    AddQaa(true);
                    return;
                }

                if (MenuHandler.GetMenuBool("CR2CC") &&
                    SpellHandler.Spells[SpellSlot.R].GetDamage(Target) > Target.Health)
                {
                    Queuer.Add("R2", Target);
                    return;
                }
            }

            // skills based on cds / engages
            if (MenuHandler.GetMenuBool("CEWHQ") && SH.Spells[SpellSlot.Q].IsReady() &&
                SH.Spells[SpellSlot.W].IsReady() && SH.Spells[SpellSlot.E].IsReady() &&
                Target.IsValidTarget(325 + SpellHandler.QRange))
            {
                Queuer.Add("E", Target.Position);
                Queuer.Add("W");
                Queuer.Add("Hydra");
                Queuer.Add("AA");
                AddQaa(true);
                return;
            }

            if (MenuHandler.GetMenuBool("CQWH") && SH.Spells[SpellSlot.Q].IsReady() &&
                SH.Spells[SpellSlot.W].IsReady() && CH.QCount == 2 && Target.IsValidTarget(SpellHandler.QRange))
            {
                Queuer.Add("Q");
                Queuer.Add("W");
                Queuer.Add("Hydra");
                Queuer.Add("AA");
                AddQaa(true);
                return;
            }

            if (MenuHandler.GetMenuBool("CEHQ") && SH.Spells[SpellSlot.Q].IsReady() &&
                SH.Spells[SpellSlot.E].IsReady() && Target.IsValidTarget(SH.QRange + 325))
            {
                Queuer.Add("E", Target.Position);
                Queuer.Add("Hydra");
                Queuer.Add("Q");
                Queuer.Add("AA");
                AddQaa(true);
                return;
            }

            if (MenuHandler.GetMenuBool("CEW") && SH.Spells[SpellSlot.E].IsReady() &&
                Target.IsValidTarget(325 + SH.WRange) && !Orbwalking.InAutoAttackRange(Target))
            {
                Queuer.Add("E", Target.Position);
                Queuer.Add("W");
                Queuer.Add("AA");
                return;
            }
            // End

            // When only one skill is up
            if (MenuHandler.GetMenuBool("CW") && SH.Spells[SpellSlot.W].IsReady() && Target.IsValidTarget(SH.WRange))
            {
                Queuer.Add("W");
                Queuer.Add("Hydra");
                return;
            }

            if (MenuHandler.GetMenuBool("CE") && SH.Spells[SpellSlot.E].IsReady() &&
                Target.IsValidTarget(325 + Orbwalking.GetRealAutoAttackRange(Player)) &&
                !Orbwalking.InAutoAttackRange(Target))
            {
                Queuer.Add("E", Target.Position);
                return;
            }

            if (MenuHandler.GetMenuBool("CQ") && SH.Spells[SpellSlot.Q].IsReady() && Target.IsValidTarget(SH.QRange))
            {
                AddQaa();
            }
            // End
        }
Пример #2
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(spells[Spells.Q].Range, DamageType.Magical);

            if (target == null)
            {
                return;
            }

            var useQ                 = getCheckBoxItem(comboMenu, "ElDiana.Combo.Q");
            var useW                 = getCheckBoxItem(comboMenu, "ElDiana.Combo.W");
            var useE                 = getCheckBoxItem(comboMenu, "ElDiana.Combo.E");
            var useR                 = getCheckBoxItem(comboMenu, "ElDiana.Combo.R");
            var useIgnite            = getCheckBoxItem(comboMenu, "ElDiana.Combo.Ignite");
            var secondR              = getCheckBoxItem(comboMenu, "ElDiana.Combo.Secure");
            var useSecondRLimitation = getSliderItem(comboMenu, "ElDiana.Combo.UseSecondRLimitation");
            var minHpToDive          = getSliderItem(comboMenu, "ElDiana.Combo.R.PreventUnderTower");

            if (useQ && spells[Spells.Q].IsReady() && target.LSIsValidTarget(spells[Spells.Q].Range))
            {
                var pred = spells[Spells.Q].GetPrediction(target);
                if (pred.HitChance >= EloBuddy.SDK.Enumerations.HitChance.High)
                {
                    spells[Spells.Q].Cast(target);
                }
            }

            if (useR && spells[Spells.R].IsReady() && target.LSIsValidTarget(spells[Spells.R].Range) &&
                target.HasBuff("dianamoonlight") &&
                (!target.UnderTurret(true) || (minHpToDive <= Player.HealthPercent)))
            {
                spells[Spells.R].Cast(target);
            }

            if (useW && spells[Spells.W].IsReady() && target.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)))
            {
                spells[Spells.W].Cast();
            }

            if (useE && spells[Spells.E].IsReady() && target.LSIsValidTarget(400f))
            {
                spells[Spells.E].Cast();
            }

            if (secondR && (!target.UnderTurret(true) || (minHpToDive <= Player.HealthPercent)))
            {
                var closeEnemies = Player.GetEnemiesInRange(spells[Spells.R].Range * 2).Count;

                if (closeEnemies <= useSecondRLimitation && useR && !spells[Spells.Q].IsReady() &&
                    spells[Spells.R].IsReady())
                {
                    if (target.Health < spells[Spells.R].GetDamage(target) &&
                        (!target.UnderTurret(true) || (minHpToDive <= Player.HealthPercent)))
                    {
                        spells[Spells.R].Cast(target);
                    }
                }

                if (closeEnemies <= useSecondRLimitation && spells[Spells.R].IsReady())
                {
                    if (target.Health < spells[Spells.R].GetDamage(target))
                    {
                        spells[Spells.R].Cast(target);
                    }
                }
            }

            if (Player.LSDistance(target) <= 600 && IgniteDamage(target) >= target.Health && useIgnite)
            {
                Player.Spellbook.CastSpell(ignite, target);
            }
        }
Пример #3
0
        private static void Combo()
        {
            var gctarget = GetTarget(Spells.Q.Range * 2.5f);
            var target   = GetTarget(Spells.Q.Range);

            if (gctarget == null)
            {
                return;
            }

            var qminion =
                MinionManager
                .GetMinions(Spells.Q.Range + 350, MinionTypes.All, MinionTeam.NotAlly)     //added 350 range, bad?
                .Where(
                    m =>
                    m.Distance(Player) <= Spells.Q.Range &&
                    m.Health <= QDamage(m) + ExtraWDamage(m) + SheenDamage(m) - 30 && m.IsValidTarget())
                .OrderBy(m => m.Distance(gctarget.Position) <= Spells.Q.Range + 350)
                .FirstOrDefault();


            if (Spells.Q.IsReady())
            {
                if (IreliaMenu.Config.Item("combo.q.gc").GetValue <bool>() &&
                    gctarget.Distance(Player.Position) >= Orbwalking.GetRealAutoAttackRange(gctarget) && qminion != null &&
                    qminion.Distance(gctarget.Position) <= Player.Distance(gctarget.Position) &&
                    qminion.Distance(Player.Position) <= Spells.Q.Range)
                {
                    Spells.Q.CastOnUnit(qminion);
                }

                if (IreliaMenu.Config.Item("combo.q").GetValue <bool>() && target != null &&
                    target.Distance(Player.Position) <= Spells.Q.Range &&
                    target.Distance(Player.Position) >=
                    IreliaMenu.Config.Item("combo.q.minrange").GetValue <Slider>().Value)
                {
                    if (UnderTheirTower(target))
                    {
                        if (target.HealthPercent >=
                            IreliaMenu.Config.Item("combo.q.undertower").GetValue <Slider>().Value)
                        {
                            return;
                        }
                    }

                    if (IreliaMenu.Config.Item("combo.w").GetValue <bool>())
                    {
                        Spells.W.Cast();
                    }

                    Spells.Q.CastOnUnit(target);
                }

                if (IreliaMenu.Config.Item("combo.q").GetValue <bool>() &&
                    IreliaMenu.Config.Item("combo.q.lastsecond").GetValue <bool>() && target != null)
                {
                    var buff = Player.Buffs.FirstOrDefault(b => b.Name == "ireliahitenstylecharged" && b.IsValid);
                    if (buff != null && buff.EndTime - Game.Time <= (Player.Distance(target) / Spells.Q.Speed + Spells.Q.Delay + .500 + Player.AttackCastDelay) && !Player.Spellbook.IsAutoAttacking)
                    {
                        if (UnderTheirTower(target))
                        {
                            if (target.HealthPercent >=
                                IreliaMenu.Config.Item("combo.q.undertower").GetValue <Slider>().Value)
                            {
                                return;
                            }
                        }

                        Spells.Q.Cast(target);
                    }
                }
            }

            if (Spells.E.IsReady() && IreliaMenu.Config.Item("combo.e").GetValue <bool>() && target != null)
            {
                if (IreliaMenu.Config.Item("combo.e.logic").GetValue <bool>() &&
                    target.Distance(Player.Position) <= Spells.E.Range)
                {
                    if (target.HealthPercent >= Player.HealthPercent)
                    {
                        Spells.E.CastOnUnit(target);
                    }
                    else if (!target.IsFacing(Player) && target.Distance(Player.Position) >= Spells.E.Range / 2)
                    {
                        Spells.E.CastOnUnit(target);
                    }
                }
                else if (target.Distance(Player.Position) <= Spells.E.Range)
                {
                    Spells.E.CastOnUnit(target);
                }
            }

            if (Spells.R.IsReady() && IreliaMenu.Config.Item("combo.r").GetValue <bool>() && !IreliaMenu.Config.Item("combo.r.selfactivated").GetValue <bool>())
            {
                if (IreliaMenu.Config.Item("combo.r.weave").GetValue <bool>())
                {
                    if (target != null && !Player.HasBuff("sheen") &&
                        target.Distance(Player.Position) <= Spells.R.Range &&
                        Utils.TickCount - lastsheenproc >= 1500)
                    {
                        Spells.R.Cast(target, false, true);
                    }
                }
                else
                {
                    Spells.R.Cast(target, false, true);
                    // Set to Q range because we are already going to combo them at this point most likely, no stupid long range R initiations
                }
            }
            else if (Spells.R.IsReady() && IreliaMenu.Config.Item("combo.r").GetValue <bool>() && IreliaMenu.Config.Item("combo.r.selfactivated").GetValue <bool>() && rcount <= 3)
            {
                if (IreliaMenu.Config.Item("combo.r.weave").GetValue <bool>())
                {
                    if (target != null && !Player.HasBuff("sheen") &&
                        target.Distance(Player.Position) <= Spells.R.Range &&
                        Utils.TickCount - lastsheenproc >= 1500)
                    {
                        Spells.R.Cast(target, false, true);
                    }
                }
                else
                {
                    Spells.R.Cast(target, false, true);
                    // Set to Q range because we are already going to combo them at this point most likely, no stupid long range R initiations
                }
            }

            if (IreliaMenu.Config.Item("combo.items").GetValue <bool>() && target != null)
            {
                if (Player.Distance(target.ServerPosition) <= 600 && ComboDamage((AIHeroClient)target) >= target.Health &&
                    IreliaMenu.Config.Item("combo.ignite").GetValue <bool>())
                {
                    Player.Spellbook.CastSpell(Spells.Ignite, target);
                }

                if (Spells.Youmuu.IsReady() && target.IsValidTarget(Spells.Q.Range))
                {
                    Spells.Youmuu.Cast();
                }

                if (Player.Distance(target.ServerPosition) <= 450 && Spells.Cutlass.IsReady())
                {
                    Spells.Cutlass.Cast(target);
                }

                if (Player.Distance(target.ServerPosition) <= 450 && Spells.Blade.IsReady())
                {
                    Spells.Blade.Cast(target);
                }
            }
        }
Пример #4
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            UltimateBuffStacks = GetUltimateBuffStacks();
            W.Range            = 110 + 20 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level;
            R.Range            = 900 + 300 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level;

            if (R.IsReady() && GetValue <bool>("UseRM"))
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero => hero.IsValidTarget(R.Range) && R.GetDamage(hero) > hero.Health))
                {
                    R.Cast(hero, false, true);
                }
            }

            if ((!ComboActive && !HarassActive) ||
                (!Orbwalking.CanMove(100) &&
                 !(ObjectManager.Player.BaseAbilityDamage + ObjectManager.Player.FlatMagicDamageMod > 100)))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseR" + (ComboActive ? "C" : "H"));
            var rLim = GetValue <Slider>("Rlim" + (ComboActive ? "C" : "H")).Value;

            if (useW && W.IsReady())
            {
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(hero => hero.IsValidTarget(Orbwalking.GetRealAutoAttackRange(hero) + W.Range)))
                {
                    W.CastOnUnit(ObjectManager.Player);
                }
            }

            if (useQ && Q.IsReady())
            {
                var t = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Magical);
                if (t != null)
                {
                    if (Q.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useE && E.IsReady())
            {
                var t = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Magical);
                if (t != null)
                {
                    if (E.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useR && R.IsReady() && UltimateBuffStacks < rLim)
            {
                var t = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Magical);
                if (t != null)
                {
                    R.Cast(t, false, true);
                }
            }
        }
Пример #5
0
 static void Drawing_OnDraw(EventArgs args)
 {
     foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(target => target.IsValidTarget(1000)))
     {
         Drawing.DrawCircle(target.Position, Orbwalking.GetRealAutoAttackRange(target), ObjectManager.Player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) ? Color.Red : Color.LimeGreen);
     }
 }
Пример #6
0
        private static void OnLaneClear()
        {
            if (getCheckBoxItem(laneClearMenu, "ElTristana.LaneClear.Tower"))
            {
                foreach (var tower in ObjectManager.Get <Obj_AI_Turret>())
                {
                    if (!tower.IsDead && tower.Health > 100 && tower.IsEnemy && tower.LSIsValidTarget() && Player.ServerPosition.LSDistance(tower.ServerPosition) < Orbwalking.GetRealAutoAttackRange(Player))
                    {
                        spells[Spells.E].Cast(tower);
                    }
                }
            }

            var eminion = EntityManager.MinionsAndMonsters.EnemyMinions.Where(x => x.HasBuff("TristanaECharge") && x.LSIsValidTarget(1000)).FirstOrDefault();

            if (eminion != null)
            {
                Orbwalker.ForcedTarget = eminion;
            }
            else
            {
                Orbwalker.ForcedTarget = null;
            }

            var minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, spells[Spells.E].Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (minions.Count <= 0)
            {
                return;
            }

            if (spells[Spells.Q].IsReady() && minions.Count > 0 && getCheckBoxItem(laneClearMenu, "ElTristana.LaneClear.Q"))
            {
                spells[Spells.Q].Cast();
            }

            if (spells[Spells.E].IsReady() && getCheckBoxItem(laneClearMenu, "ElTristana.LaneClear.E") && minions.Count > 2 && Player.ManaPercent > getSliderItem(laneClearMenu, "ElTristana.LaneClear.E.Mana"))
            {
                foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().OrderByDescending(m => m.Health))
                {
                    spells[Spells.E].Cast(minion);
                    Orbwalker.ForcedTarget = minion;
                }
            }
        }
Пример #7
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Game.PrintChat("NentoR's Nasus Loaded! Enjoy :)");

            if (Player.ChampionName != ChampionName)
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, Orbwalking.GetRealAutoAttackRange(ObjectManager.Player) + 100);
            W = new Spell(SpellSlot.W, 600);
            E = new Spell(SpellSlot.E, 650);
            R = new Spell(SpellSlot.R, 50);

            // Main Menu
            Config = new Menu("Nentor's Nasus", "Nasus", true);
            Config.AddToMainMenu();

            // OrbWalker Menu
            var orbwalkMenu = new Menu("Orbwalker", "Orbwalker");

            Orbwalker = new Orbwalking.Orbwalker(orbwalkMenu);
            Config.AddSubMenu(orbwalkMenu);

            // Target Selector Menu
            var targetSelector = new Menu("Target Selector", "ts");

            TargetSelector.AddToMenu(targetSelector);
            Config.AddSubMenu(targetSelector);

            // Combo Menu
            var comboMenu = new Menu("Combo", "Combo");

            comboMenu.AddItem(new MenuItem("ComboQ", "Use Q").SetValue(true));
            comboMenu.AddItem(new MenuItem("ComboW", "Use W").SetValue(true));
            comboMenu.AddItem(new MenuItem("ComboE", "Use E").SetValue(true));
            comboMenu.AddItem(new MenuItem("ComboR", "Use R (Misc | Check)").SetValue(true).SetTooltip("Use R as Defensive Spell when HP Percent < Slider below (Smart)"));
            comboMenu.AddItem(new MenuItem("RHP", "Use R if % HP").SetValue(new Slider(25)));
            Config.AddSubMenu(comboMenu);

            // Lane Clear Menu
            var laneClearMenu = new Menu("Lane Clear", "laneclear");

            laneClearMenu.AddItem(new MenuItem("LCQ", "Use Q to stack").SetValue(true));
            laneClearMenu.AddItem(new MenuItem("LCE", "Use E").SetValue(false));
            Config.AddSubMenu(laneClearMenu);

            // LastHit Menu
            var lastHitMenu = new Menu("LastHit", "lasthit");

            lastHitMenu.AddItem(new MenuItem("LHQ", "Use Q to stack").SetValue(true));
            Config.AddSubMenu(lastHitMenu);

            // Harass Menu
            var harassMenu = new Menu("Harass", "Harass");

            harassMenu.AddItem(new MenuItem("HQ", "Use Q to Harass").SetValue(true));
            harassMenu.AddItem(new MenuItem("HW", "Use W to Harass").SetValue(true));
            harassMenu.AddItem(new MenuItem("HE", "Use E to Harass").SetValue(true));
            Config.AddSubMenu(harassMenu);

            // Drawings Menu
            var drawMenu = new Menu("Drawings", "Drawings");

            drawMenu.AddItem(new MenuItem("DQ", "Draw Q Range").SetValue(true));
            drawMenu.AddItem(new MenuItem("DW", "Draw W Range").SetValue(true));
            drawMenu.AddItem(new MenuItem("DE", "Draw E Range").SetValue(true));
            Config.AddSubMenu(drawMenu);

            // Credits to this boy ;)
            Config.AddItem(new MenuItem("Credits", "                .:Credits:.").SetFontStyle(FontStyle.Bold, SharpDX.Color.Chartreuse));
            Config.AddItem(new MenuItem("CreditsBoy", "                SupportExTraGoZ").SetFontStyle(FontStyle.Bold, SharpDX.Color.DeepPink));
            Config.AddItem(new MenuItem("CreditsBoy2", "                Screeder").SetFontStyle(FontStyle.Bold, SharpDX.Color.Purple));

            Game.OnUpdate  += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
        }
Пример #8
0
        public float ComboDamage(AIHeroClient target)
        {
            float result = q.UseOnCombo && q.IsReady()
                               ? (q.GetCollision(player.Position.To2D(), new List <Vector2>()
            {
                target.Position.To2D()
            })
                                  .Any()
                                      ? q.GetDamage(target) / 2
                                      : q.GetDamage(target))
                               : 0F;

            result += e.UseOnCombo && e.IsReady() ? e.GetDamage(target) : 0F;

            result += w.UseOnCombo && w.IsReady() && player.Distance(target) < w.Range + Orbwalking.GetRealAutoAttackRange(target)
                          ? (float)player.GetAutoAttackDamage(target, true)
                          : 0F;

            float multiplier = 0.3F;

            if (r.Instance.Level == 2)
            {
                multiplier = 0.4F;
            }
            else if (r.Instance.Level == 3)
            {
                multiplier = 0.5F;
            }

            result += r.UseOnCombo && r.IsReady()
                          ? (float)
                      (r.GetDamage(target) + player.GetAutoAttackDamage(target, true)
                       + (q.IsReady() ? q.GetDamage(target) * multiplier : 0F)
                       + (e.IsReady() ? e.GetDamage(target) * multiplier : 0F))
                          : 0F;

            return(result);
        }
Пример #9
0
        public SkyLv_Jax()
        {
            if (Player.ChampionName != ChampionName)
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, 700);
            W = new Spell(SpellSlot.W, Orbwalking.GetRealAutoAttackRange(Player));
            E = new Spell(SpellSlot.E, 375);
            R = new Spell(SpellSlot.R);

            var ignite = Player.Spellbook.Spells.FirstOrDefault(spell => spell.Name == "summonerdot");

            if (ignite != null)
            {
                Ignite.Slot = ignite.Slot;
            }

            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);
            SpellList.Add(R);

            Menu = new Menu("SkyLv " + ChampionName + " By LuNi", "SkyLv " + ChampionName + " By LuNi", true);

            Menu.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");

            TargetSelector.AddToMenu(targetSelectorMenu);
            Menu.AddSubMenu(targetSelectorMenu);

            Orbwalker = new Orbwalking.Orbwalker(Menu.SubMenu("Orbwalking"));

            Menu.AddSubMenu(new Menu("Combo", "Combo"));

            Menu.AddSubMenu(new Menu("Harass", "Harass"));
            Menu.SubMenu("Harass").AddSubMenu(new Menu("Q Settings Harass", "Q Settings Harass"));
            Menu.SubMenu("Harass").AddSubMenu(new Menu("W Settings Harass", "W Settings Harass"));
            Menu.SubMenu("Harass").AddSubMenu(new Menu("E Settings Harass", "E Settings Harass"));

            Menu.AddSubMenu(new Menu("LaneClear", "LaneClear"));
            Menu.SubMenu("LaneClear").AddSubMenu(new Menu("Q Settings LaneClear", "Q Settings LaneClear"));
            Menu.SubMenu("LaneClear").AddSubMenu(new Menu("W Settings LaneClear", "W Settings LaneClear"));
            Menu.SubMenu("LaneClear").AddSubMenu(new Menu("E Settings LaneClear", "E Settings LaneClear"));

            Menu.AddSubMenu(new Menu("JungleClear", "JungleClear"));
            Menu.SubMenu("JungleClear").AddSubMenu(new Menu("Q Settings JungleClear", "Q Settings JungleClear"));
            Menu.SubMenu("JungleClear").AddSubMenu(new Menu("W Settings JungleClear", "W Settings JungleClear"));
            Menu.SubMenu("JungleClear").AddSubMenu(new Menu("E Settings JungleClear", "E Settings JungleClear"));

            Menu.AddSubMenu(new Menu("Flee", "Flee"));

            Menu.AddSubMenu(new Menu("Misc", "Misc"));
            Menu.SubMenu("Misc").AddItem(new MenuItem("Jax.UsePacketCast", "Use PacketCast").SetValue(false));

            Menu.AddSubMenu(new Menu("Drawings", "Drawings"));

            Menu.AddToMainMenu();

            new AfterAttack();
            new KillSteal();
            new JungleSteal();
            new OnUpdateFeatures();
            new Flee();
            new WardTrick();
            new Combo();
            new Harass();
            new JungleClear();
            new LaneClear();
            new PotionManager();
            new SpellLeveler();
            new Draw();
            new SkinChanger();
            new FountainMoves();
        }
Пример #10
0
        public override void ExecuteJungleClear()
        {
            if (Q.IsReady() && JhinQCastReady)
            {
                var jE = Program.jungleClear["UseQJ"].Cast <ComboBox>().CurrentValue;
                if (jE != 0)
                {
                    if (jE == 1)
                    {
                        var jungleMobs = Utils.Utils.GetMobs(
                            Orbwalking.GetRealAutoAttackRange(null) + 65,
                            Utils.Utils.MobTypes.BigBoys);
                        if (jungleMobs != null)
                        {
                            Q.Cast();
                        }
                    }
                    else
                    {
                        var totalAa =
                            MinionManager.GetMinions(
                                ObjectManager.Player.Position,
                                Orbwalking.GetRealAutoAttackRange(null) + 165,
                                MinionTypes.All,
                                MinionTeam.Neutral).Sum(mob => (int)mob.Health);
                        totalAa = (int)(totalAa / ObjectManager.Player.TotalAttackDamage);
                        if (totalAa > jE)
                        {
                            Q.Cast();
                        }
                    }
                }
            }

            if (W.IsReady())
            {
                var jungleMobs = Marksman.Utils.Utils.GetMobs(W.Range, Marksman.Utils.Utils.MobTypes.All);
                if (jungleMobs != null)
                {
                    var jW = Program.jungleClear["UseWJ"].Cast <ComboBox>().CurrentValue;
                    switch (jW)
                    {
                    case 1:
                    {
                        jungleMobs = Marksman.Utils.Utils.GetMobs(
                            W.Range,
                            Marksman.Utils.Utils.MobTypes.All,
                            jW);
                        W.CastOnUnit(jungleMobs);
                        break;
                    }

                    case 2:
                    {
                        jungleMobs = Utils.Utils.GetMobs(W.Range, Utils.Utils.MobTypes.BigBoys);
                        if (jungleMobs != null)
                        {
                            W.CastOnUnit(jungleMobs);
                        }
                        break;
                    }
                    }
                }
            }
        }
Пример #11
0
        private void Combo()
        {
            if (actionQueue.ExecuteNextAction(comboQueue))
            {
                return;
            }

            AIHeroClient itemsTarget = TargetSelector.GetTarget(player.AttackRange, TargetSelector.DamageType.Physical);

            if (itemsTarget != null)
            {
                zedItems.UseItems(itemsTarget);
            }

            shadows.Combo();

            if (w.UseOnCombo && shadows.CanCast && player.HasBuff("ZedR2"))
            {
                AIHeroClient target = TargetSelector.GetTarget(w.Range + e.Range, TargetSelector.DamageType.Physical);

                if (target != null)
                {
                    actionQueue.EnqueueAction(comboQueue,
                                              () => true,
                                              () => shadows.Cast(w.GetPrediction(target).CastPosition),
                                              () => true);
                    return;
                }
            }

            float maxRange = float.MaxValue;

            if (r.UseOnCombo && r.IsReady() && r.Instance.ToggleState == 0)
            {
                AIHeroClient target = null;

                maxRange = Math.Min(maxRange, r.Range);

                if (zedMenu.GetParamBool("koreanzed.combo.ronselected"))
                {
                    if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.IsValidTarget(maxRange))
                    {
                        target = TargetSelector.SelectedTarget;
                    }
                }
                else
                {
                    List <AIHeroClient> ignoredChamps = zedMenu.GetBlockList(BlockListType.Ultimate);
                    target = TargetSelector.GetTarget(maxRange, r.DamageType, true, ignoredChamps);
                }

                if (target != null)
                {
                    switch (zedMenu.GetCombo())
                    {
                    case ComboType.AllStar:
                        AllStarCombo(target);
                        break;

                    case ComboType.TheLine:
                        TheLineCombo(target);
                        break;
                    }
                    return;
                }
            }
            else if (w.UseOnCombo && shadows.CanCast && (!r.UseOnCombo || (r.UseOnCombo && !r.IsReady())) &&
                     (player.Mana > w.ManaCost + (q.UseOnCombo && q.IsReady() ? q.ManaCost : 0F) + (e.UseOnCombo && e.IsReady() ? e.ManaCost : 0F)))
            {
                maxRange = Math.Min(maxRange, w.Range + e.Range);
                AIHeroClient target = TargetSelector.GetTarget(maxRange, TargetSelector.DamageType.Physical);
                if (target != null)
                {
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => shadows.CanCast,
                        () => shadows.Cast(w.GetPrediction(target).CastPosition),
                        () => !shadows.CanCast);
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => w.Instance.ToggleState != 0,
                        () => shadows.Combo(),
                        () => true);
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => shadows.CanSwitch && target.Distance(shadows.Instance.Position) <= player.AttackRange,
                        () => shadows.Switch(),
                        () => !shadows.CanSwitch || target.Distance(shadows.Instance.Position) > player.AttackRange || !w.IsReady());
                    actionQueue.EnqueueAction(
                        comboQueue,
                        () => player.Distance(target) <= Orbwalking.GetRealAutoAttackRange(target),
                        () => EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target),
                        () => target.IsDead || target.IsZombie || player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) || checkAutoAttack.Status);
                    return;
                }
            }

            if (q.UseOnCombo && q.IsReady() && player.Mana > q.ManaCost)
            {
                maxRange = Math.Min(maxRange, q.Range);
                AIHeroClient target = TargetSelector.GetTarget(maxRange, q.DamageType);

                PredictionOutput predictionOutput = q.GetPrediction(target);

                if (predictionOutput.Hitchance >= HitChance.Medium)
                {
                    q.Cast(predictionOutput.CastPosition);
                }
            }

            if (e.UseOnCombo && e.IsReady() && player.Mana > e.ManaCost)
            {
                maxRange = Math.Min(maxRange, e.Range);
                AIHeroClient target = TargetSelector.GetTarget(maxRange, e.DamageType);
                if (target != null)
                {
                    actionQueue.EnqueueAction(comboQueue,
                                              () => e.IsReady(),
                                              () => e.Cast(),
                                              () => true);
                    return;
                }
            }

            if (w.UseOnCombo && w.IsReady() && shadows.CanSwitch)
            {
                List <Obj_AI_Base> shadowList = shadows.GetShadows();

                foreach (Obj_AI_Base objAiBase in shadowList)
                {
                    AIHeroClient target = TargetSelector.GetTarget(2000F, TargetSelector.DamageType.Physical);

                    if (target != null && player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) + 50F &&
                        objAiBase.Distance(target) < player.Distance(target))
                    {
                        shadows.Switch();
                    }
                }
            }
        }
Пример #12
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (!ComboActive)
            {
                var t = TargetSelector.GetTarget(W.Range, DamageType.Physical);
                if (!t.LSIsValidTarget() || !W.IsReady())
                {
                    return;
                }

                if (Program.harass["UseWTH"].Cast <KeyBind>().CurrentValue)
                {
                    if (ObjectManager.Player.HasBuff("Recall"))
                    {
                        return;
                    }
                    W.Cast(t);
                }

                if (t.HasBuffOfType(BuffType.Stun) || t.HasBuffOfType(BuffType.Snare) || t.HasBuffOfType(BuffType.Charm) ||
                    t.HasBuffOfType(BuffType.Fear) || t.HasBuffOfType(BuffType.Taunt) ||
                    t.HasBuff("zhonyasringshield") || t.HasBuff("Recall") && !IsActive(ObjectManager.Player, R))
                {
                    W.Cast(t.Position);
                }
            }

            /* [ Combo ] */
            if (ComboActive)
            {
                var useW = Program.combo["UseWC"].Cast <CheckBox>().CurrentValue;

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

                if (Q.IsReady() && JhinQCastReady)
                {
                    if (t.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 90))
                    {
                        Q.Cast();
                    }
                }

                if (useW && W.IsReady() && t.LSIsValidTarget() && !IsActive(ObjectManager.Player, R))
                {
                    W.Cast(t);
                }

                var useR = Program.combo["UseRC"].Cast <CheckBox>().CurrentValue;
                if (useR && R.IsReady())
                {
                    var minRRange = Program.combo["UseRCMinRange"].Cast <Slider>().CurrentValue;
                    var maxRRange = Program.combo["UseRCMaxRange"].Cast <Slider>().CurrentValue;

                    t = TargetSelector.GetTarget(maxRRange, DamageType.Physical);
                    if (!t.LSIsValidTarget())
                    {
                        return;
                    }

                    var aaDamage = Orbwalking.InAutoAttackRange(t) ? ObjectManager.Player.LSGetAutoAttackDamage(t, true) : 0;

                    if (t.Health > aaDamage && t.Health <= ObjectManager.Player.LSGetSpellDamage(t, SpellSlot.R) && ObjectManager.Player.LSDistance(t) >= minRRange)
                    {
                        R.Cast(t);
                    }
                }
            }

            //Harass
            if (HarassActive)
            {
                var target = TargetSelector.GetTarget(1200, DamageType.Physical);
                if (target == null)
                {
                    return;
                }

                if (Program.harass["UseWH"].Cast <CheckBox>().CurrentValue&& W.IsReady())
                {
                    W.Cast(target);
                }
            }

            //Manual cast R
            if (Program.misc["RManualCast"].Cast <KeyBind>().CurrentValue)
            {
                var rTarget = TargetSelector.GetTarget(2000, DamageType.Physical);
                R.Cast(rTarget);
            }
        }
Пример #13
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range + 200, DamageType.Magical);

            if (target == null)
            {
                return;
            }
            var useq       = getCheckBoxItem(comboMenu, "useq");
            var user       = getCheckBoxItem(comboMenu, "user");
            var usee       = getCheckBoxItem(comboMenu, "usee");
            var userturret = getCheckBoxItem(comboMenu, "usert");
            var ignite     = getCheckBoxItem(comboMenu, "useignite");

            if (Orbwalker.IsAutoAttacking)
            {
                return;
            }

            SetIgniteSlot(Player.GetSpellSlot("summonerdot"));

            if (ignite)
            {
                if (target.IsValidTarget(Q.Range) &&
                    (target.Health < IgniteDamage(target) + Q.GetDamage(target)))
                {
                    Player.Spellbook.CastSpell(GetIgniteSlot(), target);
                }
            }

            if (Q.IsReady() && useq && target.IsValidTarget(Q.Range))
            {
                if (Player.LSDistance(target) < Orbwalking.GetRealAutoAttackRange(target) && !W.IsReady())
                {
                    Q.Cast(target);
                }
                else if (Player.LSDistance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Q.Cast(target);
                }
            }

            if (E.IsReady() && usee && target.LSDistance(Player) < 500 && eCanCast())
            {
                if (Player.LSDistance(target) < Orbwalking.GetRealAutoAttackRange(target) && !W.IsReady())
                {
                    E.Cast(target.Position);
                }
                else if (Player.LSDistance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Utility.DelayAction.Add(200, () => E.Cast(target.Position));
                }
            }

            var rCount           = getSliderItem(comboMenu, "rcount");
            var extendedposition = Player.Position.LSExtend(target.Position, 500);

            if (ForcePulseCount() < rCount && user && R.IsReady())
            {
                if (userturret)
                {
                    if (target.UnderTurret(true))
                    {
                        return;
                    }
                }
                if (Player.HealthPercent > getSliderItem(comboMenu, "rhp"))
                {
                    if (Q.IsReady() || E.IsReady() || W.IsReady())
                    {
                        R.Cast(extendedposition);
                    }
                }
            }
        }
Пример #14
0
        private static void LaneClear()
        {
            var minions = MinionManager.GetMinions(Player.Position, Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);

            var useq = getCheckBoxItem(farmMenu, "useql");

            if (useq)
            {
                foreach (var mins in minions)
                {
                    if (mins.Health <= Q.GetDamage(mins))
                    {
                        if (mins.Health >= Player.GetAutoAttackDamage(mins) + 50 &&
                            mins.LSDistance(Player) <= Orbwalking.GetRealAutoAttackRange(mins))
                        {
                            Q.Cast(mins);
                        }

                        if (mins.LSDistance(Player) >= Orbwalking.GetRealAutoAttackRange(mins) + 100)
                        {
                            Q.Cast(mins);
                        }
                    }
                }
            }

            if (minions.FirstOrDefault() == null)
            {
                return;
            }


            if (Player.ManaPercent < getSliderItem(farmMenu, "minmanalaneclear"))
            {
                return;
            }

            var usee       = getCheckBoxItem(farmMenu, "useel");
            var user       = getCheckBoxItem(farmMenu, "userl");
            var useeslider = getSliderItem(farmMenu, "useels");
            var userslider = getSliderItem(farmMenu, "userls");
            var count      = getSliderItem(farmMenu, "rcountl");

            if (usee)
            {
                if (E.IsReady() && eCanCast())
                {
                    var miniosn =
                        MinionManager.GetMinions(Player.Position, 400);
                    {
                        if (miniosn.FirstOrDefault() != null)
                        {
                            var predict = E.GetCircularFarmLocation(miniosn, 500);
                            var minhit  = predict.MinionsHit;
                            if (minhit >= useeslider)
                            {
                                E.Cast(predict.Position);
                            }
                        }
                    }
                }
            }

            if (user)
            {
                if (ForcePulseCount() >= count)
                {
                    return;
                }
                if (R.IsReady())
                {
                    var min = MinionManager.GetMinions(Player.Position, R.Range);
                    if (min.FirstOrDefault() != null)
                    {
                        var prediction = R.GetCircularFarmLocation(min, R.Width);
                        var predict    = prediction.MinionsHit;
                        if (predict >= userslider)
                        {
                            R.Cast(prediction.Position);
                        }
                    }
                }
            }
        }
Пример #15
0
        private List <CardColor> GetBestCard(Obj_AI_Hero target, string mode)
        {
            var cards = new List <CardColor>();

            if (target == null || !target.IsValid || target.IsDead)
            {
                return(cards);
            }
            try
            {
                if (IsWKillable(target, 2))
                {
                    cards.Add(CardColor.Gold);
                }
                if (IsWKillable(target))
                {
                    cards.Add(CardColor.Blue);
                }
                if (IsWKillable(target, 1))
                {
                    cards.Add(CardColor.Red);
                }
                if (cards.Any())
                {
                    return(cards);
                }
                var selectedCard =
                    GetSelectedCardColor(Menu.Item(Menu.Name + ".harass.w-card").GetValue <StringList>().SelectedIndex);
                var burst = Menu.Item(Menu.Name + ".miscellaneous.mode").GetValue <StringList>().SelectedIndex == 0;
                var red   = 0;
                var blue  = 0;
                var gold  = 0;

                var shouldBlue = Player.Mana <W.ManaCost + Q.ManaCost &&
                                              Player.Mana + (25 + 25 * W.Level)> Q.ManaCost + W.ManaCost;

                if (!burst && (mode == "combo" || mode == "harass" && selectedCard == CardColor.None))
                {
                    if (Q.Level == 0)
                    {
                        return(new List <CardColor> {
                            CardColor.Blue
                        });
                    }
                    gold++;
                    if (target.Distance(Player) > W.Range * 0.8f)
                    {
                        gold++;
                    }
                    if (mode == "combo" && (Player.ManaPercent < 10 || shouldBlue) ||
                        mode == "harass" && !ResourceManager.Check("harass-blue"))
                    {
                        return(new List <CardColor> {
                            CardColor.Blue
                        });
                    }
                    var minRed  = Menu.Item(Menu.Name + ".combo.red-min").GetValue <Slider>().Value;
                    var redHits = GetWHits(target, GameObjects.EnemyHeroes.Cast <Obj_AI_Base>().ToList(), CardColor.Red);
                    red += redHits;
                    if (red > blue && red > gold && redHits >= minRed)
                    {
                        cards.Add(CardColor.Red);
                        if (red == blue)
                        {
                            cards.Add(CardColor.Blue);
                        }
                        if (red == gold)
                        {
                            cards.Add(CardColor.Gold);
                        }
                    }
                    else if (gold > blue && gold > red)
                    {
                        cards.Add(CardColor.Gold);
                        if (gold == blue)
                        {
                            cards.Add(CardColor.Blue);
                        }
                        if (gold == red && redHits >= minRed)
                        {
                            cards.Add(CardColor.Red);
                        }
                    }
                    else if (blue > red && blue > gold)
                    {
                        cards.Add(CardColor.Blue);
                        if (blue == red && redHits >= minRed)
                        {
                            cards.Add(CardColor.Red);
                        }
                        if (blue == gold)
                        {
                            cards.Add(CardColor.Gold);
                        }
                    }
                }
                if (mode == "combo" && !cards.Any())
                {
                    if (Q.Level == 0)
                    {
                        return(new List <CardColor> {
                            CardColor.Blue
                        });
                    }
                    var distance = target.Distance(Player);
                    var damage   = Player.GetAutoAttackDamage(target, true) - target.HPRegenRate * 2f - 10;
                    if (HasEBuff())
                    {
                        damage += E.GetDamage(target);
                    }
                    if (Q.IsReady() && (GetImmobileTime(target) > 0.5f || distance < Q.Range / 4f))
                    {
                        damage += Q.GetDamage(target);
                    }
                    if (W.GetDamage(target, 2) + damage > target.Health)
                    {
                        cards.Add(CardColor.Gold);
                    }
                    if (distance < Orbwalking.GetRealAutoAttackRange(target) * 0.85f)
                    {
                        if (W.GetDamage(target) + damage > target.Health)
                        {
                            cards.Add(CardColor.Blue);
                        }
                        if (W.GetDamage(target, 1) + damage > target.Health)
                        {
                            cards.Add(CardColor.Red);
                        }
                    }

                    if (!cards.Any())
                    {
                        if (ObjectManager.Player.HealthPercent <=
                            Menu.Item(Menu.Name + ".combo.gold-percent").GetValue <Slider>().Value)
                        {
                            cards.Add(CardColor.Gold);
                        }
                        else if (Player.ManaPercent < 10 || shouldBlue)
                        {
                            cards.Add(CardColor.Blue);
                        }
                        else
                        {
                            var redHits = GetWHits(
                                target, GameObjects.EnemyHeroes.Cast <Obj_AI_Base>().ToList(), CardColor.Red);
                            if (redHits >= Menu.Item(Menu.Name + ".combo.red-min").GetValue <Slider>().Value)
                            {
                                cards.Add(CardColor.Red);
                            }
                        }
                    }
                    if (!cards.Any())
                    {
                        cards.Add(CardColor.Gold);
                    }
                }
                else if (mode == "harass" && !cards.Any())
                {
                    if (selectedCard == CardColor.None && burst)
                    {
                        cards.Add(target.Distance(Player) > W.Range * 0.8f ? CardColor.Gold : CardColor.Blue);
                    }
                    else
                    {
                        var card = !ResourceManager.Check("harass-blue") ? CardColor.Blue : selectedCard;
                        if (card != CardColor.None)
                        {
                            cards.Add(card);
                        }
                    }
                }
                else if (mode == "flee")
                {
                    cards.Add(
                        GetWHits(target, GameObjects.EnemyHeroes.Cast <Obj_AI_Base>().ToList(), CardColor.Red) >= 2
                            ? CardColor.Red
                            : CardColor.Gold);
                }
                if (!cards.Any())
                {
                    cards.Add(CardColor.Gold);
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(cards);
        }
Пример #16
0
        private void Combo()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(1700, LeagueSharp.Common.TargetSelector.DamageType.Magical, true);

            if (target == null || target.IsInvulnerable || target.MagicImmune)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var  edmg      = getEdamage(target);
            var  qdmg      = getQdamage(target);
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() &&
                ignitedmg > HealthPrediction.GetHealthPrediction(target, 700) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) &&
                (!ActiveQ ||
                 (!(CombatHelper.IsFacing(player, target.Position, 30) && target.Distance(player) < Q.Range))))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.CanCast(target) && config.Item("useq", true).GetValue <bool>() && Qhit(target.Position) &&
                (preventSilence(Q) ||
                 (target.Health < PassiveDmg(target) * 2 || qdmg > target.Health) &&
                 target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target)))
            {
                Q.Cast(target.Position);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) &&
                (((preventSilence(E) ||
                   (target.Health < PassiveDmg(target) * 2 &&
                    target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target))) &&
                  (!ActiveE ||
                   System.Environment.TickCount - lastE > config.Item("eDelay", true).GetValue <Slider>().Value)) ||
                 edmg > target.Health))
            {
                E.CastIfHitchanceEquals(target, HitChance.High);
            }
            if (W.IsReady() && config.Item("wSpeed", true).GetValue <bool>() && ActiveQ && preventSilence(W) &&
                target.Distance(player) < Q.Range &&
                LeagueSharp.Common.Prediction.GetPrediction(target, 0.2f).UnitPosition.Distance(player.Position) > Q.Range)
            {
                W.Cast();
            }
            var canR = ComboDamage(target) > target.Health && qdmg < target.Health && target.Distance(player) < Q.Range &&
                       !Silenced;

            if (R.IsReady() &&
                (((target.Health <
                   getRdamage(target) * ((target.CountAlliesInRange(600) > 0 && target.HealthPercent > 15) ? 5 : 3) &&
                   target.Distance(player) > Q.Range) ||
                  (target.Distance(player) < Q.Range && target.Health < getRdamage(target) * 3 + edmg &&
                   target.Health > qdmg)) ||
                 player.CountEnemiesInRange(R.Range) >= config.Item("Rmin", true).GetValue <Slider>().Value))
            {
                HandleR(target, canR);
            }
        }
Пример #17
0
        private static void OnCombo()
        {
            var eTarget = HeroManager.Enemies.Find(x => x.HasBuff("TristanaECharge") && x.LSIsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)));
            var target  = eTarget ?? TargetSelector.GetTarget(spells[Spells.E].Range, DamageType.Physical);

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

            if (spells[Spells.Q].IsReady() && getCheckBoxItem(comboMenu, "ElTristana.Combo.Q"))
            {
                QLogic();
            }

            if (getCheckBoxItem(comboMenu, "ElTristana.Combo.Focus.E"))
            {
                var passiveTarget = HeroManager.Enemies.Find(x => x.HasBuff("TristanaECharge") && x.LSIsValidTarget(spells[Spells.E].Range));
                Orbwalker.ForcedTarget = passiveTarget ?? null;
            }

            if (spells[Spells.E].IsReady() && getCheckBoxItem(comboMenu, "ElTristana.Combo.E") && Player.ManaPercent > getSliderItem(comboMenu, "ElTristana.Combo.E.Mana"))
            {
                foreach (var hero in HeroManager.Enemies.OrderBy(x => x.Health))
                {
                    if (hero.IsEnemy)
                    {
                        var getEnemies = getCheckBoxItem(comboMenu, "ElTristana.E.On" + hero.NetworkId);
                        if (comboMenu["ElTristana.E.On" + hero.NetworkId] != null && getEnemies)
                        {
                            spells[Spells.E].Cast(hero);
                            Orbwalker.ForcedTarget = hero;
                        }

                        if (comboMenu["ElTristana.E.On" + hero.NetworkId] != null && !getEnemies && Player.CountEnemiesInRange(1500) == 1)
                        {
                            spells[Spells.E].Cast(hero);
                            Orbwalker.ForcedTarget = hero;
                        }
                    }
                }
            }

            if (spells[Spells.R].IsReady() && getCheckBoxItem(comboMenu, "ElTristana.Combo.R"))
            {
                if (spells[Spells.R].GetDamage(target) > target.Health)
                {
                    spells[Spells.R].Cast(target);
                }
            }

            if (IsECharged(target) && getCheckBoxItem(comboMenu, "ElTristana.Combo.Always.RE"))
            {
                if (spells[Spells.R].GetDamage(target)
                    + spells[Spells.E].GetDamage(target) * (0.3 * target.GetBuffCount("TristanaECharge") + 1)
                    > target.Health)
                {
                    spells[Spells.R].Cast(target);
                }
            }
        }
Пример #18
0
        private void Laneclear()
        {
            var arange     = Orbwalking.GetRealAutoAttackRange(ObjectManager.Player);
            var allMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q1.Range, MinionTypes.All,
                                                      MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);

            if (allMinions.Count == 0)
            {
                return;
            }
            Obj_AI_Minion nearstMinion = null;

            foreach (var obj in ObjectManager.Get <Obj_AI_Minion>())
            {
                if (nearstMinion == null || nearstMinion.Position.Distance(ObjectManager.Player.Position) > obj.Position.Distance(ObjectManager.Player.Position))
                {
                    nearstMinion = obj;
                }
            }

            if (Program.Menu.Item("LaneClear_W").GetValue <Slider>().Value >
                ObjectManager.Player.Health / ObjectManager.Player.MaxHealth * 100)
            {
                if (W1.IsReady())
                {
                    if (W1Ready() && PassiveDown())
                    {
                        if (nearstMinion.Distance(ObjectManager.Player.Position) <= arange)
                        {
                            W1.CastOnUnit(ObjectManager.Player, Packets());
                        }
                    }

                    if (W2Ready() && (PassiveDown() || Environment.TickCount - E1.LastCastAttemptT > 2800))
                    {
                        if (nearstMinion.Distance(ObjectManager.Player.Position) <= arange)
                        {
                            W2.Cast();
                        }
                    }
                }
            }
            if (Q1.IsReady() && Program.Menu.Item("LaneClear_Q").GetValue <bool>())
            {
                if (Q1Ready() && PassiveDown())
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= Q1.Range)
                    {
                        Cast_Basic_Farm(Q1, true);
                    }
                }

                if (Q2Ready() && (PassiveDown() || Environment.TickCount - Q1.LastCastAttemptT > 2800 || getQ2Target().Distance(ObjectManager.Player) >= 400))
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= Q2.Range)
                    {
                        Q2.Cast();
                    }
                }
            }
            if (E1.IsReady() && Program.Menu.Item("LaneClear_E").GetValue <bool>())
            {
                if (E1Ready() && PassiveDown())
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= E1.Range)
                    {
                        E1.Cast();
                    }
                }

                if (E2Ready() && (PassiveDown() || Environment.TickCount - E1.LastCastAttemptT > 2800))
                {
                    if (nearstMinion.Distance(ObjectManager.Player.Position) <= arange)
                    {
                        E2.Cast();
                    }
                }
            }
        }
Пример #19
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(700, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (getCheckBoxItem(comboMenu, "useIgnite") && hasIgnite &&
                ((R.IsReady() && ignitedmg + R.GetDamage(target) > target.Health) || ignitedmg > target.Health) &&
                (target.Distance(player) > E.Range || player.HealthPercent < 20))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (getCheckBoxItem(comboMenu, "useq") && Q.IsReady() &&
                player.Distance(target) > player.AttackRange && !GarenE && !GarenQ &&
                player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) &&
                CombatHelper.IsPossibleToReachHim(target, 0.30f, new float[5] {
                1.5f, 2f, 2.5f, 3f, 3.5f
            }[Q.Level - 1]))
            {
                Q.Cast(getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(comboMenu, "useq") && Q.IsReady() && !GarenQ &&
                (!GarenE || (Q.IsReady() && player.LSGetSpellDamage(target, SpellSlot.Q) > target.Health)))
            {
                if (GarenE)
                {
                    E.Cast(getCheckBoxItem(config, "packets"));
                }
                Q.Cast(getCheckBoxItem(config, "packets"));
                Player.IssueOrder(GameObjectOrder.AutoAttack, target);
            }
            if (getCheckBoxItem(comboMenu, "usee") && E.IsReady() && !Q.IsReady() && !GarenQ && !GarenE &&
                player.CountEnemiesInRange(E.Range) > 0)
            {
                E.Cast(getCheckBoxItem(config, "packets"));
            }
            var targHP = target.Health + 20 - CombatHelper.IgniteDamage(target);
            var rLogic = getCheckBoxItem(comboMenu, "user") && R.IsReady() && target.IsValidTarget() &&
                         (!getCheckBoxItem(miscMenu, "ult" + target.BaseSkinName) ||
                          player.CountEnemiesInRange(1500) == 1) && getRDamage(target) > targHP && targHP > 0;

            if (rLogic && target.Distance(player) < R.Range)
            {
                if (!(GarenE && target.Health < getEDamage(target, true) && target.Distance(player) < E.Range))
                {
                    if (GarenE)
                    {
                        E.Cast(getCheckBoxItem(config, "packets"));
                    }
                    else
                    {
                        R.Cast(target, getCheckBoxItem(config, "packets"));
                    }
                }
            }
            var data = IncDamages.GetAllyData(player.NetworkId);

            if (getCheckBoxItem(comboMenu, "usew") && W.IsReady() && target.IsFacing(player) &&
                data.DamageTaken > 40)
            {
                W.Cast(getCheckBoxItem(config, "packets"));
            }
            var hasFlash = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready;

            if (getCheckBoxItem(comboMenu, "useFlash") && hasFlash && rLogic &&
                target.Distance(player) < R.Range + 425 && target.Distance(player) > R.Range + 250 && !Q.IsReady() &&
                !CombatHelper.IsFacing(target, player.Position) && !GarenQ)
            {
                if (target.Distance(player) < R.Range + 300 && player.MoveSpeed > target.MoveSpeed)
                {
                    return;
                }
                if (GarenE)
                {
                    E.Cast(getCheckBoxItem(config, "packets"));
                }
                else if (!player.Position.Extend(target.Position, 425f).IsWall())
                {
                }
                {
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"),
                                               player.Position.LSExtend(target.Position, 425f));
                }
            }
        }
Пример #20
0
        void LH()
        {
            List <Obj_AI_Base> allMinions = MinionManager.GetMinions(Khazix.ServerPosition, Q.Range).OrderBy(x => x.MaxHealth).ToList();

            if (Config.GetBool("UseQFarm") && Q.IsReady())
            {
                foreach (Obj_AI_Base minion in
                         allMinions.Where(
                             minion =>
                             minion.IsValidTarget() &&
                             HealthPrediction.GetHealthPrediction(
                                 minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) <
                             0.75 * Khazix.GetSpellDamage(minion, SpellSlot.Q)))
                {
                    if (Vector3.Distance(minion.ServerPosition, Khazix.ServerPosition) >
                        Orbwalking.GetRealAutoAttackRange(Khazix) && Khazix.Distance(minion) <= Q.Range)
                    {
                        Q.CastOnUnit(minion);
                        return;
                    }
                }
            }
            if (Config.GetBool("UseWFarm") && W.IsReady())
            {
                MinionManager.FarmLocation farmLocation = MinionManager.GetBestCircularFarmLocation(
                    MinionManager.GetMinions(Khazix.ServerPosition, W.Range).Where(minion => HealthPrediction.GetHealthPrediction(
                                                                                       minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) <
                                                                                   0.75 * Khazix.GetSpellDamage(minion, SpellSlot.W))
                    .Select(minion => minion.ServerPosition.To2D())
                    .ToList(), W.Width, W.Range);
                if (farmLocation.MinionsHit >= 1)
                {
                    if (!EvolvedW)
                    {
                        if (Khazix.Distance(farmLocation.Position) <= W.Range)
                        {
                            W.Cast(farmLocation.Position);
                        }
                    }

                    if (EvolvedW)
                    {
                        if (Khazix.Distance(farmLocation.Position) <= W.Range)
                        {
                            W.Cast(farmLocation.Position);
                        }
                    }
                }
            }

            if (Config.GetBool("UseEFarm") && E.IsReady())
            {
                MinionManager.FarmLocation farmLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        MinionManager.GetMinions(Khazix.ServerPosition, E.Range).Where(minion => HealthPrediction.GetHealthPrediction(
                                                                                           minion, (int)(Khazix.Distance(minion) * 1000 / 1400)) <
                                                                                       0.75 * Khazix.GetSpellDamage(minion, SpellSlot.W))
                        .Select(minion => minion.ServerPosition.To2D())
                        .ToList(), E.Width, E.Range);

                if (farmLocation.MinionsHit >= 1)
                {
                    if (Khazix.Distance(farmLocation.Position) <= E.Range)
                    {
                        E.Cast(farmLocation.Position);
                    }
                }
            }


            if (Config.GetBool("UseItemsFarm"))
            {
                MinionManager.FarmLocation farmLocation =
                    MinionManager.GetBestCircularFarmLocation(
                        MinionManager.GetMinions(Khazix.ServerPosition, Hydra.Range)
                        .Select(minion => minion.ServerPosition.To2D())
                        .ToList(), Hydra.Range, Hydra.Range);

                if (Hydra.IsReady() && Khazix.Distance(farmLocation.Position) <= Hydra.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3074, Khazix);
                }
                if (Tiamat.IsReady() && Khazix.Distance(farmLocation.Position) <= Tiamat.Range && farmLocation.MinionsHit >= 2)
                {
                    Items.UseItem(3077, Khazix);
                }
            }
        }
Пример #21
0
        private void Combo()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(W.Range, LeagueSharp.Common.TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var data = Program.IncDamages.GetAllyData(player.NetworkId);

            if (config.Item("usewCC", true).GetValue <bool>() && W.IsReady() && data.AnyCC)
            {
                W.Cast(target.Position);
            }
            var closestPassive = GetClosestPassivePosition(target);

            if (closestPassive.IsValid() && config.Item("MoveToVitals", true).GetValue <bool>() &&
                Orbwalking.CanMove(300) && !EloBuddy.SDK.Orbwalker.CanAutoAttack && !player.Spellbook.IsAutoAttacking &&
                Game.CursorPos.Distance(target.Position) < 350)
            {
                orbwalker.SetMovement(false);
                EloBuddy.Player.IssueOrder(
                    GameObjectOrder.MoveTo,
                    target.Position.Extend(closestPassive, Math.Max(player.BoundingRadius + target.BoundingRadius, 100)).To3DWorld());
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() && Orbwalking.CanMove(100) &&
                config.Item("useqMin", true).GetValue <Slider>().Value <= player.Distance(target) &&
                (closestPassive.IsValid() || (target.HealthPercent < 30)) && !player.Spellbook.IsAutoAttacking)
            {
                var pos = GetQpoint(target, closestPassive);
                if (pos.IsValid())
                {
                    Q.Cast(pos);
                }
                else if (target.HealthPercent < 30)
                {
                    if (
                        CheckQusage(
                            target.Position.Extend(
                                LeagueSharp.Common.Prediction.GetPrediction(target, player.Distance(target) / 1600).UnitPosition, Qradius).To3DWorld(),
                            target))
                    {
                        Q.Cast(
                            target.Position.Extend(
                                LeagueSharp.Common.Prediction.GetPrediction(target, player.Distance(target) / 1600).UnitPosition, Qradius));
                    }
                }
            }
            if (W.IsReady() && config.Item("usew", true).GetValue <bool>())
            {
                var killable  = (target.Distance(player) > 350f && W.GetDamage(target) > target.Health);
                var incAA     = data.ProjectileDamageTaken >= target.GetAutoAttackDamage(player) - 5;
                var dangerous = incAA && data.DamageTaken >= player.Health * 0.4f;
                if (killable || (incAA && !config.Item("usewDangerous", true).GetValue <bool>()) ||
                    (config.Item("usewDangerous", true).GetValue <bool>() && dangerous))
                {
                    W.CastIfHitchanceEquals(target, HitChance.Low);
                }
            }
            if (config.Item("useIgnite").GetValue <bool>() && hasIgnite && ComboDamage(target) > target.Health &&
                !Q.IsReady() &&
                (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) || player.HealthPercent < 15))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Пример #22
0
        private static void CastQ(Obj_AI_Base target)
        {
            var myPosition = Game.CursorPos;

            if (MenuHelper.isMenuEnabled("dz191.vhr.misc.tumble.smartq") && _spells[SpellSlot.E].IsReady())
            {
                const int currentStep = 30;
                var       direction   = ObjectManager.Player.Direction.To2D().Perpendicular();
                for (var i = 0f; i < 360f; i += currentStep)
                {
                    var         angleRad        = Geometry.DegreeToRadian(i);
                    var         rotatedPosition = ObjectManager.Player.Position.To2D() + (300 * direction.Rotated(angleRad));
                    Obj_AI_Hero myTarget;
                    if (CondemnCheck(rotatedPosition.To3D(), out myTarget) && Helpers.OkToQ(rotatedPosition.To3D()))
                    {
                        myPosition = rotatedPosition.To3D();
                        break;
                    }
                }
            }
            if (_spells[SpellSlot.R].IsEnabledAndReady(Mode.Combo) && (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) && ObjectManager.Player.CountEnemiesInRange(Orbwalking.GetRealAutoAttackRange(null)) >= MenuHelper.getSliderValue("dz191.vhr.combo.r.minenemies"))
            {
                _spells[SpellSlot.R].Cast();
            }
            CastTumble(myPosition, target);
        }
Пример #23
0
 private static void LoadItems()
 {
     ItemDb =
         new Dictionary <string, Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType> >
     {
         {
             "Tiamat",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3077, 450f),
                 EnumItemType.AoE,
                 EnumItemTargettingType.EnemyObjects)
         },
         {
             "Bilge",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3144, 450f),
                 EnumItemType.Targeted,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Blade",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3153, 450f),
                 EnumItemType.Targeted,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Hydra",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3074, 450f),
                 EnumItemType.AoE,
                 EnumItemTargettingType.EnemyObjects)
         },
         {
             "Titanic Hydra Cleave",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3748, Orbwalking.GetRealAutoAttackRange(null) + 65),
                 EnumItemType.OnTarget,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Randiun",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3143, 490f),
                 EnumItemType.AoE,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Hextech",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3146, 750f),
                 EnumItemType.Targeted,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Entropy",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3184, 750f),
                 EnumItemType.Targeted,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Youmuu's Ghostblade",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3142, Orbwalking.GetRealAutoAttackRange(null) + 65),
                 EnumItemType.AoE,
                 EnumItemTargettingType.EnemyHero)
         },
         {
             "Sword of the Divine",
             new Tuple <LeagueSharp.Common.Items.Item, EnumItemType, EnumItemTargettingType>(
                 new LeagueSharp.Common.Items.Item(3131, Orbwalking.GetRealAutoAttackRange(null) + 65),
                 EnumItemType.AoE,
                 EnumItemTargettingType.EnemyHero)
         }
     };
 }
Пример #24
0
        /// <summary>
        ///     Does the combo.
        /// </summary>
        private static void Combo()
        {
            var useQ         = Menu.Item("useQ").GetValue <bool>();
            var useW         = Menu.Item("useW").GetValue <bool>();
            var useE         = Menu.Item("useE").GetValue <bool>();
            var useR         = Menu.Item("useR").GetValue <bool>();
            var minQRange    = Menu.Item("minQRange").GetValue <Slider>().Value;
            var useEStun     = Menu.Item("useEStun").GetValue <bool>();
            var useQGapclose = Menu.Item("useQGapclose").GetValue <bool>();
            var useWBeforeQ  = Menu.Item("useWBeforeQ").GetValue <bool>();
            var procSheen    = Menu.Item("procSheen").GetValue <bool>();
            var useIgnite    = Menu.Item("useIgnite").GetValue <bool>();
            var useRGapclose = Menu.Item("useRGapclose").GetValue <bool>();

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

            if (target == null && useQGapclose)
            {
                /** var minionQ =
                 *  ObjectManager.Get<Obj_AI_Minion>()
                 *      .Where(x => x.IsValidTarget())
                 *      .Where(x => Player.GetSpellDamage(x, SpellSlot.Q) > x.Health)
                 *      .FirstOrDefault(
                 *          x =>
                 *              x.Distance(TargetSelector.GetTarget(Q.Range * 5, TargetSelector.DamageType.Physical)) <
                 *              Q.Range);*/
                var minionQ =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(
                        x =>
                        Q.IsKillable(x) && Q.IsInRange(x) &&
                        x.Distance(HeroManager.Enemies.OrderBy(y => y.Distance(Player)).FirstOrDefault())
                        < Player.Distance(HeroManager.Enemies.OrderBy(z => z.Distance(Player)).FirstOrDefault()));

                if (minionQ != null && Player.Mana > Q.ManaCost * 2)
                {
                    Q.CastOnUnit(minionQ);
                    return;
                }

                if (useRGapclose)
                {
                    var minionR =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(
                            x =>
                            x.IsValidTarget() && x.Distance(Player) < Q.Range && x.CountEnemiesInRange(Q.Range) >= 1)
                        .FirstOrDefault(
                            x =>
                            x.Health - Player.GetSpellDamage(x, SpellSlot.R) < Player.GetSpellDamage(x, SpellSlot.Q));

                    if (minionR != null)
                    {
                        R.Cast(minionR);
                    }
                }
            }

            // Get target that is in the R range
            var rTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (useR && UltActivated && rTarget.IsValidTarget())
            {
                if (procSheen)
                {
                    // Fire Ult if player is out of AA range, with Q not up or not in range
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
                    {
                        R.Cast(rTarget);
                    }
                    else
                    {
                        if (!HasSheenBuff)
                        {
                            R.Cast(rTarget);
                        }
                    }
                }
                else
                {
                    R.Cast(rTarget);
                }
            }

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

            if (Botrk.IsReady())
            {
                Botrk.Cast(target);
            }

            if (Cutlass.IsReady())
            {
                Cutlass.Cast(target);
            }

            if (Omen.IsReady() && Omen.IsInRange(target) &&
                target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player))
            {
                Omen.Cast();
            }

            if (useIgnite && target != null && target.IsValidTarget(600) &&
                (IgniteSlot.IsReady() &&
                 Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health))
            {
                Player.Spellbook.CastSpell(IgniteSlot, target);
            }

            if (useWBeforeQ)
            {
                if (useW && W.IsReady())
                {
                    W.Cast();
                }

                if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target);
                }
            }
            else
            {
                if (useQ && Q.IsReady() && target.Distance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target);
                }

                if (useW && W.IsReady())
                {
                    W.Cast();
                }
            }

            if (useEStun)
            {
                if (target.CanStunTarget() && useE && E.IsReady())
                {
                    E.Cast(target);
                }
            }
            else
            {
                if (useE && E.IsReady())
                {
                    E.Cast(target);
                }
            }

            if (useR && R.IsReady() && !UltActivated)
            {
                R.Cast(target);
            }
        }
Пример #25
0
        private static void Harass()
        {
            AIHeroClient target = TargetSelector.GetTarget(E.Range, DamageType.Physical);

            if (target == null)
            {
                return;
            }
            switch (getBoxItem(harassMenu, "useCH"))
            {
            case 1:
                if (Q.IsReady() && E.IsReady() && lastE.Equals(0) && fury && !rene)
                {
                    if (getCheckBoxItem(harassMenu, "donteqwebtower") &&
                        player.Position.LSExtend(target.Position, E.Range).UnderTurret(true))
                    {
                        return;
                    }
                    var closeGapTarget =
                        MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly)
                        .Where(i => i.LSDistance(target.ServerPosition) < Q.Range - 40)
                        .OrderByDescending(i => Environment.Minion.countMinionsInrange(i.Position, Q.Range))
                        .FirstOrDefault();
                    if (closeGapTarget != null)
                    {
                        lastEpos = player.ServerPosition;
                        Utility.DelayAction.Add(4100, () => lastEpos = new Vector3());
                        E.Cast(closeGapTarget.Position);
                        lastE = System.Environment.TickCount;
                        return;
                    }
                    else
                    {
                        lastEpos = player.ServerPosition;
                        Utility.DelayAction.Add(4100, () => lastEpos = new Vector3());
                        E.Cast(target.Position);
                        lastE = System.Environment.TickCount;
                        return;
                    }
                }
                if (player.LSDistance(target) < Orbwalking.GetRealAutoAttackRange(target) && Q.IsReady() &&
                    E.IsReady() && E.IsReady())
                {
                    Orbwalker.ForcedTarget = (target);
                }
                return;

            case 0:
                if (Q.IsReady() && W.IsReady() && !rene && E.CanCast(target))
                {
                    if (getCheckBoxItem(harassMenu, "donteqwebtower") &&
                        player.Position.LSExtend(target.Position, E.Range).UnderTurret(true))
                    {
                        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.LSDistance(target) < Orbwalking.GetRealAutoAttackRange(target) && Q.IsReady() &&
                    E.IsReady() && E.IsReady())
                {
                    Orbwalker.ForcedTarget = (target);
                }
                return;

            default:
                break;
            }

            if (getCheckBoxItem(harassMenu, "useqH") && Q.CanCast(target))
            {
                Q.Cast();
            }

            if (getBoxItem(harassMenu, "useCH") == 0 && !lastE.Equals(0) && rene &&
                !Q.IsReady() && !renw)
            {
                if (lastEpos.IsValid())
                {
                    E.Cast(player.Position.LSExtend(lastEpos, 350f));
                }
            }
        }
Пример #26
0
        private static void LaneClear()
        {
            var minions = MinionManager.GetMinions(Player.Position, Q.Range, MinionTypes.All, MinionTeam.Enemy,
                                                   MinionOrderTypes.MaxHealth);

            var useq = GetBool("useql", typeof(bool));

            if (useq)
            {
                foreach (var mins in minions)
                {
                    if (mins.Health <= Q.GetDamage(mins))
                    {
                        if (mins.Health >= Player.GetAutoAttackDamage(mins) + 50 && mins.Distance(Player) <= Orbwalking.GetRealAutoAttackRange(mins))
                        {
                            Q.Cast(mins);
                        }

                        if (mins.Distance(Player) >= Orbwalking.GetRealAutoAttackRange(mins) + 100)
                        {
                            Q.Cast(mins);
                        }
                    }
                }
            }
            if (minions.FirstOrDefault() == null)
            {
                return;
            }


            if (Player.ManaPercent < GetValue("minmanalaneclear"))
            {
                return;
            }

            var usee       = GetBool("useel", typeof(bool));
            var user       = GetBool("userl", typeof(bool));
            var useeslider = GetValue("useels");
            var userslider = GetValue("userls");
            var count      = GetValue("rcountl");

            if (usee)
            {
                if (E.IsReady() && eCanCast())
                {
                    // if (Player.Distance(minions) < Orbwalking.GetRealAutoAttackRange(minions) && !W.IsReady())
                    //    E.CastIfWillHit(minions, useeslider);
                    //else if (Player.Distance(minions) > Orbwalking.GetRealAutoAttackRange(minions))
                    //{
                    var miniosn =
                        MinionManager.GetMinions(Player.Position, 400);
                    {
                        if (miniosn.FirstOrDefault() != null)
                        {
                            var predict = E.GetCircularFarmLocation(miniosn, 500);
                            var minhit  = predict.MinionsHit;
                            if (minhit >= useeslider)
                            {
                                E.Cast(predict.Position);
                            }
                        }
                    }
                }
            }

            if (user)
            {
                if (ForcePulseCount() >= count)
                {
                    return;
                }
                if (R.IsReady())
                {
                    var min =
                        MinionManager.GetMinions(Player.Position, R.Range);
                    if (min.FirstOrDefault() != null)
                    {
                        var prediction = R.GetCircularFarmLocation(min, R.Width);
                        var predict    = prediction.MinionsHit;
                        if (predict >= userslider)
                        {
                            R.Cast(prediction.Position);
                        }
                    }
                }
            }
        }
Пример #27
0
        private static void ExecuteCombo()
        {
            if (!Common.CommonHelper.ShouldCastSpell(CommonTargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(null) + 65)))
            {
                return;
            }

            var t = CommonTargetSelector.GetTarget(R.Range);

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

            if (t.IsValidTarget(Q.Range) && MenuLocal.Item("Combo.Q.KillSteal").GetValue <StringList>().SelectedIndex == 1)
            {
                var enemy = HeroManager.Enemies.Find(e => Q.CanCast(e) && e.Health < Q.GetDamage(e));
                if (enemy != null)
                {
                    Champion.PlayerSpells.CastQCombo(enemy);
                }
            }

            if (t.IsValidTarget(Q.Range) && MenuLocal.Item("Combo.Q").GetValue <StringList>().SelectedIndex == 1 && t.Health < Q.GetDamage(t))
            {
                var closesMinion =
                    MinionManager.GetMinions(Q.Range)
                    .Where(
                        m =>
                        m.Distance(t.Position) < Orbwalking.GetRealAutoAttackRange(null) &&
                        m.Health < Q.GetDamage(m) - 15)
                    .OrderBy(m1 => m1.Distance(t.Position))
                    .FirstOrDefault();

                if (closesMinion != null)
                {
                    Q.CastOnUnit(closesMinion);
                }
                else
                {
                    Champion.PlayerSpells.CastQCombo(t);
                }
            }

            if (t.IsValidTarget(Q.Range) && MenuLocal.Item("Combo.Q").GetValue <StringList>().SelectedIndex == 1 && !t.IsValidTarget(Orbwalking.GetRealAutoAttackRange(null) + 65))
            {
                Champion.PlayerSpells.CastQCombo(t);
            }

            if (t.IsValidTarget(E.Range))
            {
                switch (MenuLocal.Item("Combo.E").GetValue <StringList>().SelectedIndex)
                {
                case 1:
                {
                    Champion.PlayerSpells.CastECombo(t);
                    break;
                }

                case 2:
                {
                    if (t.Health > ObjectManager.Player.Health)
                    {
                        Champion.PlayerSpells.CastECombo(t);
                    }
                    break;
                }
                }
            }

            if (R.IsReady() && MenuLocal.Item("Combo.R").GetValue <StringList>().SelectedIndex == 1 && t.IsValidTarget(R.Range) && BladesSpellCount >= 0)
            {
                if (!t.IsValidTarget(Q.Range + Orbwalking.GetRealAutoAttackRange(null)) && t.Health < R.GetDamage(t) * 4)
                {
                    PredictionOutput rPredictionOutput = R.GetPrediction(t);
                    Vector3          castPosition      = rPredictionOutput.CastPosition.Extend(ObjectManager.Player.Position, -(ObjectManager.Player.Distance(t.ServerPosition) >= 450 ? 80 : 120));

                    if (rPredictionOutput.Hitchance >=
                        (ObjectManager.Player.Distance(t.ServerPosition) >= R.Range / 2 ? HitChance.VeryHigh : HitChance.High) &&
                        ObjectManager.Player.Distance(castPosition) < R.Range)
                    {
                        R.Cast(castPosition);
                    }
                }

                if (CommonMath.GetComboDamage(t) > t.Health && t.IsValidTarget(Q.Range) && Q.IsReady())
                {
                    R.Cast(t, false, true);
                }

                if (BladesSpellCount > 0 && BladesSpellCount <= 3)
                {
                    var enemy = HeroManager.Enemies.Find(e => e.Health < R.GetDamage(e) * BladesSpellCount && e.IsValidTarget(R.Range));
                    if (enemy == null)
                    {
                        foreach (var e in HeroManager.Enemies.Where(e => e.IsValidTarget(R.Range)))
                        {
                            R.Cast(e, false, true);
                        }
                    }
                    else
                    {
                        R.Cast(enemy, false, true);
                    }
                }
            }
        }
Пример #28
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range + 200, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            var useq       = GetBool("useq", typeof(bool));
            var user       = GetBool("user", typeof(bool));
            var usee       = GetBool("usee", typeof(bool));
            var userturret = GetBool("usert", typeof(bool));
            var ignite     = GetBool("useignite", typeof(bool));

            if (Player.IsWindingUp)
            {
                return;
            }

            SetIgniteSlot(Player.GetSpellSlot("summonerdot"));

            if (ignite)
            {
                if (target.IsValidTarget(Q.Range) &&
                    (target.Health < IgniteDamage(target) + Q.GetDamage(target)))
                {
                    Player.Spellbook.CastSpell(GetIgniteSlot(), target);
                }
            }

            if (Q.IsReady() && useq && target.IsValidTarget(Q.Range))
            {
                if (Player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) && !W.IsReady())
                {
                    Q.Cast(target);
                }
                else if (Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Q.Cast(target);
                }
            }

            if (E.IsReady() && usee && target.Distance(Player) < 500 && eCanCast())
            {
                if (Player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) && !W.IsReady())
                {
                    E.Cast(target.Position);
                }
                else if (Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Utility.DelayAction.Add(200, () => E.Cast(target.Position));
                }
            }

            var rCount           = GetValue("rcount");
            var extendedposition = Player.Position.Extend(target.Position, 500);

            if (ForcePulseCount() < rCount && user && R.IsReady() && Player.IsFacing(target))
            {
                if (target.UnderTurret(true) && userturret)
                {
                    return;
                }
                if (target.HealthPercent - 15 > Player.HealthPercent)
                {
                    return;
                }
                if (Q.IsReady() || (E.IsReady() && (eCanCast() || GetPassiveBuff == 5)) || W.IsReady())
                {
                    if (Player.Mana >= Player.Spellbook.GetSpell(SpellSlot.R).ManaCost + Q.ManaCost)
                    {
                        if (Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                        {
                            R.Cast(extendedposition);
                        }
                    }
                }
            }
        }
Пример #29
0
        private static void OnCastTumble(Obj_AI_Base target, Vector3 position)
        {
            var afterTumblePosition = ObjectManager.Player.ServerPosition.Extend(position, 300f);
            var distanceToTarget    = afterTumblePosition.Distance(target.ServerPosition, true);

            if ((distanceToTarget < Math.Pow(ObjectManager.Player.AttackRange + 45f + 65f, 2) && distanceToTarget > Math.Pow(120f, 2)) ||
                MenuExtensions.GetItemValue <bool>("dz191.vhr.misc.tumble.qspam"))
            {
                switch (MenuExtensions.GetItemValue <StringList>("dz191.vhr.misc.condemn.qlogic").SelectedIndex)
                {
                case 0:
                    /**
                     * var smartQPosition = TumblePositioning.GetSmartQPosition();
                     * var smartQCheck =  smartQPosition != Vector3.Zero;
                     * var QPosition = smartQCheck ? smartQPosition : Game.CursorPos;
                     * var QPosition2 = Provider.GetQPosition() != Vector3.Zero ? Provider.GetQPosition() : QPosition;
                     *
                     *
                     * DefaultQCast
                     *
                     * if (!QPosition2.UnderTurret(true) || (QPosition2.UnderTurret(true) && ObjectManager.Player.UnderTurret(true)))
                     * {
                     *   CastQ(QPosition2);
                     * }
                     * */

                    if (Variables.MeleeEnemiesTowardsMe.Any() &&
                        !Variables.MeleeEnemiesTowardsMe.All(m => m.HealthPercent <= 15))
                    {
                        var Closest =
                            Variables.MeleeEnemiesTowardsMe.OrderBy(m => m.Distance(ObjectManager.Player)).First();
                        var whereToQ = Closest.ServerPosition.Extend(
                            ObjectManager.Player.ServerPosition, Closest.Distance(ObjectManager.Player) + 300f);

                        if (whereToQ.IsGoodEndPosition())
                        {
                            CastQ(whereToQ);
                        }
                    }
                    else
                    {
                        DefaultQCast(position, target);
                    }

                    break;

                case 1:
                    //To mouse
                    DefaultQCast(position, target);
                    break;

                case 2:
                    //Away from melee enemies
                    if (Variables.MeleeEnemiesTowardsMe.Any() &&
                        Variables.MeleeEnemiesTowardsMe.Any(m => m.Health
                                                            < ObjectManager.Player.GetAutoAttackDamage(m) * 3
                                                            + Variables.spells[SpellSlot.W].GetDamage(m)
                                                            + Variables.spells[SpellSlot.Q].GetDamage(m)))
                    {
                        var Closest =
                            Variables.MeleeEnemiesTowardsMe.OrderBy(m => m.Distance(ObjectManager.Player)).First();
                        var whereToQ = Closest.ServerPosition.Extend(
                            ObjectManager.Player.ServerPosition, Closest.Distance(ObjectManager.Player) + 300f);

                        if (whereToQ.IsGoodEndPosition())
                        {
                            CastQ(whereToQ);
                        }
                    }
                    else
                    {
                        DefaultQCast(position, target);
                    }
                    break;

                case 3:
                    //Credits to Kurisu's Graves!
                    var range = Orbwalking.GetRealAutoAttackRange(target);
                    var path  = LeagueSharp.Common.Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(),
                                                                                     Prediction.GetPrediction(target, 0.25f).UnitPosition.To2D(), 300f, range);

                    if (path.Count() > 0)
                    {
                        var TumblePosition = path.MinOrDefault(x => x.Distance(Game.CursorPos)).To3D();
                        if (!TumblePosition.IsGoodEndPosition())
                        {
                            CastQ(TumblePosition);
                        }
                    }
                    else
                    {
                        DefaultQCast(position, target);
                    }
                    break;
                }
            }
        }
Пример #30
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Player, Q.Range, TargetSelector.DamageType.Magical);

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

            if (GetBool("useignite", typeof(bool)))
            {
                if (Q.IsReady() && Ignite.IsReady() && (target.Health <= Q.GetDamage(target) + IgniteDamage(target)))
                {
                    Player.Spellbook.CastSpell(Ignite, target);
                }

                if (Ignite.IsReady() && (target.Health <= IgniteDamage(target) - 30))
                {
                    Player.Spellbook.CastSpell(Ignite, target);
                }
            }
            switch (GetStringValue("combomode"))
            {
            case 0:
                if (E.IsReady() && Environment.TickCount - lastnoenemies < 1500 && target.IsValidTarget(E.Range) && target.Distance(Player) > R.Range - 230)
                {
                    E.Cast(target);
                }

                if (Q.IsReady() && Environment.TickCount - lastnoenemies > 1000)
                {
                    Q.Cast(target);
                }

                if (_blade != null && _enemy != null && GetBool("usee", typeof(bool)))
                {
                    if (GetTravelTime(_blade, _enemy) < 500)
                    {
                        Player.Spellbook.CastSpell(SpellSlot.E, _enemy);
                    }
                }


                if (Environment.TickCount - lastq > 1500 && E.IsReady() && !Q.IsReady() &&
                    target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) + 30 && GetBool("usee", typeof(bool)))
                {
                    E.Cast(target);
                }
                if (W.IsReady() && target.IsValidTarget(W.Range) && Environment.TickCount - laste > 350)
                {
                    W.Cast();
                }
                if (CanKill(Q, target))
                {
                    return;
                }
                if (CanKill(W, target))
                {
                    return;
                }
                if (CanKill(E, target))
                {
                    return;
                }

                if ((R.GetDamage(target, 1) * 10) / 10 > target.Health && target.Distance(Player) < R.Range - 150)
                {
                    R.Cast();
                }

                //if (Player.CountEnemiesInRange(R.Range - 130) > 0 && !E.IsReady() && !Q.IsReady() && !W.IsReady())
                //{
                //    R.Cast();
                //}

                if (R.IsReady() && !E.IsReady() && !Q.IsReady() && !W.IsReady() &&
                    target.IsValidTarget(R.Range - 200) && target.Health < (R.GetDamage(target, 1) * 10) / 9)
                {
                    R.Cast();
                }
                break;
            }
        }