Exemplo n.º 1
0
            public static void CastW(bool checkPerMana = false)
            {
                if (!W.IsReady())
                {
                    return;
                }

                var existsManaPer = Program.Config.Item("UseQTHM").GetValue <Slider>().Value;

                if (checkPerMana && ObjectManager.Player.ManaPercentage() < existsManaPer)
                {
                    return;
                }

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

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

                var minW = Program.Config.Item("MinWRange").GetValue <Slider>().Value;

                if (JinxData.GetRealDistance(t) >= minW ||
                    t.Health <= ObjectManager.Player.GetSpellDamage(t, SpellSlot.W))
                {
                    W.CastIfHitchanceEquals(t, JinxData.GetWHitChance);
                }
            }
Exemplo n.º 2
0
            public static void CastQ(bool checkPerMana = false)
            {
                if (!Q.IsReady())
                {
                    return;
                }

                if (checkPerMana &&
                    ObjectManager.Player.ManaPercentage() < Program.Config.Item("UseQTHM").GetValue <Slider>().Value)
                {
                    return;
                }

                var t = TargetSelector.GetTarget(JinxData.QMegaGunRange, TargetSelector.DamageType.Physical);

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

                var swapAoe = Program.Config.SubMenu("Misc").Item("SwapAOE").GetValue <Slider>().Value;

                if (swapAoe > 1 && JinxData.QGunType == JinxData.GunType.Mini && GetEnemiesArround > swapAoe)
                {
                    Q.Cast();
                    return;
                }

                if (!Program.Config.SubMenu("Misc").Item("SwapDistance").GetValue <bool>())
                {
                    return;
                }

                if (JinxData.QGunType == JinxData.GunType.Mega)
                {
                    if (JinxData.GetRealDistance(t) <= JinxData.QMiniGunRange)
                    {
                        Q.Cast();
                    }
                }
                else
                {
                    if (JinxData.GetRealDistance(t) > JinxData.QMiniGunRange)
                    {
                        Q.Cast();
                    }
                }
            }
Exemplo n.º 3
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            JinxEvents.ExecuteToggle();
            JinxEvents.AlwaysChooseMiniGun();

            if (E.IsReady())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (GetValue <bool>("AutoEI"))
                {
                    JinxEvents.CastE(HitChance.Immobile);
                }

                if (GetValue <bool>("AutoED"))
                {
                    JinxEvents.CastE(HitChance.Dashing);
                }

                if (GetValue <bool>("AutoES"))
                {
                    if (JinxData.EnemyHasBuffForCastE)
                    {
                        JinxEvents.CastE(HitChance.High);
                    }
                }
            }


            if (GetValue <bool>("UseRC") && R.IsReady())
            {
                var maxRRange = GetValue <Slider>("MaxRRange").Value;
                var t         = TargetSelector.GetTarget(maxRRange, TargetSelector.DamageType.Physical);

                var aaDamage = Orbwalking.InAutoAttackRange(t)
                    ? ObjectManager.Player.GetAutoAttackDamage(t, true) * JinxData.GetPowPowStacks
                    : 0;

                if (t.Health > aaDamage && t.Health <= ObjectManager.Player.GetSpellDamage(t, SpellSlot.R))
                {
                    if (t.IsValidTarget(maxRRange))
                    {
                        R.Cast(t);
                    }
                    else
                    {
                        var xRKillNotice = String.Format(
                            "Killable Target: {0}, Distance: {1}", t.ChampionName, JinxData.GetRealDistance(t));
                        Drawing.DrawText(
                            Drawing.Width * 0.44f, Drawing.Height * 0.80f, System.Drawing.Color.Red, xRKillNotice);
                    }
                }
            }

            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));
                var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

                if (useQ && JinxData.JinxSpells.CanCastQ)
                {
                    JinxEvents.CastQ();
                }

                if (useW && JinxData.JinxSpells.CanCastW)
                {
                    JinxEvents.CastW();
                }

                if (useE && JinxData.JinxSpells.CanCastE)
                {
                    JinxEvents.CastE(HitChance.High);
                }
            }
        }