• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Help] How to move HP value

Status
Not open for further replies.
Newbie Spellweaver
Joined
Sep 27, 2015
Messages
91
Reaction score
11
I search for this all over the internet and could not find any solution, but I know many pros have done this please help.

nhacker - [Help] How to move HP value - RaGEZONE Forums


As in the picture the HP value got move up y-axis, please someone help or share how to do this.

Printplayer.cpp of muemus6
PHP:
__declspec(naked) void PrintPlayerViewHP1() // OK
{
    static DWORD PrintPlayerViewHPAddress1 = 0x0080FD27;
    _asm
    {
        Mov Ecx,ViewMaxHP
        Test Ecx,Ecx
        Jle EXIT
        Mov Edx,ViewMaxHP
        Mov Eax,ViewCurHP
        Sub Edx,Eax
        Mov Dword Ptr Ss:[Ebp-0x174],Edx
        Fild Dword Ptr Ss:[Ebp-0x174]
        Mov Ecx,ViewMaxHP
        Mov Dword Ptr Ss:[Ebp-0x178],Ecx
        Fidiv Dword Ptr Ss:[Ebp-0x178]
        Fstp Dword Ptr Ss:[Ebp-0x134]
        EXIT:
        Jmp [PrintPlayerViewHPAddress1]
    }
}
__declspec(naked) void PrintPlayerViewHP2() // OK
{
    static float PositionModifierHP = 3.25f;
    static DWORD PrintPlayerViewHPAddress1 = 0x0080FF12;
    _asm
    {
        Mov Ecx,ViewCurHP
        Push Ecx
        Push Ecx
        Fld Dword Ptr Ds:[0x00D461A4]
        Fstp Dword Ptr Ss:[Esp]
        Fld Dword Ptr Ss:[Ebp-0x0C]
        Cmp Ecx,0x186A0
        Jl EXIT
        Fsub Dword Ptr Ds:[PositionModifierHP]
        Cmp Ecx,0xF4240
        Jl EXIT
        Fsub Dword Ptr Ds:[PositionModifierHP]
        EXIT:
        Jmp [PrintPlayerViewHPAddress1]
    }
}

I can only move HP value in x-axis by editing "PositionModifierHP", there no y-axis to modify, and I know nothing of assembly. Please help thank you.
 
Newbie Spellweaver
Joined
Sep 27, 2015
Messages
91
Reaction score
11
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:
__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:
__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 :eek:tt1:
 
Upvote 0
Status
Not open for further replies.
Back
Top