TeachersPet
Well-known member
- Joined
- Jul 27, 2005
- RedCents
- 71¢
*** I was just informed MQ2Pax does this, I wish I knew why I keep making random plugins I don't need to make ***
I lost cronic's source to his old MQ2CSum and threw this together.
I lost cronic's source to his old MQ2CSum and threw this together.
Rich (BB code):
/*
MQ2SumCorpse
By: TeachersPet
Usage: /sumcorpse
cronic made a plugin that's probably pretty close to this. I lost his source so I threw this together.
*/
#include "../MQ2Plugin.h"
#define OP_MovePkt 0x178A
#define OP_CorpseDrag 0x8279
#define OP_CorpseDrop 0x3e35
struct _MOVEPKT {
unsigned short SpawnID;
unsigned short TimeStamp;
int ZHeading:12;
unsigned int HeadingRemainder:2;
unsigned int Heading:10;
unsigned int paddingHeading:8;
float DeltaY;
unsigned int Animation:10;
unsigned int paddingAnimation:22;
float DeltaX;
float Y;
int DeltaHeading:10;
int paddingDeltaHeading:22;
float DeltaZ;
float Z;
float X;
} M;
PreSetup("MQ2SumCorpse");
VOID SumCorpse(PSPAWNINFO pChar, PCHAR szLine) {
if (!pTarget || !ppTarget) {
WriteChatColor("Please Target a corpse",USERCOLOR_DEFAULT);
return;
}
PSPAWNINFO Target = (PSPAWNINFO)pTarget;
if (Target->Type != SPAWN_CORPSE) {
WriteChatColor("Please Target a corpse",USERCOLOR_DEFAULT);
return;
}
ZeroMemory(&M, sizeof(M));
M.SpawnID = (unsigned short)GetCharInfo()->pSpawn->SpawnID;
M.Heading = GetCharInfo()->pSpawn->Heading;
M.Y = Target->Y;
M.X = Target->X;
M.Z = Target->Z;
SendEQMessage(OP_MovePkt, &M, sizeof(M));
SendEQMessage(OP_CorpseDrag, Target->Name, 152);
M.Y = GetCharInfo()->pSpawn->Y;
M.X = GetCharInfo()->pSpawn->X;
M.Z = GetCharInfo()->pSpawn->Z;
SendEQMessage(OP_MovePkt, &M, sizeof(M));
SendEQMessage(OP_CorpseDrop, Target->Name, 17);
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/sumcorpse",SumCorpse);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/sumcorpse");
}



I know...just tired of the same question being asked and the same answer given...just thought I would throw in a curve ball and see what came up. 