Thread can be close since I had found the other solution.
For people still working on this here is what I have learned so far and try to disassembly:
PHP Code:
__declspec(naked) void PrintPlayerViewHP2() // OK
{
static float PositionModifierHP = 3.25f;
static DWORD PrintPlayerViewHPAddress1 = 0x0080FF12;
_asm
{
Mov Ecx,ViewCurHP //Ecx = current HP
Push Ecx
Push Ecx
Fld Dword Ptr Ds:[0x00D461A4] //Declare offset position of (HP/MANA/SD/AG)
Fstp Dword Ptr Ss:[Esp]
Fld Dword Ptr Ss:[Ebp-0x0C] //Declare offset position of HP by -12 memory block
Cmp Ecx,0x186A0 //Compare HP with 100000
Jl EXIT //False -> exit
Fsub Dword Ptr Ds:[PositionModifierHP] //True -> move to left by subtract PositionModifierHP
Cmp Ecx,0xF4240 //Compare HP with 1000000
Jl EXIT //False -> exit
Fsub Dword Ptr Ds:[PositionModifierHP] //True -> Move to left one more
EXIT:
Jmp [PrintPlayerViewHPAddress1] //Return value to 0x0080FF12
}
}
You can try to overwrite this offset 0x0080FF12 with:
PHP Code:
__declspec(naked) void HPNumberPosition()
{
static float HPNumberPositionY = 290.0f;//Modify as you wish
static DWORD HPNumberPosition = 0x0080FF1E; //Pointer
_asm
{
Fadd Dword Ptr DS:[HPNumberPositionY]
Fstp Dword Ptr SS:[ESP]
Fld Dword Ptr SS:[EBP-0xC]
jmp [HPNumberPosition]
}
}
SetRange((LPVOID)0x0080FF12, 0x12, ASM::NOP);
SetOp((LPVOID)0x0080FF12, (LPVOID)HPNumberPosition, ASM::JMP); //Overwrite to offset 0x0080FF12
Didnt test myself so use wisely