Move Request (0x02)
- Status:
implemented - Direction:
Client - Length:
7 bytes - POL reference: https://docs.polserver.com/packets/index.php?Packet=0x02
- Last modified in POL docs:
2009-03-02 06:46:22byTurley
Moongate Packet Classes
MoveRequestPacket(Incoming, Fixed, length7) fromsrc/Moongate.Network.Packets/Incoming/Movement/MoveRequestPacket.cs
Current Moongate Behavior
Moongate currently has packet classes for this opcode.
Packet Build
| Type | Field |
|---|---|
BYTE[1] |
cmd |
BYTE[1] |
direction |
BYTE[1] |
sequence number |
BYTE[4] |
fastwalk prevention key |
Subcommand Build
N/A
Notes
Sequence number starts at 0, after a reset. However, if 255 is reached, the next seq # is 1, not 0.
Fastwalk prevention notes: each 0x02 pops the top element from fastwalk key stack. (0xbf sub1 init. fastwalk stack, 0xbf sub2 pushes an element to stack)
If stack is empty key value is 0. (-> never set keys to 0 in 0xbf sub 1/2)
Because client sometimes sends bursts of 0x02's DON'T check for a certain top stack value.
The only safe way to detect fastwalk: push a key after EACH 0x21, 0x22, (=send 0xbf sub 2) check in 0x02 for stack emptyness.
If empty -> fastwalk alert.
Note that actual key values are irrelevant. (just don't use 0)
Of course without perfect 0x02/0x21/0x22 synch (serverside) it's useless to use fastwalk detection.
Last but not least: fastwalk detection adds 9 bytes per step and player !
Direction Notes:
- 0x00 - North 0x01 - Northeast
0x02 - East
0x03 - Southeast
0x04 - South
0x05 - Southwest
0x06 - West
0x07 - Northwest
Running affects the Direction number also. When running, it is Direction|0x80. Therefore direction becomes 0x80, 0x81, and so on.