• 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

MQ2Ventriloquist (Hooray!)

It doesn't make you talk as someone else. Voice graft hacks were nerfed long ago (if anyone remembers Neo the One from Sullon Zek, he did the voice graft hack). What this does is warps you next to a mob, does a /say or a /hail, then quickly warps you back. I may borrow some code from Cosmic (giving him full credit for it) and just modifying this for the public so you don't really warp on your screen, just serverside. I couldn't get it to work using packets when I tried.
 
had a need for this using packets so changed it up some

NOTE: you will show up at the target for a brief second and it is possibly to get agro

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

PreSetup("MQ2Hail");

#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif
#define PKT_UPDATE_POSITION		0x7B59
#define PKT_CHANNEL_MESSAGE	       0x37E3

struct _MovePacket {
/*0000*/ unsigned short SpawnID;
/*0002*/ unsigned short TimeStamp;
/*0004*/ int DeltaHeading:16;
/*0006*/ int padding0006: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;

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];
} M;

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

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

	// init packets
	ZeroMemory(&P, sizeof(P));
	ZeroMemory(&M, sizeof(M));
	P.SpawnID = (unsigned short)pChar->SpawnID;
	P.Heading = (unsigned int)(pChar->Heading * 4);

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

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

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

	// jump to
	P.Z = Target->Z;
	P.Y = Target->Y;
	P.X = Target->X;
	SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));

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

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

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

	// init packets
	ZeroMemory(&P, sizeof(P));
	ZeroMemory(&M, sizeof(M));
	P.SpawnID = (unsigned short)pChar->SpawnID;
	P.Heading = (unsigned int)(pChar->Heading * 4);

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

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

	// jump to
	P.Z = Target->Z;
	P.Y = Target->Y;
	P.X = Target->X;
	SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));

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

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

PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/hailtarget");
	RemoveCommand("/saytarget");
}
 
Last edited:
Your latest update doesn't compile Galuvwen :(
Getting tons of errors, syntax errors, undeclared identifiers, redfinitions etc :(

Gonna look it over, see if I can fix it.. Using VS .NET 2k3, and if I get completely stuck I'll come back with some errors for you to look at ;)

-- edit --
Okay, still getting errors, but found the reason I got the redifintions etc. I didn't get the # in front of #include along in my cutnpaste..

Now I'm just getting tons of syntax errors

Rich (BB code):
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(43): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(43): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(44): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(44): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(56): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(56): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(57): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(57): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(58): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(58): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(75): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(75): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(76): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(76): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(85): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(85): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(86): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(86): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(87): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(87): error C2143: syntax error : missing ';' before '.'
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(41): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(41): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(59): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(59): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(73): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(73): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(88): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(88): error C2275: 'P' : illegal use of this type as an expression
c:\Mq2-20060316\MQ2Hail\MQ2Hail.cpp(5): warning C4005: 'PKT_UPDATE_POSITION' : macro redefinition

-- edit --
My old code compiles fine. Haven't testet it though, but I see you've made some changes, so I'm guessing there's a reason for it ;)

My old code (which compiles):
Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2Hail");

// Code borrowed directly from MQ2CSum
// 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

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];
} M;

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

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

	// init packets
	ZeroMemory(&P, sizeof(P));
	ZeroMemory(&M, sizeof(M));
	P.SpawnID = (unsigned short)pChar->SpawnID;
	P.Heading = (unsigned int)(pChar->Heading * 4);

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

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

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

	// jump to
	P.Z = Target->Z;
	P.Y = Target->Y;
	P.X = Target->X;
	SendEQMessage(5323, &P, sizeof(P));

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

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

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

	// init packets
	ZeroMemory(&P, sizeof(P));
	ZeroMemory(&M, sizeof(M));
	P.SpawnID = (unsigned short)pChar->SpawnID;
	P.Heading = (unsigned int)(pChar->Heading * 4);

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

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

	// jump to
	P.Z = Target->Z;
	P.Y = Target->Y;
	P.X = Target->X;
	SendEQMessage(5323, &P, sizeof(P));

	sprintf(M.message,"%s", szLine);
	SendEQMessage(4100,&M,sizeof(M));
}

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

PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/hailtarget");
	RemoveCommand("/saytarget");
}

http://rg.pastebin.com/pastebin.php?diff=608900
diff between new and my old (I don't know jack about C++) :(

-- edit --
Here's your new code, with a few minor changes which seems to make it compile.
I added the #ifdef (taken from PiggyZone), that wasn't what fixed it though, so doubt it'll have any effect.

The main difference between the old and the new _MovePacket struck, that I noticed, was that the old (which compiles) starts like:
struct _MovePacket

in the new it started like:
typedef struct _MovePacket

so I just removed the "typedef" (no clue what it does), and now it compiles without errors or warnings :)

You can see the diff here, code below:

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

PreSetup("MQ2Hail");

#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif
#define PKT_UPDATE_POSITION	0x7B59
#define PKT_CHANNEL_MESSAGE	0x37E3

struct _MovePacket {
	/*0000*/ unsigned short SpawnID;
	/*0002*/ unsigned short TimeStamp;
	/*0004*/ int DeltaHeading:16;
	/*0006*/ int padding0006: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;

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];
} M;

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

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

	// init packets
	ZeroMemory(&P, sizeof(P));
	ZeroMemory(&M, sizeof(M));
	P.SpawnID = (unsigned short)pChar->SpawnID;
	P.Heading = (unsigned int)(pChar->Heading * 4);

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

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

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

	// jump to
	P.Z = Target->Z;
	P.Y = Target->Y;
	P.X = Target->X;
	SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));

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

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

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

	// init packets
	ZeroMemory(&P, sizeof(P));
	ZeroMemory(&M, sizeof(M));
	P.SpawnID = (unsigned short)pChar->SpawnID;
	P.Heading = (unsigned int)(pChar->Heading * 4);

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

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

	// jump to
	P.Z = Target->Z;
	P.Y = Target->Y;
	P.X = Target->X;
	SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));

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

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

PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/hailtarget");
	RemoveCommand("/saytarget");
}
 
Last edited:
yup no longer use this code and made a few mistakes copying and pasting shit

should be all good now tho
 
MQ2Ventriloquist (Hooray!)

Users who are viewing this thread

Back
Top
Cart