Mu 99.6XT HP Bar (Main ver. 1.0.13)

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Enthusiast vankyy26 is offline
    MemberRank
    Mar 2010 Join Date
    48Posts

    config Mu 99.6XT HP Bar (Main ver. 1.0.13)

    EDIT: RELEASE LINK (22.10.17)
    http://forum.ragezone.com/f197/hp-ba...9-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 :
    https://mega.nz/#!nQsHEA4T!HyPNMcrjm...mycYYe-2bSNe1M

    Main Pseudocode Decompilation :
    https://mega.nz/#!mdEzCJKZ!G633-6rCR...hm6kCbNv9TgiKI

    screen-06_08-20_56-0000.jpg
    Last edited by KarLi; 22-10-17 at 07:43 PM. Reason: Attach Main


  2. #2
    Proficient Member Van_Bom is offline
    MemberRank
    May 2009 Join Date
    194Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    thank you very murch

  3. #3
    Account Upgraded | Title Enabled! muonlinegr2 is offline
    MemberRank
    May 2012 Join Date
    GreeceLocation
    708Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    @vankyy26 Fixed hp bar for 97d version

  4. #4
    Nothing Better godhoang is offline
    MemberRank
    Jul 2008 Join Date
    vietnamLocation
    557Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    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.

  5. #5
    Proficient Member Van_Bom is offline
    MemberRank
    May 2009 Join Date
    194Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    Quote Originally Posted by godhoang View Post
    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

  6. #6
    Nothing Better godhoang is offline
    MemberRank
    Jul 2008 Join Date
    vietnamLocation
    557Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    Quote Originally Posted by Van_Bom View Post
    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 ?

  7. #7
    Proficient Member Van_Bom is offline
    MemberRank
    May 2009 Join Date
    194Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    Quote Originally Posted by godhoang View Post
    thanks VanBom, long time no see !
    anyways, is above main.exe compatible with 0.99.60T CHS MuServer ?
    0.99.60 chs is 1.00m or 1.00l or 1.00h client chs

  8. #8
    Nothing Better godhoang is offline
    MemberRank
    Jul 2008 Join Date
    vietnamLocation
    557Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    Quote Originally Posted by Van_Bom View Post
    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 ?

  9. #9
    #ChangeBrazil SmileYzn is offline
    MemberRank
    Nov 2012 Join Date
    0x00401000Location
    927Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    You can put this

    Code:
    ((void(*)())0x005BA770)();
    In a macro, and put at the end of the DrawNewHealthBar function, since if you put at begin some clients can have troubles (Will not display) with original PartyHpBar.

  10. #10
    Proficient Member Van_Bom is offline
    MemberRank
    May 2009 Join Date
    194Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    Quote Originally Posted by godhoang View Post
    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 )

  11. #11
    Apprentice henrique1205 is offline
    MemberRank
    Feb 2015 Join Date
    21Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    thats very nice (y)!!

    I hope you find all you need!

  12. #12
    Apprentice caron22 is offline
    MemberRank
    May 2012 Join Date
    24Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    #define pDrawText 0x00534200

  13. #13
    Apprentice caron22 is offline
    MemberRank
    May 2012 Join Date
    24Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    #define pCursorX 0x07EB9614
    #define pCursorY 0x07EB9610

  14. #14
    Enthusiast vankyy26 is offline
    MemberRank
    Mar 2010 Join Date
    48Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    Quote Originally Posted by caron22 View Post
    #define pCursorX 0x07EB9614
    #define pCursorY 0x07EB9610
    Thanks man. Added your offsets to the list with credits to u.

  15. #15
    Darkness Member Kiosani is offline
    MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,276Posts

    Re: Mu 99.6XT HP Bar (Main ver. 1.0.13)

    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



Page 1 of 2 12 LastLast

Advertisement