Esempio n. 1
0
        private static void OnGapcloser(Obj_AI_Hero target, GapcloserArgs Args)
        {
            if (MiscOption.GetBool("R", "AutoR").Enabled&& R.Ready && target != null && target.IsValidTarget(R.Range))
            {
                switch (Args.Type)
                {
                case SpellType.Melee:
                    if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100))
                    {
                        var rPred = R.GetPrediction(target);
                        R.Cast(rPred.UnitPosition);
                    }
                    break;

                case SpellType.Dash:
                    if (Args.EndPosition.DistanceToPlayer() <= 350)
                    {
                        var rPred = R.GetPrediction(target);
                        R.Cast(rPred.UnitPosition);
                    }
                    break;

                case SpellType.SkillShot:
                case SpellType.Targeted:
                {
                    var rPred = R.GetPrediction(target);
                    R.Cast(rPred.UnitPosition);
                }
                break;
                }
            }
        }
Esempio n. 2
0
        private static void OnGapcloser(Obj_AI_Hero target, GapcloserArgs Args)
        {
            if (MiscOption.GetBool("R", "AutoR").Enabled&& R.Ready && target != null && target.IsValidTarget(R.Range) && !Args.HaveShield)
            {
                switch (Args.Type)
                {
                case SpellType.SkillShot:
                {
                    if (target.IsValidTarget(300))
                    {
                        var rPred = R.GetPrediction(target);

                        R.Cast(rPred.UnitPosition);
                    }
                }
                break;

                case SpellType.Melee:
                case SpellType.Dash:
                case SpellType.Targeted:
                {
                    if (target.IsValidTarget(400))
                    {
                        var rPred = R.GetPrediction(target);

                        R.Cast(rPred.UnitPosition);
                    }
                }
                break;
                }
            }
        }
Esempio n. 3
0
 private static void OnEnemyGapcloser(ActiveGapcloser Args)
 {
     if (MiscOption.GetBool("GapE") && E.IsReady() && Args.Sender.IsValidTarget(E.Range))
     {
         SpellManager.PredCast(E, Args.Sender, true);
     }
 }
Esempio n. 4
0
        private static void AutoUseEvent()
        {
            if (MiscOption.GetKey("R", "SemiRKey").Active)
            {
                Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

                if (Me.Spellbook.GetSpell(SpellSlot.R).Level > 0 && R.IsReady())
                {
                    var target = MyTargetSelector.GetTarget(R.Range);
                    if (target.IsValidTarget(R.Range) && !target.IsValidTarget(MiscOption.GetSlider("R", "GlobalRMin").Value))
                    {
                        var rPred = R.GetPrediction(target);

                        if (rPred.Hitchance >= HitChance.High)
                        {
                            R.Cast(rPred.CastPosition);
                        }
                    }
                }
            }

            if (MiscOption.GetBool("W", "WSlow").Enabled&& W.IsReady() && Me.HasBuffOfType(BuffType.Slow))
            {
                W.Cast();
            }
        }
Esempio n. 5
0
        private static void BeforeAttack(BeforeAttackEventArgs Args)
        {
            if (MiscOption.GetBool("Forcus"))
            {
                if (isComboMode || isHarassMode)
                {
                    foreach (var target in ObjectManager.Heroes.Enemies.Where(x => !x.IsDead && !x.IsZombie &&
                                                                              Orbwalker.InAutoAttackRange(x) &&
                                                                              x.HasBuff("kalistacoopstrikemarkally"))
                             )
                    {
                        if (!target.IsDead && target.IsValidTarget(Orbwalker.GetRealAutoAttackRange(target)))
                        {
                            myOrbwalker.ForceTarget(target);
                        }
                    }
                }
                else if (isLaneClearMode || isJungleClearMode)
                {
                    var minion = MinionManager
                                 .GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me),
                                             MinionTypes.All, MinionTeam.NotAlly)
                                 .FirstOrDefault(x => Orbwalker.InAutoAttackRange(x) && x.HasBuff("kalistacoopstrikemarkally"));

                    if (minion != null && minion.IsValidTarget(Orbwalker.GetRealAutoAttackRange(minion)))
                    {
                        myOrbwalker.ForceTarget(minion);
                    }
                }
            }
        }
Esempio n. 6
0
        private static void OnCreate(GameObject sender)
        {
            if (sender.Name.Contains("Draven_Base_Q_reticle_self.troy"))
            {
                AxeList.Add(sender, Game.TickCount + 1800);
            }

            if (E.Ready)
            {
                var Rengar = GameObjects.EnemyHeroes.Find(heros => heros.ChampionName.Equals("Rengar"));
                var Khazix = GameObjects.EnemyHeroes.Find(heros => heros.ChampionName.Equals("Khazix"));

                if (MiscOption.GetBool("ERengar").Enabled&& Rengar != null)
                {
                    if (sender.Name == "Rengar_LeapSound.troy" && sender.Position.Distance(Me.Position) < E.Range)
                    {
                        E.Cast(Rengar.Position);
                    }
                }

                if (MiscOption.GetBool("EKhazix").Enabled&& Khazix != null)
                {
                    if (sender.Name == "Khazix_Base_E_Tar.troy" && sender.Position.Distance(Me.Position) <= 300)
                    {
                        E.Cast(Khazix.Position);
                    }
                }
            }
        }
Esempio n. 7
0
        private static void AutoR()
        {
            if (R.Level > 0 && Me.Mana > R.ManaCost && R.IsReady())
            {
                var ally = ObjectManager.Heroes.Allies.FirstOrDefault(
                    x => !x.IsMe && !x.IsDead && !x.IsZombie && x.HasBuff("kalistacoopstrikeally"));

                if (ally != null && ally.IsVisible && ally.DistanceToPlayer() <= R.Range)
                {
                    if (MiscOption.GetBool("AutoSave") && Me.CountEnemiesInRange(R.Range) > 0 &&
                        ally.CountEnemiesInRange(R.Range) > 0 &&
                        ally.HealthPercent <= MiscOption.GetSlider("AutoSaveHp"))
                    {
                        R.Cast(true);
                    }

                    if (MiscOption.GetBool("Balista") && ally.ChampionName == "Blitzcrank")
                    {
                        if (ObjectManager.Heroes.Enemies.Any(
                                x => !x.IsDead && !x.IsZombie && x.IsValidTarget() && x.HasBuff("rocketgrab2")))
                        {
                            R.Cast(true);
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        private static void BeforeAttack(BeforeAttackEventArgs Args)
        {
            if (!Args.Unit.IsMe)
            {
                return;
            }

            if (MiscOption.GetBool("Forcus"))
            {
                if (isComboMode || isHarassMode)
                {
                    foreach (var enemy in ObjectManager.Heroes.Enemies.Where(x => !x.IsDead && !x.IsZombie && HavePassive(x)))
                    {
                        myOrbwalker.ForceTarget(enemy);
                    }
                }

                if (isLaneClearMode || isJungleClearMode)
                {
                    var all = MinionManager.GetMinions(Me.Position, Orbwalker.GetRealAutoAttackRange(Me),
                                                       MinionTypes.All, MinionTeam.NotAlly).Where(HavePassive).ToArray();

                    if (all.Any())
                    {
                        myOrbwalker.ForceTarget(all.FirstOrDefault());
                    }
                }
            }
        }
Esempio n. 9
0
        private static void AutoRLogic()
        {
            if (MiscOption.GetBool("AutoR") && R.IsReady() && Me.CountEnemiesInRange(1000) == 0)
            {
                foreach (
                    var target in
                    ObjectManager.Heroes.Enemies.Where(
                        x =>
                        x.IsValidTarget(R.Range) && x.DistanceToPlayer() >= MiscOption.GetSlider("RRange")))
                {
                    if (!target.CanMoveMent() && target.IsValidTarget(EQ.Range) &&
                        R.GetDamage(target) + Q.GetDamage(target) * 3 >= target.Health + target.HPRegenRate * 2)
                    {
                        R.Cast(target, true);
                    }

                    if (R.GetDamage(target) > target.Health + target.HPRegenRate * 2 && target.Path.Length < 2 &&
                        R.GetPrediction(target, true).Hitchance >= HitChance.High)
                    {
                        R.Cast(target, true);
                    }

                    if (isComboMode && Me.CountEnemiesInRange(800) == 0)
                    {
                        R.CastIfWillHit(target, MiscOption.GetSlider("RMinCast"), true);
                    }
                }
            }
        }
Esempio n. 10
0
        private static void HideSettings(int settings)
        {
            if (Me.HasBuff("VayneInquisition") && Me.HasBuff("vaynetumblefade"))
            {
                switch (settings)
                {
                case 0:
                    Orbwalker.AttackState = false;
                    break;

                case 1:
                    if (MiscOption.GetBool("Stealth", "Hideinsolo").Enabled&& Me.CountEnemyHeroesInRange(900) == 1)
                    {
                        SoloHideMode();
                    }

                    if (MiscOption.GetBool("Stealth", "Hideinmulti").Enabled&& Me.CountEnemyHeroesInRange(900) > 1)
                    {
                        MultiHideMode();
                    }
                    break;

                default:
                    Orbwalker.AttackState = true;
                    break;
                }
            }
            else
            {
                Orbwalker.AttackState = true;
            }
        }
Esempio n. 11
0
 private static void OnEnemyGapcloser(ActiveGapcloser Args)
 {
     if (MiscOption.GetBool("GapW") && W.IsReady() && Args.Sender.IsValidTarget(W.Range) && Args.End.DistanceToPlayer() <= 200)
     {
         W.Cast(Args.End, true);
     }
 }
Esempio n. 12
0
        private static void AutoUltEvent()
        {
            if (Me.Spellbook.GetSpell(SpellSlot.R).Level > 0 && R.IsReady())
            {
                var ally = GameObjects.AllyHeroes.FirstOrDefault(
                    x => !x.IsMe && !x.IsDead && x.Buffs.Any(a => a.Name.ToLower().Contains("kalistacoopstrikeally")));

                if (ally != null && ally.IsVisible && ally.DistanceToPlayer() <= R.Range)
                {
                    if (MiscOption.GetSliderBool("R", "AutoRAlly").Enabled&& Me.CountEnemyHeroesInRange(R.Range) > 0 &&
                        ally.CountEnemyHeroesInRange(R.Range) > 0 &&
                        ally.HealthPercent <= MiscOption.GetSliderBool("R", "AutoRAlly").Value)
                    {
                        R.Cast();
                    }

                    if (MiscOption.GetBool("R", "Balista").Enabled&& ally.CharacterName == "Blitzcrank")
                    {
                        if (
                            GameObjects.EnemyHeroes.Any(
                                x =>
                                !x.IsDead && x.IsValidTarget() &&
                                x.Buffs.Any(a => a.Name.ToLower().Contains("rocketgrab"))))
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Esempio n. 13
0
        private static void OnGapcloser(Obj_AI_Hero target, GapcloserArgs Args)
        {
            if (MiscOption.GetBool("AutoE").Enabled&& E.Ready && target.IsValidTarget(E.Range))
            {
                if (E.Ready && target != null && target.IsValidTarget(E.Range))
                {
                    switch (Args.Type)
                    {
                    case SpellType.Melee:
                        if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100))
                        {
                            var ePred = E.GetPrediction(target);
                            E.Cast(ePred.UnitPosition);
                        }
                        break;

                    case SpellType.Dash:
                    case SpellType.SkillShot:
                    case SpellType.Targeted:
                    {
                        var ePred = E.GetPrediction(target);
                        E.Cast(ePred.UnitPosition);
                    }
                    break;
                    }
                }
            }
        }
Esempio n. 14
0
        private static void OnCreate(GameObject sender, EventArgs Args)
        {
            if (R.IsReady())
            {
                var Rengar = ObjectManager.Heroes.Enemies.Find(heros => heros.ChampionName.Equals("Rengar"));
                var Khazix = ObjectManager.Heroes.Enemies.Find(heros => heros.ChampionName.Equals("Khazix"));

                if (MiscOption.GetBool("AntiRengar") && Rengar != null)
                {
                    if (sender.Name == "Rengar_LeapSound.troy" && sender.Position.Distance(Me.Position) < R.Range)
                    {
                        if (Rengar.IsValidTarget(R.Range))
                        {
                            R.CastOnUnit(Rengar, true);
                        }
                    }
                }

                if (MiscOption.GetBool("AntiKhazix") && Khazix != null)
                {
                    if (sender.Name == "Khazix_Base_E_Tar.troy" && sender.Position.Distance(Me.Position) <= 300)
                    {
                        if (Khazix.IsValidTarget(R.Range))
                        {
                            R.CastOnUnit(Khazix, true);
                        }
                    }
                }
            }
        }
Esempio n. 15
0
        private static void OnCreate(GameObject sender, EventArgs Args)
        {
            if (sender.Name.Contains("Draven_Base_Q_reticle_self.troy"))
            {
                AxeList.Add(new AllAxe(sender, Utils.TickCount + 1800));
            }

            if (E.IsReady())
            {
                var Rengar = ObjectManager.Heroes.Enemies.Find(heros => heros.ChampionName.Equals("Rengar"));
                var Khazix = ObjectManager.Heroes.Enemies.Find(heros => heros.ChampionName.Equals("Khazix"));

                if (MiscOption.GetBool("AntiRengar") && Rengar != null)
                {
                    if (sender.Name == "Rengar_LeapSound.troy" && sender.Position.Distance(Me.Position) < E.Range)
                    {
                        E.Cast(Rengar.Position, true);
                    }
                }

                if (MiscOption.GetBool("AntiKhazix") && Khazix != null)
                {
                    if (sender.Name == "Khazix_Base_E_Tar.troy" && sender.Position.Distance(Me.Position) <= 300)
                    {
                        E.Cast(Khazix.Position, true);
                    }
                }
            }
        }
Esempio n. 16
0
        private static void PreAttack(object sender, PreAttackEventArgs Args)
        {
            if (MiscOption.GetBool("Forcus", "Forcus").Enabled)
            {
                if (Orbwalker.Mode == OrbwalkingMode.Combo || Orbwalker.Mode == OrbwalkingMode.Mixed)
                {
                    foreach (var enemy in GameObjects.EnemyHeroes.Where(x => !x.IsDead && HavePassive(x)))
                    {
                        if (enemy.IsValidAutoRange())
                        {
                            Orbwalker.ForceTarget(enemy);
                            LastForcusTime = Game.TickCount;
                        }
                    }
                }
                else if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
                {
                    var all =
                        GameObjects.EnemyMinions.Where(x => x.IsValidAutoRange() && HavePassive(x))
                        .OrderBy(x => x.MaxHealth)
                        .FirstOrDefault();

                    if (all.IsValidAutoRange())
                    {
                        Orbwalker.ForceTarget(all);
                        LastForcusTime = Game.TickCount;
                    }
                }
            }
        }
Esempio n. 17
0
        private static void OnWndProc(WndEventArgs Args)
        {
            if (MiscOption.GetBool("EnableControl"))
            {
                if (MiscOption.GetKey("ControlKey"))
                {
                    if (Utils.TickCount - lastCastTime > 1800)
                    {
                        lastCastTime = Utils.TickCount;
                    }
                }

                if (MiscOption.GetBool("ControlKey2") && (Args.Msg == 516 || Args.Msg == 517))
                {
                    if (Utils.TickCount - lastCastTime > 1800)
                    {
                        lastCastTime = Utils.TickCount;
                    }
                }

                if (MiscOption.GetBool("ControlKey3") && Args.Msg == 0x20a)
                {
                    if (Utils.TickCount - lastCastTime > 1800)
                    {
                        lastCastTime = Utils.TickCount;
                    }
                }
            }
        }
Esempio n. 18
0
 private static void AutoUseLogic()
 {
     if (MiscOption.GetBool("AutoWSlow") && W.IsReady() && Me.HasBuffOfType(BuffType.Slow))
     {
         W.Cast();
     }
 }
Esempio n. 19
0
        private static void AfterQLogic(Obj_AI_Base target)
        {
            if (!Q.IsReady())
            {
                return;
            }

            var qPosition  = Me.ServerPosition.Extend(Game.CursorPosition, Q.Range);
            var targetDisQ = target.ServerPosition.Distance(qPosition);

            if (MiscOption.GetBool("QTurret") && qPosition.UnderTurret(true))
            {
                return;
            }

            if (MiscOption.GetBool("QCheck"))
            {
                if (ObjectManager.Heroes.Enemies.Count(x => x.IsValidTarget(300f, true, qPosition)) >= 3)
                {
                    return;
                }

                //Catilyn W
                if (ObjectManager
                    .Get <Obj_GeneralParticleEmitter>()
                    .FirstOrDefault(
                        x =>
                        x != null && x.IsValid() &&
                        x.Name.ToLower().Contains("yordletrap_idle_red.troy") &&
                        x.Position.Distance(qPosition) <= 100) != null)
                {
                    return;
                }

                //Jinx E
                if (ObjectManager.Get <Obj_AI_Minion>()
                    .FirstOrDefault(x => x.IsValid() && x.IsEnemy && x.Name == "k" &&
                                    x.Position.Distance(qPosition) <= 100) != null)
                {
                    return;
                }

                //Teemo R
                if (ObjectManager.Get <Obj_AI_Minion>()
                    .FirstOrDefault(x => x.IsValid() && x.IsEnemy && x.Name == "Noxious Trap" &&
                                    x.Position.Distance(qPosition) <= 100) != null)
                {
                    return;
                }
            }

            if (targetDisQ >= 300 && targetDisQ <= 600)
            {
                if (Me.CanMoveMent())
                {
                    Q.Cast(Game.CursorPosition, true);
                }
            }
        }
Esempio n. 20
0
        private static void OnUpdate(EventArgs args)
        {
            if (ObjectManager.Player.IsDead || ObjectManager.Player.IsRecalling())
            {
                return;
            }

            var wName  = MyLogic.W.Name.ToLower();
            var wState = MyLogic.W.State;

            if (wName != "pickacard" && ObjectManager.Player.HasBuff("pickacard_tracker") && Variables.GameTimeTickCount - LastWSent > 0)
            {
                if (MiscOption.GetBool("CardSelect", "HumanizerSelect").Enabled&&
                    Variables.GameTimeTickCount - LastWSent <=
                    random.Next(MiscOption.GetSlider("CardSelect", "HumanizerSelectMin").Value,
                                MiscOption.GetSlider("CardSelect", "HumanizerSelectMax").Value))
                {
                    return;
                }

                if (Select == HumanizerCards.Blue &&
                    wName.Equals("BlueCardLock", StringComparison.InvariantCultureIgnoreCase))
                {
                    MyLogic.W.Cast();
                }
                else if (Select == HumanizerCards.Yellow &&
                         wName.Equals("GoldCardLock", StringComparison.InvariantCultureIgnoreCase))
                {
                    MyLogic.W.Cast();
                }
                else if (Select == HumanizerCards.Red && wName.
                         Equals("RedCardLock", StringComparison.InvariantCultureIgnoreCase))
                {
                    MyLogic.W.Cast();
                }
            }
            else
            {
                if (wState == SpellState.Ready)
                {
                    Status = HumanizerSelectStatus.Ready;
                }
                else if ((wState == SpellState.Cooldown || wState == SpellState.Disabled ||
                          wState == SpellState.NoMana || wState == SpellState.NotLearned ||
                          wState == SpellState.CooldownOrSealed || wState == SpellState.Unknown) &&
                         !IsSelect)
                {
                    Status = HumanizerSelectStatus.Cooldown;
                }
                else if (IsSelect)
                {
                    Status = HumanizerSelectStatus.Selected;
                }
                else
                {
                    Status = HumanizerSelectStatus.Selecting;
                }
            }
        }
Esempio n. 21
0
        private static Vector3 GetDashQPos()
        {
            var firstQPos = Me.ServerPosition.Extend(Game.CursorPosition, Q.Range);
            var allPoint  = MyGeometry.GetCirclrPos(Me.ServerPosition, Q.Range);

            foreach (var point in allPoint)
            {
                var mousecount = firstQPos.CountEnemiesInRange(300);
                var count      = point.CountEnemiesInRange(300);

                if (!HaveEnemiesInRange(point))
                {
                    continue;
                }

                if (mousecount == count)
                {
                    if (point.DistanceToMouse() < firstQPos.DistanceToMouse())
                    {
                        firstQPos = point;
                    }
                }

                if (count < mousecount)
                {
                    firstQPos = point;
                }
            }

            for (var i = 1; i <= 5; i++)
            {
                if (NavMesh.IsWall(Me.ServerPosition.Extend(firstQPos, i * 20)))
                {
                    return(Vector3.Zero);
                }
            }

            if (MiscOption.GetBool("QTurret") && firstQPos.UnderTurret(true))
            {
                return(Vector3.Zero);
            }

            if (MiscOption.GetBool("QCheck"))
            {
                if (Me.CountEnemiesInRange(Q.Range + Me.BoundingRadius - 30) < firstQPos.CountEnemiesInRange(Q.Range * 2 - Me.BoundingRadius))
                {
                    return(Vector3.Zero);
                }

                if (firstQPos.CountEnemiesInRange(Q.Range * 2 - Me.BoundingRadius) > 3)
                {
                    return(Vector3.Zero);
                }
            }

            return(!HaveEnemiesInRange(firstQPos) ? Vector3.Zero : firstQPos);
        }
Esempio n. 22
0
 private static void AutoR()
 {
     if (MiscOption.GetBool("AutoR") && R.IsReady() && R.Instance.SpellData.Name == "QuinnR")
     {
         if (!Me.IsDead && Me.InFountain())
         {
             R.Cast();
         }
     }
 }
Esempio n. 23
0
 private static void AutoR()
 {
     if (MiscOption.GetBool("R", "AutoR").Enabled&& R.IsReady() && R.Name == "QuinnR")
     {
         if (!Me.IsDead && Me.InFountain())
         {
             R.Cast();
         }
     }
 }
Esempio n. 24
0
 private static void OnEnemyGapcloser(ActiveGapcloser Args)
 {
     if (MiscOption.GetBool("Anti") && E.IsReady())
     {
         if (Args.End.Distance(Me.Position) <= 200 && Args.Sender.IsValidTarget(E.Range))
         {
             E.Cast(Args.Sender.Position, true);
         }
     }
 }
Esempio n. 25
0
 private static void AutoR()
 {
     if (MiscOption.GetBool("R", "AutoR").Enabled&& R.Ready && R.GetBasicSpell().Name == "QuinnR")
     {
         if (!Me.IsDead && Me.IsInFountainRange())
         {
             R.Cast();
         }
     }
 }
Esempio n. 26
0
 private static void OnEnemyGapcloser(ActiveGapcloser Args)
 {
     if (MiscOption.GetBool("Gapcloser") && E.IsReady())
     {
         if (Args.End.DistanceToPlayer() <= 200)
         {
             E.Cast(Me.Position.Extend(Args.Sender.Position, -E.Range), true);
         }
     }
 }
Esempio n. 27
0
 private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
 {
     if (sender.IsEnemy && sender.ObjectType == GameObjectType.AIHeroClient && sender.IsMelee() &&
         Args.Target != null && Args.Target.IsMe)
     {
         if (MiscOption.GetBool("EnabledAntiMelee") && Me.HealthPercent <= MiscOption.GetSlider("AntiMeleeHp"))
         {
             E.Cast(Me.Position.Extend(sender.Position, -E.Range), true);
         }
     }
 }
Esempio n. 28
0
        private static void OnEnemyGapcloser(ActiveGapcloser Args)
        {
            var target = Args.Sender;

            if (target.IsValidTarget(E.Range) && (Args.End.DistanceToPlayer() <= 300 || target.DistanceToPlayer() <= 300))
            {
                if (MiscOption.GetBool("GapE") && E.IsReady())
                {
                    SpellManager.PredCast(E, target, true);
                }
            }
        }
Esempio n. 29
0
        //private static void OnGapcloser(AIHeroClient target, GapcloserArgs Args)
        //{
        //    if (target != null && target.IsValidTarget(E.Range))
        //    {
        //        switch (Args.Type)
        //        {
        //            case SpellType.Melee:
        //                {
        //                    if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100) &&
        //                        MiscOption.GetBool("Q", "QMelee").Enabled && Q.IsReady())
        //                    {
        //                        Q.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -Q.Range));
        //                    }
        //                }
        //                break;
        //            case SpellType.SkillShot:
        //                {
        //                    if (MiscOption.GetBool("E", "AntiGapcloserE").Enabled && E.IsReady() && target.IsValidTarget(250) && !Args.HaveShield)
        //                    {
        //                        E.CastOnUnit(target);
        //                    }
        //                }
        //                break;
        //            case SpellType.Dash:
        //            case SpellType.Targeted:
        //                {
        //                    if (MiscOption.GetBool("E", "AntiGapcloserE").Enabled && E.IsReady() && target.IsValidTarget(E.Range) && !Args.HaveShield)
        //                    {
        //                        E.CastOnUnit(target);
        //                    }
        //                }
        //                break;
        //        }
        //    }
        //}

        private static Vector3 GetDashQPos()
        {
            var firstQPos = Me.PreviousPosition.Extend(Game.CursorPosRaw, Q.Range);
            var allPoint  = MyExtraManager.GetCirclePoints(Q.Range).ToList();

            foreach (var point in allPoint)
            {
                var mousecount = firstQPos.CountEnemyHeroesInRange(300);
                var count      = point.CountEnemyHeroesInRange(300);

                if (!HaveEnemiesInRange(point))
                {
                    continue;
                }

                if (mousecount == count)
                {
                    if (point.DistanceToCursor() < firstQPos.DistanceToCursor())
                    {
                        firstQPos = point;
                    }
                }

                if (count < mousecount)
                {
                    firstQPos = point;
                }
            }

            if (MiscOption.GetList("Q", "QTurret").Index == 0 || MiscOption.GetList("Q", "QTurret").Index == 2)
            {
                if (firstQPos.IsUnderEnemyTurret())
                {
                    return(Vector3.Zero);
                }
            }

            if (MiscOption.GetBool("Q", "QCheck").Enabled)
            {
                if (Me.CountEnemyHeroesInRange(Q.Range + Me.BoundingRadius - 30) <
                    firstQPos.CountEnemyHeroesInRange(Q.Range * 2 - Me.BoundingRadius))
                {
                    return(Vector3.Zero);
                }

                if (firstQPos.CountEnemyHeroesInRange(Q.Range * 2 - Me.BoundingRadius) > 3)
                {
                    return(Vector3.Zero);
                }
            }

            return(HaveEnemiesInRange(firstQPos) ? firstQPos : Vector3.Zero);
        }
Esempio n. 30
0
        private static void Auto()
        {
            if (MiscOption.GetBool("Q", "AutoQ").Enabled&& Q.IsReady() &&
                Orbwalker.ActiveMode != OrbwalkerMode.Combo && Orbwalker.ActiveMode != OrbwalkerMode.Harass)
            {
                var target = MyTargetSelector.GetTarget(Q.Range - 50);

                if (target.IsValidTarget(Q.Range) && !target.CanMoveMent())
                {
                    Q.Cast(target.PreviousPosition);
                }
            }

            if (W.IsReady())
            {
                if (MiscOption.GetBool("W", "AutoWCC").Enabled)
                {
                    foreach (
                        var target in
                        GameObjects.EnemyHeroes.Where(
                            x => x.IsValidTarget(W.Range) && !x.CanMoveMent() && !x.HasBuff("caitlynyordletrappublic")))
                    {
                        if (Variables.GameTimeTickCount - lastWTime > 1500)
                        {
                            W.Cast(target.PreviousPosition);
                        }
                    }
                }

                if (MiscOption.GetBool("W", "AutoWTP").Enabled)
                {
                    var obj =
                        ObjectManager
                        .Get <AIBaseClient>()
                        .FirstOrDefault(x => !x.IsAlly && !x.IsMe && x.DistanceToPlayer() <= W.Range &&
                                        x.Buffs.Any(
                                            a =>
                                            a.Name.ToLower().Contains("teleport") ||
                                            a.Name.ToLower().Contains("gate")) &&
                                        !ObjectManager.Get <AIBaseClient>()
                                        .Any(b => b.Name.ToLower().Contains("trap") && b.Distance(x) <= 150));

                    if (obj != null)
                    {
                        if (Variables.GameTimeTickCount - lastWTime > 1500)
                        {
                            W.Cast(obj.PreviousPosition);
                        }
                    }
                }
            }
        }