Пример #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
        /// <summary>
        ///     Gets minion health based on pred type
        /// </summary>
        public static float getPred(Obj_AI_Base minion, PredType type, SpellDataInst spell = null)
        {
            var result     = minion.Health;
            var predHealth = minion.Health;

            switch (type)
            {
            case PredType.PRED_LAST_HIT:
            {
                var time = LXOrbwalker.GetCurrentWindupTime() + 1000 * player.Distance(minion) / player.BasicAttack.MissileSpeed;
                predHealth = DtsHealthPrediction.GetHealthPrediction(minion, (int)time);
                result     = predHealth;
                break;
            }

            case PredType.PRED_TWO_HITS:
            {
                var time = LXOrbwalker.GetCurrentWindupTime() + 1000 * player.Distance(minion) / player.BasicAttack.MissileSpeed;
                predHealth = DtsHealthPrediction.GetHealthPrediction(minion, (int)(time * 2));
                result     = predHealth;
                break;
            }

            case PredType.PRED_SKILL:
            {
                var time = (int)(spell.SData.SpellCastTime * 1000 + 1000 * player.Distance(minion) / spell.SData.MissileSpeed);
                predHealth = DtsHealthPrediction.GetHealthPrediction(minion, time);
                result     = predHealth;
                break;
            }

            case PredType.PRED_UNKILLABLE:
            {
                var time = LXOrbwalker.GetCurrentWindupTime() + 1000 * player.Distance(minion) / player.BasicAttack.MissileSpeed;
                predHealth = DtsHealthPrediction.GetHealthPrediction(minion, (int)(time * 1.5f));
                result     = predHealth;
                break;
            }
            }


            return(result);
        }