• 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

MQ2 Compiling Guide

Status
Not open for further replies.

Cade

The Rainman, (Administrator)
Joined
Feb 28, 2005
RedCents
1,041¢
I've seen how to do a noauth compile in one place and how to remove the plugin date/time check in another and what to remove to get warp to work somewhere else. Haven't seen how to put string back in but I imagine it's here somewhere, but I know how. So to save people the time of searching around, here's how to do what I just listed.

[size=+1]Noauth compile:[/size]

With a hex editor (I recomend hex workshop) open MQ2Auth.exe before you run it and replace (Ctrl+H usually, if that doesn't work go to Edit -> Replace. If you don't have that option you will have to go to find and do it manually)
Rich (BB code):
microsoft\
with
Rich (BB code):
microsoap\
After that's done, run MQ2Auth.exe [size=+3]and do the same thing to MacroQuest2.exe in the release folder.[/size]

[size=+1]Removing the date/time check:[/size]

Remove these bits of code from PluginHandler.cpp:

Rich (BB code):
DWORD checkme(char *module)
{
    char *p;
    PIMAGE_DOS_HEADER pd = (PIMAGE_DOS_HEADER)module;
    PIMAGE_FILE_HEADER pf;
    p = module + pd->e_lfanew;
    p += 4;  //skip sig
    pf = (PIMAGE_FILE_HEADER) p;
    return pf->TimeDateStamp;
}

static unsigned int mq2mainstamp = 0;

Rich (BB code):
 if (!mq2mainstamp) {
        mq2mainstamp = checkme((char*)GetModuleHandle("mq2main.dll"));
    }

Rich (BB code):
	return 0;
	}
    if (mq2mainstamp > checkme((char*)hmod)) {
        DebugSpew("Please recompile %s %d %d", FullFilename, mq2mainstamp, checkme((char*)hmod));
        FreeLibrary(hmod);

Alternate:

So what I do is when I make the main compile I set my system date/time back to the year 2004, do the compile, then set it back to the current date. So when I make Plunins, at a later date, that I want to send to my friends they have been loading and working fine.

[size=+1]Removing anti-warp code:[/size]

EDIT: This section once contained instructions for removing antiwarp and antizone code, due to recent changes it only contains information for removing antiwarp code, so any combination warp/zone plugins will only warp.

In EQData.h replace
Rich (BB code):
/*0x24c*/ FLOAT Unknown0x24c[0x3];
with
Rich (BB code):
/*0x24c*/ FLOAT SafeYLoc;
/*0x250*/ FLOAT SafeXLoc;
/*0x254*/ FLOAT SafeZLoc;


AND in MQ2Main.h:

Replace the 0 in this line:
Rich (BB code):
#define CDisplay__MoveLocalPlayerToSafeCoords 0
with the warp offset (0x043D7C5 as of 11/1)

AND in MQ2Commandapi.cpp remove:
Rich (BB code):
if (!stricmp(Command,"/warp"))
{
Function=0;
}

AND in PluginHandler.cpp remove:
Rich (BB code):
	if (!stricmp(Filename,"mq2warp")) // ^_^
	{
		return 0;
	}



[size=+1]Putting string back in:[/size]

In MQ2Data.cpp change
Rich (BB code):
TLO(dataString)
{
	WriteChatf("Due to complete misuse of the String Top-Level Object, it has been removed.");
	return false;
	/*
	if (!ISINDEX())
		return false;
	strcpy(DataTypeTemp,szIndex);
	Ret.Ptr=&DataTypeTemp[0];
	Ret.Type=pStringType;
	return true;
	/**/
}
to
Rich (BB code):
TLO(dataString)
{
	if (!ISINDEX())
		return false;
	strcpy(DataTypeTemp,szIndex);
	Ret.Ptr=&DataTypeTemp[0];
	Ret.Type=pStringType;
	return true;
}

[size=+1]Compiling Plugins With VS6[/size]

Download the latest zip and save it to your desktop, name it MQLatest.

Follow my instructions on making a noauth compile.

I'm going to use MQ2Twist as my example

First, open a command prompt (Start -> Run -> Type: cmd)

Navigate to your MQ2 source folder withing the command prompt by typing:
Rich (BB code):
cd desktop\MQLatest

Now type
Rich (BB code):
mkplugin twist
This will create a folder within the MQLatest folder named MQ2Twist.

Open that folder then open MQ2Twist.cpp (NOT ISXEQTwist.cpp or ISXEQTwist.h) and replace everything in it with the plugin source. Save and close.

Now go back to the main MQLatest folder and double click macroquest2.dsw.

Once that's open, go to Project -> Insert Project Into Workspace. In the window that pops up, open the MQ2Twist folder and double click MQ2Twist.dsp.

Now go to Build -> Set Active Configuration and double click
Rich (BB code):
MQ2Main - Win32 Release

Now go to Build -> Batch Build and make sure everything is checked. Click Build and it should start compiling.

[size=+1]Compiling Plugins With VS.NET[/size]

Download the latest zip and save it to your desktop, name it MQLatest.

Follow my instructions on making a noauth compile.

I'm going to use MQ2Twist as my example

First, open a command prompt (Start -> Run -> Type: cmd)

Navigate to your MQ2 source folder withing the command prompt by typing:
Rich (BB code):
cd desktop\MQLatest

Now type
Rich (BB code):
mkplugin twist
This will create a folder within the MQLatest folder named MQ2Twist.

Open that folder then open MQ2Twist.cpp (NOT ISXEQTwist.cpp or ISXEQTwist.h) and replace everything in it with the plugin source. Save and close.

Now go back to the main MQLatest folder and double click macroquest2.sln

Go to File -> Add Project -> Add Existing Project.

In the window that pops up, open the MQ2Twist folder and double click MQ2Twist.vcproj.

Go to the Build menu and select Configuration Manager. Select Release, and place a check in each dll you want compiled. Click the Close button.

Go to Build -> Batch Build. Click Select All then click Build. It should start compiling.Alternate:
 
Last edited:
Re: noauth+date/time check+warp+string

Excellent write-up. I do believe this could truly help alot of people in learning how to do some of this stuff themselves. Great job!
 
Re: noauth+date/time check+warp+string

Make sure you change microsoft in hex and non hex mode there are liek 8,000 cases of microsoft in the mq2auth.exe.
 
Re: noauth+date/time check+warp+string

OMG!! It's EXACTLY what I needed for myself!! I have no programming skill at all and I have been searching for these fixes.

Thank you Cad, I must say that this post has been the biggest help to me for a long, long time :) All the fixes in one loc :D


BTW... whats with the name change??? :cool:
 
Re: noauth+date/time check+warp+string

BTW... whats with the name change???
I usually am called Cade, and also I met someone in game with a name close to mine, and if say a GM should come read the boards to see what the bugs are ( :cool: ) I wouldn't want him get banned.

And tone, all I did was change it in non-hex mode and it worked great (2 cases)

Ty for the 5 star rating whoever did that, and ty whoever it was that gave it a rating of terrible also
 
Last edited:
Re: noauth+date/time check+warp+string

hehe xD good job Cade and thanks for posting this :D
 
Re: noauth+date/time check+warp+string

A truely awsome undertaking. Good work Cade. Please rate it guys 5 stars!!
 
Re: noauth+date/time check+warp+string

Bumping this up in case someone actually uses it, also added how to add plugins to your compile in both VS6 and .net as I get asked that a lot
 
Re: noauth+date/time check+warp+string

Top marks for this post Cade. I keep this myself but its always nice to see soemhting like this posted to help others, I ma sorry to say I never posted this info in 1 easy to find thread.

After this month passes I will move this to the Guide section. Want it to stay here for now this is Voting material.
 
Re: noauth+date/time check+warp+string

Ty ty soul, but if you'll notice it was in the july poll already ;p All I did in august was update the offset and add how to add plugins to the compiles.
 
Re: noauth+date/time check+warp+string

Hey, was trying to figure out this got everything except this part.
by any chance do you have the new code?


Code:

/* 0x12e0 */ BYTE Unknown0x12e0[0x14f4-0x12e0];


with
Code:

/* 0x12e0 */ BYTE Unknown0xfd8[0x200];
/* 0x14d8 */ DWORD ZoneBoundId;
/* 0x14dc */ BYTE field_0x14dc[0x10];
 
Re: noauth+date/time check+warp+string

No, I don't :( changes were made to mq2, I'll get it some day...
 
Re: noauth+date/time check+warp+string

thanks bro .. i am one step closer to being as helpful as you BIG DOGS!!

8-)
 
Re: noauth+date/time check+warp+string

For a good laugh ----- This works great if you are below level 10. I wanted to try it, and I typed in /gate on a level 25 char and sure enough, I died and gated to bind. Went to loot my corpse and after I looted everything it was still there. Did a /corpse and could drag it, did a /sumcorpse and it said I needed to consent, and I did, but still said that. Very weird. Going to explore this more later (am still at work).
 
Last edited:
Re: noauth+date/time check+warp+string

There is a way to get zone working, and I have it running on my comp, gate is the only thing I can't seem to fix, yet that is do-able too. Will browse through my stuff and try to give you the specifics on /zone if you don't have it running..

