• 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

Warp Source, must compile & find offset

Status
Not open for further replies.
The right offset is in this thread somewhere. The command to warp to coordinates is not /warp <x,y,z>, its /warp loc <x,y,z>.
 
Just when I have things workin, Sony goes and screws it up=(. Anyway, after the latest patch I downloaded the new MQ2, and compiled it with all my plugins. When I do a /warp, it says in the window that it is warping to the correct spot, but I dont move. Any ideas?
 
go and download IDA Pro from isohunt.com (bittorent site) disassemble the eqgame.exe wait untill the bar turns somewhat blue, and search for "offset aFinishedMovelo" right above that should be "call sub_4372FF" the sub_4372FF is your offset, ie. 0x004372FF
 
works great, thanks for the info on how to find that out for myself next time. :D
 
I just tried to compile this and got 12 errors.

Each one says that "Safe(X or Y or Z)Loc is not a member of _ZONEINFO"

I followed the instructions that come with MQ2 in the manual, under the heading "Creating a MacroQuest2 Plugin"

Thanks in advance for any suggestions or help! :)
 
Open the EQData.h file, find your _ZONEINFO or whatever and find this line under it.

/*0x1ec*/ (some extra garbage over here)
delete this whole line and add
/*0x1ec*/ FLOAT SafeYLoc;
/*0x1f0*/ FLOAT SafeXLoc;
/*0x1f4*/ FLOAT SafeZLoc;
to where it used to be.
 
Thanks Siddin!! I did figure that out finally! DUH for me! LOL! I didn't read the whole post before I compiled it, or understand what was in the .h file. Got it now! :D
 
where can i find something to complie marco quest ? i have been trying to get my auth code compiled for 2months and havent been able to play plz help me :( :( :( :(
 
post your auth code here and i'll compile it for you right now
 
Last edited:
OK, I was a little premature when I said that I got it working. I did compile the warp plugin by itself with no errors, but on logging in to EQ, the plugin wasn't listed nor would it load. I tried to do a complete recompile of MQ2 with the warp plugin added to the workspace, and everything compiles fine EXCEPT the warp plugin. I continually get an error of 1104 cannot open detours.lib. I can delete the mq2warp folder and recompile mq and it compiles fine. Any ideas as to what I am doing wrong?
 
have you tried to compile everything else first, then add mq2warp to the workspace and do a single compile of just mq2warp?

Also here's the version of MQ2WARP that I use, i haven't checked to see if they're the same at all yet, but anyhow...

Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2Safe");
#define CDisplay__MoveLocalPlayerToSafeCoords	0x0040E19D

VOID DoWarp(float y, float x, float z);
VOID Warp(PSPAWNINFO pChar, PCHAR szLine);
VOID GateBind(PSPAWNINFO, PCHAR);

PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/warp",Warp);
	AddCommand("/gate",GateBind);
	GetCharInfo()->Skill[25] = 252;
}


PLUGIN_API VOID ShutdownPlugin(VOID)
{
	DebugSpewAlways("Shutting down MQ2Safe");
	RemoveCommand("/gate");
	RemoveCommand("/warp");
}


// WARP commands
VOID Warp(PSPAWNINFO pChar, PCHAR szLine)
{
	static float LastY;
	static float LastX;
	static float LastZ;
	float NewY = 0;
	float NewX = 0;
	bRunNextCommand = TRUE;
	PSPAWNINFO psTarget = NULL;
	PZONEINFO Zone = (PZONEINFO)pZoneInfo;
    CHAR command[MAX_STRING]; GetArg(command,szLine,1);
	CHAR Y[MAX_STRING]; GetArg(Y,szLine,2);
	CHAR X[MAX_STRING]; GetArg(X,szLine,3);
	CHAR Z[MAX_STRING]; GetArg(Z,szLine,4);
	if (
		stricmp(command, "succor") != 0 &&
		stricmp(command, "loc") != 0 &&
		stricmp(command, "last") != 0 &&
		stricmp(command, "target") != 0
	) {
		WriteChatColor("Usage: /warp <succor|last|target|loc y x z>", CONCOLOR_RED);
		return;
		} else {
		if (!stricmp(command,"target"))  {
			if (ppTarget && pTarget) {
			psTarget = (PSPAWNINFO)pTarget;
			}
			if (!psTarget) {
				WriteChatColor("You must have a target for /warp target.", CONCOLOR_RED);
				return;
			}
			float TargetZ = float (psTarget->Z-(psTarget->AvatarHeight*0.5));
			srand (time(NULL));
				//random Y
				if (rand()%2!=0)
				{
					NewY = float(psTarget->Y+rand()%12);
				}
				else {
					NewY = float(psTarget->Y-rand()%12);
				}
				//random X
				if (rand()%2!=0)
				{
					NewX = float(psTarget->X+rand()%12);
				}
				else {
					NewX = float(psTarget->X-rand()%12);
				}
			LastY = NewY;
			LastX = NewX;
			LastZ = TargetZ;
			DoWarp(NewY, NewX, TargetZ);
		} else if (!stricmp(command,"succor"))  {
			static float north = 0;
			((PSPAWNINFO)pCharSpawn)->Heading = north;
			DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
			__asm call dword ptr [MLPTSC];
			return;
		} else if (!stricmp(command,"loc")) {
		if ((Y[0] == 0) || (X[0] == 0) || (Z[0] == 0))
		{
			WriteChatColor("You must provide <y> <x> <z> if going to a location.",
CONCOLOR_RED);
			return;
		}
			LastY = (float)atof(Y);
			LastX = (float)atof(X);
			LastZ = (float)atof(Z);
		DoWarp((float)atof(Y), (float)atof(X), (float)atof(Z));
		return;
		} else if (!stricmp(command,"last")) {
		if ((LastY==0) || (LastX==0) || (LastZ==0))
		{
			WriteChatColor("You must have warped before to use this command!.",
CONCOLOR_RED);
			return;
		}
		DoWarp(LastY, LastX, LastZ);
		return;
		}
	}
}
// GATE
VOID GateBind(PSPAWNINFO pChar, PCHAR szLine)
{
	pChar->Type = SPAWN_CORPSE;
}
// MEGAWARP

VOID DoWarp(float y, float x, float z)
{
	PZONEINFO Zone = (PZONEINFO)pZoneInfo;

	float SafeY = Zone->SafeYLoc;
	float SafeX = Zone->SafeXLoc;
	float SafeZ = Zone->SafeZLoc;

	Zone->SafeYLoc = y;
	Zone->SafeXLoc = x;
	Zone->SafeZLoc = z;

	CHAR szMsg[MAX_STRING] = {0};
	sprintf(szMsg, "Warping to: %3.2f, %3.2f, %3.2f.", Zone->SafeXLoc,
Zone->SafeYLoc, Zone->SafeZLoc);
	WriteChatColor(szMsg, COLOR_PURPLE);

	DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
	__asm call dword ptr [MLPTSC];

	Zone->SafeYLoc = SafeY;
	Zone->SafeXLoc = SafeX;
	Zone->SafeZLoc = SafeZ;
}
 
Last edited:
Anon, are any of your other custom pulgins working? Like MQ2zone? Are you sure you did everything Sidin asked? PM me your warpcode and EQdata.h if your other CUSTOM (like MQ2zone) plugins are working.
 
Here are the steps I am using to compile this:

1. Start>Run: c:\mq2\mkplugin mq2warp
This creates the mq2warp folder in mq2

2. c:\mq2\mq2main eqdata.h
Click this ( which opens up VS 6) and replace the code "/*0x1ec*/
FLOAT Unknown0x1ec[3];" with the 3 new lines of code. "Save" the file.

3. Add the new plugin to the Visual Studio workspace.
c:\mq2 macroquest2.dsw
Click the .dsw file, this will open VS 6. Select Projects>Insert Projects
into workspace, then select mq2warp from the list. Select mq2warp.dsp.
MQ2Warp is now listed as part of the workspace.

4. Left click and highlight the mq2warp code that is listed in the forums.
Right click on the highlighted code and choose copy from the menu.
c:\mq2\mq2warp mq2warp.cpp. Click on this file. this will open up VS 6.
Highlight the displayed code, right click on the highlighted code and
choose paste from the menu. This will replace the highlighted code with
the mq2warp code that I got from the forums.

5. Replace the offset code at the beginning of the code with the correct
offset. 0x004372FF is what I used as it was listed in this thread as the
latest correct offset.

6. Choose Build>Set Active Configuration. Select MQ2Warp-Win32 Release.
Click OK. Hit Cntrl+F7 to compile. It compiles with no errors or warnings
at this point.

7. The plugin should be ready to use at this point I assume, but it don't work.
When I log into EQ, with MQ2 running, and check "plugin list" mq2warp
isn't listed, nor will it load with "plugin mq2warp"

8. I have tried to go back at this point and recompile the entire solution and
that is where I get the 1104 error. I have tried redoing it after a clean
reboot, same error. I have deleted the entire MQ2 directory, reinstalled
MQ2 and redid the steps several times, with no change. Everything
compiles fine until it gets to mq2warp, and I get an error, every time.

9. Easy_Modder, this is my first attempt at adding a plugin so I have no other
"Custom" plugins. Sorry.

10. I am sure I am just being a Noob about this, and am merely doing
something very basic wrong here. It is probably a case of "Can't see the
forest for the trees". If anyone sees where I am going wron here, please
let me know.

Thanks!!

You guys Rock!
 
mq2 has a few problems with vs6.0 so you'll first need to clean up all the output files in the release folder (except macroquest2.exe) manually or you can use vs6 to clean the workspace first (recommended) but either way to make sure that all the plugins compile first just compile the mq2main. then after that compiles you should be able to compile the whole project without any errors. If you're still having trouble i'll tell you where to get VS2003 pro .net
 
OK, I have absolutely NO idea what I did, but went back and recompiled again after another clean boot, and mq2warp compiled fine, loaded fine and works fine! :)
BTW Siddin, the way you told me to complie it was the way I was doing it.
but, I would be interested in getting VS2003 if you wouldn't mind. PM me if you need to.
Thanks for the help guys!
 
new offset as of 20050215 5:00 am pst. 0x004404B8
 
Here a question, anyone know how aggro works? If you hit a mob and then /warp to the zone line, would the mob cause a train?
 
it depends on how far away the zoneline is as well as how much aggro you have on the mob.
 
new offset 0x00440942
 
Last edited:
I Don't know what i'm doing wrong but I changed the things that were listed.. compiled no errors.. plugin loaded fine.. but i get a docommand - couldn't parse /warp target everytime i try it.

The only thing that works is if I do /zone poknowledge or /zone nexus or something like that I get turned to a diff direction but stay in the same spot.
 
if you did everything it should be working... *ponder* did you change the offset to what it is currently? 0x00440942
 
This is the code I used when i compiled it. I'm using visual studio.net to compile and the rest of mq2 compiled and works fine with that. Just not warp.





#include "../MQ2Plugin.h"

PreSetup("mq2warp");
#define CDisplay__MoveLocalPlayerToSafeCoords 0x00440942

VOID DoWarp(float y, float x, float z);
VOID Warp(PSPAWNINFO pChar, PCHAR szLine);
VOID GateBind(PSPAWNINFO, PCHAR);

PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/warp",Warp);
AddCommand("/gate",GateBind);
GetCharInfo()->Skill[25] = 252;
}


PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down mq2warp");
RemoveCommand("/gate");
RemoveCommand("/warp");
}


// WARP commands
VOID Warp(PSPAWNINFO pChar, PCHAR szLine)
{
static float LastY;
static float LastX;
static float LastZ;
float NewY = 0;
float NewX = 0;
bRunNextCommand = TRUE;
PSPAWNINFO psTarget = NULL;
PZONEINFO Zone = (PZONEINFO)pZoneInfo;
CHAR command[MAX_STRING]; GetArg(command,szLine,1);
CHAR Y[MAX_STRING]; GetArg(Y,szLine,2);
CHAR X[MAX_STRING]; GetArg(X,szLine,3);
CHAR Z[MAX_STRING]; GetArg(Z,szLine,4);
if (
stricmp(command, "succor") != 0 &&
stricmp(command, "loc") != 0 &&
stricmp(command, "last") != 0 &&
stricmp(command, "target") != 0
) {
WriteChatColor("Usage: /warp <succor|last|target|loc y x z>", CONCOLOR_RED);
return;
} else {
if (!stricmp(command,"target")) {
if (ppTarget && pTarget) {
psTarget = (PSPAWNINFO)pTarget;
}
if (!psTarget) {
WriteChatColor("You must have a target for /warp target.", CONCOLOR_RED);
return;
}
float TargetZ = float (psTarget->Z-(psTarget->AvatarHeight*0.5));
srand (time(NULL));
//random Y
if (rand()%2!=0)
{
NewY = float(psTarget->Y+rand()%12);
}
else {
NewY = float(psTarget->Y-rand()%12);
}
//random X
if (rand()%2!=0)
{
NewX = float(psTarget->X+rand()%12);
}
else {
NewX = float(psTarget->X-rand()%12);
}
LastY = NewY;
LastX = NewX;
LastZ = TargetZ;
DoWarp(NewY, NewX, TargetZ);
} else if (!stricmp(command,"succor")) {
static float north = 0;
((PSPAWNINFO)pCharSpawn)->Heading = north;
DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
__asm call dword ptr [MLPTSC];
return;
} else if (!stricmp(command,"loc")) {
if ((Y[0] == 0) || (X[0] == 0) || (Z[0] == 0))
{
WriteChatColor("You must provide <y> <x> <z> if going to a location.",
CONCOLOR_RED);
return;
}
LastY = (float)atof(Y);
LastX = (float)atof(X);
LastZ = (float)atof(Z);
DoWarp((float)atof(Y), (float)atof(X), (float)atof(Z));
return;
} else if (!stricmp(command,"last")) {
if ((LastY==0) || (LastX==0) || (LastZ==0))
{
WriteChatColor("You must have warped before to use this command!.",
CONCOLOR_RED);
return;
}
DoWarp(LastY, LastX, LastZ);
return;
}
}
}
// GATE
VOID GateBind(PSPAWNINFO pChar, PCHAR szLine)
{
pChar->Type = SPAWN_CORPSE;
}
// MEGAWARP

VOID DoWarp(float y, float x, float z)
{
PZONEINFO Zone = (PZONEINFO)pZoneInfo;

float SafeY = Zone->SafeYLoc;
float SafeX = Zone->SafeXLoc;
float SafeZ = Zone->SafeZLoc;

Zone->SafeYLoc = y;
Zone->SafeXLoc = x;
Zone->SafeZLoc = z;

CHAR szMsg[MAX_STRING] = {0};
sprintf(szMsg, "Warping to: %3.2f, %3.2f, %3.2f.", Zone->SafeXLoc,
Zone->SafeYLoc, Zone->SafeZLoc);
WriteChatColor(szMsg, COLOR_PURPLE);

DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
__asm call dword ptr [MLPTSC];

Zone->SafeYLoc = SafeY;
Zone->SafeXLoc = SafeX;
Zone->SafeZLoc = SafeZ;
}
 
Warp is part of MQ2warp, MQ2moveutils, or MQ2megawarp depending on what compiled version you use. Command is /warp target or /warp loc x y z.
 
Rich (BB code):
#include "../MQ2Plugin.h" 
#undef CDisplay__MoveLocalPlayerToSafeCoords
#define CDisplay__MoveLocalPlayerToSafeCoords   0x444C21

PreSetup("MQ2Warp"); 
#undef ExactLocation
#undef zWarp
#undef DoWarp
#undef Warp
#undef SafeYLoc
#undef SafeXLoc
#undef SafeZLoc
VOID DoWarp(float y, float x, float z); 
VOID Warp(PSPAWNINFO pChar, PCHAR szLine); 
VOID zWarp(PSPAWNINFO pChar, PCHAR szLine); 
VOID ExactLocation(PSPAWNINFO pChar); 

VOID ExactLocation(PSPAWNINFO pChar, PCHAR szLine) 
{  CHAR LocMsg[MAX_STRING] = {0}; 
   sprintf(LocMsg, "Your location is %3.6f, %3.6f, %3.6f", pChar->Y, pChar->X, pChar->Z); 
   WriteChatColor(LocMsg); 
   return; 
} 

VOID zWarp(PSPAWNINFO pChar, PCHAR szLine) 
{   CHAR Z[MAX_STRING] = {0}; 
        GetArg(Z,szLine,1); 
        float MyY = pChar->Y; 
        float MyX = pChar->X; 


        if (Z[0]==0) { 
      WriteChatColor("Usage: /zwarp <dist>", CONCOLOR_RED); 
      return; 
        } 

        float NewZ = pChar->Z; 
        NewZ = NewZ + (FLOAT)atof(Z); 
        DoWarp(MyY, MyX, NewZ); 
        return; 
} 

