• 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

MQ2Supercast -- Cast While Running Plugin

zippzipp

Member
Joined
Nov 17, 2006
RedCents
51¢
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.

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:
won't work on my shaman, sk, or druid, loaded up, memmed spell and /scast spellname while running, interrupted everytime
 
Try making hotkeys and doing it, have tested it on 3 different computers with 3 different classes, cleric, sk, and enchanter, and it works. Occationally there are some interrupts but should cast fine for the most part.

--Zippzipp
 
If im not mistaken your target must be in range from where you started casting because alls this doe is warp you to where you started casting, casts the spell, and waprs back, no?
 
Yea pretty much,

In order for a spell to complete you have to end it where you started it. So target would have to be in range of where you started casting. Thats no problem if your buffing your self, or kiting or what not, also great for pulling or casting on stationary mobs.

-Zippzipp
 
It would be a good idea to place a warning on all plugins that use warp. If this used some kind of passive hack to cast while moving, I'd use it, but warp is just too high profile an issue with SOE for me to risk it, and I'm sure there are others who feel the same way, and would like to know what kind of hacks are being used.
 
I'll put my money on the theory that he said "warp" because it was faster to type than "sends a movement packet" and then have to explain what it is when 15 people ask him.
 
Its not really a warp, it uses movement packets to update position temporarily, this is no different than using, the stuff that is in mq2pax such as summon corpse hack, the /saytarget hack, the open stuff from accross zone hack.

With warp you actually change your position and the place you warp to is your new position to you and everyone in the game. With the movement packet if anything you will popup at the location your sending for a split second and then you will be right back to where you were. Most of time too quick for anyone to notice.

--Zippzipp
 
TSPlayer62 said:
If it doesnt use warp, then why does the author of the plugin not know that? I smell something fishy.

paranoia: baseless or excessive suspicion of the motives of others.
 
I'm well aware of what is in MQ2Pax, lol, I created the plugin (out of cronic's various stuff, yes).

My point is that I define a warp like this: You call a function (or send a packet) for movement that moves you in a way that you couldn't move in without calling that function (or sending that packet). You appear at a place that is *most likely* nowhere that you could have been based on your position and normal movement abilities.

The fact that you do it twice doesn't matter. Just don't try to sugarcoat what's happening here.
 
OK a question I have in all this is.... your running cause you got a really really bad mob chasing your ass across a zone ... bang you land a snare or a really good slow .... life is good mob slows down and lil Johnnie is alive....

well you fail to land that really nice slow or snare and really mad mob is still on your butt and your running like hell...

you cast which basically means you reposition to the spot you fired the spell at so it gets no offset error (think thats how it would work beat me if I am wrong) and at this same point when the spell actually fires the mob is no longer at his designated spot (your running like hell remember) so he ends up out of range.....

so does this explain why it has an 80% rate or whatever it is.....

the spell being cast is from the origional spot spell was initiated and the spell fires from that same spot while the mob has moved to a new location ....
 
You are correct in that the spell is cast from where you hit the cast hotkey, and thus you could run out of range by the time it lands. Solution is to run in a circle or just keep the mob within the range. The reason it fails is i dont think i have the timing 100% correct on when to send the position packet for the end of the spell.

Essentially the way it works is:

1. send position packet x y z and cast spell
2. wait for spell cast timer to nearly finish
3. Just before casting is complete (in the case of this plugin .1 seconds before) send the same position packet x y z.
4. Spell Completes casting and for that split second you are at same spot as you were when you started casting.

The reason it is incomplete sometimes is because i dont think i have the timeing 100% perfect on the packet that is sent back.

--Zippzipp
 
It looks like any items that mess with the spell cast time (such as spell haste 5 for example) will mess with the timing. I noticed this because my mq2 window would say mq2 done casting half a second before the spell was actually up. I took off my boots and then tried, and it was successful. Enjoy the possibilities of this, i know im about to =D
 
So would this set off the same red flags that warping does? For those of us trying to remain below radar for a bit, should we avoid this one?
 
i have tried to compile it myself and use the .dll listed here, and it does NOT work for any of my accounts any of my toons, hotbuttons or not. Interrupts 100% of the time. Mem spell, then make a hotbutton (/scast "Chlorotrope"), target myself, or someone, start running around and hit hotbutton, i start casting, get the 'done casting' echo but i get interrupted.

edit: grammar
 
tsguy said:
So would this set off the same red flags that warping does? For those of us trying to remain below radar for a bit, should we avoid this one?
yes
 
The way this essentially works is it sets a location of where you begin casting and then when your cast timer is ending it warps you back to your location where you were serverside so you can finish casting.

However, I'm going to clean it up a little bit. There's a lot of unnecessary code in there.
 
How would I get it to cast Overthere rk.II ?
Tried typing it in quotes...worked with other multiword spells, but not with the rk.II.
 
Try "Overthere Rk. II"

There's a space between the . and the II.
 
Any chance you are going to update this since the patch? Crashes to desktop when I try and use it. And this is an awesome plugin, I've pulled off some crazy stuff with it. Thanks
 
anyone able to run circles around mobs and cast pbaoe spells?

i tried it but they would often end up hitting me...was trying to mix it with mq2exactspeed to make different sized circles
 
MQ2Supercast -- Cast While Running Plugin

Users who are viewing this thread

Back
Top
Cart