• 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

MQ2CGank (1 Viewer)

Attached is a compiled MQ2CGank using randomguy's code

[size=+1]Randomguy_01 is teh win![/size]
 
Last edited:
my question is what are you looking for to find the offset #define PKT_GRAB_ITEM 0xF47. I am familiar with how to find offsets. I can do most of them myself. However am at a dead end trying to find this one.

What are you putting in as a search?
 
Cadewen said:
Attached is a compiled MQ2CGank using randomguy's code

[size=+1]Randomguy_01 is teh win![/size]

ok i have an issue i downloaded the link and put it with Tones compile but it won't let me load it for some reason... i get an error in my MQ2 box..

Also a qeustion rq if possible i want to use this to do my groundspawns for my epic 1.5. so to use this since i have locs of the groundspawns can i /gank the loc of the groundspawn can someone explain it to me please?

i can't wait to utilize this thanks
 
You have to edit the Macroquest.ini file and add the plugin under the plugin section. Then it should run in game.
 
if it won't load in game, that won't load it either. Maybe Tone forgot to remove the date/time check? :D
 
need new offsets for this if anyone has them post em i will update my compile with this included =))

This is the offset that is needed...if i get some time i may try and find it

Rich (BB code):
#define PKT_GRAB_ITEM        0x3CB2
 
I forgot about this plugin or I would have posted the opcode for it :P Sorry guys gogo cronic.
 
Any idea what it means when you get this? Is it saying that the #undef isn't working?

Rich (BB code):
--------------------Configuration: MQ2Gank - Win32 Release--------------------
Compiling...
MQ2Gank.cpp
C:\Program Files\MQ2\MQ2Gank\../MQ2Main/MQ2Internal.h(343) : warning C4005: 'PKT_UPDATE_POSITION' : macro redefinition
        C:\Program Files\MQ2\MQ2Gank\MQ2Gank.cpp(7) : see previous definition of 'PKT_UPDATE_POSITION'
EQLIB_IMPORTS
Linking...
   Creating library ../Release/MQ2Gank.lib and object ../Release/MQ2Gank.exp

MQ2Gank.dll - 0 error(s), 1 warning(s)
 
It was working before the new expansion release...

It doesn't crash or anything, but when I target the item on the ground and type /gank, nothing happens.
Rich (BB code):
#include "../MQ2Plugin.h" 

#ifdef PKT_UPDATE_POSITION 
#undef PKT_UPDATE_POSITION 
#endif 

#define PKT_UPDATE_POSITION  0x2B94 
#define PKT_GRAB_ITEM        0x0F47 

PreSetup("MQ2CGank"); 

VOID GankCmd(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   // check for target 
   if (!pTarget || !pGroundTarget) return; 
    
   // acquire item 
   PGROUNDITEM pItem = (PGROUNDITEM)pGroundTarget; 

   // setup move packet 
   struct _MOVEPKT { 
   /*0000*/ unsigned short SpawnID; 
   /*0002*/ unsigned short TimeStamp; 
   /*0004*/ int Heading:12; 
   /*0004*/ int padding1_0004:10; 
   /*0004*/ int padding2_0004:10; 
   /*0008*/ float DeltaY; 
   /*0012*/ float X; 
   /*0016*/ float DeltaX; 
   /*0020*/ int DeltaHeading:10; 
   /*0020*/ int Animation:10; 
   /*0020*/ int padding0020:12; 
   /*0024*/ float Z; 
   /*0028*/ float Y; 
   /*0032*/ float DeltaZ; 
   } P; 

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

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

   // gank 
   struct _GRABITEMPKT { 
      unsigned long DropID; 
      unsigned long SpawnID; 
   } GP; 

   GP.DropID = pItem->DropID; 
   GP.SpawnID = pChar->SpawnID; 
   SendEQMessage(PKT_GRAB_ITEM, &GP, sizeof(GP)); 

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

   // clear target 
   pTarget = 0; 
   pGroundTarget = 0; 
} 

PLUGIN_API VOID InitializePlugin(VOID) 
{ 
   AddCommand("/gank", GankCmd); 
} 

PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
   RemoveCommand("/gank"); 
}
 
small correction:
Rich (BB code):
#define PKT_UPDATE_POSITION 0x14CB
#define PKT_GRAB_ITEM 0xF47

tested and working as of now.
 
When you drop the item its: 0xF47
When you pick it up its 0x3BC2

Gimmie a sec and ill get it to work.
 
It works fine with his original code just change the packets to numerical instead of hex.
 
so all you have to do is type /gank to turn it on? i havent been able to find a list of commands for it
 
The source is 2 post above yours you should be able to tell from the source what to do with it. You /itemtarget the groundspawn and /gank to pick it up.
 
bah, the way i was thinking was that it would pick up any item on the ground in a zone, without having to target it to tell it what to pick up.
 
The /itemtarget works but the /gank doesnt for me... i get in red txt in MQ window "DoCommand - Couldn't parse '/gank' ... what am i doing wrong?
 
having an issue with /gank, it's not ganking :) I can /itemtarget
but when i /gank noting on cusor or in inv. anyone have this working since last patch?
 
The way /itemtarget and /doortarget work have changed since the last patch. That plugin may be broken due to this change. It's really quite a superficial change, and I'll see if maybe I can update it myself with some spare time this week. I'll keep ya posted.

-CodeCaster
 
Small fix for CGank and updated for 12/7/05 opcodes.

When you use /itemtarget, it says Item "Soandso" targeted in the MQ2 console rather than it putting something in your target window, other than that it still works fine.

Rich (BB code):
code outdated
 
Last edited:
In POK today when i did /itemtarget I targeted the pottery wheel and retrieved favourite recipes ... oO
 
Yeah it has always done this... :)

You'll have to write a macro that selects the type of item you want if you don't want ANY ground spawn targetted, which tradeskill combiners are classified as.

-CodeCaster
 
Pity the forge/potterywheel/oven inventory doesn't come up though ... would be useful to make my misty thickets right next to the banker so I didnt have to keep running back and forward for top ups of ingredients.
 
Updated for the 2-23-06 patch and new update position structure

Rich (BB code):
// cronic

#include "../MQ2Plugin.h"
PLUGIN_VERSION(20060223);

#ifdef PKT_UPDATE_POSITION
#undef PKT_UPDATE_POSITION
#endif

#define PKT_UPDATE_POSITION  0x7B59
#define PKT_GRAB_ITEM        0x5546

PreSetup("MQ2CGank");

VOID GankCmd(PSPAWNINFO pChar, PCHAR szLine)
{
	// check for target
	if (!pGroundTarget) {
		WriteChatf("Please use /itemtarget to aquire a target.");
		return;
	}

	// acquire item
	PGROUNDITEM pItem = (PGROUNDITEM)pGroundTarget;
	PSPAWNINFO Target = (PSPAWNINFO)pTarget; 

	// setup move packet
	struct _MOVEPKT {
	/*0000*/ unsigned short SpawnID;
	/*0002*/ unsigned short TimeStamp;
	/*0004*/ int DeltaHeading:16;
	/*0006*/ int padding0020: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;

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

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

	// gank
	struct _GRABITEMPKT {
		unsigned long DropID;
		unsigned long SpawnID;
	} GP;

	GP.DropID = pItem->DropID;
	GP.SpawnID = pChar->SpawnID;
	SendEQMessage(PKT_GRAB_ITEM, &GP, sizeof(GP));

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

	// clear target
	pTarget = 0;
	pGroundTarget = 0;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/gank", GankCmd);
}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
	RemoveCommand("/gank");
}
 
Last edited:
this one still works, however other plugins i'm running into weirdness.. csum wont work and the plugin i wrote to place items on a Y,X,Z loc is sending the items to the succor point in the zone.
 
as I said, MOVEPKT changed completely, anything that uses it will be broken
 
MQ2CGank

Users who are viewing this thread

Back
Top
Cart