Use this to summon a corpse. Attached is a compiled version. Have fun.
Instructions:
- Target a corpse that you have consent to move.
- Type '/sumcorpse'.
Instructions:
- Target a corpse that you have consent to move.
- Type '/sumcorpse'.
Rich (BB code):
// 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 0x50C0
#define PKT_CORPSE_DROP 0x7C7C
#define PKT_UPDATE_POSITION 0x14CB
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*/ float Y;
/*0008*/ float DeltaZ;
/*0012*/ float DeltaY;
/*0016*/ float DeltaX;
/*0020*/ int Animation:10;
/*0020*/ int DeltaHeading:10;
/*0020*/ int padding0020:12;
/*0024*/ float X;
/*0028*/ float Z;
/*0032*/ int Heading:12;
/*0032*/ int padding1_0032:10;
/*0032*/ int padding2_0032:10;
} P; // 36
// 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");
}
Last edited:



