Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

// cronic
#include "../MQ2Plugin.h"
#ifdef PKT_CORPSE_DRAG
#undef PKT_CORPSE_DRAG
#endif
#ifdef PKT_CORPSE_DROP
#undef PKT_CORPSE_DROP
#endif
#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif
#define PKT_CORPSE_DRAG 0x61C3
#define PKT_CORPSE_DROP 0x6B74
#define PKT_UPDATE_POSITION 0x7B59
PreSetup("MQ2CSum");
VOID SumCorpseCmd(PSPAWNINFO pChar, PCHAR szLine)
{
// check for target
if (!pTarget || !ppTarget) return;
// make sure it's a corpse
PSPAWNINFO Target = (PSPAWNINFO)pTarget;
if (Target->Type != SPAWN_CORPSE) return;
// setup move packet
struct _MOVEPKT {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int DeltaHeading:16;
/*0006*/ int padding0020:16;
/*0008*/ float DeltaZ;
/*0012*/ float Y;
/*0016*/ int Animation:16;
/*0018*/ int Heading:16;
/*0020*/ float X;
/*0024*/ float DeltaY;
/*0028*/ float DeltaX;
/*0032*/ float Z;
} P;
// init move packet
ZeroMemory(&P, sizeof(P));
P.SpawnID = (unsigned short)pChar->SpawnID;
P.Heading = (unsigned int)(pChar->Heading * 4);
// jump to
P.Z = Target->Z;
P.Y = Target->Y;
P.X = Target->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drag
char szCorpseName[152] = {0};
strcpy(szCorpseName, Target->Name);
SendEQMessage(PKT_CORPSE_DRAG, szCorpseName, 152);
// jump back
P.Z = pChar->Z;
P.Y = pChar->Y;
P.X = pChar->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drop
SendEQMessage(PKT_CORPSE_DROP, "", 0);
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/sumcorpse", SumCorpseCmd);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/sumcorpse");
}
#define PKT_CORPSE_DRAG 0x61C3
#define PKT_CORPSE_DROP 0x6B74
#define PKT_UPDATE_POSITION 0x7B59
#define PKT_CORPSE_DRAG 0x61C3
#define PKT_CORPSE_DROP 0x6B74
#define PKT_UPDATE_POSITION 0x14CB
#define PKT_CORPSE_DRAG 0x7117
#define PKT_CORPSE_DROP 0x7bd6
#define PKT_UPDATE_POSITION 0x178a
struct _MOVEPKT {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int Heading:16;
/*0006*/ int unknown1:16; //??
/*0008*/ float DeltaZ; // ?? not sure
/*0012*/ int Animation:16;
/*0014*/ int padding014:16; //??
/*0016*/ int DeltaHeading:16; //?? not sure
/*0018*/ int unknown2:16; //??
/*0020*/ float Y;
/*0024*/ float DeltaY; //?? not sure
/*0028*/ float DeltaX; //?? not sure
/*0032*/ float Z;
/*0036*/ float X;
} P;
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int Heading:16;
/*0006*/ int unknown1:16; //??
/*0008*/ float DeltaZ; // ?? not sure
/*0012*/ int Animation:16;
/*0014*/ int padding014:16; //??
/*0016*/ int DeltaHeading:16; //?? not sure
/*0018*/ int Animation2:16; // something else to do with animation
/*0020*/ float Y;
/*0024*/ float DeltaY; //?? not sure
/*0028*/ float DeltaX; //?? not sure
/*0032*/ float Z;
/*0036*/ float X;
// cronic
#include "../MQ2Plugin.h"
#ifdef PKT_CORPSE_DRAG
#undef PKT_CORPSE_DRAG
#endif
#ifdef PKT_CORPSE_DROP
#undef PKT_CORPSE_DROP
#endif
#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif
#define PKT_CORPSE_DRAG 0x7117
#define PKT_CORPSE_DROP 0x7bd6
#define PKT_UPDATE_POSITION 0x178a
PreSetup("MQ2CSum");
VOID SumCorpseCmd(PSPAWNINFO pChar, PCHAR szLine)
{
// check for target
if (!pTarget || !ppTarget) return;
// make sure it's a corpse
PSPAWNINFO Target = (PSPAWNINFO)pTarget;
if (Target->Type != SPAWN_CORPSE) return;
// setup move packet
struct _MOVEPKT {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int Heading:16;
/*0006*/ int unknown1:16; //??
/*0008*/ float DeltaZ; // ?? not sure
/*0012*/ int Animation:16;
/*0014*/ int padding014:16; //??
/*0016*/ int DeltaHeading:16; //?? not sure
/*0018*/ int Animation2:16; // something else to do with animation
/*0020*/ float Y;
/*0024*/ float DeltaY; //?? not sure
/*0028*/ float DeltaX; //?? not sure
/*0032*/ float Z;
/*0036*/ float X; } P; // 40
// init move packet
ZeroMemory(&P, sizeof(P));
P.SpawnID = (unsigned short)pChar->SpawnID;
P.Heading = (unsigned int)(pChar->Heading * 4);
// jump to
P.Z = Target->Z;
P.Y = Target->Y;
P.X = Target->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drag
char szCorpseName[152] = {0};
strcpy(szCorpseName, Target->Name);
SendEQMessage(PKT_CORPSE_DRAG, szCorpseName, 152);
// jump back
P.Z = pChar->Z;
P.Y = pChar->Y;
P.X = pChar->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drop
SendEQMessage(PKT_CORPSE_DROP, "", 0);
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/sum", SumCorpseCmd);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/sum");
}
struct _MOVEPKT {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int Heading:16;
/*0006*/ int unknown1:16; //??
/*0008*/ float DeltaZ; // ?? not sure
/*0012*/ int Animation:16;
/*0014*/ int padding014:16; //??
/*0016*/ int DeltaHeading:16; //?? not sure
/*0018*/ int unknown2:16; //??
/*0020*/ float Y;
/*0024*/ float DeltaY; //?? not sure
/*0028*/ float DeltaX; //?? not sure
/*0032*/ float Z;
/*0036*/ float X;
} P;
// cronic
#include "../MQ2Plugin.h"
#ifdef PKT_CORPSE_DRAG
#undef PKT_CORPSE_DRAG
#endif
#ifdef PKT_CORPSE_DROP
#undef PKT_CORPSE_DROP
#endif
#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif
#define PKT_UPDATE_POSITION 0x178a
#define PKT_CORPSE_DRAG 0x7117
#define PKT_CORPSE_DROP 0x7bd6
PreSetup("MQ2CSum");
VOID SumCorpseCmd(PSPAWNINFO pChar, PCHAR szLine)
{
// check for target
if (!pTarget || !ppTarget) return;
// make sure it's a corpse
PSPAWNINFO Target = (PSPAWNINFO)pTarget;
if (Target->Type != SPAWN_CORPSE) return;
// setup move packet
struct _MOVEPKT {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int Heading:16;
/*0006*/ int unknown1:16; //??
/*0008*/ float DeltaZ; // ?? not sure
/*0012*/ int Animation:16;
/*0014*/ int padding014:16; //??
/*0016*/ int DeltaHeading:16; //?? not sure
/*0018*/ int Animation2:16; // something else to do with animation
/*0020*/ float Y;
/*0024*/ float DeltaY; //?? not sure
/*0028*/ float DeltaX; //?? not sure
/*0032*/ float Z;
/*0036*/ float X;
} P;
// init move packet
ZeroMemory(&P, sizeof(P));
P.SpawnID = (unsigned short)pChar->SpawnID;
P.Heading = (unsigned int)(pChar->Heading * 4);
// jump to
P.Z = Target->Z;
P.Y = Target->Y;
P.X = Target->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drag
char szCorpseName[152] = {0};
strcpy(szCorpseName, Target->Name);
SendEQMessage(PKT_CORPSE_DRAG, szCorpseName, 152);
// jump back
P.Z = pChar->Z;
P.Y = pChar->Y;
P.X = pChar->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drop
SendEQMessage(PKT_CORPSE_DROP, "", 0);
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/sumcorpse", SumCorpseCmd);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/sumcorpse");
}
// cronic
#include "../MQ2Plugin.h"
#ifdef PKT_CORPSE_DRAG
#undef PKT_CORPSE_DRAG
#endif
#ifdef PKT_CORPSE_DROP
#undef PKT_CORPSE_DROP
#endif
#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif
#define PKT_CORPSE_DRAG 0x7117
#define PKT_CORPSE_DROP 0x7bd6
#define PKT_UPDATE_POSITION 0x178a
PreSetup("MQ2CSum");
VOID SumCorpseCmd(PSPAWNINFO pChar, PCHAR szLine)
{
// check for target
if (!pTarget || !ppTarget) return;
// make sure it's a corpse
PSPAWNINFO Target = (PSPAWNINFO)pTarget;
if (Target->Type != SPAWN_CORPSE) return;
// setup move packet
struct _MOVEPKT {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int Heading:16;
/*0006*/ int unknown1:16; //??
/*0008*/ float DeltaZ; // ?? not sure
/*0012*/ int Animation:16;
/*0014*/ int padding014:16; //??
/*0016*/ int DeltaHeading:16; //?? not sure
/*0018*/ int Animation2:16; // something else to do with animation
/*0020*/ float Y;
/*0024*/ float DeltaY; //?? not sure
/*0028*/ float DeltaX; //?? not sure
/*0032*/ float Z;
/*0036*/ float X;
} P;
// init move packet
ZeroMemory(&P, sizeof(P));
P.SpawnID = (unsigned short)pChar->SpawnID;
P.Heading = (unsigned int)(pChar->Heading * 4);
// jump to
P.Z = Target->Z;
P.Y = Target->Y;
P.X = Target->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drag
char szCorpseName[152] = {0};
strcpy(szCorpseName, Target->Name);
SendEQMessage(PKT_CORPSE_DRAG, szCorpseName, 152);
// jump back
P.Z = pChar->Z;
P.Y = pChar->Y;
P.X = pChar->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
// corpse drop
SendEQMessage(PKT_CORPSE_DROP, "", 0);
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/sumcorpse", SumCorpseCmd);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/sumcorpse");
}
thez said:Lol, the reason I made MQ2Pax was so that I could combine all of the plugins I had with opcodes / structs into a single plugin, so that I didn't have to keep updating MvPkt in 50 different plugin codes. If you want the /rez command, just add that particular plugin into your repetoire...it's not a big deal.
thez said:Lol, the reason I made MQ2Pax was so that I could combine all of the plugins I had with opcodes / structs into a single plugin, so that I didn't have to keep updating MvPkt in 50 different plugin codes. If you want the /rez command, just add that particular plugin into your repetoire...it's not a big deal.

