Exemplo n.º 1
0
        static void KillSteal()
        {
            if (Human())
            {
                if (Option_Item("KillSteal Human Q") && Q.IsReady())
                {
                    var Qtarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical, true);
                    if (Qtarget != null && Qtarget.Health <= Q.GetDamage(Qtarget))
                    {
                        Q.CastOnUnit(Qtarget, true);
                    }
                }

                if (Option_Item("KillSteal Human W") && W.IsReady())
                {
                    var Wtarget    = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical, true);
                    var prediction = W.GetPrediction(Wtarget);
                    if (Wtarget != null && Wtarget.Health <= W.GetDamage(Wtarget) && prediction.CollisionObjects.Count == 0)
                    {
                        W.Cast(Wtarget.ServerPosition, true);
                    }
                }
            }
            if (Spider())
            {
                if (Option_Item("KillSteal Spider Q") && Q2.IsReady())
                {
                    var Q2target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Magical, true);
                    if (Q2target != null && Q2target.Health <= Q2.GetDamage(Q2target))
                    {
                        Q2.CastOnUnit(Q2target, true);
                    }
                }
            }
        }
Exemplo n.º 2
0
        static float GetComboDamage(AIHeroClient Enemy)
        {
            float damage = 0;

            if (Q.IsReady())
            {
                damage += Q.GetDamage(Enemy);
            }
            if (W.IsReady())
            {
                damage += W.GetDamage(Enemy);
            }
            if (Q2.IsReady())
            {
                damage += Q2.GetDamage(Enemy);
            }
            if (W2.IsReady())
            {
                damage += W2.GetDamage(Enemy);
            }
            if (!Player.Spellbook.IsAutoAttacking)
            {
                damage += (float)ObjectManager.Player.GetAutoAttackDamage(Enemy, true);
            }


            return(damage);
        }
Exemplo n.º 3
0
        private void CastQe(Obj_AI_Hero target, string source)
        {
            if (target == null)
            {
                return;
            }

            if (W.IsReady())
            {
                var wVec = Player.ServerPosition + Vector3.Normalize(target.ServerPosition - Player.ServerPosition) * W.Range;

                var qPred = xSaliceResurrected_Rework.Prediction.CommonPredEx.GetP(wVec, Q, target, W.Delay + Q.Delay, true);

                if ((Q.IsReady() || QSpell.State == SpellState.Surpressed) && (E.IsReady() || ESpell.State == SpellState.Surpressed) &&
                    Player.Distance(target.Position) < Q.Range - 75 && qPred.Hitchance >= HitChance.VeryHigh)
                {
                    var vec        = target.ServerPosition - Player.ServerPosition;
                    var castBehind = qPred.CastPosition + Vector3.Normalize(vec) * 75;

                    W.Cast(wVec);
                    Utility.DelayAction.Add((int)W.Delay + 100, () => Q2.Cast(castBehind));
                    Utility.DelayAction.Add((int)(W.Delay + Q.Delay) + 100, () => E.Cast(castBehind));
                }
            }
        }
