Who do me the favor to find me the offset of hp bar

Results 1 to 1 of 1
  1. #1
    Enthusiast Ryuno is offline
    MemberRank
    Aug 2016 Join Date
    30Posts

    Who do me the favor to find me the offset of hp bar

    hola que tal pido este tipo de favores ya que nose hacerlos si algien que tenga conocimiento en buscarme estos offset se lo agradeceria ya que trato de adaptar el hpbar a cliente que uso dejo el main


    dejo el main
    :
    Main 1.2K


    esa es la source V: Saludos

    Hello that I ask this kind of favors since I do not do them if somebody who has knowledge in looking for these offset I would appreciate it since I try to adapt the hpbar to client that I use I leave the main
    I leave the main
    Main 1.2K
    That is the source V: Regards


    Code:
    #include "stdafx.h"
    #include "HealthBar.h"
    
    
    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(*)())0x005BA770)();
    
    
        int PosX, PosY, LifeProgress;
        float LifeBarWidth = 38.0f;
        char LifeDisplay[20];
        VAngle Angle;
    
    
        for(int n=0;n < MAX_MAIN_VIEWPORT;n++)
        {
            DWORD ViewportAddress = ((DWORD(__thiscall*)(void*,DWORD))0x0096A4C0)(((void*(*)())0x00402BC0)(),n);
    
    
            if(!ViewportAddress)
            {
                continue;
            }
    
    
            if(*(BYTE*)(ViewportAddress+0x30C) == 0)
            {
                continue;
            }
    
    
            NEW_HEALTH_BAR* lpNewHealthBar = GetNewHealthBar(*(WORD*)(ViewportAddress+0x7E),*(BYTE*)(ViewportAddress+0x320));
    
    
            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(&Angle, &PosX, &PosY);
    
    
            PosX -= (int)floor(LifeBarWidth / (double)2.0);
    
    
            if((pCursorX >= PosX) && ((float)pCursorX <= (float)PosX + LifeBarWidth) && (pCursorY >= PosY - 2) && (pCursorY < PosY + 6))
            {
                wsprintf(LifeDisplay, "HP : %d0%%", LifePercent);
                pSetTextColor(pTextThis(), 0xFF, 0xE6, 0xD2, 0xFF);
                pDrawText(pTextThis(), PosX, PosY - 6, LifeDisplay, 0, 0, (LPINT)1, 0);
            }
    
    
            pSetBlend(true);
    
    
            glColor4f(0.0, 0.0, 0.0, 0.5);
            pDrawBarForm((float)(PosX + 1), (float)(PosY + 1), LifeBarWidth + 4.0f, 5.0f, 0.0f, 0);
            pGLSwitchBlend();
    
    
            glColor3f(0.2f, 0.0, 0.0);
            pDrawBarForm((float)PosX, (float)PosY, LifeBarWidth + 4.0f, 5.0f, 0.0, 0);
    
    
            glColor3f(0.19607843f, 0.039215688f, 0.0);
            pDrawBarForm((float)(PosX + 2), (float)(PosY + 2), LifeBarWidth, 1.0f, 0.0, 0);
    
    
            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, 0.0, 0);
            }
    
    
            pGLSwitch();
        }
    
    
        pGLSwitch();
    
    
        glColor3f(1.0, 1.0, 1.0);
    }





    Code:
    #pragma once
    
    
    #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();
    
    
    #define pGetPosFromAngle        ((void(__cdecl*)(VAngle * Angle, int * PosX, int * PosY)) 0x635B00)
    #define pCursorX                *(int*)0x879340C
    #define pCursorY                *(int*)0x8793410
    #define pTextThis                ((LPVOID(*)()) 0x0041FE10)
    #define pSetTextColor            ((void(__thiscall*)(LPVOID This, BYTE r, BYTE g, BYTE b, BYTE h)) 0x420040)
    #define pDrawText                ((int(__thiscall*)(LPVOID This, int PosX, int PosY, char * Text, int Arg4, int Arg5, int * Arg6, int Arg7)) 0x420150)
    #define pDrawBarForm            ((void(__cdecl*)(float PosX, float PosY, float Width, float Height, float Arg5, int Arg6)) 0x6378A0)
    #define pSetBlend                ((void(__cdecl*)(BYTE Mode)) 0x635FD0)
    #define pGLSwitchBlend            ((void(__cdecl*)()) 0x00636070)
    #define pGLSwitch                ((void(__cdecl*)()) 0x00635F50)




Advertisement