VOID Warp(PSPAWNINFO pChar, PCHAR szLine) 
{ 
   static float LastY; 
   static float LastX; 
   static float LastZ; 
   bRunNextCommand = TRUE; 
   PSPAWNINFO psTarget = NULL; 
   PZONEINFO Zone = (PZONEINFO)pZoneInfo; 
    CHAR command[MAX_STRING]; GetArg(command,szLine,1); 
   CHAR Y[MAX_STRING]; GetArg(Y,szLine,2); 
   CHAR X[MAX_STRING]; GetArg(X,szLine,3); 
   CHAR Z[MAX_STRING]; GetArg(Z,szLine,4); 
   if ( 
      stricmp(command, "succor") != 0 && 
      stricmp(command, "loc") != 0 && 
      stricmp(command, "last") != 0 && 
      stricmp(command, "target") != 0 && 
      stricmp(command, "dir") != 0 
   ) { 
      WriteChatColor("Usage: /warp <succor|last|loc <y x z>|dir <dist>| target>", CONCOLOR_RED); 
      return; 
      } else { 
      if (!stricmp(command,"target"))  { 
         if (ppTarget && pTarget) { 
         psTarget = (PSPAWNINFO)pTarget; 
         } 
         if (!psTarget) { 
            WriteChatColor("You must have a target for /warp target.", CONCOLOR_RED); 
            return; 
         } 
         float TargetZ = float (psTarget->Z); 
         float TargetY = float (psTarget->Y); 
         float TargetX = float (psTarget->X); 
                        LastY = TargetY; 
         LastX = TargetX; 
         LastZ = TargetZ; 
         DoWarp(TargetY, TargetX, TargetZ); 
      } else if (!stricmp(command,"succor"))  { 
         static float north = 0; 
         ((PSPAWNINFO)pCharSpawn)->Heading = north; 
         DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords; 
         __asm call dword ptr [MLPTSC]; 
         return; 
      } else if (!stricmp(command,"loc")) { 
      if ((Y[0] == 0) || (X[0] == 0) || (Z[0] == 0)) 
      { 
         WriteChatColor("You must provide <y> <x> <z> if going to a location.", CONCOLOR_RED); 
         return; 
      } 
         LastY = (float)atof(Y); 
         LastX = (float)atof(X); 
         LastZ = (float)atof(Z); 
      DoWarp((float)atof(Y), (float)atof(X), (float)atof(Z)); 
      return; 
      } else if (!stricmp(command,"last")) { 
      if ((LastY==0) || (LastX==0) || (LastZ==0)) 
      { 
         WriteChatColor("You must have warped before to use this command!.", CONCOLOR_RED); 
         return; 
      } 
      DoWarp(LastY, LastX, LastZ); 
      return; 
      } else if (!stricmp(command,"dir")) { 
      if (Y[0]==0) { 
         WriteChatColor("You MUST provide <dist> if going in your current direction.", CONCOLOR_RED); 
         return; 
      } 
      FLOAT angle = (FLOAT)((pChar->Heading)*0.0123); 
      FLOAT dissafegoto = (FLOAT)atof(Y); 
      DoWarp(pChar->Y + (FLOAT)(dissafegoto * cos(angle)), pChar->X + (FLOAT)(dissafegoto * sin(angle)), pChar->Z); 
      return; 
                } 
   } 
} 


VOID DoWarp(float y, float x, float z) 
{ 

        PZONEINFO Zone = (PZONEINFO)pZoneInfo; 
   float SafeY = Zone->SafeYLoc; 
   float SafeX = Zone->SafeXLoc; 
   float SafeZ = Zone->SafeZLoc; 

   Zone->SafeYLoc = y; 
   Zone->SafeXLoc = x; 
   Zone->SafeZLoc = z; 

   CHAR szMsg[MAX_STRING] = {0}; 
   sprintf(szMsg, "Warping to: %3.2f, %3.2f, %3.2f.", Zone->SafeYLoc, Zone->SafeXLoc, Zone->SafeZLoc); 
   WriteChatColor(szMsg, COLOR_PURPLE); 

   DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords; 
   __asm call dword ptr [MLPTSC]; 

   Zone->SafeYLoc = SafeY; 
   Zone->SafeXLoc = SafeX; 
   Zone->SafeZLoc = SafeZ; 
} 

PLUGIN_API VOID InitializePlugin(VOID) 
{ 
   AddCommand("/warp",Warp); 
   AddCommand("/zwarp",zWarp); 
        AddCommand("/exactloc",ExactLocation); 
} 


PLUGIN_API VOID ShutdownPlugin(VOID) 
{ 
   DebugSpewAlways("Shutting down MQ2Warp"); 
   RemoveCommand("/warp"); 
   RemoveCommand("/exactloc"); 
   RemoveCommand("/zwarp"); 
}
 
You will also need to go into mq2pluginhandler.h and remove
if (!stricmp(Filename,"mq2warp")) // ^_^
{
return 0;
}

also you'll need to go into mq2commandapi.h and remove
if (!stricmp(Command,"/warp"))
{
Function=0;
}
 
siddin,

anything special I've got to do in order to get this thing working? I'm a little noobed out when it comes to this stuff.

I used your lastest code you posted (and removed the stuff from the MacroQuest2 files) and I'm still getting errors during compile.

Thanks for any infos,

JadeOne
 
I didn't write them in my last post because I just scored the already compiled warp plugin out of your megabuild you recently posted.

I removed that stuff out of the source to keep it from giving me crap about loading "mq2warp" but I think in my compilings and recompilings and moving here and there, I may have no full rebuilt it.

However, I changed the name of the plugin from "mq2warp" to "mq2jam" and it loaded fine...and warps fine.

So I'm not having any issues at the moment.

Thanks,

JadeOne
 
Getting:
--------------------Configuration: MQ2Warp - Win32 Release--------------------
Compiling...
MQ2Warp.cpp
F:\munged\MQ2Warp\MQ2Warp.cpp(123) : error C2039: 'SafeYLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(124) : error C2039: 'SafeXLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(125) : error C2039: 'SafeZLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(127) : error C2039: 'SafeYLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(128) : error C2039: 'SafeXLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(129) : error C2039: 'SafeZLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(132) : error C2039: 'SafeYLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(132) : error C2039: 'SafeXLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(132) : error C2039: 'SafeZLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(138) : error C2039: 'SafeYLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\MQ2Warp\MQ2Warp.cpp(139) : error C2039: 'SafeXLoc' : is not a member of '_ZONEINFO'
F:\munged\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
F:\munged\\MQ2Warp\MQ2Warp.cpp(140) : error C2039: 'SafeZLoc' : is not a member of '_ZONEINFO'
F:\munged\\MQ2Warp\../MQ2Main/EQData.h(1207) : see declaration of '_ZONEINFO'
Error executing cl.exe.

MQ2Warp.dll - 12 error(s), 0 warning(s)

In both .NET and VC++6 and using both the 05/15 and 05/22 MQ source. Was there a new struct change posted elsewhere? I'm no good at structs.

If this was addressed elsewhere, my apologies.
 
open Eqdata.h in MQ2Main, search for _ZONEINFO and you will notice that in the structure there is room for floats that JUST AREN'T THERE (jumps from 0x1ec to 0x1f8), the dev's have removed them and replaced it with an /*0x1ec*/ unknown0x1ec, delete that and place
/*0x1ec*/ FLOAT SafeYLoc;
/*0x1f0*/ FLOAT SafeXLoc;
/*0x1f4*/ FLOAT SafeZLoc;

so that it reads

/*0x1db*/ BYTE Unknown0x1db[0xd];
/*0x1e8*/ FLOAT ZoneExpModifier;
/*0x1ec*/ FLOAT SafeYLoc;
/*0x1f0*/ FLOAT SafeXLoc;
/*0x1f4*/ FLOAT SafeZLoc;
/*0x1f8*/ FLOAT Ceiling;

Save the file and compile the plugin, it should work entirely
 
Compiling...
warps.cpp
c:\stuff\mq2-20050522\mq2main\eqdata.h(1214) : error C2086: 'Unknown0x1db' : redefinition
c:\stuff\mq2-20050522\mq2main\eqdata.h(1215) : error C2086: 'ZoneExpModifier' : redefinition
c:\stuff\mq2-20050522\mq2main\eqdata.h(1220) : error C2086: 'Ceiling' : redefinition
EQLIB_IMPORTS
Error executing cl.exe.

warps.dll - 3 error(s), 0 warning(s)
.................................................
did i do something wrong?
 
Yes you tried to redifine those variables... the ONLY lines you needed to add in eqdata.h is these

/*0x1ec*/ FLOAT SafeYLoc;
/*0x1f0*/ FLOAT SafeXLoc;
/*0x1f4*/ FLOAT SafeZLoc;


the rest of the lines list in my last post is to show you whats above and below those 3 to make sure you have them in the right place. What you did was copy those 5 or 6 lines that were at the bottom of my last post when those lines were already there. So just delete the duplicate lines, should be 3 of them, and you will have a successful compile.
 
siddin said:
You will also need to go into mq2pluginhandler.h and remove
if (!stricmp(Filename,"mq2warp")) // ^_^
{
return 0;
}

also you'll need to go into mq2commandapi.h and remove
if (!stricmp(Command,"/warp"))
{
Function=0;
}

