• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

MQ2Hail (1 Viewer)

Cheesymac

Member
Joined
Apr 15, 2006
RedCents
10¢
does this actually work for anyone?


/saytarget task from anywhere but speaking range of Marana in DL does nothing for me....
 
updated source - compile this and try

It works fine for me.

/hailtarget
/saytarget

Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2Hail");

#define PKT_UPDATE_POSITION			0x178a // 6-13
#define PKT_CHANNEL_MESSAGE			0xb5a  // 6-13

typedef struct _MovePacket {
/*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;
} MovePacket, *PMovePacket; // 40

typedef struct _MsgPacket {
/*0000*/ char target[64];
/*0064*/ char sender[64];
/*0128*/ unsigned int language;
/*0132*/ unsigned int channel;
/*0136*/ char padding136[8];
/*0144*/ unsigned int languageskill;
/*0148*/ char message[100];
} MsgPacket, *PMsgPacket; 

VOID ThrowHail(PSPAWNINFO pChar, PCHAR szLine)
{
	if (!pTarget || !ppTarget) return;

	PSPAWNINFO Target = (PSPAWNINFO)pTarget;
	if (Target->Type != SPAWN_NPC) return;

	MovePacket MovePkt;
	MsgPacket MsgPkt;
	ZeroMemory(&MovePkt, sizeof(MovePkt));
	ZeroMemory(&MsgPkt, sizeof(MsgPkt));
	MovePkt.SpawnID = (unsigned short)pChar->SpawnID;
	MovePkt.Heading = (unsigned int)(pChar->Heading * 4);

	strcpy(MsgPkt.target,Target->Name);

	char szHailName[100] = {0};
	strcpy(szHailName, Target->DisplayedName);

	strcpy(MsgPkt.sender,pChar->Name);
	MsgPkt.channel=8;
	MsgPkt.languageskill=100;

	MovePkt.Z = Target->Z;
	MovePkt.Y = Target->Y;
	MovePkt.X = Target->X;
	SendEQMessage(PKT_UPDATE_POSITION, &MovePkt, sizeof(MovePkt));

	sprintf(MsgPkt.message,"Hail, %s", szHailName);
	SendEQMessage(PKT_CHANNEL_MESSAGE,&MsgPkt,sizeof(MsgPkt));
}

VOID ThrowSay(PSPAWNINFO pChar, PCHAR szLine)
{
	if (!pTarget || !ppTarget) return;

	PSPAWNINFO Target = (PSPAWNINFO)pTarget;
	if (Target->Type != SPAWN_NPC) return;

	MovePacket MovePkt;
	MsgPacket MsgPkt;

	ZeroMemory(&MovePkt, sizeof(MovePkt));
	ZeroMemory(&MsgPkt, sizeof(MsgPkt));
	MovePkt.SpawnID = (unsigned short)pChar->SpawnID;
	MovePkt.Heading = (unsigned int)(pChar->Heading * 4);

	strcpy(MsgPkt.target,Target->Name);

	strcpy(MsgPkt.sender,pChar->Name);
	MsgPkt.channel=8;
	MsgPkt.languageskill=100;

	MovePkt.Z = Target->Z;
	MovePkt.Y = Target->Y;
	MovePkt.X = Target->X;
	SendEQMessage(PKT_UPDATE_POSITION, &MovePkt, sizeof(MovePkt));

	sprintf(MsgPkt.message,"%s", szLine);
	SendEQMessage(PKT_CHANNEL_MESSAGE,&MsgPkt,sizeof(MsgPkt));
}

PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/hailtarget", ThrowHail);
	AddCommand("/saytarget", ThrowSay);
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{	
	RemoveCommand("/hailtarget");
	RemoveCommand("/saytarget");
}
 
It warps your character, but not your view.

I suppose you could always try it with Ghosting on, but I don't know if that'd make a difference.
 
k cool, would you mind posting the offsets as well, I like to compile the plugins i use when the sources are available, I dunno why It's just one of my things.
 
MQ2Hail

Users who are viewing this thread

Back
Top