• 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

Multi Load Messages

Status
Not open for further replies.

The0Eldest

New member
Joined
Jul 12, 2005
RedCents
10¢
There are precompilers out there that have their custom messages, and that is cool. But I wanted to have it change, like real EQ, static ones are BORING (<3 you precompilers). This guide will make it so you too can have a non-static, non-boring loading message!

Multiple Loading Messages!

This guide assumes you can compile MQ2 yourself, if you can't you need more help than I will give. The required file is MQ2CleanUI.cpp. Also, I use nested if/else, that is how I like to do this, if you want to use a switch/case, go ahead.

At the top of this file is something that looks like:

Rich (BB code):
char *OurCaption = "MQ2: Think of it as evolution in action.";

Change that to something like this(explaination below):
Rich (BB code):
char *OurCaption1 = "I R TEH HAXOR!";
char *OurCaption2 = "U IS TEH HAXOR!";
char *OurCaption3 = "WE PWNZOR!";

You are going to change this, first you can change *OurCaption to *OurCaption1 . Second, you are going to customize what is in the " " so you too can be T3H H4X0R. third if you want don't want multiple loading messages, THE GUIDE ENDS HERE just compile and poof custom message. If you want the multiple loading messages, add another line after this one, I copy and paste because I am lazy, it will be the same, other than *OurCaption1 should change to *OurCaption2 and the message in " " should change also, repeat till you have all your messages.

Next up we change this class:

Rich (BB code):
class EQ_LoadingSHook
{
public:

	VOID SetProgressBar_Trampoline(int,char const *);
	VOID SetProgressBar_Detour(int A,char const *B)
	{
		if (gbMQ2LoadingMsg)
            SetProgressBar_Trampoline(A, OurCaption);
		else
			SetProgressBar_Trampoline(A,B);
	}
};

To this (explaination below):

Rich (BB code):
class EQ_LoadingSHook
{
public:

	INT MsgNum;
	VOID SetProgressBar_Trampoline(int,char const *);
	VOID SetProgressBar_Detour(int A,char const *B)
	{
		if (gbMQ2LoadingMsg)
		{
			srand(time(NULL));
			int RANGE_MIN = 0;
			int RANGE_MAX = 2;
			MsgNum = (((double) rand() / (double) RAND_MAX) * RANGE_MAX + RANGE_MIN);

			if(MsgNum == 0)
			{
            	SetProgressBar_Trampoline(A, OurCaption1);
        	} 
        	else
        	{
	        	if(MsgNum == 1)
	        	{
		        	SetProgressBar_Trampoline(A,OurCaption2);
	        	}
	        	else
	        	{
		        	if(MsgNum == 2)
		        	{
			        	SetProgressBar_Trampoline(A,OurCaption3);
		        	}
	        	}
        	}
        }
		else
			SetProgressBar_Trampoline(A,B);
	}
};

This is the progress bar loader (I think, cause when I did something wrong here, the bar dissappeared lol) If you know anything about coding, reading or anything else, it should be simple to edit this so that it works for the number of messages you have. It starts at 0, so remember that when determining the MsgNum, and also change the RANGE_MAX to the appropriate number. This is where someone could use a switch/case if they wanted, I use nested if/else because that is how I like to program.

Lastly we edit:
Rich (BB code):
if (gbMQ2LoadingMsg)
	{
    	char **ptr = (char **) EQ_LoadingS__Array;
    	int i;

    	for (i=0;i<EQ_LoadingS__ArraySize;i++)
        	ptr = OurCaption;
	}


And change that to:
Rich (BB code):
if (gbMQ2LoadingMsg)
	{
		char **ptr = (char **) EQ_LoadingS__Array;
		int i=0;
	
		while (i<EQ_LoadingS__ArraySize)
		{
			ptr = OurCaption1;
			if((i+1)<EQ_LoadingS__ArraySize) ptr[i++] = OurCaption2;
			if((i+1)<EQ_LoadingS__ArraySize) ptr[i++] = OurCaption3;
			i++;
		}
	}


Here you need to add in a line of "if((i+1)<EQ_LoadingS__ArraySize) ptr[i++] = OurCaption3;" for each caption.

Compile it and VIOLA! You have your own custom loading messages. It works for me, and I did a diff to make sure I caught all my changes. If you have a problem, post away.

Hit me with a RedCent if you like it :D.
 
Multi Load Messages
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart