Beispiel #1
0
        private Vector3 GetAggressiveTumblePos(EloBuddy.Obj_AI_Base target)
        {
            var cursorPos = EloBuddy.Game.CursorPos;

            if (!IsDangerousPosition(cursorPos))
            {
                return(cursorPos);
            }
            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1)
            {
                return(cursorPos);
            }

            var aRC =
                new Challenger_Series.Utils.Geometry.Circle(EloBuddy.ObjectManager.Player.ServerPosition.ToVector2(), 300).ToPolygon().ToClipperPath();
            var targetPosition = target.ServerPosition;


            foreach (var p in aRC)
            {
                var v3   = new Vector2(p.X, p.Y).ToVector3();
                var dist = v3.Distance(targetPosition);
                if (dist > 325 && dist < 450)
                {
                    return(v3);
                }
            }
            return(Vector3.Zero);
        }
Beispiel #2
0
        public static float GetComboDamage(EloBuddy.Obj_AI_Base enemy)
        {
            float damage = 0;

            if (spells[Spells.Q].IsReady())
            {
                damage += spells[Spells.Q].GetDamage(enemy);
            }

            if (spells[Spells.W].IsReady())
            {
                damage += spells[Spells.W].GetDamage(enemy);
            }

            if (spells[Spells.E].IsReady())
            {
                damage += spells[Spells.E].GetDamage(enemy);
            }

            if (spells[Spells.R].IsReady())
            {
                damage += spells[Spells.R].GetDamage(enemy);
            }

            if (ignite == EloBuddy.SpellSlot.Unknown || Player.Spellbook.CanUseSpell(ignite) != EloBuddy.SpellState.Ready)
            {
                damage += (float)Player.GetSummonerSpellDamage(enemy, LeagueSharp.Common.Damage.SummonerSpell.Ignite);
            }

            return(damage + 15 + (12 * Player.Level) + Player.FlatMagicDamageMod);
        }
Beispiel #3
0
        public static void OnProcessSpell(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectProcessSpellCastEventArgs arg)
        {
            if (!sender.IsMe)
            {
                return;
            }

            // Chat.Print(arg.SData.Name);

            if (Config.Item("forceQE").GetValue <bool>() && sender.IsMe && arg.SData.Name.Contains("RivenFeint") && Riven.Q.IsReady() && LXOrbwalker.GetPossibleTarget() != null)
            {
                Console.WriteLine("force q");
                Riven.Q.Cast(LXOrbwalker.GetPossibleTarget().Position);
                Riven.forceQ = true;
                // Riven.timer = new System.Threading.Timer(obj => { Riven.EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Riven.difPos()); }, null, (long)100, System.Threading.Timeout.Infinite);
            }

            if (arg.SData.Name.Contains("RivenFeint") || arg.SData.Name.Contains("TriCleave") || arg.SData.Name.Contains("RivenFMartyr"))
            {
                LeagueSharp.Common.Utility.DelayAction.Add(Game.Ping + LXOrbwalker.GetCurrentWindupTime() + 50, delegate { Riven.cancelAnim(); });
            }

            if (arg.SData.Name.Contains("RivenFeint") && Riven.R.IsReady() && Config.Item("useR").GetValue <bool>())
            {
                LeagueSharp.Common.Utility.DelayAction.Add(Game.Ping + 50, delegate { Riven.useRSmart(LXOrbwalker.GetPossibleTarget()); });
            }
        }
Beispiel #4
0
 /// <summary>
 /// Called when a spell cast is processed by the client.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="EloBuddy.GameObjectProcessSpellCastEventArgs"/> instance containing the event data.</param>
 internal static void OnProcessSpellCast(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsValid && sender.Team != ObjectManager.Player.Team && args.SData.Name == "YasuoWMovingWall")
     {
         _wallCastT          = Utils.TickCount;
         _yasuoWallCastedPos = sender.ServerPosition.To2D();
     }
 }
Beispiel #5
0
 //TODO: Remove
 static void OnCast(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectProcessSpellCastEventArgs args)
 {
     if (!sender.IsEnemy) return;
     if (args.SData.Name == "TrinketTotemLvl3B" || args.SData.Name == "VisionWard" && menu.SubMenu("misc").Item("antipink").GetValue<bool>())
     {
         if (args.End.Distance(player.Position) < 1200) 
             LeagueSharp.Common.Utility.DelayAction.Add(200, () => AntiPink(args.End));
     }
 }
Beispiel #6
0
        private static int CountPassive(EloBuddy.Obj_AI_Base target)
        {
            var ekkoPassive = target.Buffs.FirstOrDefault(x => x.Name.Equals("EkkoStacks", StringComparison.InvariantCultureIgnoreCase));

            if (ekkoPassive != null)
            {
                return(ekkoPassive.Count);
            }

            return(0);
        }
Beispiel #7
0
 private int VayneWStacks(EloBuddy.Obj_AI_Base o)
 {
     if (o == null)
     {
         return(0);
     }
     if (o.Buffs.FirstOrDefault(b => b.Name.Contains("vaynesilver")) == null ||
         !o.Buffs.Any(b => b.Name.Contains("vaynesilver")))
     {
         return(0);
     }
     return(o.Buffs.FirstOrDefault(b => b.Name.Contains("vaynesilver")).Count);
 }
Beispiel #8
0
        private Vector3 GetTumblePos(EloBuddy.Obj_AI_Base target)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return(GetAggressiveTumblePos(target));
            }

            var cursorPos          = EloBuddy.Game.CursorPos;
            var targetCrowdControl = from tuplet in CachedCrowdControl
                                     where tuplet.Item1 == target.CharData.BaseSkinName
                                     select tuplet.Item2;

            if (!IsDangerousPosition(cursorPos) && !(targetCrowdControl.FirstOrDefault() != null && targetCrowdControl.Any(
                                                         crowdControlEntry =>
                                                         target.Spellbook.GetSpell(crowdControlEntry.Slot).IsReady())))
            {
                return(cursorPos);
            }

            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1)
            {
                return(cursorPos);
            }
            var targetWaypoints = LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(target);

            if (targetWaypoints[targetWaypoints.Count - 1].Distance(EloBuddy.ObjectManager.Player.ServerPosition) > 550)
            {
                return(Vector3.Zero);
            }

            var aRC =
                new Challenger_Series.Utils.Geometry.Circle(EloBuddy.ObjectManager.Player.ServerPosition.ToVector2(), 300).ToPolygon().ToClipperPath();
            var targetPosition = target.ServerPosition;
            var pList          = (from p in aRC
                                  select new Vector2(p.X, p.Y).ToVector3()
                                  into v3
                                  let dist = v3.Distance(targetPosition)
                                             where !IsDangerousPosition(v3) && dist < 500
                                             select v3).ToList();

            if (EloBuddy.ObjectManager.Player.UnderTurret() || EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800) == 1 ||
                cursorPos.CountEnemyHeroesInRange(450) <= 1)
            {
                return(pList.Count > 1 ? pList.OrderBy(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero);
            }
            return(pList.Count > 1
                ? pList.OrderByDescending(el => el.Distance(cursorPos)).FirstOrDefault()
                : Vector3.Zero);
        }
Beispiel #9
0
        private static void Obj_AI_Hero_OnProcessSpellCast(EloBuddy.Obj_AI_Base sender, EloBuddy.GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsEnemy)
            {
                if (Player != null && spells[Spells.R].IsReady())
                {
                    if ((!(sender is EloBuddy.AIHeroClient) || args.SData.IsAutoAttack()) && args.Target != null &&
                        args.Target.NetworkId == Player.NetworkId)
                    {
                        incomingDamage.Add(
                            Player.ServerPosition.LSDistance(sender.ServerPosition) / args.SData.MissileSpeed + EloBuddy.Game.Time,
                            (float)sender.LSGetAutoAttackDamage(Player));
                    }
                    else if (sender is EloBuddy.AIHeroClient)
                    {
                        var attacker = (EloBuddy.AIHeroClient)sender;
                        var slot     = attacker.GetSpellSlot(args.SData.Name);

                        if (slot != EloBuddy.SpellSlot.Unknown)
                        {
                            if (slot == attacker.GetSpellSlot("SummonerDot") && args.Target != null &&
                                args.Target.NetworkId == Player.NetworkId)
                            {
                                instantDamage.Add(
                                    EloBuddy.Game.Time + 2,
                                    (float)attacker.GetSummonerSpellDamage(Player, LeagueSharp.Common.Damage.SummonerSpell.Ignite));
                            }
                            else if (slot.HasFlag(EloBuddy.SpellSlot.Q | EloBuddy.SpellSlot.W | EloBuddy.SpellSlot.E | EloBuddy.SpellSlot.R) &&
                                     ((args.Target != null && args.Target.NetworkId == Player.NetworkId) ||
                                      args.End.LSDistance(Player.ServerPosition) < Math.Pow(args.SData.LineWidth, 2)))
                            {
                                instantDamage.Add(EloBuddy.Game.Time + 2, (float)attacker.LSGetSpellDamage(Player, slot));
                            }
                        }
                    }
                }
            }

            if (sender.IsMe)
            {
                if (args.SData.Name.Equals("EkkoE", StringComparison.InvariantCultureIgnoreCase))
                {
                    LeagueSharp.Common.Utility.DelayAction.Add(250, EloBuddy.SDK.Orbwalker.ResetAutoAttack);
                }
            }
        }
Beispiel #10
0
 public static void OnLevelUp(EloBuddy.Obj_AI_Base sender, LeagueSharp.Common.CustomEvents.Unit.OnLevelUpEventArgs args)
 {
     if (sender.NetworkId == Yasuo.Player.NetworkId)
     {
         if (!Config.Item("autoLevel").GetValue <bool>())
         {
             return;
         }
         if (Config.Item("levUpSeq").GetValue <StringList>().SelectedIndex == 0)
         {
             Yasuo.sBook.LevelUpSpell(Yasuo.levelUpSeq[args.NewLevel - 1].Slot);
         }
         else if (Config.Item("levUpSeq").GetValue <StringList>().SelectedIndex == 1)
         {
             Yasuo.sBook.LevelUpSpell(Yasuo.levelUpSeq2[args.NewLevel - 1].Slot);
         }
     }
 }
Beispiel #11
0
        private static void OnLevelUp(EloBuddy.Obj_AI_Base sender,
                                      LeagueSharp.Common.CustomEvents.Unit.OnLevelUpEventArgs args)
        {
            if (!sender.IsValid || !sender.IsMe)
            {
                return;
            }

            if (!_config.Item("AutoLevel").GetValue <bool>())
            {
                return;
            }
            if (_config.Item("Style").GetValue <StringList>().SelectedIndex == 0)
            {
                _player.Spellbook.LevelUpSpell((SpellSlot)tristap[args.NewLevel - 1]);
            }
            else if (_config.Item("Style").GetValue <StringList>().SelectedIndex == 1)
            {
                _player.Spellbook.LevelUpSpell((SpellSlot)tristad[args.NewLevel - 1]);
            }
        }
Beispiel #12
0
        static float GetComboDamage(EloBuddy.Obj_AI_Base target)
        {
            double comboDamage = (float)EloBuddy.ObjectManager.Player.GetComboDamage(target, GetSpellCombo());

            return((float)(comboDamage + EloBuddy.ObjectManager.Player.LSGetAutoAttackDamage(target)));
        }
Beispiel #13
0
 public override bool ShouldBeDead(EloBuddy.Obj_AI_Base target, float additionalSpellDamage = 0f)
 {
     return(base.ShouldBeDead(target, TwitchE.GetRemainingPoisonDamageMinusRegeneration(target)));
 }