• 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!) (1 Viewer)

TeachersPet

Well-known member
Joined
Jul 27, 2005
RedCents
71¢
MQ2Ventriloquist (Hooray!) -Updated 10/19

A friend asked me to try and make him something that would allow him to hail the Stonespiritist in Vxed without getting him aggro on his crappy slow old computer. Rather than do the sensible thing and have him make a hotbutton, I decided I'd do a little more than that. It hasn't been properly tested, so tell me if it does it without aggro'ing or not.

Commands:
/throwvoice <text goes here>
- does a /say at your target
/throwvoice -hail
- does a /hail at your target

Rich (BB code):
// MQ2Ventriloquist
// Type /throwvoice <your /say goes here> or /throwvoice -hail to "throw" a /say or a /hail safely to your target without any risk of dying.
// By: TeachersPet

#include "../MQ2Plugin.h"
PreSetup("MQ2Ventriloquist");

#define WarpOffset 0x43B211

int ThrowBack = 0;
float ThrowSafeLocY = 0;
float ThrowSafeLocX = 0;
float ThrowSafeLocZ = 0;
float ThrowOrigLocY = 0;
float ThrowOrigLocX = 0;
float ThrowOrigLocZ = 0;
char ThrowCmd[MAX_STRING] = {0};

VOID ThrowVoice(PSPAWNINFO pChar, PCHAR szLine)
{
	DWORD MLPTSC = WarpOffset;

	PZONEINFO Zone = (PZONEINFO)pZoneInfo;
	ThrowSafeLocY = Zone->Unknown0x1ec[0];
	ThrowSafeLocX = Zone->Unknown0x1ec[1];
	ThrowSafeLocZ = Zone->Unknown0x1ec[2];

	ThrowOrigLocX = pChar->X;
	ThrowOrigLocY = pChar->Y;
	ThrowOrigLocZ = pChar->Z;

	if (!pTarget || !ppTarget) return;

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

	if(!strnicmp(szLine, "-hail", 5)) {
		sprintf(ThrowCmd,"/hail");
	} else {
		sprintf(ThrowCmd,"/say %s",szLine);
	}

	Zone->Unknown0x1ec[1] = Target->X;
	Zone->Unknown0x1ec[0] = Target->Y;
	Zone->Unknown0x1ec[2] = Target->Z;

	__asm call dword ptr [MLPTSC];

	ThrowBack = 1;
}

PLUGIN_API VOID OnPulse(PSPAWNINFO pChar)
{
	PZONEINFO Zone = (PZONEINFO)pZoneInfo;
	DWORD MLPTSC = WarpOffset;
	if(ThrowBack == 1) {	
		DoCommand(pChar,"/keypress left");
		DoCommand(pChar,ThrowCmd);
		ThrowBack = 2;
	} else if(ThrowBack == 2) {
		Zone->Unknown0x1ec[0] = ThrowOrigLocY;
		Zone->Unknown0x1ec[1] = ThrowOrigLocX;
		Zone->Unknown0x1ec[2] = ThrowOrigLocZ;
		__asm call dword ptr [MLPTSC];
		Zone->Unknown0x1ec[0] = ThrowSafeLocY;
		Zone->Unknown0x1ec[1] = ThrowSafeLocX;
		Zone->Unknown0x1ec[2] = ThrowSafeLocZ;
		DoCommand(pChar,"/keypress left");
		ThrowBack = 0;
	}
	return;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/throwvoice",ThrowVoice);
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/throwvoice");
}

Updated:
- 10/19, Fixed the Warp Offset
 
Last edited:
Will people see you warp or does it just send the server a diff command to do hails and says?
 
Did not compile that well in C++ 6.0

C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(24) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(25) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(26) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(43) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(44) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(45) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(61) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(62) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(63) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(65) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(66) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\MQ2Throwvoice.cpp(67) : error C2039: 'Unknown0x1ec' : is not a member of '_ZONEINFO'
C:\Documents and Settings\Desktop\mq2\MQ2ThrowVoice\../MQ2Main/EQData.h(1214) : see declaration of '_ZONEINFO'
Error executing cl.exe.

MQ2ThrowVoice.dll - 12 error(s), 0 warning(s)
 
Make sure you change the lines in eqdata otherwise it won't compile... any plugin using any type of warp needs those lines changed... look at my warp plugin if you need the lines...
 
I know.

That was just my way of explaining it to idiots (not you).
 
I don't modify my warp structs. I'm surprised people still do when it's easier just to do this once. Especially with the new ZoneShift you don't have to do ANY struct modifications if you code smart.

If you want to use the modified structs, go hunt and search for all of the Unknown thingys and replace it with the corresponding crap you put in your structs.
 
Anyone test this in the field yet? Only testing I've had time to do is with the Seer in PoK.
 
I'm going to modify it so it doesn't use warp and just uses the packets for moving.
 
I'm going to modify it so it doesn't use warp and just uses the packets for moving.

If you want to do the whole thing with packets, here is the packet for says and tells:

Rich (BB code):
#define PKT_CHANNEL_MESSAGE 0x1004

struct _MSGPACKET {
/*0000*/ char target[64];
/*0064*/ char sender[64];
/*0128*/ unsigned int language;
/*0132*/ unsigned int channel; // 7= tell 8=say 
/*0136*/ char hail; // 0=non hail  1=hail (hail is a form of say)
/*0137*/ char padding136[7];
/*0144*/ unsigned int languageskill; // 100=max
/*0148*/ char message[100];
} M;

The message is actually variable length. the 100 was arbitrary.

If you use the packets to move yourself to the mob, you can immediately speak or hail without waiting on the pulse.

However, if you move back, the server is likely to think you were oor when you hailed. I just use the packet to move to the mob and do the talking and let the client move me back automatically. Works 99% of the time. Still misses the hail on occasion, but I think warping and waiting is the only way to guarantee it gets through.

-piggy
 
TeachersPet, were you sucessful in coding it to not need warp and instead use packets? I would love to use this great plugin!
 
I'm lazy, I'll work on it while I reinstall WinXP on my other box right now.

UPDATE: Testing now!
 
Last edited:
With the plugin recoded to use packets instead of warp, what happens next to the npc if someone is standing right there. Do they see you /say whatever to the npc but don't see you around there? or do the people around your real location see you /say something but the npc responds to you since the server thinks you are close to him?
 
They'll see what you say and see you pop up for a brief second. Not like anyone pays attention.

BTW, using the packet thing in OnPulse is fucking gay. It'll be a bit before I get it finished.
 
So your saying even when you finish with the packet version they will see you infront of the npc for a brief second? Wouldn't that be the same as warping over there?
 
thanks cade, does your have ultrawarp now? or do I still have to type those extra four chars? =(
 
...

/CADEWARP HAS BEEN GONE FOR WEEKS

I posted that a good 15 times
 
I tried to put the following in my AFK Taskmaster script

/zone Dreadlands
/target Marana
/throwvoice <Task Please>

I got a CTD, any ideas?

I'm using Cade's compile.
 
i'm getting the same CTD while using this plugin. I compiled myself so i didn't modify any part of the compile for it, just used the plugin itself. Didn't like /throwvoice -hail either, CTD.
 
humm... the one i was using was from cade's compile, possibly he didn't update that offset i'm thinking? Anywho, thanks for the tip teacher's pet!
 
I updated the offset, sorry about that guys. I updated the offset in MQ2Main.h but forgot about ventriloquist
 
aww... I dont have a way to compile yet. I dont quite get the warping. can it be done without the warping? I mean say my enchanter was just using improved invisibility. I could stand nearby for 10 minutes (barring any GM's)and just make a mushroom talk to someone or something? hehe
 
MQ2Ventriloquist (Hooray!)

Users who are viewing this thread

Back
Top
Cart