• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Movement Tracking Packet struct

jimbo

Member
Joined
Jun 16, 2006
RedCents
The movement tracking packet consists of one or more segments of 17 bytes, plus one byte tacked onto the end.

That last byte seems so simple now, but it was a big pain in the ass to figure out. When the last movement_type was 2 (stationary), the last byte is just a copy of the first byte of the last segment.

Otherwise (movement_type 1 (moving normally) for example), that last byte is simply what was left over in that memory position the last time it was written. ie. Let's say you have a 15-segment movement tracking packet, and that last byte is 'AE'. Look back at the last time your movement tracking packet was 16-segments or longer, and you will find the first byte of the 16th segment was 'AE'. I don't know if this is a check of some kind on the server side, but I am dubious. It may be just sloppy coding on the part of an EQ dev. I think I will spoof it properly just to be sure.

Here is the struct of the segment:
Rich (BB code):
typedef struct _MovementTrackingSegment {
	float Y;
	float X;
	float Z;
	unsigned char movement_type;	//1=regular, 2=stationary, 3=warp
	unsigned short timestamp2;	//milliseconds in real time
	unsigned short timestamp;	//same as MovePacket TimeStamp
	//BYTE unknown18;
} MovementTrackingSegment, *pMovementTrackingSegment;
Enjoy.

--jimbo
Throw me a red cent if this is useful to you.
 
Someone asked me (via pm) for an example of how to use this. So here is a simple example:
Rich (BB code):
PLUGIN_API BOOL OnSendPacket(DWORD Type, PVOID Packet, DWORD Size)
{

	//if it is a movement tracking packet...
	if (Type == PKT_MOVEMENT_TRACKING) {
		sprintf(Msg, "movement tracking packet\n");
		WriteChatColor(Msg);
		int segment_count = (int)(Size/17);
		pMovementTrackingSegment pMTS = (pMovementTrackingSegment)Packet;	//declare pointer pMTS of our defined struct type and set it to point to the Packet
		for (int segment_number = 1; segment_number <= segment_count; segment_number++) {
			if (pMTS->movement_type == 3) {
				pMTS->movement_type = 2;
			}
			pMTS++;							//increment the pointer one unit of the size of the segment struct
		};

	}
	return true;	//send the packet
}
This cycles through all the tracking packet segments, replacing the warp byte with a standing-still byte. Snazzy 'eh?

Throw me a red cent if you like.
--jimbo
 
Do you mind if I borrow this OnSendPacket code to resurrect MQ2Vanguard? I kind of gave up when I was screwing with it because that stupid ass size changing packet was an unbelievable pain to mess with.
 
You'll also get type 3 when a mob summons you, and in testing using that puts you completely out of sync with the server, causing you to die if you don't fade/gate/escape. There has to be a different way to do this.
 
pms said:
You'll also get type 3 when a mob summons you, and in testing using that puts you completely out of sync with the server, causing you to die if you don't fade/gate/escape. There has to be a different way to do this.

If you add a Boolean like WARPED to the equation then each time you DOWARP put it there (as TRUE), and each time you catch it in the detection you change it back to FALSE that should correct the problem with being summoned, etc.

So like this for example:

Rich (BB code):
if (Type == PKT_MOVEMENT_TRACKING && WARPED) {
 
Makes me wonder given the size of the packet, is the 03 the only thing that needs to be modified? Since other things are using it, not just mob summon. I'm seeing other instances besides warp and mob summon.
 
Movement Tracking Packet struct

Users who are viewing this thread

Back
Top
Cart