Ok its been a few months since I've had the time to play EQ or deal with compiling mq2, why compile if you are playing right?? anyways trying to play catch up to all that mq2 has seemingly done to itself i have run into a few snafu's. 1. I cant find a file mq2commanapi.h (I've looked before and after compiling mq2) and2. do you make this changes and the ones to eqdata.h before you compile mq2 or after mq2 before the plugin?
 
both of those header files siddin mentions are actually the .cpp files, he just made a typo
 
Okay guys , im new to this and i stayed up all night learning this program. Personally I got very frustrated and it took me quite some time to figure it out. However, with a little more instruction this is very easy to compile. I am in no way saying i created this at all. I'm just making it easier for people like myself that don't figure it out as easy. First off after compiling MQ2.

You need to make a file to install the warp.ccp, which in this case the easiest way i could figure out was.... start\run C:\MQ2\mkplugin MQ2Warp
Once you have completed this. Open up whichever compiler you are using and run visual. Go to file , add project , existing project , MQ2Warp.

Upon doing this , it should open up your file for MQ2Warp and ask to convert it. Select yes.

Now in the compiler click on the + sign for MQ2Warp , + sign source files , double click MQ2Warp.ccp.

This is where you have to select all the text in this file and erase it. Copy this file below and paste it into MQ2Warp.ccp
------------------------------------------------------------------------

#include "../MQ2Plugin.h"
#undef CDisplay__MoveLocalPlayerToSafeCoords
#define CDisplay__MoveLocalPlayerToSafeCoords 0x444C21

PreSetup("MQ2Warp");
#undef ExactLocation
#undef zWarp
#undef DoWarp
#undef Warp
#undef SafeYLoc
#undef SafeXLoc
#undef SafeZLoc
VOID DoWarp(float y, float x, float z);
VOID Warp(PSPAWNINFO pChar, PCHAR szLine);
VOID zWarp(PSPAWNINFO pChar, PCHAR szLine);
VOID ExactLocation(PSPAWNINFO pChar);

VOID ExactLocation(PSPAWNINFO pChar, PCHAR szLine)
{ CHAR LocMsg[MAX_STRING] = {0};
sprintf(LocMsg, "Your location is %3.6f, %3.6f, %3.6f", pChar->Y, pChar->X, pChar->Z);
WriteChatColor(LocMsg);
return;
}

VOID zWarp(PSPAWNINFO pChar, PCHAR szLine)
{ CHAR Z[MAX_STRING] = {0};
GetArg(Z,szLine,1);
float MyY = pChar->Y;
float MyX = pChar->X;


if (Z[0]==0) {
WriteChatColor("Usage: /zwarp <dist>", CONCOLOR_RED);
return;
}

float NewZ = pChar->Z;
NewZ = NewZ + (FLOAT)atof(Z);
DoWarp(MyY, MyX, NewZ);
return;
}

VOID Warp(PSPAWNINFO pChar, PCHAR szLine)
{
static float LastY;
static float LastX;
static float LastZ;
bRunNextCommand = TRUE;
PSPAWNINFO psTarget = NULL;
PZONEINFO Zone = (PZONEINFO)pZoneInfo;
CHAR command[MAX_STRING]; GetArg(command,szLine,1);
CHAR Y[MAX_STRING]; GetArg(Y,szLine,2);
CHAR X[MAX_STRING]; GetArg(X,szLine,3);
CHAR Z[MAX_STRING]; GetArg(Z,szLine,4);
if (
stricmp(command, "succor") != 0 &&
stricmp(command, "loc") != 0 &&
stricmp(command, "last") != 0 &&
stricmp(command, "target") != 0 &&
stricmp(command, "dir") != 0
) {
WriteChatColor("Usage: /warp <succor|last|loc <y x z>|dir <dist>| target>", CONCOLOR_RED);
return;
} else {
if (!stricmp(command,"target")) {
if (ppTarget && pTarget) {
psTarget = (PSPAWNINFO)pTarget;
}
if (!psTarget) {
WriteChatColor("You must have a target for /warp target.", CONCOLOR_RED);
return;
}
float TargetZ = float (psTarget->Z);
float TargetY = float (psTarget->Y);
float TargetX = float (psTarget->X);
LastY = TargetY;
LastX = TargetX;
LastZ = TargetZ;
DoWarp(TargetY, TargetX, TargetZ);
} else if (!stricmp(command,"succor")) {
static float north = 0;
((PSPAWNINFO)pCharSpawn)->Heading = north;
DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
__asm call dword ptr [MLPTSC];
return;
} else if (!stricmp(command,"loc")) {
if ((Y[0] == 0) || (X[0] == 0) || (Z[0] == 0))
{
WriteChatColor("You must provide <y> <x> <z> if going to a location.", CONCOLOR_RED);
return;
}
LastY = (float)atof(Y);
LastX = (float)atof(X);
LastZ = (float)atof(Z);
DoWarp((float)atof(Y), (float)atof(X), (float)atof(Z));
return;
} else if (!stricmp(command,"last")) {
if ((LastY==0) || (LastX==0) || (LastZ==0))
{
WriteChatColor("You must have warped before to use this command!.", CONCOLOR_RED);
return;
}
DoWarp(LastY, LastX, LastZ);
return;
} else if (!stricmp(command,"dir")) {
if (Y[0]==0) {
WriteChatColor("You MUST provide <dist> if going in your current direction.", CONCOLOR_RED);
return;
}
FLOAT angle = (FLOAT)((pChar->Heading)*0.0123);
FLOAT dissafegoto = (FLOAT)atof(Y);
DoWarp(pChar->Y + (FLOAT)(dissafegoto * cos(angle)), pChar->X + (FLOAT)(dissafegoto * sin(angle)), pChar->Z);
return;
}
}
}


VOID DoWarp(float y, float x, float z)
{

PZONEINFO Zone = (PZONEINFO)pZoneInfo;
float SafeY = Zone->SafeYLoc;
float SafeX = Zone->SafeXLoc;
float SafeZ = Zone->SafeZLoc;

Zone->SafeYLoc = y;
Zone->SafeXLoc = x;
Zone->SafeZLoc = z;

CHAR szMsg[MAX_STRING] = {0};
sprintf(szMsg, "Warping to: %3.2f, %3.2f, %3.2f.", Zone->SafeYLoc, Zone->SafeXLoc, Zone->SafeZLoc);
WriteChatColor(szMsg, COLOR_PURPLE);

DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
__asm call dword ptr [MLPTSC];

Zone->SafeYLoc = SafeY;
Zone->SafeXLoc = SafeX;
Zone->SafeZLoc = SafeZ;
}

PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/warp",Warp);
AddCommand("/zwarp",zWarp);
AddCommand("/exactloc",ExactLocation);
}


PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2Warp");
RemoveCommand("/warp");
RemoveCommand("/exactloc");
RemoveCommand("/zwarp");
}
----------------------------------------------------------

However do not include the ------ , i was just doing that to make sure people can figure out where to start and stop copy.

Now is the part where attention is needed. Click on the + sign for MQ2Main, + sign source files , then double click MQ2PluginHandler.ccp
In this file you must DELETE:

if (!stricmp(Filename,"mq2warp")) // ^_^
{
return 0;
}

Also there is ANOTHER DELETE:

In the same drop down meno that MQ2PluginHandler.ccp was located double click
MQ2CommandAPI.ccp , here you must DELETE this.

if (!stricmp(Command,"/warp"))
{
Function=0;
}

Now you are very close to being done.
Now go to MQ2Main , + sign Header Files , double click EQData.h
Now look through this file and DELETE this line /*0x1ec*/ unknown0x1ec
YOU MUST DELETE THIS LINE OR IT WILL NOT WORK.
After you delete this line you must add these 3 lines in place of the single line u deleted.

/*0x1ec*/ FLOAT SafeYLoc;
/*0x1f0*/ FLOAT SafeXLoc;
/*0x1f4*/ FLOAT SafeZLoc;

Now make sure MQ2 is running and load up eq. Once u see the MQ window type /plugin MQ2Warp
Should say MQ2Warp Loaded.
Now you are ready to warp my friend. Enjoy. Hope this helps people like myself out lol. I burnt a good 5 hours tryin to figure this out for some dumb reason. Now its easy to understand. Thnx :)
 
I've looked at that file and all i get is ; not sure if its been changed again.

/*0x1ec*/ struct _ITEMSPELLS Scroll;
/*0x1f8*/ DWORD Unknown0x1f8[5];
/*0x20c*/ DWORD Unknown0x20c;
/*0x210*/ DWORD Unknown0x210;
/*0x214*/ DWORD ProcRate;
/*0x218*/ DWORD CombatEffects;
/*0x21c*/ DWORD Shielding;
/*0x220*/ DWORD StunResist;
 
Look in the Guides section, there's a slightly more up to date thread than this one from last June.
 
Warp Source, must compile & find offset
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart