Example #1
0
        private static void ItemUse()
        {
            var TG = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);

            if (TG == null)
            {
                return;
            }

            if (DFG.IsReady() && Menu.Item("DFG1").GetValue <bool>())
            {
                DFG.Cast(TG);
            }
            if (Cutlass.IsReady() && Menu.Item("Cutlass1").GetValue <bool>())
            {
                Cutlass.Cast(TG);
            }
            if (Hextech.IsReady() && Menu.Item("Hextech1").GetValue <bool>())
            {
                Hextech.Cast(TG);
            }
            if (Frostclaim.IsReady() && Menu.Item("Frostclaim1").GetValue <bool>())
            {
                Frostclaim.Cast(TG);
            }
            if (Botrk.IsReady() && Menu.Item("Botrk1").GetValue <bool>())
            {
                Botrk.Cast(TG);
            }
            if (Youmuus.IsReady() && Menu.Item("Youmuus1").GetValue <bool>())
            {
                Youmuus.Cast();
            }
        }
Example #2
0
        private static float DamageToUnit(Obj_AI_Hero hero)
        {
            float dmg = 0;

            var spells = new List <Spell> {
                Q, W, E, R
            };

            foreach (var spell in spells.Where(x => x.IsReady()))
            {
                // Account for each blade
                if (spell.Slot == SpellSlot.R)
                {
                    dmg += spell.GetDamage(hero) * 4;
                }
                else
                {
                    dmg += spell.GetDamage(hero);
                }
            }

            if (Botrk.IsReady())
            {
                dmg += (float)Player.GetItemDamage(hero, Damage.DamageItems.Botrk);
            }

            if (Cutlass.IsReady())
            {
                dmg += (float)Player.GetItemDamage(hero, Damage.DamageItems.Bilgewater);
            }

            return(dmg);
        }
Example #3
0
 /// <summary>
 /// Gets the damage to a specific unit.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns>The damage that the combo will deal to a target.</returns>
 private static float DamageToUnit(Obj_AI_Hero target)
 {
     return
         ((float)
          ((Q.IsReady() ? Q.GetDamage(target) : 0) + (E.IsReady() ? E.GetDamage(target) : 0)
           + (R.IsReady() ? R.GetDamage(target) : 0) + Player.GetAutoAttackDamage(target) * 2
           + (Botrk.IsReady() ? Player.GetItemDamage(target, Damage.DamageItems.Botrk) : 0)
           + (Hydra.IsReady() ? Player.GetItemDamage(target, Damage.DamageItems.Hydra) : 0)
           + (Cutlass.IsReady() ? Player.GetItemDamage(target, Damage.DamageItems.Bilgewater) : 0)));
 }
Example #4
0
        private static void OffensiveItems()
        {
            if (Botrk.IsReady() && Value.Use("activator.botrk"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Value.Use("activator.botrk.ks") &&
                        Player.Instance.CalculateDamageOnUnit(t, DamageType.Physical, t.MaxHealth * (float)0.1) >
                        t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (Value.Use("activator.botrk.lifesave") &&
                        Player.Instance.HealthPercent < Value.Get("activator.botrk.hp"))
                    {
                        Botrk.Cast(t);
                    }
                    if (Value.Use("activator.botrk.combo") &&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Cutlass.IsReady() && Value.Use("activator.bilgewater"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Value.Use("activator.bilgewater.ks") &&
                        Player.Instance.CalculateDamageOnUnit(t, DamageType.Physical, 100) > t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (Value.Use("activator.bilgewater.combo") &&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo &&
                Value.Use("activator.youmus"))
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget(Player.Instance.AttackRange) && t is AIHeroClient)
                {
                    Youmuus.Cast();
                }
            }
        }
Example #5
0
        private void Offensive()
        {
            if (Botrk.IsReady() && getCheckBoxItem("Botrk"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("BotrkKS") &&
                        Player.CalcDamage(t, DamageType.Physical, t.MaxHealth * 0.1) >
                        t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (getCheckBoxItem("BotrkLS") &&
                        Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (getCheckBoxItem("BotrkCombo") && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && getCheckBoxItem("Hextech"))
            {
                var t = TargetSelector.GetTarget(Hextech.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("HextechKS") &&
                        Player.CalcDamage(t, DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) >
                        t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (getCheckBoxItem("HextechCombo") && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && getCheckBoxItem("FrostQueen") &&
                Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && getCheckBoxItem("Cutlass"))
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("CutlassKS") &&
                        Player.CalcDamage(t, DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (getCheckBoxItem("CutlassCombo") && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && getCheckBoxItem("Youmuus"))
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (getCheckBoxItem("YoumuusKS") && t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (getCheckBoxItem("YoumuusCombo") && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (getCheckBoxItem("Hydra"))
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #6
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (GLP800.IsReady() && Config.Item("GLP800").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(GLP800.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("GLP800KS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 200 + Player.FlatMagicDamageMod * 0.35) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        GLP800.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (Config.Item("GLP800Combo").GetValue <bool>() && Program.Combo)
                    {
                        Program.debug("PRO");
                        GLP800.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            if (Protobelt.IsReady() && Config.Item("Protobelt").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Protobelt.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("ProtobeltKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.35) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Protobelt.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                    if (Config.Item("ProtobeltCombo").GetValue <bool>() && Program.Combo)
                    {
                        Program.debug("PRO");
                        Protobelt.Cast(Prediction.GetPrediction(t, 0.5f).CastPosition);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>() && Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>() && Program.Combo)
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>())
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #7
0
        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);

                if (minionQ != null)
                {
                    Q.CastOnUnit(minionQ, Packets);
                    return;
                }

                if (useRGapclose)
                {
                    var minionR =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidTarget())
                        .Where(x => x.Distance(Player) < Q.Range)     // Use Q.Range so we follow up with a Q
                        .Where(x => 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, Packets);
                    }
                }
            }

            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(Packets);
                }

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

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

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

            if (useR && R.IsReady() && !UltActivated)
            {
                R.Cast(target, Packets);
            }

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

            if (useR && UltActivated)
            {
                if (!procSheen)
                {
                    return;
                }

                // 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, Packets);
                }
                else
                {
                    if (!HasSheenBuff)
                    {
                        R.Cast(rTarget, Packets);
                    }
                }
            }
            else
            {
                R.Cast(rTarget, Packets);
            }
        }
Example #8
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && Config.Item("FrostQueen").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(FrostQueen.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    var predInput2 = new Core.PredictionInput
                    {
                        Aoe       = true,
                        Collision = false,
                        Speed     = 1200,
                        Delay     = 0.25f,
                        Range     = FrostQueen.Range,
                        From      = Player.ServerPosition,
                        Radius    = 200,
                        Unit      = t,
                        Type      = Core.SkillshotType.SkillshotCircle
                    };
                    var poutput2 = Core.Prediction.GetPrediction(predInput2);

                    if (poutput2.Hitchance >= Core.HitChance.High)
                    {
                        FrostQueen.Cast(poutput2.CastPosition);
                    }
                }
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>())
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is Obj_AI_Hero)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth * 0.6)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>() && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #9
0
        private static void Offensive()
        {
            if (Botrk.IsReady() && OffensivesMenu["botrk"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (OffensivesMenu["botrkks"].Cast <CheckBox>().CurrentValue&&
                        Player.CalculateDamageOnUnit(t, DamageType.Physical, t.MaxHealth * (float)0.1) > t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (OffensivesMenu["botrkls"].Cast <CheckBox>().CurrentValue&& Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (OffensivesMenu["botrkc"].Cast <CheckBox>().CurrentValue&&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && OffensivesMenu["hex"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(Hextech.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (OffensivesMenu["hexks"].Cast <CheckBox>().CurrentValue&&
                        Player.CalculateDamageOnUnit(t, DamageType.Magical, 150 + Player.FlatMagicDamageMod * (float)0.4) >
                        t.Health)
                    {
                        Hextech.Cast(t);
                    }
                    if (OffensivesMenu["hexc"].Cast <CheckBox>().CurrentValue&&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo && FrostQueen.IsReady() &&
                OffensivesMenu["fq"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(FrostQueen.Range, DamageType.Magical);
                if (t.IsValidTarget() && t.Distance(Player) < 1500)
                {
                    FrostQueen.Cast();
                }
            }

            if (Cutlass.IsReady() && OffensivesMenu["cut"].Cast <CheckBox>().CurrentValue)
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (OffensivesMenu["cutks"].Cast <CheckBox>().CurrentValue&&
                        Player.CalculateDamageOnUnit(t, DamageType.Magical, 100) > t.Health)
                    {
                        Cutlass.Cast(t);
                    }
                    if (OffensivesMenu["cutc"].Cast <CheckBox>().CurrentValue&&
                        Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && OffensivesMenu["gb"].Cast <CheckBox>().CurrentValue&&
                Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo)
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget(Player.AttackRange) && t is AIHeroClient)
                {
                    Youmuus.Cast();
                }
            }

            if ((OffensivesMenu["tmat"].Cast <CheckBox>().CurrentValue ||
                 OffensivesMenu["rh"].Cast <CheckBox>().CurrentValue) && (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo || Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Harass))
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Tiamat.IsReady() && Player.CountEnemiesInRange(Tiamat.Range) > 0)
                {
                    Tiamat.Cast();
                }
            }
        }
Example #10
0
        private static void Combo()
        {
            foreach (var Enemy in EntityManager.Heroes.Enemies)
            {
                if (Enemy.IsValidTarget())
                {
                    if (Smite != null && Smite.IsReady() && ComboSmite.CurrentValue)
                    {
                        var target = TargetSelector.SelectedTarget == null
                            ? TargetSelector.GetTarget(700, DamageType.Physical)
                            : TargetSelector.SelectedTarget;

                        if (target != null && target.IsValidTarget() && !target.IsDead && (target.Position - Player.Position).Length() < 500)
                        {
                            Smite.Cast(target);
                        }
                        else
                        {
                            Smite.Cast(target);
                        }
                    }
                    if (Cutlass.IsOwned() && Cutlass.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        var target = TargetSelector.SelectedTarget == null
                            ? TargetSelector.GetTarget(550, DamageType.Physical)
                            : TargetSelector.SelectedTarget;

                        if (target != null && target.IsValidTarget() && !target.IsDead && Cutlass.IsInRange(target))
                        {
                            Cutlass.Cast(target);
                        }
                        else
                        {
                            Cutlass.Cast(target);
                        }
                    }
                    if (Botrk.IsOwned() && Botrk.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        var target = TargetSelector.SelectedTarget == null
                            ? TargetSelector.GetTarget(550, DamageType.Physical)
                            : TargetSelector.SelectedTarget;

                        if (target != null && target.IsValidTarget() && !target.IsDead && Botrk.IsInRange(target))
                        {
                            Botrk.Cast(target);
                        }
                        else
                        {
                            Botrk.Cast(target);
                        }
                    }
                    if (Youmuu.IsOwned() && Youmuu.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(500) > 0)
                        {
                            Youmuu.Cast();
                        }
                    }
                    if (Ravenous_Hydra.IsOwned() && Ravenous_Hydra.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(385) > 0)
                        {
                            Ravenous_Hydra.Cast();
                        }
                    }
                    if (Tiamat.IsOwned() && Tiamat.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(385) > 0)
                        {
                            Tiamat.Cast();
                        }
                    }
                    if (Titanic_Hydra.IsOwned() && Titanic_Hydra.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(385) > 0)
                        {
                            Titanic_Hydra.Cast();
                        }
                    }
                    if (!ComboQAA.CurrentValue && ComboQ.CurrentValue && Q.IsReady() && Enemy.IsValidTarget(E.Range))
                    {
                        Q.Cast();
                    }
                    if (!Enemy.IsDead && Enemy != null && Enemy.IsValidTarget(E.Range) && ComboE.CurrentValue)
                    {
                        if ((Enemy.Position - Player.Position).Length() > ComboEmin.CurrentValue)
                        {
                            E.Cast(Enemy);
                        }
                        if (E.GetSpellDamage(Enemy) >= Enemy.TotalShieldHealth())
                        {
                            E.Cast(Enemy);
                        }
                        if (Enemy.IsDashing())
                        {
                            E.Cast(Enemy);
                        }
                        if (Enemy.HealthPercent < 15)
                        {
                            E.Cast(Enemy);
                        }
                    }
                    if (ComboW.CurrentValue && W.IsReady())
                    {
                        var target = TargetSelector.GetTarget(250, DamageType.Physical);
                        if (target != null)
                        {
                            W.Cast();
                        }
                    }
                    if (ComboR.CurrentValue && R.IsReady())
                    {
                        var RDamage = R.GetSpellDamage(Enemy);
                        if (Player.CountEnemyChampionsInRange(R.Range) >= ComboRmin.CurrentValue)
                        {
                            if (Enemy.HasBuff("xenzhaointimidate"))
                            {
                                R.Cast();
                            }
                        }
                        if (Enemy.TotalShieldHealth() < RDamage)
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Example #11
0
        /// <summary>
        ///     Does the combo.
        /// </summary>
        private static void Combo()
        {
            var useQ         = getCheckBoxItem(comboMenu, "useQ");
            var useW         = getCheckBoxItem(comboMenu, "useW");
            var useE         = getCheckBoxItem(comboMenu, "useE");
            var useR         = getCheckBoxItem(comboMenu, "useR");
            var minQRange    = getSliderItem(comboMenu, "minQRange");
            var useEStun     = getCheckBoxItem(comboMenu, "useEStun");
            var useQGapclose = getCheckBoxItem(comboMenu, "useQGapclose");
            var useWBeforeQ  = getCheckBoxItem(comboMenu, "useWBeforeQ");
            var procSheen    = getCheckBoxItem(comboMenu, "procSheen");
            var useIgnite    = getCheckBoxItem(comboMenu, "useIgnite");
            var useRGapclose = getCheckBoxItem(comboMenu, "useRGapclose");

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

            if (target == null && useQGapclose)
            {
                /** var minionQ =
                 *  ObjectManager.Get<Obj_AI_Minion>()
                 *      .Where(x => x.LSIsValidTarget())
                 *      .Where(x => Player.LSGetSpellDamage(x, SpellSlot.Q) > x.Health)
                 *      .FirstOrDefault(
                 *          x =>
                 *              x.LSDistance(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.LSDistance(HeroManager.Enemies.OrderBy(y => y.LSDistance(Player)).FirstOrDefault())
                        < Player.LSDistance(HeroManager.Enemies.OrderBy(z => z.LSDistance(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.LSIsValidTarget() && x.LSDistance(Player) < Q.Range && x.LSCountEnemiesInRange(Q.Range) >= 1)
                        .FirstOrDefault(
                            x =>
                            x.Health - Player.LSGetSpellDamage(x, SpellSlot.R) < Player.LSGetSpellDamage(x, SpellSlot.Q));

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

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

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

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

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

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

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

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

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

                if (useQ && Q.IsReady() && target.LSDistance(Player.ServerPosition) > minQRange)
                {
                    Q.CastOnUnit(target);
                }
            }
            else
            {
                if (useQ && Q.IsReady() && target.LSDistance(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);
            }
        }
Example #12
0
        private void Offensive()
        {
            if (Botrk.IsReady() && Config.Item("Botrk").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Botrk.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("BotrkKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Physical, t.MaxHealth * 0.1) > t.Health)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkLS").GetValue <bool>() && Player.Health < Player.MaxHealth * 0.5)
                    {
                        Botrk.Cast(t);
                    }
                    if (Config.Item("BotrkCombo").GetValue <bool>() && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && Config.Item("Hextech").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Hextech.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("HextechKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) > t.Health)
                    {
                        Hextech.Cast(t);
                    }
                    if (Config.Item("HextechCombo").GetValue <bool>() && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Cutlass.IsReady() && Config.Item("Cutlass").GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (Config.Item("CutlassKS").GetValue <bool>() && Player.CalcDamage(t, Damage.DamageType.Magical, 100) > t.Health)
                    {
                        Cutlass.Cast(t);
                    }
                    if (Config.Item("CutlassCombo").GetValue <bool>() && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && Config.Item("Youmuus").GetValue <bool>())
            {
                var t = Orbwalker.GetTarget();

                if (t.IsValidTarget() && t is Obj_AI_Hero)
                {
                    if (Config.Item("YoumuusKS").GetValue <bool>() && t.Health < Player.MaxHealth * 0.6)
                    {
                        Youmuus.Cast();
                    }
                    if (Config.Item("YoumuusCombo").GetValue <bool>() && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (Config.Item("Hydra").GetValue <bool>())
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Example #13
0
        public static void ExecuteItems()
        {
            //Item Target's
            var botrktarget     = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
            var gunbladetarget  = TargetSelector.GetTarget(Gunblade.Range, DamageType.Magical);
            var protobelttarget = TargetSelector.GetTarget(Protobelt.Range, DamageType.Magical);
            var glptarget       = TargetSelector.GetTarget(GLP.Range, DamageType.Magical);
            var cutlasstarget   = TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);

            if ((botrktarget == null) || botrktarget.IsInvulnerable)
            {
                return;
            }
            //Blade of the Ruined King
            if (ComboMenu["Botrk"].Cast <CheckBox>().CurrentValue)
            {
                if ((Player.Instance.CountEnemiesInRange(550) >= 1) && Botrk.IsReady() && Botrk.IsOwned() &&
                    botrktarget.IsValidTarget(Botrk.Range))
                {
                    Botrk.Cast(botrktarget);
                }
            }

            if ((gunbladetarget == null) || gunbladetarget.IsInvulnerable)
            {
                return;
            }
            //Hextech Gunblade
            if (ComboMenu["Gunblade"].Cast <CheckBox>().CurrentValue)
            {
                if ((Player.Instance.CountEnemiesInRange(700) >= 1) && Gunblade.IsReady() && Gunblade.IsOwned() &&
                    gunbladetarget.IsValidTarget(Gunblade.Range))
                {
                    Gunblade.Cast(gunbladetarget);
                }
            }

            if ((protobelttarget == null) || protobelttarget.IsInvulnerable)
            {
                return;
            }
            //Protobelt
            if (ComboMenu["Protobelt"].Cast <CheckBox>().CurrentValue)
            {
                if ((Player.Instance.CountEnemiesInRange(600) >= 1) && Protobelt.IsReady() && Protobelt.IsOwned() &&
                    protobelttarget.IsValidTarget(Protobelt.Range))
                {
                    Protobelt.Cast(protobelttarget.Position);
                }
            }

            if ((glptarget == null) || glptarget.IsInvulnerable)
            {
                return;
            }
            //GLP
            if (ComboMenu["GLP"].Cast <CheckBox>().CurrentValue)
            {
                if ((Player.Instance.CountEnemiesInRange(600) >= 1) && GLP.IsReady() && GLP.IsOwned() &&
                    glptarget.IsValidTarget(GLP.Range))
                {
                    GLP.Cast(glptarget);
                }
            }

            if ((cutlasstarget == null) || cutlasstarget.IsInvulnerable)
            {
                return;
            }
            //Bilgewater Cutlass
            if (ComboMenu["Cutlass"].Cast <CheckBox>().CurrentValue)
            {
                if ((Player.Instance.CountEnemiesInRange(550) >= 1) && Cutlass.IsReady() && Cutlass.IsOwned() &&
                    cutlasstarget.IsValidTarget(Cutlass.Range))
                {
                    Cutlass.Cast(cutlasstarget);
                }
            }

            /*
             *
             * //Summoners Target
             * var Summ1 = TargetSelector.GetTarget(Smite.Range, DamageType.Mixed);
             * var Summ2 = TargetSelector.GetTarget(Ignite.Range, DamageType.Mixed);
             *
             * if ((Summ1 == null) || Summ1.IsInvulnerable)
             *  return;
             * //Smite
             * if (ComboMenu["Smite"].Cast<CheckBox>().CurrentValue)
             *  if (Player.Instance.CountEnemiesInRange(500) >= 1 && Smite.IsReady() && Smite.IsLearned && Summ1.IsValidTarget(Smite.Range))
             *      Smite.Cast(Summ1);
             *
             *
             * if ((Summ2 == null) || Summ2.IsInvulnerable)
             *  return;
             * //Ignite
             * if (ComboMenu["Ignite"].Cast<CheckBox>().CurrentValue)
             *  if (Player.Instance.CountEnemiesInRange(600) >= 1 && Ignite.IsReady() && Ignite.IsLearned && Summ2.IsValidTarget(Ignite.Range))
             *      Ignite.Cast(Summ2);
             *
             */
        }