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!

[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