Exemplo n.º 1
0
        static void Misc()
        {
            if (misc.check("QKS") && Q1.IsReady())
            {
                var target = TargetSelector.GetTarget(Q1.Range, DamageType.Physical);

                if (target != null && Q1.GetDamage(target) > target.Health)
                {
                    Q1.CastIfHitchanceMinimum(target, hitchance);
                }
            }

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

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

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

                else if (Items.CanUseItem(myhero, CPotion.Id))
                {
                    CPotion.Cast();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///     The cast qe hammer.
        /// </summary>
        private static void CastQEHammer()
        {
            var Enemies = GameObjects.EnemyHeroes.Where(x => (x != null) && x.IsValidTarget());

            foreach (var Enemy in
                     Enemies.Where(x => x.IsValidTarget(E1.Range) && (Q1.GetDamage(x) + HammerEDmg(x) > x.Health)))
            {
                if (RangeForm())
                {
                    if (R.IsReady())
                    {
                        R.Cast();
                    }
                }
                else
                {
                    if (Q1.IsReady() && E1.IsReady())
                    {
                        Q1.Cast(Enemy);
                        if (E1.IsReady())
                        {
                            E1.Cast();
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// The combo damage.
        /// </summary>
        /// <param name="target">
        /// The target.
        /// </param>
        /// <returns>
        /// The <see cref="double"/>.
        /// </returns>
        public static double ComboDamage(Obj_AI_Base target)
        {
            double damage = 0;

            if ((CannonQ_CD_R == 0) && (CannonE_CD_R != 0))
            {
                damage += CannonQDmg(target);
            }
            if ((CannonQ_CD_R == 0) && (CannonE_CD_R == 0))
            {
                damage += CannonQEDmg(target);
            }
            if (HammerQ_CD_R == 0)
            {
                damage += Q1.GetDamage(target);
            }
            if (HammerW_CD_R == 0)
            {
                damage += W1.GetDamage(target);
            }
            if (HammerE_CD_R == 0)
            {
                damage += HammerEDmg(target);
            }
            return(damage);
        }
Exemplo n.º 4
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q3.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + QMANA + EMANA)
                {
                    CastQ(t);
                }
                else if (Program.Harass && Config.Item("harassQ", true).GetValue <bool>() && Config.Item("Harass" + t.ChampionName).GetValue <bool>() && Player.ManaPercent > Config.Item("QHarassMana", true).GetValue <Slider>().Value&& OktwCommon.CanHarras())
                {
                    CastQ(t);
                }
                else if (OktwCommon.GetKsDamage(t, Q1) > t.Health)
                {
                    CastQ(t);
                }
                else if (Player.Mana > RMANA + QMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q3.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        CastQ(t);
                    }
                }
            }

            if (Player.IsWindingUp)
            {
                return;
            }

            if (!Program.None && !Program.Combo)
            {
                var allMinions = Cache.GetMinions(Player.ServerPosition, Q1.Range);

                if (Config.Item("farmQout", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + EMANA + WMANA)
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q1.Range) && (!Orbwalker.InAutoAttackRange(minion) || (!minion.UnderTurret(true) && minion.UnderTurret()))))
                    {
                        var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 600);
                        if (hpPred < Q1.GetDamage(minion) && hpPred > minion.Health - hpPred * 2)
                        {
                            Q1.Cast(minion);
                            return;
                        }
                    }
                }
                if (FarmSpells && Config.Item("farmQ", true).GetValue <bool>())
                {
                    var farmPos = Q1.GetCircularFarmLocation(allMinions, Q1.Width);
                    if (farmPos.MinionsHit >= FarmMinions)
                    {
                        Q1.Cast(farmPos.Position);
                    }
                }
            }
        }
Exemplo n.º 5
0
        public static float CalcDamage(Obj_AI_Base target)
        {
            //Calculate Combo Damage
            var aa     = player.GetAutoAttackDamage(target);
            var damage = aa;

            Ignite = player.GetSpellSlot("summonerdot");

            if (Ignite.IsReady())
            {
                damage += player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            }

            if (Config.Item("combo.E").GetValue <bool>()) // edamage
            {
                if (E1.IsReady())
                {
                    damage += E1.GetDamage(target);
                }
            }
            if (target.HasBuff("luxilluminatingfraulein"))
            {
                damage += aa + player.CalcDamage(target, Damage.DamageType.Magical,
                                                 10 + (8 * player.Level) + 0.2 * player.FlatMagicDamageMod);
            }
            if (player.HasBuff("lichbane"))
            {
                damage += player.CalcDamage(target, Damage.DamageType.Magical,
                                            (player.BaseAttackDamage * 0.75) + ((player.BaseAbilityDamage + player.FlatMagicDamageMod) * 0.5));
            }
            if (R1.IsReady()) // rdamage
            {
                damage += R1.GetDamage(target);
            }

            if (Q1.IsReady())
            {
                damage += Q1.GetDamage(target);
            }
            return((float)damage);
        }
Exemplo n.º 6
0
        /// <summary>
        ///     The cast q hammer.
        /// </summary>
        private static void CastQHammer()
        {
            if (Q1.IsReady())
            {
                var Enemies = GameObjects.EnemyHeroes.Where(x => (x != null) && x.IsValidTarget());

                foreach (var Enemy in Enemies.Where(x => x.IsValidTarget(Q1.Range) && (Q1.GetDamage(x) > x.Health)))
                {
                    Q1.Cast(Enemy);
                }
            }
        }
Exemplo n.º 7
0
        public static void SpellCastR(AIHeroClient target)
        {
            if (target == null)
            {
                return;
            }
            if (!target.IsValid)
            {
                return;
            }
            var rslider = Config.Item("combo.r.slider").GetValue <Slider>().Value;

            #region variables/floats
            //[R] Combo Sequences
            double qdmg = Q1.GetDamage(target);
            double edmg = E1.GetDamage(target);
            double rdmg = R1.GetDamage(target);
            double aa   = Player.GetAutoAttackDamage(target);
            Ignite = player.GetSpellSlot("summonerdot");
            var insideE = Lux_E != null && target.Distance(Lux_E.Position) < E1.Width;
            var thp     = target.Health;
            var AArange = Orbwalking.GetRealAutoAttackRange(player);

            var debuff = target.HasBuff("luxilluminatingfraulein");

            if (debuff)
            {
                rdmg += PassiveDMG(target);
            }
            if (debuff)
            {
                aa += PassiveDMG(target);
            }
            if (insideE)
            {
                rdmg += edmg;
            }

            var qcollision = Q1.GetCollision(player.Position.To2D(), new List <Vector2> {
                Q1.GetPrediction(target).CastPosition.To2D()
            });
            var minioncol = qcollision.Where(x => (x is AIHeroClient) && x.IsEnemy).Count();
            var qpred     = Q1.GetPrediction(target).Hitchance >= HitChance.High;
            var epred     = E1.GetPrediction(target).Hitchance >= HitChance.High;

            var rooted = target.HasBuff("LuxLightBindingMis");


            if (target.Distance(player.Position) < rslider && !rooted)
            {
                return;
            }


            #endregion
            if (insideE && Lux_E != null)
            {
                return;
            }

            //Checks if Allies can kill the bitch
            if (AllyCheck(target, 600) >= 2 && target.Health < rdmg / 2)
            {
                return;
            }
            //Checks if an Ally can kill le bitch
            if (AllyCheck(target, 600) >= 1 && target.Health < rdmg / 2)
            {
                return;
            }

            if (rooted && insideE && rdmg + edmg > thp && target.IsValidTarget(R1.Range))
            {
                SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R"));
            }

            if (E1.IsReady() && thp < edmg && target.IsValidTarget(E1.Range) && epred)
            {
                return;
            }

            if (Q1.IsReady() && thp < qdmg && target.IsValidTarget(Q1.Range) && minioncol <= 1 && qpred)
            {
                return;
            }

            if (insideE && thp < edmg)
            {
                return;
            }

            if (insideE && thp < edmg + aa && target.IsValidTarget(AArange))
            {
                return;
            }

            if (thp < aa && target.IsValidTarget(AArange))
            {
                return;
            }

            if (thp < edmg && E1.IsReady() && rooted && target.IsValidTarget(E1.Range))
            {
                return;
            }

            if (Q1.IsReady() && !E1.IsReady() && thp < qdmg && target.IsValidTarget(Q1.Range) && minioncol <= 1 && qpred)
            {
                return;
            }

            if (E1.IsReady() && !Q1.IsReady() && thp < edmg && target.IsValidTarget(E1.Range) && epred)
            {
                return;
            }

            if (rooted && debuff && thp < aa && target.IsValidTarget(AArange))
            {
                return;
            }

            if (Environment.TickCount - E1.LastCastAttemptT < 100 || Environment.TickCount - Q1.LastCastAttemptT < 800 && !rooted)
            {
                return;
            }

            if (rooted && insideE && thp < rdmg + edmg && target.IsValidTarget(R1.Range))
            {
                SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R"));
            }

            if (rooted && E1.IsReady() && target.IsValidTarget(E1.Range) && thp < rdmg + edmg && target.IsValidTarget(R1.Range))
            {
                SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R"));
            }

            if (rooted && debuff && thp < rdmg + aa && target.IsValidTarget(AArange))
            {
                SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R"));
            }

            if (rooted && debuff && thp < rdmg && target.IsValidTarget(R1.Range))
            {
                SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R"));
            }

            if (thp < rdmg)
            {
                SpellCast(target, R1.Range, R1, false, 1, false, PredR("prediction.R"));
            }
        }
Exemplo n.º 8
0
        public static void Routine()
        {
            var targetR = TargetSelector.GetTarget(R1.Range, TargetSelector.DamageType.Magical);
            var target  = TargetSelector.GetTarget(Q1.Range, TargetSelector.DamageType.Magical);

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

            Ignite = player.GetSpellSlot("summonerdot");

            //[R] Aoe Cast
            byte hitcount;

            hitcount = (byte)Config.Item("advanced.R.aoe.count").GetValue <Slider>().Value;

            if (Config.Item("advanced.R.aoe").GetValue <bool>() && R1.IsReady() && !E1.IsReady() && target.IsValidTarget(E1.Range + E1.Width))
            {
                R1.CastIfWillHit(target, hitcount);
            }

            #region -- Variables/Floats etc.
            float qdmg    = Q1.GetDamage(target);
            float edmg    = E1.GetDamage(target);
            float rdmg    = R1.GetDamage(target);
            float aa      = (float)Player.GetAutoAttackDamage(target);
            var   insideE = Lux_E != null && target.Distance(Lux_E.Position) <= E1.Width;
            var   thp     = target.Health;
            var   AArange = Orbwalking.GetRealAutoAttackRange(player);
            var   debuff  = target.HasBuff("luxilluminatingfraulein");
            if (debuff)
            {
                rdmg += PassiveDMG(target);
            }
            if (debuff)
            {
                aa += PassiveDMG(target);
            }
            if (insideE)
            {
                rdmg += edmg;
            }
            var rooted = target.HasBuff("LuxLightBindingMis");
            #endregion


            if (insideE && thp < edmg && target.IsValidTarget(R1.Range))
            {
                return;
            }

            if (rooted && insideE && rdmg + edmg > thp && target.IsValidTarget(R1.Range))
            {
                SpellCastR(targetR);
            }

            #region -- Q spellcast

            var prediction = Q1.GetPrediction(target, true);
            var collision  = Q1.GetCollision(Player.Position.To2D(), new List <Vector2> {
                prediction.UnitPosition.To2D()
            });
            if (Config.Item("combo.Q").GetValue <bool>() &&
                Environment.TickCount - E1.LastCastAttemptT > 400 && Environment.TickCount - R1.LastCastAttemptT > 800 && prediction.Hitchance >= PredQ("prediction.Q"))
            {
                if (collision.Count == 2)
                {
                    if (collision[0].IsChampion() || collision[1].IsChampion())
                    {
                        Q1.Cast(prediction.CastPosition);
                    }
                }
                else if (collision.Count == 1 && collision[0].IsChampion())
                {
                    Q1.Cast(prediction.CastPosition);
                }
                else if (collision.Count <= 1)
                {
                    Q1.Cast(prediction.CastPosition);
                }
                #endregion -- Q spellcast end


                if (rooted && thp < aa && target.IsValidTarget(AArange))
                {
                    return;
                }

                if (Config.Item("combo.E").GetValue <bool>() && Environment.TickCount - Q1.LastCastAttemptT > 875 && Environment.TickCount - R1.LastCastAttemptT > 800)
                {
                    SpellCast(target, E1.Range, E1, false, 1, true, PredE("prediction.E"));
                }

                if (IgniteKillCheck() < thp && target.HasBuff("summonerdot"))
                {
                    return;
                }

                if (Config.Item("combo.R").GetValue <bool>() && R1.IsReady())
                {
                    SpellCastR(targetR);
                }

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

                var ignitemenu = Config.Item("autospells.ignite").GetValue <bool>();

                if (thp > IgniteDamage(target) && thp < IgniteDamage(target) + edmg + aa && rooted && E1.IsReady() && target.IsValidTarget(600) && Ignite.IsReady() && ignitemenu)
                {
                    player.Spellbook.CastSpell(Ignite, target);
                    Printchat("Ignite casted");
                }

                if (thp < IgniteDamage(target) + rdmg + aa && rooted && Ignite.IsReady() && R1.IsReady() && ignitemenu)
                {
                    player.Spellbook.CastSpell(Ignite, target);
                    Printchat("Ignite casted");
                }

                if (thp < IgniteDamage(target) + rdmg + aa && Ignite.IsReady() && R1.IsReady() && ignitemenu)
                {
                    player.Spellbook.CastSpell(Ignite, target);
                    Printchat("Ignite casted");
                }

                if (thp < IgniteDamage(target) && target.IsValidTarget(600) && AllyCheck(target, 600) < 1 && Ignite.IsReady() && ignitemenu)
                {
                    player.Spellbook.CastSpell(Ignite, target);
                    Printchat("Ignite casted");
                }
            }
        }
Exemplo n.º 9
0
        private static void Killsteal()
        {
            foreach (
                var enemy in HeroManager.Enemies.Where(e => e.LSIsValidTarget() && e.LSDistance(Player.Position) <= E.Range)
                )
            {
                if (Human())
                {
                    if (getCheckBoxItem(ksMenu, "qKSH") && getCheckBoxItem(ksMenu, "wKSH") && Q.IsReady() &&
                        W.IsReady())
                    {
                        if (enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy) + W.GetDamage(enemy))
                        {
                            W.Cast(enemy);
                            Q.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKSH"))
                    {
                        if (Q.IsReady() && enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy))
                        {
                            Q.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKS") && getCheckBoxItem(ksMenu, "switchKS"))
                    {
                        if (realcdSQ == 0 && enemy.LSDistance(Player.Position) <= Q1.Range &&
                            enemy.Health <= Q1.GetDamage(enemy, 1))
                        {
                            if (R.IsReady())
                            {
                                R.Cast();
                                Q1.CastOnUnit(enemy);
                            }
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "wKSH"))
                    {
                        if (W.IsReady() && enemy.LSDistance(Player.Position) <= W.Range &&
                            enemy.Health <= W.GetDamage(enemy))
                        {
                            W.Cast(enemy);
                            return;
                        }
                    }
                }
                else if (!Human())
                {
                    if (getCheckBoxItem(ksMenu, "qKSH") && getCheckBoxItem(ksMenu, "wKSH") && realcdW == 0 &&
                        realcdQ == 0)
                    {
                        if (enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy) + W.GetDamage(enemy))
                        {
                            R.Cast();
                            W.Cast(enemy);
                            Q.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKS"))
                    {
                        if (Q1.IsReady() && enemy.LSDistance(Player.Position) <= Q1.Range &&
                            enemy.Health <= Q1.GetDamage(enemy, 1))
                        {
                            Q1.CastOnUnit(enemy);
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "qKSH") && getCheckBoxItem(ksMenu, "switchKS"))
                    {
                        if (realcdQ == 0 && enemy.LSDistance(Player.Position) <= Q.Range &&
                            enemy.Health <= Q.GetDamage(enemy))
                        {
                            if (R.IsReady())
                            {
                                R.Cast();
                                Q.CastOnUnit(enemy);
                            }
                            return;
                        }
                    }

                    if (getCheckBoxItem(ksMenu, "wKSH") && getCheckBoxItem(ksMenu, "switchKS"))
                    {
                        if (realcdW == 0 && enemy.LSDistance(Player.Position) <= W.Range &&
                            enemy.Health <= W.GetDamage(enemy))
                        {
                            if (R.IsReady())
                            {
                                R.Cast();
                                W.Cast(enemy);
                            }
                            return;
                        }
                    }
                }
            }
        }