Also you can get around the "Speedbumps" thats the MQ2 devs put in by undefining something like SuccorFunc at the beginning of your warp plugins etc, without changing each source file. By doing ....(Right after the line of "PreSetup"

#undef
#define SuccorFunc 0x004(Whatever the current succor offset is)
 
Re: noauth+date/time check+warp+string

We have /zone /gate and /fade working here. Try reading.

And I'm quite happy doing it this way thank you very much.
 
Re: noauth+date/time check+warp+string

Sorry for being so rude...woke up on the wrong side of someone's bed this morning...
 
Re: noauth+date/time check+warp+string

Doesn't your noauth fix leave you vulnerable... Suppose Microsoap puts out something MQ needs?

:eek:
 
Re: noauth+date/time check+warp+string

No.

If microsoap puts out something MQ needs (Which probably won't happen) it would have nothing to do with the auth system.
 
Re: noauth+date/time check+warp+string

Np btw Cade, been looking through more and more on the site, and you and everyone else have done some very fine work, minus all the mass flamings.../Standing Ovation
 
Re: noauth+date/time check+warp+string

dude....

this is some awesome information.

quick question though. If i don't want to use a hex editor could I simply load the code in a compiler and make the changes before running my compile?
 
Re: noauth+date/time check+warp+string

o and.....

this is HELLA sticky worthy information. :D *hint hint nudge nudge*
 
Re: noauth+date/time check+warp+string

Fenny - there's no way that I've found yet to remove the auth check besides the hex editor. What code are you speaking of?
 
Re: noauth+date/time check+warp+string

well, using VC6 I have been able to view the .ccp stuff prior to compiling by creating a new work space with in the compiler and viewing the source code. All im asking is if these changes could be made prior to the compile to create the a nifty unnerfed compile.


question partially answered here by deadchanter. this removes the plugin date check nerf.

http://www.redguides.com/community/showthread.php?t=3126
 
Re: noauth+date/time check+warp+string

You mean MQ2Auth.cpp? That's different than MQ2Auth.exe
 
Re: noauth+date/time check+warp+string

I can't believe how helpful everyone is here, good job! =p


I did want to add one little thing to this subject. I compile for a few close friends and sometimes some plugins I make are later than when I make the MQ2main.dll. Problem right? Anyway I dont mind useing the Auth system BUT the Plugin system sucks. So what I do is when I make the main compile I set my system date/time back to the year 2004, do the compile, then set it back to the current date. So when I make Plunins, at a later date, that I want to send to my friends they have been loading and working fine.
 
Re: noauth+date/time check+warp+string

I have had no problem making the plugins later, of course I usually just recompile and copy paste.. However, I wonder if your little trick would/does work as far as EQEMU...

Things that make ya go hmmmm.
 
Re: noauth+date/time check+warp+string

That's another way and I'll add it.

But the way that's in there is what I'll always use :)
 
Re: noauth+date/time check+warp+string

I'm trying to remove the auth check from my compile, but it doesn't seem to be working. Maybe one of you can help me figure out what I'm messing up. I downloaded Hex Workshop and did a find/replace for "microsoft/" selecting Text String from the dropdown box. I would replace all instances of "microsoft\" with "microsoap\" in MQ2Auth.exe, then run that executable. Then I'd do the same find/replace with macroquest2.exe. I'd save my changes then set my date to 2004, compile, then set my date back to 2005.

The compile runs fine on my laptop, but when I copy over the release folder to my desktop I get the error saying that my machine is not authorized to run the copy.

Can you all see what I'm doing wrong?
 
Re: noauth+date/time check+warp+string

did you remove the no auth code as in the guide? If not, you will have to run no auth on the desktop to get it to work and re-compile. If I read it right.
 
Re: noauth+date/time check+warp+string

if i use this guide to replace to get the noauth+date/time etc how can i use warp in MQ2 ?
What need i to type to get warp around ?

thx for help
 
Re: noauth+date/time check+warp+string

Yes, I followed the guide the best I could to change the hex values in mq2auth and macroquest2.exe. I'm thinking I may have made a mistake within the hex editor itself. I'll try to tinker with it again tonight when I get home from work.
 
Re: noauth+date/time check+warp+string

the first couple of times i did this.. i had to go step by step slowly.... finally on the third try i got it....

8-)
 
Re: noauth+date/time check+warp+string

if i use this guide to replace to get the noauth+date/time etc how can i use warp in MQ2 ?
What need i to type to get warp around ?

thx for help

Erm...it's in the guide...did I forget something?
 
Re: noauth+date/time check+warp+string

Was updating my compile to 12/01/05 Update posted on MQ2, appears to be a new block added around line 600 in mq2datavars.cpp:

Rich (BB code):
#ifndef SafeXLoc
#error 1
#endif

If you tried to compile using this the compiler would give you "fatal error C1189: #error : 1"

Don't recall ever seeing this before. Just delete it and compiles fine.
 
Re: MQ2 Compiling Guide - By Cade

Cade said:
In EQData.h replace
Rich (BB code):
/*0x1ec*/ FLOAT Unknown0x1ec[3];
with
Rich (BB code):
/*0x1ec*/ FLOAT SafeYLoc;
/*0x1f0*/ FLOAT SafeXLoc;
/*0x1f4*/ FLOAT SafeZLoc;

Just checking since I can't find the mentioned line in EQData.h anylonger, so looking at the one previously "forgotten" by the devs makes me think that this now should be:

Replace:
Rich (BB code):
/*0x24c*/   FLOAT   Unknown0x24c[0x3];
With:
Rich (BB code):
/*0x24c*/   FLOAT   SafeYLoc;
/*0x250*/   FLOAT   SafeXLoc;
/*0x254*/   FLOAT   SafeZLoc;
Or am I totally wrong here?
 
MQ2 Compiling Guide
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart