Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Mu 99.6XT HP Bar (Main ver. 1.0.13)

Status
Not open for further replies.
Newbie Spellweaver
Joined
Mar 9, 2010
Messages
46
Reaction score
71
EDIT: RELEASE LINK (22.10.17)
http://forum.ragezone.com/f197/hp-bar-source-99-6xt-1139891/

Hello guys !

I'm currently working on a 99.6XT server project and decided to share with you my work on the Main.exe offsets. Any enthusiasts who want can join this project and hope we can finish it together. My OpenGL experience is weaker and i'm still struggling finding some of the correct functions needed for the bar.

Offsets i'm searching or found:

Code:
#define pCursorX   *(DWORD *)0x07EB9614
#define pCursorY    *(DWORD *)0x07EB9610
#define pProtocolCall				0x004CDA7D
#define pGLSwitchBlend				((void(*)()) 0x5F1130)
#define pGLSwitch					((void(*)()) 0x5F10B0)
#define pDrawBarForm				((void(*)(float PosX, float PosY, float Width, float Height)) 0x5F21D0)
#define pGetPosFromAngle			((void(*)(int a1, int a2, int a3)) 0x005F0CE0) 
#define pSetBlend					((char(*)(BYTE Mode)) 0x005F1130)
#define ProtocolCore				((BOOL(*)(DWORD,BYTE*,DWORD,DWORD))0x004CDB60)
#define pDrawText					((int(*)(int posX, int posY, LPCSTR lpString, int a4, char a5, int a6))  0x00534350 )
#define DrawText					((char(*)(int a1, int a2, LPCSTR lpString))0x005343A0)
#define DrawText2					((int(*)(int a1, int a2, LPCSTR lpString, int a4, char a5, int a6))0x005342A0)
#define pSetTextColor				((void(__thiscall*)(LPVOID This, COLORREF h)) 0x00661030) // OK


Open GL Offsets :


Code:
glGenTextures   = 0x006612B8; // OK
glBindTexture   = 0x00661328; // OK
glPixelStorei   = 0x006612FC; // OK
glTexImage2D    = 0x0066132C; // OK
glTexParameteri = 0x006612F8; // OK
glBegin         = 0x00661358; // OK
glEnd            = 0x00661364; // OK
glColor3f       = 0x00661348; // OK
glColor3fv      = 0x00661354; // OK
glBlendFunc     = 0x006612AC; // OK
glTexCoord2f    = 0x0066135C; // OK
glTexEnv        = 0x00661300; // OK
glVertex3f      = 0x00661324; //OK
glVertex3fv     = 0x00661360; // OK
glDeleteTextures = 0x006612F4; // OK
glIsTexture     = 0x006612F0; //OK
glFontFace      = 0x00661318; // OK
glViewport      = 0x006612A8; // OK
glDepthMask  = 0x00661320; // OK
MessageBoxA     = 0x0066137C; // OK

Non UI Offsets :

Code:
#define ProtocolCore   ((int(*)(PBYTE lpMsg, int index, DWORD a4, int len, unsigned int flags)) 0x004CDB60) // OK

The HP Bar code i plan to use as base:

Code:
#define MAX_MAIN_VIEWPORT 400


struct NEW_HEALTH_BAR
{
	WORD index;
	BYTE type;
	BYTE rate;
};


struct VAngle
{
	float X;
	float Y;
	float Z;
};


void ClearNewHealthBar();
void InsertNewHealthBar(WORD index, BYTE type, BYTE rate);
NEW_HEALTH_BAR* GetNewHealthBar(WORD index, BYTE type);
void DrawNewHealthBar();

Code:
NEW_HEALTH_BAR gNewHealthBar[MAX_MAIN_VIEWPORT];


void ClearNewHealthBar() // OK
{
	for (int n = 0; n < MAX_MAIN_VIEWPORT; n++)
	{
		gNewHealthBar[n].index = 0xFFFF;
		gNewHealthBar[n].type = 0;
		gNewHealthBar[n].rate = 0;
	}
}


void InsertNewHealthBar(WORD index, BYTE type, BYTE rate) // OK
{
	for (int n = 0; n < MAX_MAIN_VIEWPORT; n++)
	{
		if (gNewHealthBar[n].index == 0xFFFF)
		{
			gNewHealthBar[n].index = index;
			gNewHealthBar[n].type = type;
			gNewHealthBar[n].rate = rate;
			return;
		}
	}
}


NEW_HEALTH_BAR* GetNewHealthBar(WORD index, BYTE type) // OK
{
	for (int n = 0; n < MAX_MAIN_VIEWPORT; n++)
	{
		if (gNewHealthBar[n].index != 0xFFFF)
		{
			if (gNewHealthBar[n].index == index && gNewHealthBar[n].type == type)
			{
				return &gNewHealthBar[n];
			}
		}
	}


	return 0;
}


void DrawNewHealthBar() // OK
{
	((void(*)())0x00581D30)();

	int PosX, PosY, LifeProgress;
	float LifeBarWidth = 38.0f;
	char LifeDisplay[20];
	VAngle Angle;

	for (int n = 0; n < MAX_MAIN_VIEWPORT; n++)
	{
		int ViewportAddress = *(DWORD*)(0x73C8174) + (1068 *  n);

		int MonsterId = *(WORD*)(ViewportAddress + 492);
		int MonsterType = *(BYTE*)(ViewportAddress + 132);


		if (!ViewportAddress)
		{
			continue;
		}

		/*if (*(BYTE*)(ViewportAddress + 0x30C) == 0)
		{
			continue;
		}*/


		NEW_HEALTH_BAR* lpNewHealthBar = GetNewHealthBar(MonsterId, MonsterType);


		if (lpNewHealthBar == 0)
		{
			continue;
		}


		int LifePercent = lpNewHealthBar->rate / 10;


		Angle.X = *(float*)(ViewportAddress + 0x404);


		Angle.Y = *(float*)(ViewportAddress + 0x408);


		Angle.Z = *(float*)(ViewportAddress + 0x40C) + *(float*)(ViewportAddress + 0x3E8) + 100.0f;


		pGetPosFromAngle((int)&Angle, (int)&PosX, (int)&PosY);


		PosX -= (int)floor(LifeBarWidth / (double)2.0);


		if ((pCursorX >= PosX) && ((float)pCursorX <= (float)PosX + LifeBarWidth) && (pCursorY >= PosY - 2) && (pCursorY < PosY + 6))
		{
			sprintf_s(LifeDisplay, "HP : %d0%%", LifePercent);


			//pSetTextColor(pTextThis(), RGB(0xFF, 0xE6, 0xD2, 0xFF));
			pDrawText(PosX, PosY - 6, LifeDisplay, 0, 0, 1);
		}


		pSetBlend(true);


		glColor4f(0.0, 0.0, 0.0, 0.5);
		pDrawBarForm((float)(PosX + 1), (float)(PosY + 1), LifeBarWidth + 4.0f, 5.0f);
		pGLSwitchBlend();


		glColor3f(0.2f, 0.0, 0.0);
		pDrawBarForm((float)PosX, (float)PosY, LifeBarWidth + 4.0f, 5.0f);


		glColor3f(0.19607843f, 0.039215688f, 0.0);
		pDrawBarForm((float)(PosX + 2), (float)(PosY + 2), LifeBarWidth, 1.0f);

		if (LifePercent > 10)
		{
			LifeProgress = 10;
		}
		else
		{
			LifeProgress = LifePercent;
		}

		glColor3f(0.98039216f, 0.039215688f, 0.0);

		for (int i = 0; i < LifeProgress; i++)
		{
			pDrawBarForm((float)(i * 4 + PosX + 2), (float)(PosY + 2), 3.0, 2.0);
		}

		pGLSwitch();
	}


	pGLSwitch();


	glColor3f(1.0, 1.0, 1.0);
}

Main.exe Link :


Main Pseudocode Decompilation :


Screen(06_08-20_56)-0000 - Mu 99.6XT HP Bar (Main ver. 1.0.13) - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited by a moderator:
Nothing Better
Joined
Jul 3, 2008
Messages
551
Reaction score
92
Excuse me, could you please to answer my unprofessional question ?
99.6XT - is it 1.0m (or n) main.exe, isn't it ?
because I'm now using 0.99.60T mu server but the main version in commonloc.cfg is 1.01.14, it's too confusing.
 
Junior Spellweaver
Joined
May 1, 2009
Messages
192
Reaction score
17
Excuse me, could you please to answer my unprofessional question ?
99.6XT - is it 1.0m (or n) main.exe, isn't it ?
because I'm now using 0.99.60T mu server but the main version in commonloc.cfg is 1.01.14, it's too confusing.

protocol VTM is 1.00n VTM CLIENT
protocol chs is 1.00m and 1.00l client
 
Nothing Better
Joined
Jul 3, 2008
Messages
551
Reaction score
92
protocol VTM is 1.00n VTM CLIENT
protocol chs is 1.00m and 1.00l client

thanks VanBom, long time no see !
anyways, is above main.exe compatible with 0.99.60T CHS MuServer ?
 
Nothing Better
Joined
Jul 3, 2008
Messages
551
Reaction score
92
0.99.60 chs is 1.00m or 1.00l or 1.00h client chs

lol, I understood this before :D please focus to my question, it's a yes/no question, right ? hehe.
So, I just ask IS ABOVE main (of this thread) compatible with 0.99.60T CHS MuServer ?
 
Junior Spellweaver
Joined
May 1, 2009
Messages
192
Reaction score
17
lol, I understood this before :D please focus to my question, it's a yes/no question, right ? hehe.
So, I just ask IS ABOVE main (of this thread) compatible with 0.99.60T CHS MuServer ?

I speak English not good, you have to understand ( google transe )
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
For helps on your Research bro:

Code:
#define pGLSwitchBlend  ((void(__cdecl*)()) 0x5F1130)
#define pGLSwitch       ((void(__cdecl*)()) 0x5F10B0)
#define pDrawBarForm    ((void(__cdecl*)(float PosX, float PosY, float Width, float Height)) 0x5F21D0) // -> In old main have: 4 Args
 
Newbie Spellweaver
Joined
Mar 9, 2010
Messages
46
Reaction score
71
For helps on your Research bro:

Code:
#define pGLSwitchBlend  ((void(__cdecl*)()) 0x5F1130)
#define pGLSwitch       ((void(__cdecl*)()) 0x5F10B0)
#define pDrawBarForm    ((void(__cdecl*)(float PosX, float PosY, float Width, float Height)) 0x5F21D0) // -> In old main have: 4 Args

Thanks bro !
 
Newbie Spellweaver
Joined
Nov 1, 2006
Messages
8
Reaction score
1
Hello,Has anyone been able to locate the #define pTextThis ((LPVOID (*) ()) 0xXXXXXXXX)?Thank you.
Hello,Has anyone been able to locate the #define pTextThis ((LPVOID (*) ()) 0xXXXXXXXX)?Thank you.
 
Newbie Spellweaver
Joined
Mar 9, 2010
Messages
46
Reaction score
71
So finally we have all the offsets. I've changed the Draw Bar function too. The code isn't tested well but it should work. As i don't have enough spare time to finish full release at the moment you guys can take that code and finish it without any problems. What must be done else?

- Protocol Core packet
- Loop with timer in GS to send packets about the visible mobs around the character
- have fun

P.S.: Friend of mine send me pic of this implementation:
vankyy26 - Mu 99.6XT HP Bar (Main ver. 1.0.13) - RaGEZONE Forums
 
Last edited:
Status
Not open for further replies.
Back
Top