Esempio n. 1
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var rTarget = TargetSelector.GetTarget(R.Range, DamageType.Physical);

            if (rTarget != null && args.IsAutoAttack() && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (E.IsReady() && R.IsReady() && (Player.Instance.Mana - EMana - RMana > 0) &&
                    rTarget.CountEnemiesInRange(600) <= 2 &&
                    !rTarget.HasUndyingBuffA() && !rTarget.Position.IsVectorUnderEnemyTower())
                {
                    var damage = GetComboDamage(rTarget, 2);

                    if (damage >= rTarget.TotalHealthWithShields())
                    {
                        R.AllowedCollisionCount = int.MaxValue;

                        var rPred = R.GetPrediction(rTarget);

                        if (rPred.HitChancePercent >= 65)
                        {
                            R.Cast(rPred.CastPosition);

                            R.AllowedCollisionCount = -1;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 internal static void ChecarSendoatacado(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!Multi["AtvSeg"].Cast <KeyBind>().CurrentValue)
     {
         return;
     }
     if (sender.IsMe)
     {
         if (!args.IsAutoAttack())
         {
             UltCast = Environment.TickCount;
         }
     }
     if (!sender.IsEnemy || sender.Distance(Eu) >= 1000)
     {
         return;
     }
     if (args.Target == null)
     {
         return;
     }
     if (!args.Target.IsMe)
     {
         return;
     }
     Fugir    = true;
     MeAtacou = sender;
 }
Esempio n. 3
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var target     = args.Target as Obj_AI_Base;
            var senderHero = sender as AIHeroClient;

            if (args.IsAutoAttack())
            {
                return;
            }
            if (senderHero != null && senderHero.IsEnemy)
            {
                if (target != null && target.IsAlly)
                {
                    var targettedSpell = new TargetSpell(target, senderHero, senderHero.Hero, args.Slot);
                    TargettedSpells.Add(targettedSpell);
                    Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80);
                }
                if (target == null)
                {
                    var notMissile = new NotMissile(args.Start, args.End, senderHero, senderHero.Hero, args.Slot, args.SData.Name);
                    NotMissiles.Add(notMissile);
                    Core.DelayAction(() => NotMissiles.Remove(notMissile), 80);
                }
            }
        }
Esempio n. 4
0
 static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && args.IsAutoAttack() && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         var target = args.Target as AIHeroClient;
         if (target != null && )
     }
 }
Esempio n. 5
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMelee || !args.IsAutoAttack())
            {
                return;
            }

            OnPostBasicAttack?.Invoke(sender, new PostBasicAttackArgs(sender, args.Target, args.End, args.Start, sender.NetworkId, sender.Team));
        }
        internal static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var random = new Random();
            int randomNumber;

            if (sender.IsAlly || !Settings.UseW)
            {
                return;
            }
            if (args.Target == null)
            {
                /*Logger.Debug("Seriously WTF!");
                 * Logger.Debug("WTF? args.SData.Name: " + args.SData.Name);
                 * Logger.Debug("WTF? sender.Distance(args.End): " + sender.Distance(args.End));
                 * Logger.Debug("WTF? Start: " + args.Start);
                 * Logger.Debug("WTF? Player.Instance.ServerPosition: " + Player.Instance.ServerPosition);
                 * Logger.Debug("WTF? PredictLinearMissile: " + PredictLinearMissile(Player.Instance, sender.Distance(args.End), 300, 0, 1000, 2, args.Start, true).HitChancePercent);
                 * Logger.Debug("WTF? PredictLinearMissile > 11: " + (PredictLinearMissile(Player.Instance, sender.Distance(args.End), 300, 0, 1000, 2, args.Start, true)
                 *      .HitChancePercent > 15));*/
                if (args.End.IsInRange(Player.Instance.ServerPosition, 100) ||
                    (Prediction.Position.PredictLinearMissile(Player.Instance, sender.Distance(args.End), 300, 0, 1000, 2, args.Start, true).HitChancePercent > 15))
                {
                    randomNumber = Settings.UseHumanizer ? random.Next(10, 100) : 0;
                    Core.DelayAction(delegate { SpellManager.W.Cast(); }, randomNumber);
                }
            }

            if (args.Target == null || sender.IsMinion || !args.Target.IsMe)
            {
                return;
            }
            var hero = sender as AIHeroClient;

            if (hero == null)
            {
                return;
            }
            if (args.IsAutoAttack())
            {
                if (hero.GetAutoAttackDamage(Player.Instance) < Player.Instance.Health / 16)
                {
                    return;
                }
            }
            else
            {
                if (hero.GetSpellDamage(Player.Instance, args.Slot) < Player.Instance.Health / 16)
                {
                    return;
                }
            }
            randomNumber = Settings.UseHumanizer ? random.Next(10, 100) : 0;
            Core.DelayAction(delegate { SpellManager.W.Cast(); }, randomNumber);
        }
Esempio n. 7
0
 public static void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsDead || !sender.IsMe)
     {
         return;
     }
     if (args.IsAutoAttack() || Game.Time - PassiveTimer > 2)
     {
         PassiveUp = false;
     }
     if (args.Slot == SpellSlot.Q)
     {
         Orbwalker.ResetAutoAttack();
     }
 }
Esempio n. 8
0
        private static SkillshotData GetData(Obj_AI_Base caster, GameObjectProcessSpellCastEventArgs args, MissileClient missile = null)
        {
            var spellName    = args?.SData.Name ?? missile?.SData.Name;
            var slot         = args?.Slot ?? missile?.Slot;
            var target       = (args?.Target ?? missile?.Target) as Obj_AI_Base;
            var isAutoAttack = (args?.IsAutoAttack() ?? missile?.IsAutoAttack()).GetValueOrDefault();

            SkillshotData result = SkillshotDatabase.Current.FirstOrDefault(s =>
                                                                            s.IsCasterName(caster.BaseSkinName) && (missile != null || s.IsSlot(slot)) && s.HasBuff(caster) &&
                                                                            ((missile == null && s.IsSpellName(spellName)) || (args == null && s.IsMissileName(spellName))) &&
                                                                            (!s.DetectByMissile || missile != null) &&
                                                                            (!(s.EndSticksToTarget || s.StartsFromTarget || s.IsAutoAttack) || (target != null && !target.IsMe)) &&
                                                                            (!isAutoAttack || s.IsAutoAttack));

            return(result);
        }
Esempio n. 9
0
        private void AiHeroClientOnOnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!args.IsAutoAttack())
            {
                return;
            }

            if (sender.IsMe && args.Target is AIHeroClient)
            {
                Core.RepeatAction(() => E.Cast(me), 0, 1000);
            }
            else if (sender.IsAlly && sender.Distance(me) <= E.Range && menu.Get <CheckBox>("AutoE").CurrentValue&&
                     Q.IsReady() &&
                     args.Target is AIHeroClient)
            {
                E.Cast(sender);
            }
        }
Esempio n. 10
0
        /*Combo*/

        /*Enemy AutoAttack Use E*/
        private static void AutoAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.Equals(Orbwalker.ActiveModes.Combo))
            {
                return;
            }
            var hero   = sender as AIHeroClient;
            var target = args.Target as AIHeroClient;

            if (!_e.IsReady() || hero == null || !hero.IsValid || target == null || !target.IsValid || target.IsMe && !hero.IsEnemy || !_combo["AAuseE"].Cast <CheckBox>().CurrentValue)
            {
                return;
            }
            var allian = EntityManager.Heroes.Allies.FirstOrDefault(x => x.Distance(x.Position) < 200 && args.IsAutoAttack() && !x.IsMe);

            if (allian == null || !(Braum.Distance(allian.Position) < 200) || !args.IsAutoAttack() || !(allian.HealthPercent <= _combo["alliedHeal"].Cast <Slider>().CurrentValue))
            {
                return;
            }
            _e.Cast(hero.Position);
        }
Esempio n. 11
0
 internal static void CheckSkill(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!sender.IsMe || args.IsAutoAttack())
     {
         return;
     }
     if (!Player.Instance.Spellbook.GetSpell(args.Slot).IsReady)
     {
         args.Process = false;
         BlockCkick   = BlockCkick + 1;
         return;
     }
     if (!Safe)
     {
         args.Process = false;
         BlockCkick   = BlockCkick + 1;
         return;
     }
     Cliks   = Cliks + 1;
     UltCast = Environment.TickCount;
 }
Esempio n. 12
0
 private static void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe)
     {
         if (args.IsAutoAttack())
         {
             if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
             {
                 if (ShouldAA)
                 {
                     Orbwalker.ResetAutoAttack();
                     if (Player.Instance.IsInAutoAttackRange(args.Target as AttackableUnit))
                     {
                         Player.IssueOrder(GameObjectOrder.AttackTo, args.Target);
                     }
                     ShouldAA = false;
                     return;
                 }
                 if (ShouldQ)
                 {
                     SpellManager.Q.Cast();
                     Orbwalker.ResetAutoAttack();
                     if (Player.Instance.IsInAutoAttackRange(args.Target as AttackableUnit))
                     {
                         Player.IssueOrder(GameObjectOrder.AttackTo, args.Target);
                     }
                     ShouldAA = true;
                     ShouldQ  = false;
                     return;
                 }
             }
         }
         if (args.Slot == SpellSlot.Q)
         {
             Orbwalker.ResetAutoAttack();
         }
     }
 }
Esempio n. 13
0
 private static void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe)
     {
         if (args.IsAutoAttack())
         {
             if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
             {
                 if (ShouldAA)
                 {
                     Orbwalker.ResetAutoAttack();
                     if (Player.Instance.IsInAutoAttackRange(args.Target as AttackableUnit))
                     {
                         Player.IssueOrder(GameObjectOrder.AttackTo, args.Target);
                     }
                     ShouldAA = false;
                     return;
                 }
                 if (ShouldQ)
                 {
                     SpellManager.Q.Cast();
                     Orbwalker.ResetAutoAttack();
                     if (Player.Instance.IsInAutoAttackRange(args.Target as AttackableUnit) )
                     {
                         Player.IssueOrder(GameObjectOrder.AttackTo, args.Target);
                     }
                     ShouldAA = true;
                     ShouldQ = false;
                     return;
                 }
             }
         }
         if (args.Slot == SpellSlot.Q)
         {
             Orbwalker.ResetAutoAttack();
         }
     }
 }
Esempio n. 14
0
 internal static void ChecarSendoatacado(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!Multi["AtvSeg"].Cast <KeyBind>().CurrentValue)
     {
         return;
     }
     if (sender.IsMe)
     {
         if (args.IsAutoAttack())
         {
             return;
         }
         UltCast = Environment.TickCount;
         if (Environment.TickCount <= UltCast + 300 || Environment.TickCount <= UltClick + 500)
         {
             args.Process = false;
         }
     }
     if (sender.Distance(Eu) >= 1300 || !sender.IsEnemy)
     {
         return;
     }
     if (args.Target == null)
     {
         return;
     }
     if (!sender.IsEnemy || !args.Target.IsMe)
     {
         return;
     }
     if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
     {
         Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.None;
     }
     Fugir    = true;
     MeAtacou = sender;
 }
Esempio n. 15
0
 private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     var target = args.Target as Obj_AI_Base;
     var senderHero = sender as AIHeroClient;
     if (args.IsAutoAttack()) return;
     if (senderHero != null && senderHero.IsEnemy)
     {
         if (target != null && target.IsAlly)
         {
             var targettedSpell = new TargetSpell(target, senderHero, senderHero.Hero, args.Slot);
             TargettedSpells.Add(targettedSpell);
             Core.DelayAction(() => TargettedSpells.Remove(targettedSpell), 80);
         }
     }
 }
Esempio n. 16
0
 static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     //Chat.Print(args.IsAutoAttack());
     if (sender.IsMe && args.IsAutoAttack() && Hydra != null && Hydra.IsReady() && args.Target is AIHeroClient)
     {
         Hydra.Cast();
     }
 }
Esempio n. 17
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var heroSender = sender;
            var target     = args.Target as AIHeroClient;

            if (heroSender == null || heroSender is Obj_AI_Turret || target == null || Champions.All(x => target.NetworkId != x) || !args.IsAutoAttack() || target.Team == heroSender.Team)
            {
                return;
            }

            if (IncomingDamages.ContainsKey(target.NetworkId))
            {
                IncomingDamages[target.NetworkId].Damage += heroSender.GetAutoAttackDamage(target, true);
            }
            else
            {
                IncomingDamages.Add(target.NetworkId, new IncomingDamageArgs
                {
                    Sender      = heroSender,
                    Target      = target,
                    Tick        = (int)Game.Time * 1000,
                    Damage      = heroSender.GetAutoAttackDamage(target, true),
                    IsTargetted = true
                });
            }
            Console.WriteLine("[DEBUG] AutoAttack [" + target.Hero + "] " + heroSender.GetAutoAttackDamage(target, true));
        }
Esempio n. 18
0
 static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && args.IsAutoAttack())
         debugDictionary["OLD"] = Core.GameTickCount+"";
 }
Esempio n. 19
0
        private static void AfterAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (args.SData.Name == "ItemTitanicHydraCleave")
            {
                // because we want another auto after this
                Orbwalker.ResetAutoAttack();
                return;
            }
            if (!args.IsAutoAttack())
            {
                return;
            }
            Utils.Debug("ondos " + Core.GameTickCount);
            var target = args.Target as AttackableUnit;

            if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None && target != null && target.IsValidTarget())
            {
                if (!Q.IsReady() && !W.IsReady() && CanCastHydra())
                {
                    Hydra.Cast();
                }
                if (Cooldown(Player.Spells[0]) > 1.0f && !W.IsReady() && CanCastTitan())
                {
                    Titan.Cast();
                }
                lastAA = Core.GameTickCount;
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)))
                    {
                        if (QNum >= 1 && W.IsReady())
                        {
                            var target2 = (ComboTarget != null && ComboTarget.IsValidTarget(WRange)) ? ComboTarget :
                                          TargetSelector.GetTarget(WRange, DamageType.Physical, null, true);
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                            {
                                Hydra.Cast();
                                return;
                            }
                            if (R.IsReady() && R.Name != R1)
                            {
                                var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                                if (enemy != null)
                                {
                                    forceR2  = true;
                                    R2Target = enemy;
                                    Core.DelayAction(() => forceR2 = false, 750);
                                }
                            }
                        }
                    }
                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                    {
                        if (QNum >= 1 && W.IsReady())
                        {
                            var target2 = (JCTarget != null && JCTarget.IsValidTarget(WRange)) ? JCTarget : EntityManager.MinionsAndMonsters.GetJungleMonsters(null, WRange, true).FirstOrDefault();
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                            {
                                Hydra.Cast();
                            }
                        }
                    }


                    if (Mode != Orbwalker.ActiveModes.None && target.IsValidTarget(Q.Range) && target.IsValid && !target.IsDead && !target.IsZombie)
                    {
                        if (Q.IsReady())
                        {
                            Player.CastSpell(SpellSlot.Q, target.Position);
                            return;
                        }
                    }
                    if (Cooldown(Player.Spells[0]) > 1.0f && W.IsReady() && Player.Instance.CountEnemiesInRange(WRange) > 0)
                    {
                        Player.CastSpell(SpellSlot.W);
                        return;
                    }
                }
            }
        }
Esempio n. 20
0
        private static void AfterAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe) return;

            if (args.SData.Name == "ItemTitanicHydraCleave")
            {
                // because we want another auto after this
                Orbwalker.ResetAutoAttack();
                return;
            }
            if (!args.IsAutoAttack()) return;
            Utils.Debug("ondos " + Core.GameTickCount);
            var target = args.Target as AttackableUnit;
            if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None && target != null && target.IsValidTarget())
            {
                if (!Q.IsReady() && CanCastHydra())
                    Hydra.Cast();
                if (Cooldown(Player.Spells[0]) > 1.0f && !W.IsReady() && CanCastTitan())
                    Titan.Cast();
                lastAA = Core.GameTickCount;
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)))
                    {
                        if (QNum >= 1 && W.IsReady())
                        {

                            var target2 = (ComboTarget != null && ComboTarget.IsValidTarget(WRange)) ? ComboTarget :
                            TargetSelector.GetTarget(WRange, DamageType.Physical, null, true);
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                            {
                                Hydra.Cast();
                                return;
                            }
                            if (R.IsReady() && R.Name != R1)
                            {
                                var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(h => (h.Distance(Player.Instance) < R.Range - 50) && RDamage(h) > h.Health && h.IsValidTarget());
                                if (enemy != null)
                                {
                                    forceR2 = true;
                                    R2Target = enemy;
                                    Core.DelayAction(() => forceR2 = false, 750);
                                }
                            }

                        }
                    }
                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                    {

                        if (QNum >= 1 && W.IsReady())
                        {
                            var target2 = (JCTarget != null && JCTarget.IsValidTarget(WRange)) ? JCTarget : EntityManager.MinionsAndMonsters.GetJungleMonsters(null, WRange, true).FirstOrDefault();
                            if (target2 != null && target2.IsValidTarget() && CanCastTitan())
                            {
                                Titan.Cast();
                                Player.IssueOrder(GameObjectOrder.AttackUnit, target2);
                                return;
                            }
                            if (target2 != null && target2.IsValidTarget() && !CanCastHydra())
                            {
                                Player.CastSpell(SpellSlot.W);
                                return;
                            }
                            if (CanCastHydra())
                                Hydra.Cast();

                        }
                    }

                    if (Mode != Orbwalker.ActiveModes.None && target.IsValidTarget(Q.Range) && target.IsValid && !target.IsDead && !target.IsZombie)
                    {
                        if (Q.IsReady())
                        {
                            Player.CastSpell(SpellSlot.Q, target.Position);
                            return;
                        }
                    }
                    if (Cooldown(Player.Spells[0]) > 1.0f && W.IsReady() && Player.Instance.CountEnemiesInRange(WRange) > 0)
                    {
                        Player.CastSpell(SpellSlot.W);
                        return;
                    }
                }

            }
        }
Esempio n. 21
0
        private static void Obj_AI_Base_OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo && sender.IsMe && args.Target is AIHeroClient)
            {
                var target = (AIHeroClient)args.Target;

                if (target == null)
                {
                    return;
                }

                if (CastE(target))
                {
                    Orbwalker.ResetAutoAttack();
                    return;
                }
                if (QInCombo.CurrentValue && Q.Cast((Obj_AI_Base)args.Target))
                {
                    return;
                }
                if (WInCombo.CurrentValue && W.Cast((Obj_AI_Base)args.Target))
                {
                    return;
                }
            }

            if (SpellFarmEnabled.CurrentValue && Hero.ManaPercent > EFarmMana.CurrentValue && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && sender.IsMe && args.IsAutoAttack() && ((Obj_AI_Base)args.Target).IsMinion)
            {
                if (ESpellFarm.CurrentValue && E.Cast((Vector3)Hero.Position.Extend(Game.CursorPos, 10)))
                {
                    Orbwalker.ResetAutoAttack();
                    return;
                }
                if (QSpellFarm.CurrentValue && Hero.ManaPercent > QFarmMana.CurrentValue)
                {
                    var Qfarm = EntityManager.MinionsAndMonsters.GetLaneMinions(
                        EntityManager.UnitTeam.Enemy,
                        Hero.Position,
                        Q.Range);
                    if (Qfarm == null)
                    {
                        return;
                    }

                    foreach (var objAiMinion in from objAiMinion in Qfarm
                             let rectangle = new Geometry.Polygon.Rectangle(Player.Instance.Position,
                                                                            Player.Instance.Position.Extend(objAiMinion, Player.Instance.Distance(objAiMinion) > 900 ? 900 - Player.Instance.Distance(objAiMinion) : 900).To3D(), 20)
                                             let count = Qfarm.Count(minion => new Geometry.Polygon.Circle(minion.Position, objAiMinion.BoundingRadius).Points.Any(rectangle.IsInside))
                                                         where count >= MinimumMinionsToQ.CurrentValue
                                                         select objAiMinion)
                    {
                        Q.Cast(objAiMinion);
                    }
                }
                if (WSpellFarm.CurrentValue && Hero.ManaPercent > WFarmMana.CurrentValue && W.Cast((Obj_AI_Base)args.Target))
                {
                    return;
                }
            }

            if (SpellFarmEnabled.CurrentValue && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) && sender.IsMe && args.IsAutoAttack() && ((Obj_AI_Base)args.Target).IsMonster)
            {
                if (EInJGClear.CurrentValue && Hero.ManaPercent > EJGMana.CurrentValue && E.Cast((Vector3)Hero.Position.Extend(Game.CursorPos, 10)))
                {
                    Orbwalker.ResetAutoAttack();
                    return;
                }
                if (QInJGClear.CurrentValue && Hero.ManaPercent > QJGMana.CurrentValue && args.Target.IsValid && Q.Cast((Obj_AI_Base)args.Target))
                {
                    return;
                }
                if (WInJGClear.CurrentValue && Hero.ManaPercent > WJGMana.CurrentValue && args.Target.IsValid && W.Cast((Obj_AI_Base)args.Target))
                {
                    return;
                }
            }
        }
Esempio n. 22
0
        private static void Obj_AI_Base_OnBasicAttack(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var caster = sender as AIHeroClient;
            var target = args.Target as Obj_AI_Base;

            if (caster == null || target == null || !caster.IsValid || !target.IsValid || !args.IsAutoAttack())
            {
                return;
            }

            var data = getData(caster, target, args.Start, args.SData.Name);

            foreach (var d in data)
            {
                Add(d);
            }
        }
 internal static void ChecarSendoatacado(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!Multi["AtvSeg"].Cast<KeyBind>().CurrentValue) return;
     if (sender.IsMe)
     {
         if (args.IsAutoAttack()) return;
         UltCast = Environment.TickCount;
         if (Environment.TickCount <= UltCast + 300 || Environment.TickCount <= UltClick + 500)
         {
             args.Process = false;
         }
     }
     if (sender.Distance(Eu) >= 1300 || !sender.IsEnemy) return;
     if (args.Target == null) return;
     if (!sender.IsEnemy || !args.Target.IsMe) return;
     if (Orbwalker.ActiveModesFlags != Orbwalker.ActiveModes.None)
     {
         Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.None;
     }
     Fugir = true;
     MeAtacou = sender;
 }