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
Updated:
- 10/19, Fixed the Warp Offset
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:



