예제 #1
0
 private static void checkHar()
 {
     if (!Config.Item("AutoRHar").GetValue <bool>() || Config.Item("AutoRMana").GetValue <Slider>().Value > Player.ManaPercentage() || Player.ServerPosition.UnderTurret(true))
     {
         return;
     }
     if (R1.IsReady())
     {
         var bigMiss = isBigMissle();
         List <AIHeroClient> targets = ObjectManager.Get <AIHeroClient>().Where(x => x.IsEnemy && x.IsValidTarget(bigMiss ? R2.Range : R1.Range) && !x.IsZombie && !x.HasBuffOfType(BuffType.Invulnerability) && R1.CanCast(x)).ToList();
         foreach (var target in targets)
         {
             if (Config.Item("Har." + target.BaseSkinName).GetValue <bool>())
             {
                 if (!ccd(target) && Config.Item("ccdOnly").GetValue <bool>() || Config.Item("AutoRMisCount").GetValue <Slider>().Value > Player.Spellbook.GetSpell(SpellSlot.R).Ammo)
                 {
                     return;
                 }
                 else
                 {
                     if (bigMiss)
                     {
                         R2.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                     }
                     else
                     {
                         R1.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                     }
                 }
             }
         }
     }
 }
예제 #2
0
        private static void Combo()
        {
            var useQCombo = Config.Item("QuseCombo").GetValue <bool>();
            var useECombo = Config.Item("EuseCombo").GetValue <bool>();
            var useRCombo = Config.Item("RuseCombo").GetValue <bool>();

            if (Q.IsReady() && useQCombo)
            {
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t == null)
                {
                    return;
                }
                Q.CastIfHitchanceEquals(t, qHitChance);
            }

            if (E.IsReady() && useECombo)
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t == null)
                {
                    return;
                }
                E.Cast(t);
            }
            var bigMiss = isBigMissle();

            if (bigMiss ? R2.IsReady() : R1.IsReady() && useRCombo)
            {
                var t = TargetSelector.GetTarget(bigMiss ? R2.Range : R1.Range, TargetSelector.DamageType.Magical);
                if (t == null)
                {
                    return;
                }
                if (!bigMiss)
                {
                    R1.CastIfHitchanceEquals(t, rHitChance);
                }
                else
                {
                    R2.CastIfHitchanceEquals(t, rHitChance);
                }
            }
        }
예제 #3
0
        private static void laneClear()
        {
            var Qmana = Config.Item("ManaFarmQ").GetValue <Slider>().Value;
            var Emana = Config.Item("ManaFarmE").GetValue <Slider>().Value;
            var Rmana = Config.Item("ManaFarmR").GetValue <Slider>().Value;
            var useQ  = Config.Item("QLC").GetValue <bool>();
            var useE  = Config.Item("ELC").GetValue <bool>();
            var useR  = Config.Item("RLC").GetValue <bool>();
            var useR2 = Config.Item("BigRClear").GetValue <bool>();
            //var miniR = Config.Item("miniClear").GetValue<bool>();
            var Qcount         = Config.Item("QFarmCount").GetValue <Slider>().Value;
            var Ecount         = Config.Item("EFarmCount").GetValue <Slider>().Value;
            var Rcount         = Config.Item("RFarmCount").GetValue <Slider>().Value;
            var MisCount       = Config.Item("RMisCount").GetValue <Slider>().Value;
            var Ammo           = Player.Spellbook.GetSpell(SpellSlot.R).Ammo;
            var BigMissile     = isBigMissle();
            var harrassinclear = Config.Item("HarInClear").GetValue <bool>();
            var missiles       = Config.Item("AutoRMisCount").GetValue <Slider>().Value;
            var useQHar        = Config.Item("QHar").GetValue <bool>();
            var useEHar        = Config.Item("EHar").GetValue <bool>();
            var useRHar        = Config.Item("RHar").GetValue <bool>();
            var useQHarMana    = Config.Item("QHarMana").GetValue <Slider>().Value;
            var useRHarMana    = Config.Item("RHarMana").GetValue <Slider>().Value;

            if (_Ob.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && !Orbwalking.CanAttack() && R1.IsReady() && useR && Player.ManaPercentage() > Rmana)
            {
                if (BigMissile)
                {
                    return;
                }

                if (Ammo > MisCount)
                {
                    List <Obj_AI_Base> killableMinions = MinionManager.GetMinions(R1.Range, MinionTypes.All).Where(x => x.Health <= Player.GetAutoAttackDamage(x)).ToList();
                    if (killableMinions.Count >= 2)
                    {
                        var farthestMinion = killableMinions.OrderBy(x => x.Distance(Player.Position)).First();
                        if (R1.GetDamage(farthestMinion) >= farthestMinion.Health)
                        {
                            R1.Cast(farthestMinion);
                        }
                    }
                }
            }

            if (Q.IsReady() && useQ && Player.ManaPercentage() > Qmana)
            {
                List <Obj_AI_Base> QMinionsRange = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                List <int>         qRangeCount   = new List <int>();
                foreach (var minion in QMinionsRange)
                {
                    List <Obj_AI_Base> qMinions = MinionManager.GetMinions(minion.Position, Q.Width, MinionTypes.All, MinionTeam.NotAlly);
                    qRangeCount.Add(qMinions.Count());
                }
                if (qRangeCount.Max() >= Qcount)
                {
                    Q.Cast(QMinionsRange[qRangeCount.IndexOf(qRangeCount.Max())]);
                }
            }

            if (E.IsReady() && useE && Player.ManaPercentage() > Emana)
            {
                List <Obj_AI_Base> EMinions = MinionManager.GetMinions(Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly);
                if (EMinions.Count >= Ecount)
                {
                    E.Cast(EMinions[0]);
                }
            }

            if (BigMissile ? R2.IsReady() : R1.IsReady() && useR && (Ammo > MisCount) && Player.ManaPercentage() > Rmana)
            {
                if (BigMissile && !useR2)
                {
                    return;
                }

                List <Obj_AI_Base> RMinionsRange = MinionManager.GetMinions(Player.ServerPosition, (BigMissile ? R2.Range : R1.Range), MinionTypes.All, MinionTeam.NotAlly);
                List <int>         rRangeCount   = new List <int>();
                foreach (var minion in RMinionsRange)
                {
                    List <Obj_AI_Base> rMinions = MinionManager.GetMinions(minion.Position, BigMissile ? 300f : 200f, MinionTypes.All, MinionTeam.NotAlly);
                    rRangeCount.Add(rMinions.Count());
                }
                if (rRangeCount.Max() >= Rcount)
                {
                    if (BigMissile)
                    {
                        R2.Cast(RMinionsRange[rRangeCount.IndexOf(rRangeCount.Max())], false, true);
                    }
                    else
                    {
                        R1.Cast(RMinionsRange[rRangeCount.IndexOf(rRangeCount.Max())], false, true);
                    }
                }
            }

            if (Q.IsReady() && harrassinclear && useQHar && Player.ManaPercentage() >= useQHarMana)
            {
                if (Player.ServerPosition.UnderTurret(true))
                {
                    return;
                }

                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t == null)
                {
                    return;
                }
                Q.CastIfHitchanceEquals(t, HitChance.VeryHigh);
            }

            if (BigMissile ? R2.IsReady() : R1.IsReady() && harrassinclear && useRHar && Player.Spellbook.GetSpell(SpellSlot.R).Ammo >= missiles && Player.ManaPercentage() >= useRHarMana)
            {
                if (Player.ServerPosition.UnderTurret(true))
                {
                    return;
                }

                var t = TargetSelector.GetTarget(BigMissile ? R2.Range : R1.Range, TargetSelector.DamageType.Magical);
                if (t == null)
                {
                    return;
                }
                if (!BigMissile)
                {
                    R1.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                }
                else
                {
                    R2.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                }
            }
        }