Exemplo n.º 4
0
        private void OnHarass()
        {
            bool useQ = Menu["harass"]["useq"].Enabled;

            if (Q.Ready && useQ && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQW" && !Player.IsDashing())
            {
                var qtarget = GetBestEnemyHeroTargetInRange(Q.Range);
                if (qtarget.IsValidTarget(Q.Range) && qtarget != null)
                {
                    Q.Cast(qtarget);
                }
            }
            if (Q.Ready && useQ && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ2W" && !Player.IsDashing())
            {
                var qtarget = GetBestEnemyHeroTargetInRange(Q2.Range);
                if (qtarget.IsValidTarget(Q2.Range) && qtarget != null)
                {
                    Q2.Cast(qtarget);
                }
            }

            bool useQ2 = Menu["harass"]["useq2"].Enabled;

            if (Q.Ready && useQ2 && Player.SpellBook.GetSpell(SpellSlot.Q).Name == "YasuoQ3W" && !Player.IsDashing())
            {
                var qtarget = GetBestEnemyHeroTargetInRange(Q3.Range);
                if (qtarget.IsValidTarget(Q3.Range) && qtarget != null)
                {
                    Q3.Cast(qtarget);
                }
            }
        }
Exemplo n.º 5
0
        public override void KillSteal()
        {
            if (Orbwalker.IsAutoAttacking || user.Spellbook.IsCastingSpell || user.Spellbook.IsCharging || user.Spellbook.IsChanneling)
            {
                return;
            }

            if (Q2.IsReady() && Config.useQks)
            {
                var qtarget = Q2.GetKillStealTarget(SpellManager.QDamage(null), DamageType.Physical);
                if (qtarget != null && !qtarget.HasBuff("PoppyWZone") && !SkillshotDetector.SkillshotsDetected.Any(s => s.WillHit(Q2.GetPrediction(qtarget).CastPosition.To2D())))
                {
                    if (!useQ(false, Config.useQShortVital, Config.useQLongvital, false, qtarget))
                    {
                        Q2.Cast(qtarget);
                    }
                }
            }

            if (W.IsReady() && Config.useWks)
            {
                var wtarget = W.GetKillStealTarget(SpellManager.WDamage(null), DamageType.Magical);
                if (wtarget != null)
                {
                    W.Cast(wtarget, 75);
                }
            }
        }
Exemplo n.º 6
0
        public Position GetPosition(int x, int y)
        {
            if (MiddleSquare.Contains(x, y))
            {
                return(Position.Middle);
            }
            else if (Q1.Contains(x, y))
            {
                return(Position.Q1);
            }
            else if (Q2.Contains(x, y))
            {
                return(Position.Q2);
            }
            else if (Q3.Contains(x, y))
            {
                return(Position.Q3);
            }
            else if (Q4.Contains(x, y))
            {
                return(Position.Q4);
            }

            return(Position.None);
        }
Exemplo n.º 7
0
        private static void HarassLogic()
        {
            var target = TargetSelector.GetTarget(W.Range, DamageType.Mixed);
            var inputW = W.GetPrediction(target);

            if (mainMenu["Harass"].GetValue <MenuSlider>("mana%").Value <= GameObjects.Player.ManaPercent && !Ismelee())
            {
                var targetQ2  = Q2.GetTarget();
                var targetQ3  = Q3.GetTarget();
                var PlayerPos = GameObjects.Player.Position;

                var inputQ2 = Q2.GetPrediction(targetQ2);
                var inputQ3 = Q3.GetPrediction(targetQ2);


                if (mainMenu["Harass"].GetValue <MenuBool>("Q3use").Enabled&& Q.IsReady() && targetQ3.IsValidTarget() && inputQ3.Hitchance >= HitChance.VeryHigh && E2.IsReady())
                {
                    Q3.Cast(inputQ3.CastPosition);
                    E2.Cast(PlayerPos);
                }

                if (mainMenu["Harass"].GetValue <MenuBool>("Q2use").Enabled&& Q.IsReady() && targetQ2.IsValidTarget() && inputQ2.Hitchance >= HitChance.VeryHigh)
                {
                    Q2.Cast(inputQ2.CastPosition);
                }
            }
        }
Exemplo n.º 8
0
        protected override void Interrupter_OnPosibleToInterrupt(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs spell)
        {
            if (!Menu.Item("UseInt", true).GetValue <bool>())
            {
                return;
            }

            if (unit != null && Player.Distance(unit.Position) < Q2.Range + unit.BoundingRadius && Q1Cd == 0 && E1Cd == 0)
            {
                if (!IsMelee && R.IsReady())
                {
                    R.Cast();
                }

                if (Q2.IsReady())
                {
                    Q2.Cast(unit);
                }
            }

            if (unit != null && Player.Distance(unit.Position) < E2.Range + unit.BoundingRadius && E1Cd == 0)
            {
                if (!IsMelee && R.IsReady())
                {
                    R.Cast();
                }

                if (E2.IsReady())
                {
                    E2.Cast(unit);
                }
            }
        }
Exemplo n.º 9
0
 private static void OnPossibleToInterrupt(AIHeroClient unit, InterruptableSpell spell)
 {
     if (Player.IsDead || !getCheckBoxItem(miscMenu, "EQ") ||
         !getCheckBoxItem(miscMenu, unit.ChampionName + "_" + spell.Slot) || !Q.IsReady())
     {
         return;
     }
     if (E.CanCast(unit) && Player.Mana >= Q.Instance.SData.Mana + E.Instance.SData.Mana)
     {
         var predE = E.GetPrediction(unit);
         if (predE.Hitchance >= E.MinHitChance &&
             E.Cast(
                 predE.UnitPosition.LSExtend(Player.ServerPosition, -E.Width / (unit.IsFacing(Player) ? 2 : 1)),
                 getCheckBoxItem(miscMenu, "Packet")) &&
             Q.Cast(predE.UnitPosition, getCheckBoxItem(miscMenu, "Packet")))
         {
             return;
         }
     }
     foreach (var flag in
              Flag.Where(i => Q2.WillHit(unit, i.ServerPosition)))
     {
         Q.Cast(flag.ServerPosition, getCheckBoxItem(miscMenu, "Packet"));
     }
 }
Exemplo n.º 10
0
        private static void ComboLogic()
        {
            var targetQ2  = Q2.GetTarget();
            var targetQ3  = Q3.GetTarget();
            var targetQ4  = Q4.GetTarget();
            var PlayerPos = GameObjects.Player.Position;

            var inputQ2 = Q2.GetPrediction(targetQ2);
            var inputQ3 = Q3.GetPrediction(targetQ3);
            var inputQ4 = Q4.GetPrediction(targetQ4);

            if (mainMenu["Combo"].GetValue <MenuBool>("Q2use").Enabled&& Q.IsReady() && !E2.IsReady() && targetQ2.IsValidTarget() && inputQ2.Hitchance >= HitChance.VeryHigh)
            {
                Q2.Cast(inputQ2.CastPosition);
            }
            if (mainMenu["Combo"].GetValue <MenuBool>("Q4use").Enabled&& Q.IsReady() && targetQ4.IsValidTarget() && inputQ4.Hitchance >= HitChance.VeryHigh && E2.IsReady())
            {
                E2.Cast(inputQ4.CastPosition);
                Q4.Cast(inputQ4.CastPosition);
            }
            if (mainMenu["Combo"].GetValue <MenuBool>("Q3use").Enabled&& Q.IsReady() && targetQ3.IsValidTarget() && inputQ3.Hitchance >= HitChance.VeryHigh && E2.IsReady())
            {
                Q3.Cast(inputQ3.CastPosition);
                E2.Cast(PlayerPos);
            }
        }
Exemplo n.º 11
0
        //c
        public static void Combo()
        {
            var Target = TargetSelector.GetTarget(Q1.Range, DamageType.Physical);

            if (Target == null)
            {
                return;
            }
            var useQ  = ModesMenu1["ComboQ"].Cast <CheckBox>().CurrentValue;
            var useQ2 = ModesMenu1["ComboQ2"].Cast <CheckBox>().CurrentValue;
            var Qp    = Q1.GetPrediction(Target);

            if (!Target.IsValid())
            {
                return;
            }
            if (Q1.IsReady() && useQ && !Target.IsInvulnerable && Q1.Name.Equals("BlindMonkQOne", StringComparison.InvariantCultureIgnoreCase))
            {
                if (Qp.HitChance >= HitChance.High)
                {
                    Q1.Cast(Qp.CastPosition);
                }
            }

            if (Q2.IsReady() && useQ2 && !Target.IsInvulnerable && Q2.Name.Equals("blindmonkqtwo", StringComparison.InvariantCultureIgnoreCase))
            {
                Q2.Cast();
            }
        }
Exemplo n.º 12
0
        static void Main(string[] args)
        {
            //Q2 i)
            //Console.WriteLine(Q2.ProductCost('A'));

            //Q2 ii)
            //Console.WriteLine(Q2.CanBuy(16));

            //Q2 iii)
            //Console.WriteLine(Q2.FutureValue(3, 100, .05));

            //Q2 iv)
            //int a = 4;
            //int b = 5;
            //Q2.DoubleValues(ref a, ref b);
            //Console.WriteLine(a + " " + b);

            //Q2 v)
            Console.WriteLine(Q2.Search("c# if fun fun fun", "fun"));
            //Console.WriteLine(Q2.FutureValue(3, 100, .05)) ;

            ReadFromFile();
            ParseData();
            PrintReport();
        }
Exemplo n.º 13
0
        private static void FlashQCombo()
        {
            EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            var target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            if (Player.Distance3D(target) > Q.Range)
            {
                if (FlashSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(FlashSlot) == SpellState.Ready && Q.IsReady())
                {
                    Q2.UpdateSourcePosition(V2E(ObjectManager.Player.Position, target.Position, FlashRange).To3D());
                    var predPos = Q2.GetPrediction(target);
                    if (predPos.Hitchance != HitChance.VeryHigh) //What does "Madlife" mean?
                    {
                        return;
                    }
                    Player.Spellbook.CastSpell(FlashSlot, predPos.CastPosition);
                    Q.Cast(predPos.CastPosition);
                }
            }
        }
Exemplo n.º 14
0
        private void FlashQ()
        {
            Player.IssueOrder(OrderType.MoveTo, Game.CursorPos);
            if (Q.Ready)
            {
                if (Flash.Ready && Flash != null)
                {
                    if (!Player.HasBuff("ViQ"))
                    {
                        var qtarget = TargetSelector.GetTarget(Q.ChargedMaxRange + 500);

                        if (qtarget != null)
                        {
                            Q2.StartCharging(Game.CursorPos);
                        }
                    }
                    if (Player.HasBuff("ViQ"))
                    {
                        var qtarget = TargetSelector.GetTarget(Q2.Range);
                        var pred    = Q2.GetPrediction(qtarget);
                        if (qtarget != null)
                        {
                            if (qtarget.IsValidTarget(Q2.Range))
                            {
                                if (Flash.Cast(qtarget.ServerPosition))
                                {
                                    Q2.Cast(pred.CastPosition);
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 15
0
        static void Harass()
        {
            if (!(Player.ManaPercent > AIO_Menu.Champion.Harass.IfMana))
            {
                return;
            }

            if (AIO_Menu.Champion.Harass.UseQ && Q.IsReady())
            {
                var Q2target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Physical);

                if (Q2target != null && Q2target.HasBuff2("urgotcorrosivedebuff"))
                {
                    Q2.Cast(Q2target);
                }
                else
                {
                    var qTarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

                    if (qTarget != null && Q.GetPrediction(qTarget).Hitchance >= AIO_Menu.Champion.Misc.SelectedHitchance)
                    {
                        Q.Cast(qTarget);
                    }
                }
            }
        }
Exemplo n.º 16
0
        //private static void OnGapcloser(AIHeroClient target, GapcloserArgs Args)
        //{
        //    if (E.IsReady() && target != null && target.IsValidTarget(E.Range))
        //    {
        //        switch (Args.Type)
        //        {
        //            case SpellType.Melee:
        //                {
        //                    if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100))
        //                    {
        //                        E.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -E.Range));
        //                    }
        //                }
        //                break;
        //            case SpellType.Dash:
        //                {
        //                    if (Args.EndPosition.DistanceToPlayer() <= 250 ||
        //                        target.PreviousPosition.DistanceToPlayer() <= 300)
        //                    {
        //                        E.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -E.Range));
        //                    }
        //                }
        //                break;
        //            case SpellType.SkillShot:
        //            case SpellType.Targeted:
        //                {
        //                    if (target.PreviousPosition.DistanceToPlayer() <= 300)
        //                    {
        //                        E.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -E.Range));
        //                    }
        //                }
        //                break;
        //        }
        //    }
        //}

        private static void QLogic(AIHeroClient target, bool useExtendQ = true)
        {
            if (!Q.IsReady() || target == null || target.IsDead || target.IsUnKillable())
            {
                return;
            }

            if (target.IsValidTarget(Q.Range))
            {
                Q.CastOnUnit(target);
            }
            else if (target.IsValidTarget(Q2.Range) && useExtendQ)
            {
                var collisions =
                    GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && (x.IsMinion() || x.GetJungleType() != JungleType.Unknown))
                    .ToList();

                if (!collisions.Any())
                {
                    return;
                }

                foreach (var minion in collisions)
                {
                    var qPred    = Q2.GetPrediction(target);
                    var qPloygon = new Geometry.Rectangle(Me.PreviousPosition, Me.PreviousPosition.Extend(minion.Position, Q2.Range), Q2.Width);

                    if (qPloygon.IsInside(qPred.UnitPosition.ToVector2()) && minion.IsValidTarget(Q.Range))
                    {
                        Q.CastOnUnit(minion);
                        break;
                    }
                }
            }
        }
Exemplo n.º 17
0
        static void Laneclear()
        {
            if (!(Player.ManaPercent > AIO_Menu.Champion.Laneclear.IfMana))
            {
                return;
            }

            var Minions = MinionManager.GetMinions(Q2.Range, MinionTypes.All, MinionTeam.Enemy);

            if (Minions.Count <= 0)
            {
                return;
            }

            if (AIO_Menu.Champion.Laneclear.UseQ && Q.IsReady())
            {
                var Q2t = MinionManager.GetMinions(Q2.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.HasBuff2("urgotcorrosivedebuff"));
                if (Q2t != null)
                {
                    Q2.Cast(Q2t);
                }
                else
                {
                    var qTarget = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth).FirstOrDefault(x => AIO_Func.isKillable(x, Q, 0) && AIO_Func.PredHealth(x, Q) > 0);

                    if (qTarget != null && Q.GetPrediction(qTarget).Hitchance >= AIO_Menu.Champion.Misc.SelectedHitchance)
                    {
                        Q.Cast(qTarget);
                    }
                }
            }
        }
Exemplo n.º 18
0
Arquivo: Ziggs.cs Projeto: tekintr/AIO
 internal static bool CastQ3(Obj_AI_Base target)
 {
     if (target != null && Q.IsReady())
     {
         var pred = Q3.GetPrediction(target);
         if (Q.IsInRange(pred.CastPosition))
         {
             return(CastQ1(target));
         }
         if (Q2.IsInRange(pred.CastPosition))
         {
             return(CastQ2(target));
         }
         if (pred.CanNext(Q3, MenuValue.General.QHitChance, false))
         {
             var castPosition  = player.Position.Extend(pred.CastPosition, player.Distance(pred.CastPosition) * QBounceRatio3).To3DWorld();
             var castPosition2 = player.Position.Extend(pred.CastPosition, player.Distance(pred.CastPosition) / QBounceRatio2);
             if (castPosition2.CountEnemyMinionsInRange(Q.Radius) < float.Epsilon && !castPosition.IsWall() && !castPosition.IsBuilding())
             {
                 if (castPosition.CountEnemyMinionsInRange(Q.Radius) < float.Epsilon && !castPosition.IsWall() && !castPosition.IsBuilding())
                 {
                     return(Q.Cast(castPosition));
                 }
             }
         }
     }
     return(false);
 }
Exemplo n.º 19
0
        private static void KillSteal()
        {
            if (ksMenu["useQ"].Cast <CheckBox>().CurrentValue&& Q.IsReady())
            {
                var target = Q.GetTarget();
                if (target != null && target.Health < Qdamage(target))
                {
                    Q2.Cast(target);
                    return;
                }
            }

            if (ksMenu["useE"].Cast <CheckBox>().CurrentValue&& E.IsReady())
            {
                var target = E.GetTarget();
                if (target != null && target.Health < Edamage(target))
                {
                    E.CastMinimumHitchance(target, HitChance.Medium);
                    return;
                }
            }

            if (ksMenu["useR"].Cast <CheckBox>().CurrentValue&& E.IsReady())
            {
                var target = R.GetTarget();
                if (target != null && target.Health < Rdamage(target))
                {
                    R.Cast();
                    return;
                }
            }
        }
Exemplo n.º 20
0
        private void LastHitQ()
        {
            if (!Q.IsReady())
            {
                return;
            }

            List <Obj_AI_Base> allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                                      Q.Range + QWidth, MinionTypes.All, MinionTeam.NotAlly);

            if (allMinionsQ.Count > 0)
            {
                foreach (var minion in allMinionsQ)
                {
                    var health = HealthPrediction.GetHealthPrediction(minion, 700);

                    var qPred = Q2.GetCircularFarmLocation(allMinionsQ);

                    if (qPred.MinionsHit == 1)
                    {
                        if (Player.GetSpellDamage(minion, SpellSlot.Q) - 15 > health)
                        {
                            Q2.Cast(minion, packets());
                        }
                    }
                    else
                    {
                        if (Player.GetSpellDamage(minion, SpellSlot.Q, 1) - 15 > health)
                        {
                            Q2.Cast(minion, packets());
                        }
                    }
                }
            }
        }
Exemplo n.º 21
0
        private static void Jungle()
        {
            if (Program.LaneClear && Player.Mana > RMANA + WMANA + WMANA)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 700, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    if (Range)
                    {
                        if (Q.IsReady() && getCheckBoxItem(farmMenu, "jungleQ"))
                        {
                            Q.Cast(mob.ServerPosition);
                            return;
                        }
                        if (W.IsReady() && getCheckBoxItem(farmMenu, "jungleE"))
                        {
                            if (Orbwalking.InAutoAttackRange(mob))
                            {
                                W.Cast();
                            }
                            return;
                        }
                        if (getCheckBoxItem(farmMenu, "jungleR"))
                        {
                            R.Cast();
                        }
                    }
                    else
                    {
                        if (Q2.IsReady() && getCheckBoxItem(farmMenu, "jungleQm") && mob.IsValidTarget(Q2.Range))
                        {
                            Q2.Cast(mob);
                            return;
                        }

                        if (W2.IsReady() && getCheckBoxItem(farmMenu, "jungleWm"))
                        {
                            if (mob.IsValidTarget(300))
                            {
                                W.Cast();
                            }
                            return;
                        }
                        if (E2.IsReady() && getCheckBoxItem(farmMenu, "jungleEm") && mob.IsValidTarget(E2.Range))
                        {
                            if (mob.IsValidTarget(E2.Range))
                            {
                                E2.Cast(mob);
                            }
                            return;
                        }
                        if (getCheckBoxItem(farmMenu, "jungleR"))
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Exemplo n.º 22
0
        private void Jungle()
        {
            if (Program.LaneClear && Player.Mana > RMANA + WMANA + WMANA)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 700, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    if (Range)
                    {
                        if (Q.IsReady() && Config.Item("jungleQ", true).GetValue <bool>())
                        {
                            Q.Cast(mob.ServerPosition);
                            return;
                        }
                        if (W.IsReady() && Config.Item("jungleE", true).GetValue <bool>())
                        {
                            if (LeagueSharp.Common.Orbwalking.InAutoAttackRange(mob))
                            {
                                W.Cast();
                            }
                            return;
                        }
                        if (Config.Item("jungleR", true).GetValue <bool>())
                        {
                            R.Cast();
                        }
                    }
                    else
                    {
                        if (Q2.IsReady() && Config.Item("jungleQm", true).GetValue <bool>() && mob.IsValidTargetLS(Q2.Range))
                        {
                            Q2.Cast(mob);
                            return;
                        }

                        if (W2.IsReady() && Config.Item("jungleWm", true).GetValue <bool>())
                        {
                            if (mob.IsValidTargetLS(300))
                            {
                                W.Cast();
                            }
                            return;
                        }
                        if (E2.IsReady() && Config.Item("jungleEm", true).GetValue <bool>() && mob.IsValidTargetLS(E2.Range))
                        {
                            if (mob.IsValidTargetLS(E2.Range))
                            {
                                E2.Cast(mob);
                            }
                            return;
                        }
                        if (Config.Item("jungleR", true).GetValue <bool>())
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Exemplo n.º 23
0
        private static void LogicQ()
        {
            if (Program.Combo || Program.Farm)
            {
                foreach (
                    var enemy in
                    Program.Enemies.Where(
                        enemy => enemy.LSIsValidTarget(Q2.Range) && enemy.HasBuff("urgotcorrosivedebuff")))
                {
                    if (W.IsReady() && (Player.Mana > WMANA + QMANA * 4 || Q.GetDamage(enemy) * 3 > enemy.Health) &&
                        getCheckBoxItem(w, "autoW"))
                    {
                        W.Cast();
                        Program.debug("W");
                    }
                    Program.debug("E");
                    Q2.Cast(enemy.ServerPosition);
                    return;
                }
            }

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

            if (Player.CountEnemiesInRange(Q.Range - 200) > 0)
            {
                t = TargetSelector.GetTarget(Q.Range - 200, DamageType.Physical);
            }

            if (t.LSIsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + WMANA && OktwCommon.CanHarras())
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(
                            enemy =>
                            enemy.LSIsValidTarget(Q.Range) && getCheckBoxItem(harass, "harras" + t.NetworkId)))
                    {
                        Program.CastSpell(Q, enemy);
                    }
                }
                else if (OktwCommon.GetKsDamage(t, Q) * 2 > t.Health)
                {
                    Program.CastSpell(Q, t);
                }
                if (!Program.None && Player.Mana > RMANA + QMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.LSIsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
        }
Exemplo n.º 24
0
        protected override void Interrupter_OnPosibleToInterrupt(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs spell)
        {
            if (!menu.Item("UseInt", true).GetValue <bool>())
            {
                return;
            }

            if (unit != null && Player.Distance(unit) < Q2.Range + unit.BoundingRadius && _hamQcd == 0 && _hamEcd == 0)
            {
                if (!_hammerTime && R.IsReady())
                {
                    R.Cast();
                }

                if (Q2.IsReady())
                {
                    Q2.Cast(unit, packets());
                }
            }

            if (unit != null && (Player.Distance(unit) < E2.Range + unit.BoundingRadius && _hamEcd == 0))
            {
                if (!_hammerTime && R.IsReady())
                {
                    R.Cast();
                }

                if (E2.IsReady())
                {
                    E2.Cast(unit, packets());
                }
            }
        }
Exemplo n.º 25
0
        private static void LaneClear()
        {
            if (Variables.GameTimeTickCount - lastCastTime < 600 + Game.Ping ||
                Me.Buffs.Any(x => x.Name.ToLower() == "lucianpassivebuff"))
            {
                return;
            }

            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var qMinions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();

                    if (qMinions.Any())
                    {
                        foreach (var minion in qMinions)
                        {
                            var q2Minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q2.Range) && x.IsMinion()).ToList();

                            if (minion != null && minion.IsValidTarget(Q.Range) &&
                                Q2.GetHitCounts(q2Minions, Me.PreviousPosition.Extend(minion.PreviousPosition, 900)) >= 2)
                            {
                                Q.CastOnUnit(minion);
                                return;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 26
0
        private static void LaneClear()
        {
            if (GetMenuBool("Laneclear", "Q"))
            {
                var targetMinionEBuffed =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .FirstOrDefault(
                        minion =>
                        minion.IsEnemy && minion.IsValid && minion.Distance(Me) <= Q.Range &&
                        minion.Health < Q.GetDamage(minion) && minion.HasBuff(UrgotEBuffName));

                if (!Equals(targetMinionEBuffed, null))
                {
                    Q2.Cast(targetMinionEBuffed);
                }

                var targetMinion =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .FirstOrDefault(
                        minion =>
                        minion.IsEnemy && minion.IsValid && minion.Distance(Me) <= Q.Range &&
                        minion.Health < Q.GetDamage(minion));

                if (!Equals(targetMinion, null))
                {
                    Q.Cast(targetMinion);
                }
            }
        }
Exemplo n.º 27
0
        private void CastQe(AIHeroClient target, string source)
        {
            if (target == null)
            {
                return;
            }

            if (W.IsReady())
            {
                Vector3 wVec = Player.Position + Vector3.Normalize(target.Position - Player.Position) * W.Range;

                var qPred = Util.GetP(wVec, Q, target, W.Delay + Q.Delay, true);

                if ((Q.IsReady()) && (E.IsReady()) && Player.Distance(target.Position) < Q.Range - 75 && qPred.Hitchance >= Q.MinHitChance)
                {
                    var vec        = target.Position - Player.Position;
                    var castBehind = qPred.CastPosition + Vector3.Normalize(vec) * 75;

                    W.Cast(wVec);
                    Utility.DelayAction.Add((int)W.Delay + 100, () => Q2.Cast(castBehind));
                    Utility.DelayAction.Add((int)(W.Delay + Q.Delay) + 100, () => E.Cast(castBehind));
                }
            }

            if (source == "insec")
            {
                if (!target.IsValidTarget(R.Range))
                {
                    return;
                }
                var turret        = GameObjects.AllyTurrets.Where(t => t.Distance(target) <= t.GetRealAutoAttackRange() + 150 + 450).FirstOrDefault();
                var allys         = GameObjects.AllyHeroes.Where(a => a.DistanceToPlayer() > a.Distance(target)).OrderByDescending(a => a.Health);
                var allyHealthTop = allys.FirstOrDefault();

                if (allyHealthTop != null)
                {
                    if (turret == null)
                    {
                        R.Cast(allyHealthTop.Position);
                    }
                    else
                    {
                        var allyUnderTurret = allys.Where(a => a.UnderAllyTurret()).OrderByDescending(a => a.Health).FirstOrDefault();
                        if (allyUnderTurret != null)
                        {
                            R.Cast(allyUnderTurret.Position);
                        }
                        else
                        {
                            R.Cast(turret.Position);
                        }
                    }
                }
                else if (turret != null)
                {
                    R.Cast(turret.Position);
                }
            }
        }
Exemplo n.º 28
0
        private void AutoQ()
        {
            if (!Q.IsReady() || !menu.Item("Q_Auto", true).GetValue <KeyBind>().Active || Environment.TickCount - E.LastCastAttemptT < 250 + Game.Ping)
            {
                return;
            }

            if (!ThirdQ())
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (!target.IsValidTarget(Q.Range))
                {
                    return;
                }

                if (menu.Item("Q_UnderTower", true).GetValue <bool>() && target.UnderTurret(true))
                {
                    return;
                }

                if (!menu.Item("predMode", true).GetValue <bool>())
                {
                    if (Player.Distance(target) < 150)
                    {
                        Q.Cast(target.ServerPosition, packets());
                    }
                    else
                    {
                        Q.Cast(target, packets());
                    }
                }
                else
                {
                    CastBasicSkillShot(Q, Q.Range, TargetSelector.DamageType.Physical, GetHitchance("Combo"), menu.Item("Q_UnderTower", true).GetValue <bool>());
                }
            }
            else if (ThirdQ())
            {
                var target = TargetSelector.GetTarget(Q2.Range, TargetSelector.DamageType.Physical);
                if (!target.IsValidTarget(Q2.Range))
                {
                    return;
                }

                if (!menu.Item("predMode", true).GetValue <bool>())
                {
                    if (menu.Item("Q_UnderTower", true).GetValue <bool>() && target.UnderTurret(true))
                    {
                        return;
                    }

                    Q2.Cast(target, packets());
                }
                else
                {
                    CastBasicSkillShot(Q2, Q2.Range, TargetSelector.DamageType.Physical, GetHitchance("Combo"), menu.Item("Q_UnderTower", true).GetValue <bool>());
                }
            }
        }
Exemplo n.º 29
0
 private static void Clear()
 {
     if (getCheckBoxItem(clearMenu, "E") && E.IsReady())
     {
         var minionObj = GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
         if (minionObj.Any())
         {
             var pos = E.GetCircularFarmLocation(minionObj.Cast <Obj_AI_Base>().ToList());
             if (pos.MinionsHit > 1)
             {
                 if (E.Cast(pos.Position, getCheckBoxItem(miscMenu, "Packet")))
                 {
                     if (getCheckBoxItem(clearMenu, "Q") && Q.IsReady())
                     {
                         Q.Cast(pos.Position, getCheckBoxItem(miscMenu, "Packet"));
                     }
                     return;
                 }
             }
             else
             {
                 var obj = minionObj.FirstOrDefault(i => i.MaxHealth >= 1200);
                 if (obj != null && E.Cast(obj, getCheckBoxItem(miscMenu, "Packet")).IsCasted())
                 {
                     return;
                 }
             }
         }
     }
     if (getCheckBoxItem(clearMenu, "Q") && Q.IsReady())
     {
         var minionObj =
             GetMinions(Q2.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth)
             .Cast <Obj_AI_Base>()
             .ToList();
         if (minionObj.Any() &&
             (!getCheckBoxItem(clearMenu, "E") || !E.IsReady() ||
              (E.IsReady() && E.GetCircularFarmLocation(minionObj).MinionsHit == 1)))
         {
             if (getCheckBoxItem(clearMenu, "E") &&
                 Flag.Where(i => minionObj.Count(a => Q2.WillHit(a, i.ServerPosition)) > 1)
                 .Any(i => Q.Cast(i.ServerPosition, getCheckBoxItem(miscMenu, "Packet"))))
             {
                 return;
             }
             var pos = Q.GetLineFarmLocation(minionObj.Where(i => Q.IsInRange(i)).ToList());
             if (pos.MinionsHit > 0 && Q.Cast(pos.Position, getCheckBoxItem(miscMenu, "Packet")))
             {
                 return;
             }
         }
     }
     if (getCheckBoxItem(clearMenu, "W") && W.IsReady() &&
         Player.HealthPercent < getSliderItem(clearMenu, "WHpU") &&
         GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly).Any() &&
         W.Cast(getCheckBoxItem(miscMenu, "Packet")))
     {
     }
 }
Exemplo n.º 30
0
 public void useQ2(Obj_AI_Base target)
 {
     if (!Q2.IsReady() || target == null || !player.IsBurrowed())
     {
         return;
     }
     Q2.Cast(target);
 }