Is it possible to hook a packet like 0x6C (target cursor) and edit the packet info the client sends?
I want it to always show the result of GetMapInfo() in the last part of the packet, instead of the landtile or static #.
What ive got now is a hook catching the packet and creating a new packet of the same type to what i want. But how do i make POL use the edited packet? I've tried
packet := newpacket;
return 0;
or is it sent via a different packet to the client with the info?
Editing packets.
Moderator: POL Developer
-
- Grandmaster Poster
- Posts: 120
- Joined: Thu Jan 18, 2007 2:34 am
If you use .SetInt16(), etc... you'll be rewriting 16-bytes of memory starting at that offset, which would overwrite the old data. I can't think of a reason that packet := newpacket wouldn't work, but using SetInt16(), etc... would just be the first thing I would check, because I know that way works.
Could you post your code? Maybe it's something else.
Could you post your code? Maybe it's something else.
-
- Grandmaster Poster
- Posts: 120
- Joined: Thu Jan 18, 2007 2:34 am