This plugin i wrote a few days ago allows you to cast while running. Works 80-90 percent of the time the other 10-20 percent you still get interuppted.
Usage:
/scast "Spell name"
i made hotkeys for my spells.
If anyone wants to hook up with me and teach me a few things about writing UI files and integrating it with plugins i can see that as the next addition to this plugin so you dont have to worry about making hotkeys every time.
So just hotkey /scast "Spell Name" and cast spells while running full speed.
Enjoy!!!
--Zippzipp
Usage:
/scast "Spell name"
i made hotkeys for my spells.
If anyone wants to hook up with me and teach me a few things about writing UI files and integrating it with plugins i can see that as the next addition to this plugin so you dont have to worry about making hotkeys every time.
So just hotkey /scast "Spell Name" and cast spells while running full speed.
Rich (BB code):
// MQ2Supercast.cpp : Defines the entry point for the DLL application.
//
// PLUGIN_API is only to be used for callbacks. All existing callbacks at this time
// are shown below. Remove the ones your plugin does not use. Always use Initialize
// and Shutdown for setup and cleanup, do NOT do it in DllMain.
#include <windows.h>
#include "../MQ2Plugin.h"
#undef PKT_UPDATE_POSITION
#define PKT_UPDATE_POSITION 0x178a
void CastCall(PSPAWNINFO, PCHAR, CHAR *);
PreSetup("MQ2Supercast");
// not sure who's movement packet this is
// but i didnt write it
struct _MOVEPKT {
unsigned short SpawnID;
unsigned short TimeStamp;
int Heading:16;
int unknown1:16; //??
float DeltaZ; // ?? not sure
int Animation:16;
int padding014:16; //??
int DeltaHeading:16; //?? not sure
int unknown2:16; //??
float Y;
float DeltaY; //?? not sure
float DeltaX; //?? not sure
float Z;
float X;
} P;
VOID SuperCast(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR ctimestring[MAX_STRING];
CHAR command[MAX_STRING];
PSPELL spell;
// read in spell from command line
GetArg(command,szLine,1);
spell=GetSpellByName(command);
if(!spell){
WriteChatColor("Please enter a valid spell name....", USERCOLOR_DEFAULT);
return;
}
// set up string for delayed dcast call
sprintf(ctimestring,"/timed %d /dcast", int((pCharData1->GetAACastingTimeModifier((EQ_Spell*)spell)+
pCharData1->GetFocusCastingTimeModifier((EQ_Spell*)spell,0)+
spell->CastTime-100)/100));
// acquire target
PSPAWNINFO Target = (PSPAWNINFO)pTarget;
// check for target
if (!pTarget || !ppTarget){
WriteChatColor("You must have a target in order to cast.....", USERCOLOR_DEFAULT);
return;
}
// init move packet
ZeroMemory(&P, sizeof(P));
P.SpawnID = (unsigned short)pChar->SpawnID;
P.Heading = (unsigned int)(pChar->Heading * 4);
// set packet x,y,z
P.Z = pChar->Z;
P.Y = pChar->Y;
P.X = pChar->X;
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
CastCall(pChar, szLine, command);
DoCommand(pChar, ctimestring);
}
void CastCall(PSPAWNINFO pChar, PCHAR szLine, CHAR *command){
CHAR caststring[MAX_STRING];
sprintf(caststring, "/cast \"%s\"",command);
DoCommand(pChar,caststring);
}
VOID DoneCast(PSPAWNINFO pChar, PCHAR szLine)
{
SendEQMessage(PKT_UPDATE_POSITION, &P, sizeof(P));
DoCommand(pChar, "/echo Done Casting");
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/scast",SuperCast);
AddCommand("/dcast",DoneCast);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
RemoveCommand("/scast");
RemoveCommand("/dcast");
}
Enjoy!!!
--Zippzipp
Last edited:

