Пример #1
0
        private void Orbwalking_AfterAttack(AttackableUnit target, EventArgs args)
        {
            if (target.Type == GameObjectType.AIHeroClient)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (getCheckBoxItem(comboMenu, "qCombo"))
                    {
                        if (target.LSIsValidTarget(_q.Range))
                        {
                            if (_q.IsReady())
                            {
                                _q.CastOnUnit(target as Obj_AI_Base);
                            }
                        }
                    }
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None))
                {
                    if (getCheckBoxItem(harassMenu, "qHarass"))
                    {
                        if (target.LSIsValidTarget(_q.Range))
                        {
                            if (_q.IsReady())
                            {
                                _q.CastOnUnit(target as Obj_AI_Base);
                            }
                        }
                    }
                }
            }
        }
Пример #2
0
 private static void SolvingWaitList()
 {
     if (!Q.IsReady(1000))
     {
         Qstate = 1;
     }
     if (waitQ == true && TTTar.LSIsValidTarget())
     {
         //if (Utils.GameTimeTickCount - cQ >= 350 + Player.AttackCastDelay - Game.Ping / 2)
         if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
         {
             if (Qmode == 0 && TTTar != null)
             {
                 Q.Cast(TTTar.Position);
             }
             else
             {
                 Q.Cast(Game.CursorPos);
             }
         }
         else
         {
             if (Qmode == 0 && TTTar != null)
             {
                 Q.Cast(TTTar.Position);
             }
             else
             {
                 Q.Cast(Game.CursorPos);
             }
         }
         if (Environment.TickCount - waitQTick >= 500 + Game.Ping / 2)
         {
             waitQ = false;
         }
     }
     if (waitR2 == true && TTTar.LSIsValidTarget())
     {
         R.Cast(TTTar as Obj_AI_Base);
         if (Environment.TickCount - waitQTick >= 500 + Game.Ping / 2)
         {
             waitQ = false;
         }
     }
     if (Q.IsReady() && UseQBeforeExpiry && !Player.LSIsRecalling())
     {
         if (Qstate != 1 && Utils.GameTimeTickCount - cQ <= 3800 - Game.Ping / 2 && Utils.GameTimeTickCount - cQ >= 3300 - Game.Ping / 2)
         {
             Q.Cast(Game.CursorPos);
         }
     }
 }
Пример #3
0
        private static void AfterAttack(AttackableUnit target, EventArgs args)
        {
            try
            {
                var enemy = target as Obj_AI_Base;
                if (enemy == null || !(target is AIHeroClient))
                {
                    return;
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                    Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                {
                    if (target.LSIsValidTarget(spells[Spells.Q].Range))
                    {
                        spells[Spells.Q].Cast();
                    }
                }
                ActiveModes.CastItems(enemy);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #4
0
        private static void OrbwalkingAfterAttack(AttackableUnit target, EventArgs args)
        {
            try
            {
                var enemy = target as Obj_AI_Base;
                if (enemy == null || !(target is AIHeroClient))
                {
                    return;
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                    Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                {
                    if (target.LSIsValidTarget(Q.Range))
                    {
                        Q.Cast();
                    }
                }

                if (getCheckBoxItem(comboMenu, "GFUELTalon.Combo.Items"))
                {
                    UseItems();
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #5
0
 public static void ForceSkill()
 {
     if (_forceQ && _qtarget != null && _qtarget.LSIsValidTarget(Spells._e.Range + Program.Player.BoundingRadius + 70) &&
         Spells._q.IsReady())
     {
         Spells._q.Cast(_qtarget.Position);
     }
     if (_forceW)
     {
         Spells._w.Cast();
     }
     if (_forceR && Spells._r.Instance.Name == IsFirstR)
     {
         Spells._r.Cast();
     }
     if (_forceItem && Items.CanUseItem(Item) && Items.HasItem(Item) && Item != 0)
     {
         Items.UseItem(Item);
     }
     if (_forceR2 && Spells._r.Instance.Name == IsSecondR)
     {
         var target = TargetSelector.SelectedTarget;
         if (target != null)
         {
             Spells._r.Cast(target.Position);
         }
     }
 }
Пример #6
0
 public static bool BadaoIsValidTarget(this AttackableUnit unit,
                                       float range    = float.MaxValue,
                                       bool checkTeam = true,
                                       Vector3 from   = new Vector3())
 {
     return(unit.LSIsValidTarget(range, checkTeam, from) && !unit.IsZombie);
 }
Пример #7
0
 public static float GetRealAutoAttackRange(AIHeroClient attacker, AttackableUnit target)
 {
     var result = attacker.AttackRange + attacker.BoundingRadius;
     if (target.LSIsValidTarget())
     {
         return result + target.BoundingRadius;
     }
     return result;
 }
Пример #8
0
 /// <summary>
 ///     Returns the auto-attack range of local player with respect to the target.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns>System.Single.</returns>
 public static float GetRealAutoAttackRange(AttackableUnit target)
 {
     var result = ObjectManager.Player.GetAutoAttackRange(target);
     if (target.LSIsValidTarget())
     {
         return result;
     }
     return result;
 }
Пример #9
0
        public static float GetRealAutoAttackRange(AIHeroClient attacker, AttackableUnit target)
        {
            var result = attacker.AttackRange + attacker.BoundingRadius;

            if (target.LSIsValidTarget())
            {
                return(result + target.BoundingRadius);
            }
            return(result);
        }
Пример #10
0
        /// <summary>
        ///     Returns the auto-attack range of local player with respect to the target.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>System.Single.</returns>
        public static float GetRealAutoAttackRange(AttackableUnit target)
        {
            var result = ObjectManager.Player.GetAutoAttackRange(target);

            if (target.LSIsValidTarget())
            {
                return(result);
            }
            return(result);
        }
Пример #11
0
 private static void AfterAttack(AttackableUnit target, EventArgs args)
 {
     if (target is AIHeroClient && target.LSIsValidTarget() && getCheckBoxItem(miscOptions, "com.itwitch.misc.Exploit"))
     {
         var tg = target as AIHeroClient;
         if (tg?.Health + 5 <= ObjectManager.Player.LSGetAutoAttackDamage(tg, true) && tg.Buffs.Any(b => b.Name.ToLower().Equals("twitchdeadlyvenom")))
         {
             Spells[SpellSlot.Q].Cast();
         }
     }
 }
Пример #12
0
        public static bool InAutoAttackRange(AttackableUnit target)
        {
            var baseTarget = (Obj_AI_Base)target;
            var myRange = AttackRange();

            if (baseTarget != null)
            {
                return baseTarget.IsHPBarRendered && Vector2.DistanceSquared(baseTarget.ServerPosition.ToVector2(), Me.ServerPosition.ToVector2()) <= myRange * myRange;
            }

            return target.LSIsValidTarget() && Vector2.DistanceSquared(target.Position.ToVector2(), Me.ServerPosition.ToVector2()) <= myRange * myRange;
        }
Пример #13
0
        /// <summary>
        /// Checks if target is in unit's auto attack range
        /// </summary>
        /// <param name="target">Target</param>
        /// <param name="_unit">Unit to check range</param>
        /// <returns>true if in auto attack range</returns>
        public static bool InAARange(AttackableUnit target, Obj_AI_Base _unit = null)
        {
            if (!target.LSIsValidTarget())
            {
                return(false);
            }

            Obj_AI_Base unit  = CorrectUnit(_unit);
            float       range = GetRealAARange(target, _unit);

            return(Vector2.DistanceSquared(target.Position.LSTo2D(), unit.ServerPosition.LSTo2D()) <= range * range);
        }
Пример #14
0
        public static bool InAutoAttackRange(AttackableUnit target)
        {
            var baseTarget = (Obj_AI_Base)target;
            var myRange    = AttackRange();

            if (baseTarget != null)
            {
                return(baseTarget.IsHPBarRendered && Vector2.DistanceSquared(baseTarget.ServerPosition.ToVector2(), Me.ServerPosition.ToVector2()) <= myRange * myRange);
            }

            return(target.LSIsValidTarget() && Vector2.DistanceSquared(target.Position.ToVector2(), Me.ServerPosition.ToVector2()) <= myRange * myRange);
        }
Пример #15
0
 private void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
 {
     Orbwalker.ForcedTarget = null;
     if (Q.IsReady() && target.LSIsValidTarget())
     {
         this.QLogic(target);
         if (UseQStackTransferBool)
         {
             this.QLogic(target);
         }
     }
 }
Пример #16
0
 /// <summary>
 ///     Returns true if the target is in auto-attack range.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public static bool InAutoAttackRange(AttackableUnit target)
 {
     if (!target.LSIsValidTarget())
     {
         return false;
     }
     var myRange = GetRealAutoAttackRange(target);
     return
         Vector2.DistanceSquared(
             target is Obj_AI_Base ? ((Obj_AI_Base)target).ServerPosition.To2D() : target.Position.To2D(),
             Player.ServerPosition.To2D()) <= myRange * myRange;
 }
Пример #17
0
 private void Orbwalker_OnPostAttack(AttackableUnit target, EventArgs args)
 {
     Orbwalker.ForcedTarget = null;
     var t = target as Obj_AI_Base;
     if (Q.IsReady() && target.LSIsValidTarget() && !t.IsMinion)
     {
         this.QLogic(target);
         if (UseQStackTransferBool)
         {
             this.QLogic(target);
         }
     }
 }
Пример #18
0
        public static bool InAutoAttackRange(AttackableUnit target)
        {
            if (!target.LSIsValidTarget())
            {
                return(false);
            }
            var myRange = GetRealAutoAttackRange(target);

            return
                (Vector2.DistanceSquared(
                     target is Obj_AI_Base ? ((Obj_AI_Base)target).ServerPosition.LSTo2D() : target.Position.LSTo2D(),
                     ObjectManager.Player.ServerPosition.LSTo2D()) <= myRange * myRange);
        }
Пример #19
0
        private static void AfterAttack(AttackableUnit target, EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if (getCheckBoxItem(comboMenu, "useE") && e.IsReady() && target is AIHeroClient && target.LSIsValidTarget(e.Range))
                {
                    e.Cast();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                if (getCheckBoxItem(clearMenu, "useEj") && e.IsReady() && target is Obj_AI_Minion && target.LSIsValidTarget(e.Range))
                {
                    e.Cast();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if ((getCheckBoxItem(miscMenu, "titanicC") || getCheckBoxItem(miscMenu, "ravenousC") ||
                     getCheckBoxItem(miscMenu, "tiamatC")) && !e.IsReady() && target is AIHeroClient &&
                    target.LSIsValidTarget(e.Range) && CommonUtilities.CheckItem())
                {
                    CommonUtilities.UseItem();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                if ((getCheckBoxItem(miscMenu, "titanicF") || getCheckBoxItem(miscMenu, "ravenousF") ||
                     getCheckBoxItem(miscMenu, "tiamatF")) && !e.IsReady() && target is Obj_AI_Minion &&
                    target.LSIsValidTarget(e.Range) && CommonUtilities.CheckItem())
                {
                    CommonUtilities.UseItem();
                }
            }
        }
Пример #20
0
        private static void ExecuteCastItems(AttackableUnit t)
        {
            foreach (var item in Common.CommonItems.ItemDb)
            {
                if (item.Value.ItemType == Common.CommonItems.EnumItemType.AoE &&
                    item.Value.TargetingType == Common.CommonItems.EnumItemTargettingType.EnemyHero)
                {
                    if (t is AIHeroClient && t.LSIsValidTarget(item.Value.Item.Range) && item.Value.Item.IsReady())
                    {
                        item.Value.Item.Cast();
                    }
                }

                if (item.Value.ItemType == Common.CommonItems.EnumItemType.Targeted &&
                    item.Value.TargetingType == Common.CommonItems.EnumItemTargettingType.EnemyHero)
                {
                    if (t.LSIsValidTarget(item.Value.Item.Range) && item.Value.Item.IsReady())
                    {
                        item.Value.Item.Cast((AIHeroClient)t);
                    }
                }
            }
        }
Пример #21
0
        public static float GetRealAutoAttackRange(AttackableUnit target)
        {
            var result = ObjectManager.Player.AttackRange + ObjectManager.Player.BoundingRadius;
            if (target.LSIsValidTarget())
            {
                var aiBase = target as Obj_AI_Base;
                if (aiBase != null && ObjectManager.Player.ChampionName == "Caitlyn")
                {
                    if (aiBase.HasBuff("caitlynyordletrapinternal"))
                    {
                        result += 650;
                    }
                }

                return result + target.BoundingRadius;
            }

            return result;
        }
Пример #22
0
        public static float GetRealAutoAttackRange(AttackableUnit target)
        {
            var result = ObjectManager.Player.AttackRange + ObjectManager.Player.BoundingRadius;

            if (target.LSIsValidTarget())
            {
                var aiBase = target as Obj_AI_Base;
                if (aiBase != null && ObjectManager.Player.ChampionName == "Caitlyn")
                {
                    if (aiBase.HasBuff("caitlynyordletrapinternal"))
                    {
                        result += 650;
                    }
                }

                return(result + target.BoundingRadius);
            }

            return(result);
        }
Пример #23
0
        private static void OrbwalkingOnAfterAttack(AttackableUnit target, EventArgs args)
        {
            if (!(target is AIHeroClient))
            {
                return;
            }

            if (!target.LSIsValidTarget())
            {
                return;
            }

            if (Hydra.IsReady())
            {
                Hydra.Cast();
            }
            else if (Tiamat.IsReady())
            {
                Tiamat.Cast();
            }
        }
Пример #24
0
 /// <summary>
 ///     Determines whether the unit is valid.
 /// </summary>
 /// <param name="unit">
 ///     The unit.
 /// </param>
 /// <param name="range">
 ///     The range.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 private static bool IsValidUnit(AttackableUnit unit, float range = 0f)
 {
     return unit.LSIsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange());
 }
Пример #25
0
 /// <summary>
 ///     Fires the after attack event.
 /// </summary>
 /// <param name="unit">The unit.</param>
 /// <param name="target">The target.</param>
 private static void FireAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (AfterAttack != null && target.LSIsValidTarget())
     {
         AfterAttack(unit, target);
     }
 }
Пример #26
0
 /// <summary>
 /// Checks if player can orbwalk given target from custom position
 /// </summary>
 /// <param name="target">Target</param>
 /// <param name="position">Custom position</param>
 /// <returns>true if can orbwalk target</returns>
 public bool CanOrbwalkTarget(AttackableUnit target, Vector3 position)
 {
     if (target.LSIsValidTarget())
     {
         if (target.Type == GameObjectType.AIHeroClient)
         {
             AIHeroClient hero = target as AIHeroClient;
             return position.LSDistance(hero.ServerPosition) - hero.BoundingRadius - hero.GetScalingRange() < Utility.GetAARange();
         }
         else
             return position.LSDistance(target.Position) - target.BoundingRadius < Utility.GetAARange();
     }
     return false;
 }
Пример #27
0
        private void Orbwalking_AfterAttack(AttackableUnit target, EventArgs args)
        {
            if (target.Type == GameObjectType.AIHeroClient)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    if (getCheckBoxItem(comboMenu, "qCombo"))
                        if (target.LSIsValidTarget(_q.Range))
                            if (_q.IsReady())
                                _q.CastOnUnit(target as Obj_AI_Base);
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None))
                {
                    if (getCheckBoxItem(harassMenu, "qHarass"))
                        if (target.LSIsValidTarget(_q.Range))
                            if (_q.IsReady())
                                _q.CastOnUnit(target as Obj_AI_Base);
                }
            }
        }
Пример #28
0
        /// <summary>
        /// Checks if player can orbwalk given target
        /// </summary>
        /// <param name="target">Target</param>
        /// <returns>true if can orbwalk target</returns>
        public bool CanOrbwalkTarget(AttackableUnit target)
        {
            if (target == null)
                return false;

            if (m_fnCanOrbwalkTarget != null)
                return m_fnCanOrbwalkTarget(target);

            if (target.LSIsValidTarget())
            {
                if (target.Type == GameObjectType.AIHeroClient)
                {
                    AIHeroClient hero = target as AIHeroClient;
                    return ObjectManager.Player.LSDistance(hero.ServerPosition) - hero.BoundingRadius - hero.GetScalingRange() + 20 < Utility.GetAARange();
                }
                else
                    return (target.Type != GameObjectType.obj_AI_Turret || m_Configuration.AttackStructures) && ObjectManager.Player.LSDistance(target.Position) - target.BoundingRadius + 20 < Utility.GetAARange();
            }
            return false;
        }
Пример #29
0
 /// <summary>
 /// Checks if player can orbwalk given target in custom range
 /// </summary>
 /// <param name="target">Target</param>
 /// <param name="range">Custom range</param>
 /// <returns>true if can orbwalk target</returns>
 public bool CanOrbwalkTarget(AttackableUnit target, float range)
 {
     if (target.LSIsValidTarget())
     {
         if (target.Type == GameObjectType.AIHeroClient)
         {
             AIHeroClient hero = target as AIHeroClient;
             return ObjectManager.Player.LSDistance(hero.ServerPosition) - hero.BoundingRadius - hero.GetScalingRange() + 10 < range + ObjectManager.Player.BoundingRadius + ObjectManager.Player.GetScalingRange();
         }
         else
             return ObjectManager.Player.LSDistance(target.Position) - target.BoundingRadius + 20 < range + ObjectManager.Player.BoundingRadius + ObjectManager.Player.GetScalingRange();
     }
     return false;
 }
Пример #30
0
        private static void ExecuteCastItems(AttackableUnit t)
        {
            foreach (var item in Common.CommonItems.ItemDb)
            {
                if (item.Value.ItemType == Common.CommonItems.EnumItemType.AoE
                    && item.Value.TargetingType == Common.CommonItems.EnumItemTargettingType.EnemyHero)
                {
                    if (t is AIHeroClient && t.LSIsValidTarget(item.Value.Item.Range) && item.Value.Item.IsReady())
                        item.Value.Item.Cast();
                }

                if (item.Value.ItemType == Common.CommonItems.EnumItemType.Targeted
                    && item.Value.TargetingType == Common.CommonItems.EnumItemTargettingType.EnemyHero)
                {
                    if (t.LSIsValidTarget(item.Value.Item.Range) && item.Value.Item.IsReady())
                        item.Value.Item.Cast((AIHeroClient)t);
                }
            }
        }
Пример #31
0
        /// <summary>
        /// Checks if target is in unit's auto attack range
        /// </summary>
        /// <param name="target">Target</param>
        /// <param name="_unit">Unit to check range</param>
        /// <returns>true if in auto attack range</returns>
        public static bool InAARange(AttackableUnit target, Obj_AI_Base _unit = null)
        {
            if (!target.LSIsValidTarget())
                return false;

            Obj_AI_Base unit = CorrectUnit(_unit);
            float range = GetRealAARange(target, _unit);
            return Vector2.DistanceSquared(target.Position.LSTo2D(), unit.ServerPosition.LSTo2D()) <= range * range;
        }
Пример #32
0
 private static void OnAfterAttack(AttackableUnit target, EventArgs args)
 {
     var combo = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo);
     var Q = getCheckBoxItem(comboMenu, "UseQC");
     if (!target.IsMe) return;
     if (combo && _q.IsReady() && Q && target.LSIsValidTarget(_q.Range))
     {
         _q.Cast();
     }
 }
Пример #33
0
        /// <summary>
        ///     Orbwalks a target while moving to Position.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="position">The position.</param>
        /// <param name="extraWindup">The extra windup.</param>
        /// <param name="holdAreaRadius">The hold area radius.</param>
        /// <param name="useFixedDistance">if set to <c>true</c> [use fixed distance].</param>
        /// <param name="randomizeMinDistance">if set to <c>true</c> [randomize minimum distance].</param>
        public static void Orbwalk(AttackableUnit target,
            Vector3 position,
            float extraWindup = 90,
            float holdAreaRadius = 0,
            bool useFixedDistance = true,
            bool randomizeMinDistance = true)
        {
            if (Utils.GameTimeTickCount - LastAttackCommandT < 68 + Math.Min(60, Game.Ping))
            {
                return;
            }

            if (BlockOrdersUntilTick - TickCount > 0)
            {
                return;
            }

            if (target.LSIsValidTarget() && (CanAttack()) && Attack)
            {
                DisableNextAttack = false;
                FireBeforeAttack(target);

                if (!DisableNextAttack)
                {
                    if (!NoCancelChamps.Contains(_championName))
                    {
                        _missileLaunched = false;
                    }

                    EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                    LastAATick = (Utils.GameTimeTickCount + Game.Ping / 2);
                    LastAttackCommandT = TickCount;
                    _lastTarget = target;
                    BlockOrdersUntilTick = TickCount + 70 + Math.Min(60, Game.Ping);
                }
            }

            if (!CanMove(extraWindup) || !Move)
                return;

            MoveTo(position, Math.Max(holdAreaRadius, 30), false, useFixedDistance, randomizeMinDistance);
        }
Пример #34
0
 private static bool CanUse(Spell spell, AttackableUnit target)
 {
     return(spell.IsReady() && Player.Mana >= spell.ManaCost && target.LSIsValidTarget(spell.Range));
 }
Пример #35
0
        private static void AfterAttack(AttackableUnit target, EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if (getCheckBoxItem(comboMenu, "useE") && e.IsReady() && target is AIHeroClient && target.LSIsValidTarget(e.Range))
                {
                    e.Cast();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                if (getCheckBoxItem(clearMenu, "useEj") && e.IsReady() && target is Obj_AI_Minion && target.LSIsValidTarget(e.Range))
                {
                    e.Cast();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                if ((getCheckBoxItem(miscMenu, "titanicC") || getCheckBoxItem(miscMenu, "ravenousC") ||
                     getCheckBoxItem(miscMenu, "tiamatC")) && !e.IsReady() && target is AIHeroClient &&
                    target.LSIsValidTarget(e.Range) && CommonUtilities.CheckItem())
                {
                    CommonUtilities.UseItem();
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                if ((getCheckBoxItem(miscMenu, "titanicF") || getCheckBoxItem(miscMenu, "ravenousF") ||
                     getCheckBoxItem(miscMenu, "tiamatF")) && !e.IsReady() && target is Obj_AI_Minion &&
                    target.LSIsValidTarget(e.Range) && CommonUtilities.CheckItem())
                {
                    CommonUtilities.UseItem();
                }
            }
        }
Пример #36
0
 /// <summary>
 ///     Returns true if the target is in auto-attack range.
 /// </summary>
 /// <param name="target">
 ///     The target.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 public static bool InAutoAttackRange(this AttackableUnit target)
 {
     return(target.LSIsValidTarget(target.GetRealAutoAttackRange()));
 }
Пример #37
0
 private static bool CanUse(Spell spell, AttackableUnit target)
 {
     return spell.IsReady() && Player.Mana >= spell.ManaCost && target.LSIsValidTarget(spell.Range);
 }
Пример #38
0
        private static void OrbwalkingOnAfterAttack(AttackableUnit target, EventArgs args)
        {
            if (!(target is AIHeroClient))
            {
                return;
            }

            if (!target.LSIsValidTarget())
            {
                return;
            }

            if (Hydra.IsReady())
            {
                Hydra.Cast();
            }
            else if (Tiamat.IsReady())
            {
                Tiamat.Cast();
            }
        }
Пример #39
0
        private static void OrbwalkingAfterAttack(AttackableUnit target, EventArgs args)
        {
            try
            {
                var enemy = target as Obj_AI_Base;
                if (enemy == null || !(target is AIHeroClient))
                {
                    return;
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)
                    || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
                {
                    if (target.LSIsValidTarget(Q.Range))
                    {
                        Q.Cast();
                    }
                }

                if (getCheckBoxItem(comboMenu, "GFUELTalon.Combo.Items"))
                {
                    UseItems();
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #40
0
 /// <summary>
 /// Magnets the hero to given target
 /// </summary>
 /// <param name="target">The target.</param>
 private void Magnet(AttackableUnit target)
 {
     if (!m_attackInProgress && !CanOrbwalkTarget(target))
     {
         if (ObjectManager.Player.AttackRange <= m_Configuration.StickRange)
         {
             if (target.LSIsValidTarget(m_Configuration.StickRange))
             {
                 /*expermential*/
                 OrbwalkingPoint = target.Position.LSExtend(ObjectManager.Player.ServerPosition, -(m_rnd.NextFloat(0.6f, 1.01f) + 0.2f) * 400);
                 /*expermential*/
             }
             else
                 OrbwalkingPoint = Vector3.Zero;
         }
         else
             OrbwalkingPoint = Vector3.Zero;
     }
     else
         OrbwalkingPoint = Vector3.Zero;
 }
Пример #41
0
 public static bool InWRange(AttackableUnit t) => t != null && t.LSIsValidTarget(WRange);
Пример #42
0
 public static bool InWRange(AttackableUnit t) => t != null && t.LSIsValidTarget(WRange);