0x21 Packet

Here you can discuss packets, implementation and design, and software related to the packet sniffing and such. This is not the place to post packages for POL, but rather discuss the packet side of them.

Moderator: POL Developer

Post Reply
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

0x21 Packet

Post by RusseL »

i wanna hook move rejection packet 0x21
if character cmdlevel > 1 - little freewalk system for staff
but i don't know how i can disable this packet. if character = staffmember - server should not send 0x21

Code: Select all

Packet 0x21
{
  Length 8
  SendFunction movehook:movehook
}

Code: Select all

exported function movehook(who, byref pkt)

if (who.cmdlevel > 1)
    return 1;
else
    return 0;
endif

endfunction
isn't work for me
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: 0x21 Packet

Post by RusseL »

Code: Select all

exported function movehook(who, byref pkt)
 
if (who.cmdlevel > 1)
    var newpacket := CreatePacket( 0x22, 3);
    newpacket.SetInt8(1, pkt.GetInt8(1));
    newpacket.SendPacket( who );
    return 1;
endif
it looks great with this code, but only in client...
server thinks that character still staying for the wall )
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: 0x21 Packet

Post by Turley »

Never ever hook a pkt involved in movement stuff. Just a little performance advise.:) ok back to your question of cause this will work only work for clients and not for the server. The pkt is just a response after some intern stuff. With a pkthook you cannot tell the server that you changed something. You only interface is the pushthrough hook or walkonscript
Post Reply