Пример #1
0
        public static void OnProcessSpell(LeagueSharp.Obj_AI_Base sender, LeagueSharp.GameObjectProcessSpellCastEventArgs arg)
        {
            if (!sender.IsMe)
            {
                return;
            }

            // Game.PrintChat(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.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"))
            {
                Utility.DelayAction.Add(Game.Ping + LXOrbwalker.GetCurrentWindupTime() + 50, delegate { Riven.cancelAnim(true); });
            }

            if (arg.SData.Name.Contains("RivenFeint") && Riven.R.IsReady() && Config.Item("useR").GetValue <bool>())
            {
                Utility.DelayAction.Add(Game.Ping + 50, delegate { Riven.useRSmart(LXOrbwalker.GetPossibleTarget()); });
            }
        }
Пример #2
0
        public static void OnGameSendPacket(GamePacketEventArgs args)
        {
            return;

            try
            {
                if (args.PacketData[0] == 119)
                {
                    args.Process = false;
                }

                //if (Riven.orbwalker.ActiveMode.ToString() == "Combo")
                //   LogPacket(args);
                if (args.PacketData[0] == 154 && LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo)
                {
                    Packet.C2S.Cast.Struct cast = Packet.C2S.Cast.Decoded(args.PacketData);
                    if ((int)cast.Slot > -1 && (int)cast.Slot < 5)
                    {
                        Utility.DelayAction.Add(Game.Ping + LXOrbwalker.GetCurrentWindupTime(), delegate { Riven.cancelAnim(true); });

                        //Game.Say("/l");
                    }

                    if (cast.Slot == SpellSlot.E && Riven.R.IsReady() && Config.Item("useR").GetValue <bool>())
                    {
                        Utility.DelayAction.Add(Game.Ping + 50, delegate { Riven.useRSmart(LXOrbwalker.GetPossibleTarget()); });
                    }
                    //Console.WriteLine(cast.Slot + " : " + Game.Ping);

                    /* if (cast.Slot == SpellSlot.Q)
                     *   Orbwalking.ResetAutoAttackTimer();
                     * else if (cast.Slot == SpellSlot.W && Riven.Q.IsReady())
                     *   Utility.DelayAction.Add(Game.Ping+200, delegate { Riven.useHydra(Riven.orbwalker.GetTarget()); });
                     * else if (cast.Slot == SpellSlot.E && Riven.W.IsReady())
                     * {
                     *   Console.WriteLine("cast QQQQ");
                     *   Utility.DelayAction.Add(Game.Ping+200, delegate { Riven.useWSmart(Riven.orbwalker.GetTarget()); });
                     * }
                     * else if ((int)cast.Slot == 131 && Riven.W.IsReady())
                     * {
                     *   Orbwalking.ResetAutoAttackTimer();
                     *   Utility.DelayAction.Add(Game.Ping +200, delegate { Riven.useWSmart(Riven.orbwalker.GetTarget()); });
                     * }*/
                    // LogPacket(args);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Пример #3
0
        public static void OnGameSendPacket(GamePacketEventArgs args)
        {
            try
            {
                if (args.PacketData[0] == 119)
                {
                    args.Process = false;
                }

                //if (Riven.orbwalker.ActiveMode.ToString() == "Combo")
                //   LogPacket(args);
                if (args.PacketData[0] == 154 && Riven.orbwalker.ActiveMode.ToString() == "Combo")
                {
                    Packet.C2S.Cast.Struct cast = Packet.C2S.Cast.Decoded(args.PacketData);
                    if ((int)cast.Slot > -1 && (int)cast.Slot < 5)
                    {
                        Utility.DelayAction.Add(Game.Ping, delegate { Riven.cancelAnim(); });
                    }

                    if (cast.Slot == SpellSlot.E && Riven.R.IsReady())
                    {
                        Console.WriteLine("cast QQQQ");
                        Utility.DelayAction.Add(Game.Ping + 100, delegate { Riven.useRSmart(Riven.orbwalker.GetTarget()); });
                    }
                    //Console.WriteLine(cast.Slot + " : " + Game.Ping);

                    /* if (cast.Slot == SpellSlot.Q)
                     *   Orbwalking.ResetAutoAttackTimer();
                     * else if (cast.Slot == SpellSlot.W && Riven.Q.IsReady())
                     *   Utility.DelayAction.Add(Game.Ping+200, delegate { Riven.useHydra(Riven.orbwalker.GetTarget()); });
                     * else if (cast.Slot == SpellSlot.E && Riven.W.IsReady())
                     * {
                     *   Console.WriteLine("cast QQQQ");
                     *   Utility.DelayAction.Add(Game.Ping+200, delegate { Riven.useWSmart(Riven.orbwalker.GetTarget()); });
                     * }
                     * else if ((int)cast.Slot == 131 && Riven.W.IsReady())
                     * {
                     *   Orbwalking.ResetAutoAttackTimer();
                     *   Utility.DelayAction.Add(Game.Ping +200, delegate { Riven.useWSmart(Riven.orbwalker.GetTarget()); });
                     * }*/
                    // LogPacket(args);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }