Example #1
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()); });
            }
        }
Example #2
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();
     }
 }
Example #3
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));
     }
 }
Example #4
0
 public override void OnProcessSpellCast(EloBuddy.GameObject sender, EloBuddy.GameObjectProcessSpellCastEventArgs args)
 {
     base.OnProcessSpellCast(sender, args);
     if (sender is EloBuddy.AIHeroClient && sender.IsEnemy)
     {
         var objaiherosender = (EloBuddy.AIHeroClient)sender;
         if (!IsInvulnerable(objaiherosender) && args.SData.Name == "summonerflash" && args.End.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350)
         {
             if (EDelaySlider > 0)
             {
                 var thisEnemy = objaiherosender;
                 LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
                 return;
             }
             E.CastOnUnit(objaiherosender);
         }
     }
 }
Example #5
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);
                }
            }
        }