Beispiel #1
0
        private static void Edetonation()
        {
            var target = TargetSelector.GetTarget(R1.Range, TargetSelector.DamageType.Magical);

            if (target != null)
            {
                if (Lux_E == null)
                {
                    return;
                }
                var rooted = target.HasBuff("LuxLightBindingMis");
                var debuff = target.HasBuff("luxilluminatingfraulein");

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

                //Lux E detonation (Object Bounding Radius)
                if (Lux_E != null && rooted && target.Distance(player.Position) <=
                    Orbwalking.GetRealAutoAttackRange(player) && target.Health > E1.GetDamage(target) && debuff)
                {
                    Printchat("[E] Detonation Blocked. Reason: AA-able");
                    return;
                }

                if (Lux_E != null && rooted && target.Distance(player.Position) <=
                    Orbwalking.GetRealAutoAttackRange(player) + 300 && target.Health > E1.GetDamage(target) && debuff && target.CountEnemiesInRange(600) <= 1)
                {
                    Printchat("[E] Detonation Blocked. Reason: AA-able");
                    return;
                }

                if (Lux_E != null && Lux_E.Position.CountEnemiesInRange(E1.Width) >= 1)
                {
                    E1.Cast();
                    Printchat("[E] Toggle Cast. Reason: Enemy Detected");
                }
            }

            else if (Lux_E != null && Lux_E.Position.CountEnemiesInRange(E1.Width) >= 1)
            {
                E1.Cast();
                Printchat("[E] Toggle Cast. Reason: Enemy Detected");
            }
        }
Beispiel #2
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);
        }
Beispiel #3
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"));
            }
        }
Beispiel #4
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");
                }
            }
        }
Beispiel #5
0
        private static void doCombo()
        {
            var Target   = SimpleTs.GetTarget(Q1.Range, SimpleTs.DamageType.Magical);
            var Marked   = Target.HasBuff("nidaleepassivehunted", true);
            var Hunting  = Player.HasBuff("nidaleepassivehunting", true);
            var Distance = Player.Distance(Target);
            var useItems = Config.Item("combo_Items").GetValue <bool>();

            if (useItems)
            {
                if (Items.CanUseItem(Bork.Id))
                {
                    Bork.Cast(Target);
                }
                if (Items.CanUseItem(Cutlass.Id))
                {
                    Cutlass.Cast(Target);
                }
            }

            var comboUT = Config.Item("combo_UT").GetValue <bool>();

            /* Human Form */
            if (!IsCougar)
            {
                if (Marked && R.IsReady() && Config.Item("combo_R").GetValue <bool>() && Distance < 750f ||
                    (!Q1.IsReady() && !Q1.IsReady(2500) && Target.Distance(Player) < 300f) &&
                    (!Utility.UnderTurret(Target, true) || comboUT))
                {
                    R.CastOnUnit(Player, PacketCasting);
                }

                else if (Q1.IsReady() && Config.Item("combo_Q1").GetValue <bool>())
                {
                    Q1.Cast(Target, PacketCasting);
                }

                else if (W1.IsReady() && Config.Item("combo_W1").GetValue <bool>())
                {
                    W1.Cast(Target, PacketCasting);
                }

                else if (E1.IsReady() && Config.Item("combo_E1").GetValue <bool>() &&
                         (!R.IsReady() || !Marked && Distance < W2.Range + 75f))
                {
                    E1.CastOnUnit(Player, PacketCasting);
                }
            }

            /* Cougar Form */
            else
            {
                if (!Marked && R.IsReady() && Config.Item("combo_R").GetValue <bool>() && Distance < W2.Range + 75f)
                {
                    R.CastOnUnit(Player, PacketCasting);
                    return;
                }

                // Deathfire grasp / Blackfire Torch
                var dmg = Q1.GetDamage(Target, 1) + W1.GetDamage(Target, 1) + E1.GetDamage(Target, 1);
                if (Target.IsValidTarget(DFG.Range) && Q1.IsReady() && W1.IsReady() && E1.IsReady() && dmg < Target.Health && (dmg * 1.2f) + (Target.MaxHealth * (DFG.Id == 3188 ? 0.20f : 0.15f)) > Target.Health && useItems)
                {
                    DFG.Cast(Target);
                }

                if (Marked && Hunting && W2.IsReady() && Config.Item("combo_W2").GetValue <bool>() && Distance < 750f &&
                    Distance > 200f && (!Utility
                                        .UnderTurret(Target, true) || comboUT))
                {
                    Player.Spellbook.CastSpell(SpellSlot.W, Target);
                }
                else if (E2.IsReady() && Distance < 300f)
                {
                    var Pred = Prediction.GetPrediction(Target, 0.5f);
                    E2.Cast(Pred.CastPosition, PacketCasting);
                }
            }
        }