Пример #1
0
 private static void OnPlayAnimation(GameObject sender, GameObjectPlayAnimationEventArgs args)
 {
     if (sender.IsMe && args.Animation.Contains("Spell") && isComboing())
     {
         Utility.DelayAction.Add(Game.Ping + 50, delegate { Riven.cancelAnim(); });
     }
 }
Пример #2
0
        /*
         *
         */
        private static void OnGameUpdate(EventArgs args)
        {
            /*
             *  RivenFengShuiEngine
             *  rivenwindslashready
             */
            try
            {
                if (Config.Item("doHarasE").GetValue <KeyBind>().Active)
                {
                    Obj_AI_Hero target = TargetSelector.GetTarget(1400, TargetSelector.DamageType.Physical);
                    LXOrbwalker.ForcedTarget = target;
                    Riven.doHarasE(target);
                }
                else if (Config.Item("doHarasQ").GetValue <KeyBind>().Active)
                {
                    Obj_AI_Hero target = TargetSelector.GetTarget(1400, TargetSelector.DamageType.Physical);
                    LXOrbwalker.ForcedTarget = target;
                    Riven.doHarasQ(target);
                }


                if (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo)
                {
                    Obj_AI_Hero target = TargetSelector.GetTarget(1400, TargetSelector.DamageType.Physical);
                    LXOrbwalker.ForcedTarget = target;
                    Riven.doCombo(target);
                    //Console.WriteLine(target.NetworkId);
                }
            }
            catch (Exception ex)
            {
                // Console.WriteLine(ex);
            }
        }
Пример #3
0
 private static void OnPlayAnimation(GameObject sender, GameObjectPlayAnimationEventArgs args)
 {
     if (sender.IsMe && args.Animation.Contains("Spell") && isComboing())
     {
         Riven.cancelAnim();
     }
 }
Пример #4
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()); });
            }
        }
Пример #5
0
        private static void onLoad(EventArgs args)
        {
            try
            {
                if (Riven.Player.ChampionName != "Riven")
                {
                    return;
                }


                Game.PrintChat("RivenSharp by DeTuKs");
                Config = new Menu("Riven - Sharp", "Riven", true);
                //Orbwalkervar menu = new Menu("My Mainmenu", "my_mainmenu", true);
                var orbwalkerMenu = new Menu("LX Orbwalker", "my_Orbwalker");
                LXOrbwalker.AddToMenu(orbwalkerMenu);
                Config.AddSubMenu(orbwalkerMenu);
                //TS
                var TargetSelectorMenu = new Menu("Target Selector", "Target Selector");
                SimpleTs.AddToMenu(TargetSelectorMenu);
                Config.AddSubMenu(TargetSelectorMenu);
                //Combo
                Config.AddSubMenu(new Menu("Combo Sharp", "combo"));
                Config.SubMenu("combo").AddItem(new MenuItem("forceQE", "Use Q after E")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("packets", "Use packet cast")).SetValue(true);

                //Haras
                Config.AddSubMenu(new Menu("Harass Sharp", "haras"));
                Config.SubMenu("haras").AddItem(new MenuItem("doHarasE", "Harass enemy E")).SetValue(new KeyBind('G', KeyBindType.Press, false));
                Config.SubMenu("haras").AddItem(new MenuItem("doHarasQ", "Harass enemy Q")).SetValue(new KeyBind('T', KeyBindType.Press, false));

                //Drawing
                Config.AddSubMenu(new Menu("Drawing Sharp", "draw"));
                Config.SubMenu("draw").AddItem(new MenuItem("doDraw", "Dissable drawings")).SetValue(false);
                Config.SubMenu("draw").AddItem(new MenuItem("drawHp", "Draw pred hp")).SetValue(true);

                //Debug
                Config.AddSubMenu(new Menu("Debug", "debug"));
                Config.SubMenu("debug").AddItem(new MenuItem("db_targ", "Debug Target")).SetValue(new KeyBind('0', KeyBindType.Press, false));

                Config.AddToMainMenu();

                Drawing.OnDraw     += onDraw;
                Drawing.OnEndScene += OnEndScene;
                Game.OnGameUpdate  += OnGameUpdate;

                GameObject.OnCreate            += OnCreateObject;
                GameObject.OnDelete            += OnDeleteObject;
                GameObject.OnPropertyChange    += OnPropertyChange;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;

                Game.OnGameSendPacket    += OnGameSendPacket;
                Game.OnGameProcessPacket += OnGameProcessPacket;

                Riven.setSkillshots();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Пример #6
0
 private static void onDraw(EventArgs args)
 {
     try
     {
         if (!Config.Item("doDraw").GetValue <bool>())
         {
             if (Config.Item("drawHp").GetValue <bool>())
             {
                 foreach (
                     var enemy in
                     ObjectManager.Get <Obj_AI_Hero>()
                     .Where(ene => !ene.IsDead && ene.IsEnemy && ene.IsVisible))
                 {
                     hpi.unit = enemy;
                     hpi.drawDmg(Riven.rushDmgBasedOnDist(enemy), Color.Yellow);
                 }
             }
             foreach (
                 Obj_AI_Hero enHero in
                 ObjectManager.Get <Obj_AI_Hero>().Where(enHero => enHero.IsEnemy && enHero.Health > 0))
             {
                 Utility.DrawCircle(enHero.Position,
                                    enHero.BoundingRadius + Riven.E.Range + Riven.Player.AttackRange,
                                    (Riven.rushDown) ? Color.Red : Color.Blue);
                 //Drawing.DrawCircle(enHero.Position, enHero.BoundingRadius + Riven.E.Range+Riven.Player.AttackRange, Color.Blue);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Пример #7
0
        private static void onLoad(EventArgs args)
        {
            try
            {
                if (Riven.Player.ChampionName != "Riven")
                {
                    return;
                }

                Game.PrintChat("RivenSharp by DeTuKs 鍔犺浇鎴愬姛!姹夊寲by浜岀嫍!QQ缇361630847");
                Config = new Menu("RivenV2浜岀嫍姹夊寲", "Riven", true);
                //Orbwalkervar menu = new Menu("My Mainmenu", "my_mainmenu", true);
                var orbwalkerMenu = new Menu("LX璧扮爫", "my_Orbwalker");
                LXOrbwalker.AddToMenu(orbwalkerMenu);
                Config.AddSubMenu(orbwalkerMenu);
                //TS
                var TargetSelectorMenu = new Menu("鐩爣閫夋嫨", "Target Selector");
                SimpleTs.AddToMenu(TargetSelectorMenu);
                Config.AddSubMenu(TargetSelectorMenu);
                //Combo
                Config.AddSubMenu(new Menu("杩炴嫑", "combo"));
                Config.SubMenu("combo").AddItem(new MenuItem("forceQE", "鍏圗鍚嶲")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("packets", "浣跨敤灏佸寘")).SetValue(true);

                //Haras
                Config.AddSubMenu(new Menu("楠氭壈", "haras"));
                Config.SubMenu("haras").AddItem(new MenuItem("doHarasE", "E楠氭壈鏁屼汉")).SetValue(new KeyBind('G', KeyBindType.Press, false));
                Config.SubMenu("haras").AddItem(new MenuItem("doHarasQ", "Q楠氭壈鏁屼汉")).SetValue(new KeyBind('T', KeyBindType.Press, false));

                //Drawing
                Config.AddSubMenu(new Menu("鑼冨洿", "draw"));
                Config.SubMenu("draw").AddItem(new MenuItem("doDraw", "鏈€杩滄妧鑳借寖鍥磡")).SetValue(false);
                Config.SubMenu("draw").AddItem(new MenuItem("drawHp", "杩炴嫑閫犳垚HP")).SetValue(true);

                //Debug
                Config.AddSubMenu(new Menu("璋冭瘯", "debug"));
                Config.SubMenu("debug").AddItem(new MenuItem("db_targ", "鐩爣璋冭瘯")).SetValue(new KeyBind('0', KeyBindType.Press, false));

                Config.AddToMainMenu();

                Drawing.OnDraw     += onDraw;
                Drawing.OnEndScene += OnEndScene;
                Game.OnGameUpdate  += OnGameUpdate;

                GameObject.OnCreate            += OnCreateObject;
                GameObject.OnDelete            += OnDeleteObject;
                GameObject.OnPropertyChange    += OnPropertyChange;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;

                Game.OnGameSendPacket    += OnGameSendPacket;
                Game.OnGameProcessPacket += OnGameProcessPacket;

                Riven.setSkillshots();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Пример #8
0
        private static void onLoad(EventArgs args)
        {
            try
            {
                Game.PrintChat("RivenSharp by DeTuKs");
                Config = new Menu("【無為汉化】瑞文V2", "Riven", true);
                //Orbwalkervar menu = new Menu("My Mainmenu", "my_mainmenu", true);
                var orbwalkerMenu = new Menu("LX 走砍", "my_Orbwalker");
                LXOrbwalker.AddToMenu(orbwalkerMenu);
                Config.AddSubMenu(orbwalkerMenu);
                //TS
                var TargetSelectorMenu = new Menu("目标选择", "Target Selector");
                SimpleTs.AddToMenu(TargetSelectorMenu);
                Config.AddSubMenu(TargetSelectorMenu);
                //Combo
                Config.AddSubMenu(new Menu("连招", "combo"));
                Config.SubMenu("combo").AddItem(new MenuItem("useR", "使用 R")).SetValue(new KeyBind('Z', KeyBindType.Toggle, true));
                Config.SubMenu("combo").AddItem(new MenuItem("forceQE", "使用Q后E")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("packets", "使用封包")).SetValue(true);

                //Haras
                Config.AddSubMenu(new Menu("骚扰", "haras"));
                Config.SubMenu("haras").AddItem(new MenuItem("doHarasE", "使用 E")).SetValue(new KeyBind('G', KeyBindType.Press, false));
                Config.SubMenu("haras").AddItem(new MenuItem("doHarasQ", "使用 Q")).SetValue(new KeyBind('T', KeyBindType.Press, false));

                //Drawing
                Config.AddSubMenu(new Menu("绘制", "draw"));
                Config.SubMenu("draw").AddItem(new MenuItem("doDraw", "清除绘制")).SetValue(false);
                Config.SubMenu("draw").AddItem(new MenuItem("drawHp", "显示伤害")).SetValue(true);

                //Debug
                Config.AddSubMenu(new Menu("调试", "debug"));
                Config.SubMenu("debug").AddItem(new MenuItem("db_targ", "调试目标")).SetValue(new KeyBind('0', KeyBindType.Press, false));

                Config.AddSubMenu(new Menu("無為汉化", "by wuwei"));
                Config.SubMenu("by wuwei").AddItem(new MenuItem("qunhao", "汉化群:386289593"));
                Config.AddToMainMenu();

                Drawing.OnDraw     += onDraw;
                Drawing.OnEndScene += OnEndScene;
                Game.OnGameUpdate  += OnGameUpdate;

                GameObject.OnCreate            += OnCreateObject;
                GameObject.OnDelete            += OnDeleteObject;
                GameObject.OnPropertyChange    += OnPropertyChange;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;

                Game.OnGameSendPacket    += OnGameSendPacket;
                Game.OnGameProcessPacket += OnGameProcessPacket;

                Riven.setSkillshots();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Пример #9
0
        /*
         *
         */
        private static void OnGameUpdate(EventArgs args)
        {
            if (Config.Item("db_targ").GetValue <KeyBind>().Active)
            {
            }

            if (Riven.orbwalker.ActiveMode.ToString() == "Combo")
            {
                Obj_AI_Hero target = SimpleTs.GetTarget(500, SimpleTs.DamageType.Physical);
                Riven.doCombo(target);
                //Console.WriteLine(target.NetworkId);
            }
        }
Пример #10
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());
            }
        }
Пример #11
0
 private static void OnEndScene(EventArgs args)
 {
     if (Config.Item("drawHp").GetValue <bool>())
     {
         foreach (
             var enemy in
             ObjectManager.Get <Obj_AI_Hero>()
             .Where(ene => !ene.IsDead && ene.IsEnemy && ene.IsVisible))
         {
             hpi.unit = enemy;
             hpi.drawDmg(Riven.rushDmgBasedOnDist(enemy), Color.Yellow);
         }
     }
 }
Пример #12
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());
            }
        }
Пример #13
0
        public static void cancelAnim(bool aaToo = false)
        {
            if (aaToo)
            {
                LXOrbwalker.ResetAutoAttackTimer();
            }
            if (LXOrbwalker.GetPossibleTarget() != null && !Riven.useHydra(LXOrbwalker.GetPossibleTarget()))
            {
                if (W.IsReady())
                {
                    Riven.useWSmart(LXOrbwalker.GetPossibleTarget());
                }
            }
            moveTo(Game.CursorPos);


            //  Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(fill iterator up)).Send();
        }
Пример #14
0
        public static void cancelAnim()
        {
            Orbwalking.ResetAutoAttackTimer();
            Console.WriteLine("Cansel anim");
            if (!Riven.useHydra(Riven.orbwalker.GetTarget()))
            {
                if (W.IsReady())
                {
                    Riven.useWSmart(Riven.orbwalker.GetTarget());
                }
                else
                {
                    Game.Say("/l");
                    Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send();
                }
            }


            //  Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(fill iterator up)).Send();
        }
Пример #15
0
        public static void doHarasE(Obj_AI_Base target)
        {
            if (target == null)
            {
                return;
            }
            float dist = Player.Distance(target.ServerPosition);

            if (E.IsReady() && dist < 540)
            {
                E.Cast(target.Position);
            }
            if (dist < (W.Range + 50) && W.IsReady() && !E.IsReady())
            {
                W.Cast();
                Riven.useHydra(target);
            }
            if (getQJumpCount() > 1 && !E.IsReady())
            {
                Player.IssueOrder(GameObjectOrder.AttackUnit, target);

                if (!Player.IsChannelingImportantSpell() && Q.IsReady() && dist > Player.AttackRange + Player.BoundingRadius /* && (getQJumpCount()*175 + target.BoundingRadius + 100) < dist*/)
                {
                    Q.Cast(target.Position);
                }
            }//Get away
            else if (getQJumpCount() == 1 && !W.IsReady())
            {
                Obj_AI_Turret closest_tower =
                    ObjectManager.Get <Obj_AI_Turret>()
                    .Where(tur => tur.IsAlly)
                    .OrderBy(tur => tur.Distance(Player.Position))
                    .First();
                Player.IssueOrder(GameObjectOrder.MoveTo, closest_tower.ServerPosition);
                if (Q.IsReady() && isRunningTo(closest_tower))
                {
                    Q.Cast(closest_tower.Position);
                }
            }
        }
Пример #16
0
        public static void OnGameProcessPacket(GamePacketEventArgs args)
        {
            try
            {
                if (isComboing())
                {
                    if (args.PacketData[0] == 35 && Riven.Q.IsReady())
                    {
                        Console.WriteLine("Gott");
                        GamePacket gp = new GamePacket(args.PacketData);
                        gp.Position = 2;
                        int netId = gp.ReadInteger();
                        if (LXOrbwalker.GetPossibleTarget() == null || LXOrbwalker.GetPossibleTarget().NetworkId != netId)
                        {
                            return;
                        }
                        if (!LXOrbwalker.CanAttack())
                        {
                            Riven.Q.Cast(LXOrbwalker.GetPossibleTarget().Position);
                        }
                    }

                    if (args.PacketData[0] == 0x17)
                    {
                        Console.WriteLine("cancel");

                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 2;
                        int sourceId = packet.ReadInteger();
                        if (sourceId == Riven.Player.NetworkId)
                        {
                            Console.WriteLine("cancel wawf");
                            Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send();
                            if (LXOrbwalker.GetPossibleTarget() != null)
                            {
                                Riven.moveTo(LXOrbwalker.GetPossibleTarget().Position);
                                //Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send();

                                // LXOrbwalker.ResetAutoAttackTimer();
                                Riven.cancelAnim(true);
                            }
                        }
                    }

                    if (args.PacketData[0] == 0xDF && false)
                    {
                        Console.WriteLine("cancel");

                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 2;
                        int sourceId = packet.ReadInteger();
                        if (sourceId == Riven.Player.NetworkId)
                        {
                            Console.WriteLine("cancel wawf");
                            Riven.moveTo(Game.CursorPos);
                            Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send();
                            LXOrbwalker.ResetAutoAttackTimer();
                            Riven.cancelAnim();
                        }
                    }

                    if (args.PacketData[0] == 0x61) //move
                    {
                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 12;
                        int sourceId = packet.ReadInteger();
                        if (sourceId == Riven.Player.NetworkId)
                        {
                            if (LXOrbwalker.GetPossibleTarget() != null)
                            {
                                //    Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send();
                                LXOrbwalker.ResetAutoAttackTimer();
                            }
                        }
                    }
                    else if (args.PacketData[0] == 0x38) //animation2
                    {
                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 1;
                        int sourceId = packet.ReadInteger();
                        if (packet.Size() == 9 && sourceId == Riven.Player.NetworkId)
                        {
                            Riven.moveTo(Game.CursorPos);
                            Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send();
                            LXOrbwalker.ResetAutoAttackTimer();
                            Riven.cancelAnim();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Пример #17
0
        public static void OnGameProcessPacket(GamePacketEventArgs args)
        {
            try
            {
                if (isComboing())
                {
                    if (args.PacketData[0] == 0x65 && Riven.Q.IsReady())
                    {
                        Packet.S2C.Damage.Struct dmg = Packet.S2C.Damage.Decoded(args.PacketData);

                        // LogPacket(args);
                        GamePacket gp = new GamePacket(args.PacketData);
                        gp.Position = 1;

                        int   targetID            = gp.ReadInteger();
                        int   dType               = (int)gp.ReadByte();
                        int   Unknown             = gp.ReadShort();
                        float DamageAmount        = gp.ReadFloat();
                        int   TargetNetworkIdCopy = gp.ReadInteger();
                        int   SourceNetworkId     = gp.ReadInteger();
                        if (Riven.Player.NetworkId != dmg.SourceNetworkId)
                        {
                            return;
                        }
                        Obj_AI_Base targ = ObjectManager.GetUnitByNetworkId <Obj_AI_Base>(dmg.TargetNetworkId);
                        if ((int)dmg.Type == 12 || (int)dmg.Type == 4 || (int)dmg.Type == 3 || (int)dmg.Type == 36 || (int)dmg.Type == 11)
                        {
                            Riven.Q.Cast(targ.Position);
                        }
                        else
                        {
                            Console.WriteLine("dtyoe: " + dType);
                        }
                    }
                    if (args.PacketData[0] == 0x34)// from yol0 :)
                    {
                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 9;
                        int action = packet.ReadByte();
                        packet.Position = 1;
                        int sourceId = packet.ReadInteger();
                        if (action == 17 && sourceId == Riven.Player.NetworkId)
                        {
                            Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send();
                            if (LXOrbwalker.GetPossibleTarget() != null)
                            {
                                Riven.moveTo(LXOrbwalker.GetPossibleTarget().Position);
                                //Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send();

                                // LXOrbwalker.ResetAutoAttackTimer();
                                Riven.cancelAnim(true);
                            }
                        }
                    }
                    else if (args.PacketData[0] == 0x61) //move
                    {
                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 12;
                        int sourceId = packet.ReadInteger();
                        if (sourceId == Riven.Player.NetworkId)
                        {
                            if (LXOrbwalker.GetPossibleTarget() != null)
                            {
                                //    Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(LXOrbwalker.GetPossibleTarget().Position.X, LXOrbwalker.GetPossibleTarget().Position.Y)).Send();
                                LXOrbwalker.ResetAutoAttackTimer();
                            }
                        }
                    }
                    else if (args.PacketData[0] == 0x38) //animation2
                    {
                        GamePacket packet = new GamePacket(args.PacketData);
                        packet.Position = 1;
                        int sourceId = packet.ReadInteger();
                        if (packet.Size() == 9 && sourceId == Riven.Player.NetworkId)
                        {
                            Riven.moveTo(Game.CursorPos);
                            Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(Game.CursorPos.X, Game.CursorPos.Y)).Send();
                            LXOrbwalker.ResetAutoAttackTimer();
                            Riven.cancelAnim();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }