Esempio n. 1
0
        private static void DashELogic(Obj_AI_Base target)
        {
            if (target.DistanceToPlayer() <= Me.GetFullAttackRange(target) ||
                target.DistanceToPlayer() > Me.GetFullAttackRange(target) + E.Range)
            {
                return;
            }

            var dashPos = Me.ServerPosition.Extend(Game.CursorPos, E.Range);

            if (dashPos.IsWall() && ComboOption.GetBool("ComboEWall").Enabled)
            {
                return;
            }

            if (dashPos.CountEnemyHeroesInRange(500) >= 3 && dashPos.CountAllyHeroesInRange(400) < 3 &&
                ComboOption.GetBool("ComboESafe").Enabled)
            {
                return;
            }

            var realRange = Me.BoundingRadius + target.BoundingRadius + Me.AttackRange;

            if (Me.ServerPosition.DistanceToMouse() > realRange * 0.60 &&
                !target.IsValidAutoRange() &&
                target.ServerPosition.Distance(dashPos) < realRange - 45)
            {
                E.Cast(dashPos);
            }
        }
Esempio n. 2
0
        public static bool CheckTarget(Obj_AI_Base target, float range = float.MaxValue)
        {
            if (target == null)
            {
                return(false);
            }

            if (target.DistanceToPlayer() > range)
            {
                return(false);
            }

            if (target.HasBuff("KindredRNoDeathBuff"))
            {
                return(false);
            }

            if (target.HasBuff("UndyingRage") && target.GetBuff("UndyingRage").EndTime - Game.Time > 0.3)
            {
                return(false);
            }

            if (target.HasBuff("JudicatorIntervention"))
            {
                return(false);
            }

            if (target.HasBuff("ChronoShift") && target.GetBuff("ChronoShift").EndTime - Game.Time > 0.3)
            {
                return(false);
            }

            return(!target.HasBuff("FioraW"));
        }
Esempio n. 3
0
        private static void LogicCast(Obj_AI_Base target)
        {
            if (!R.IsReady() || !Menu.Item("ComboR", true).GetValue <bool>() || target.DistanceToPlayer() > R.Range)
            {
                return;
            }

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

            if (HaveQPassive(target))
            {
                R.Cast(target, true);
            }

            if (Menu.Item("ComboSecondR", true).GetValue <bool>() && Utils.TickCount - LastRCast > 800 && Qcd >= 3)
            {
                if (target.Health + target.MagicShield + target.HPRegenRate < Me.GetSpellDamage(target, SpellSlot.R))
                {
                    R.Cast(target);
                }
            }
        }
Esempio n. 4
0
        private static float GetEDmg(Obj_AI_Base target)
        {
            float minDmg = E.GetDamage(target), maxDmg = E.GetDamage(target, DamageStage.Empowered);

            return(buffE != null
                       ? (Game.Time - buffE.StartTime >= 1
                              ? maxDmg
                              : minDmg + (Game.Time - buffE.StartTime) * (maxDmg - minDmg))
                       : (target.DistanceToPlayer() < 200 ? maxDmg : minDmg));
        }
Esempio n. 5
0
        private bool UseSpell(Obj_AI_Base target)
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                if (Menu.Item("SmartCombo", true).GetValue <bool>())
                {
                    return(!(target.DistanceToPlayer() <= W.Range) || IsLowAttackSpell);
                }

                return(true);
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                if (Menu.Item("SmartJungle", true).GetValue <bool>())
                {
                    return(!(target.DistanceToPlayer() <= W.Range) || IsLowAttackSpell);
                }

                return(true);
            }

            return(false);
        }
Esempio n. 6
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            //if (sender.IsMe && args.Slot == SpellSlot.Q)
            //{
            //    //평큐평
            //    Variables.Orbwalker.ResetSwingTimer();
            //}

            //적 점멸 쓴곳에 E 날리기
            if (Config.Auto.AutoE.UseEFlash &&
                SpellManager.E.IsReady() &&
                sender.IsEnemy &&
                args.SData.Name.Equals("summonerflash", StringComparison.OrdinalIgnoreCase) &&
                sender.DistanceToPlayer() <= 1125)
            {
                var flashPosition = sender.Distance(args.End) > 450 ? sender.ServerPosition.Extend(args.End, 450) : args.End;
                //시야 확인 API 추가 예정
                SpellManager.E.Cast(flashPosition);
            }
        }
Esempio n. 7
0
        private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (sender == null || !sender.IsEnemy || !sender.IsMelee() || sender.ObjectType != GameObjectType.AIHeroClient || Args.Target == null || !Args.Target.IsMe)
            {
                return;
            }

            if (MiscOption.GetBool("QMelee") && Q.IsReady())
            {
                if (sender.DistanceToPlayer() <= 300 && Me.HealthPercent <= 40)
                {
                    if (sender.Health < Me.GetAutoAttackDamage(sender) * 2)
                    {
                        return;
                    }

                    if (Me.CanMoveMent())
                    {
                        Q.Cast(Me.Position.Extend(sender.Position, -300), true);
                    }
                }
            }
        }
Esempio n. 8
0
 private static bool CastEFirst(Obj_AI_Base target)
 {
     return EFirst && E.CanCast(target) && E.IsActive() && target.DistanceToPlayer() > 50 &&
            E.Cast(target).IsCasted();
 }
Esempio n. 9
0
 public static int TravelTime(this LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
 {
     return (int)((target.DistanceToPlayer() / spell.Speed) + (Math.Abs(spell.Delay + Game.Ping)));
 }
Esempio n. 10
0
 private static bool CastEFirst(Obj_AI_Base target)
 {
     return(EFirst && E.CanCast(target) && E.IsActive() && target.DistanceToPlayer() > 50 &&
            E.Cast(target).IsCasted());
 }
Esempio n. 11
0
 public static int TravelTime(this LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
 {
     return((int)((target.DistanceToPlayer() / spell.Speed) + (Math.Abs(spell.Delay + Game.Ping))));
 }
Esempio n. 12
0
 private static Vector2 PosAfterE(Obj_AI_Base target)
 {
     return Player.ServerPosition.ToVector2()
         .Extend(
             target.ServerPosition,
             target.DistanceToPlayer() < 410 ? E.Range : target.DistanceToPlayer() + 65);
 }
Esempio n. 13
0
 public static int TravelTime(this Spell spell, Obj_AI_Base target)
 {
     return((int)(((target.DistanceToPlayer() / spell.Speed) * 1000) + (Math.Abs(spell.Delay + Game.Ping) / 2)));
 }