private static void Game_OnSendPacket(GamePacketEventArgs args) { try { if (args.PacketData[0] == 154 && Orbwalker.ActiveMode.ToString() == "Combo") { Packet.C2S.Cast.Struct @struct = Packet.C2S.Cast.Decoded(args.PacketData); if (@struct.Slot >= SpellSlot.Q && @struct.Slot <= SpellSlot.Item1) { Utility.DelayAction.Add(Game.Ping, delegate { AnimationCancel(); }); } if (@struct.Slot == SpellSlot.Q) { Orbwalking.ResetAutoAttackTimer(); } } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
private void OnGameSendPacket(GamePacketEventArgs args) { try { if (!Enabled) { return; } var spellsDelay = Menu.Item(Name + "DelaySpells").GetValue <Slider>().Value; var movementDelay = Menu.Item(Name + "DelayMovement").GetValue <Slider>().Value; if (spellsDelay > 0 && (new GamePacket(args.PacketData)).Header == Packet.C2S.Cast.Header) { Packet.C2S.Cast.Struct castStruct = Packet.C2S.Cast.Decoded(args.PacketData); if (castStruct.SourceNetworkId == ObjectManager.Player.NetworkId) { if (_lastSpell + spellsDelay > Environment.TickCount) { args.Process = false; } else { _lastSpell = Environment.TickCount; } } } if (movementDelay > 0 && (new GamePacket(args.PacketData)).Header == Packet.C2S.Move.Header) { Packet.C2S.Move.Struct movementStruct = Packet.C2S.Move.Decoded(args.PacketData); if (movementStruct.MoveType == 2) { if (movementStruct.SourceNetworkId == ObjectManager.Player.NetworkId) { if (_lastMovement + movementDelay > Environment.TickCount) { args.Process = false; } else { _lastMovement = Environment.TickCount; } } } else if (movementStruct.MoveType == 3) { _lastMovement = 0f; } } } catch (Exception ex) { Logger.WriteBlock(ex.Message, ex.ToString()); } }
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()); } }
protected override void Game_OnSendPacket(GamePacketEventArgs args) { if (args.PacketData[0] == Packet.C2S.Cast.Header) { Packet.C2S.Cast.Struct decodedPacket = Packet.C2S.Cast.Decoded(args.PacketData); if (decodedPacket.Slot == SpellSlot.R) { if (CountR() == 0 && menu.Item("blockR", true).GetValue <bool>()) { //Block packet if enemies hit is 0 args.Process = false; } } } }
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()); } }
public static void OnGameSendPacket(GamePacketEventArgs args) { if (args.PacketData[0] != 154 || Orbwalking.OrbwalkingMode.Combo != Program.Orbwalker.ActiveMode) { return; } 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, CancelAnim); } if (cast.Slot == SpellSlot.E && R.IsReady()) { Utility.DelayAction.Add(Game.Ping + 100, () => UseRSmart(Program.Orbwalker.GetTarget())); } }
private static void Game_OnSendPacket(GamePacketEventArgs args) { if (args.PacketData[0] == Packet.C2S.Cast.Header) { Packet.C2S.Cast.Struct decodedPacket = Packet.C2S.Cast.Decoded(args.PacketData); if (decodedPacket.Slot == SpellSlot.R) { if (target != null) { if (GetNumberHitByR(target) == 0) { //Block packet if enemies hit is 0 args.Process = false; } } if (target == null) { args.Process = false; } } } }
private void Game_OnGameSendPacket(GamePacketEventArgs args) //TODO: Need to find a way to block item usage { if (!IsActive()) { return; } var gPacket = new GamePacket(args.PacketData); var reader = new BinaryReader(new MemoryStream(args.PacketData)); byte packetId = reader.ReadByte(); //PacketId if (packetId == 0x9A) //OLD 0x9A { //int mNetworkId = BitConverter.ToInt32(reader.ReadBytes(4), 0); //byte spellId = reader.ReadByte(); //byte unknown = reader.ReadByte(); //float fromX = BitConverter.ToSingle(reader.ReadBytes(4), 0); //float fromY = BitConverter.ToSingle(reader.ReadBytes(4), 0); //float toX = BitConverter.ToSingle(reader.ReadBytes(4), 0); //float toY = BitConverter.ToSingle(reader.ReadBytes(4), 0); //int tNetworkId = BitConverter.ToInt32(reader.ReadBytes(4), 0); Packet.C2S.Cast.Struct decoded = Packet.C2S.Cast.Decoded(args.PacketData); //PacketSpellId nSpellId = PacketSpellId.ConvertPacketCastToId(spellId); if (/*_latestSpellSlot == nSpellId.SSpellSlot && */ _latestSpellSlot != SpellSlot.Unknown) { _drawSpots = false; foreach (WardSpot wardSpot in WardSpots) { if (!wardSpot.SafeWard && Vector3.Distance(wardSpot.Pos, new Vector3(decoded.FromX, decoded.FromY, ObjectManager.Player.ServerPosition.Z)) <= 250 && !_wardAlreadyCorrected) { args.Process = false; _wardAlreadyCorrected = true; //SendPacket //var sCastPacket = new byte[28]; //var writer = new BinaryWriter(new MemoryStream(sCastPacket)); //writer.Write((byte)0x9A); //writer.Write(mNetworkId); //writer.Write(spellId); //writer.Write(unknown); //writer.Write(wardSpot.Pos.X); //writer.Write(wardSpot.Pos.Y); //writer.Write(wardSpot.Pos.X); //writer.Write(wardSpot.Pos.Y); //writer.Write(tNetworkId); //Game.SendPacket(sCastPacket, PacketChannel.C2S, PacketProtocolFlags.Reliable); Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(decoded.TargetNetworkId, decoded.Slot, decoded.SourceNetworkId, wardSpot.Pos.X, wardSpot.Pos.Y, wardSpot.Pos.X, wardSpot.Pos.Y, decoded.SpellFlag)).Send(); //TODO: Check if its correct _wardAlreadyCorrected = false; return; } if (wardSpot.SafeWard && Vector3.Distance(wardSpot.MagneticPos, new Vector3(decoded.FromX, decoded.FromY, ObjectManager.Player.ServerPosition.Z)) <= 250 && !_wardAlreadyCorrected) { args.Process = false; ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, new Vector3(wardSpot.MovePos.X, wardSpot.MovePos.Y, wardSpot.MovePos.Z)); _latestWardSpot = wardSpot; return; } } } } }