ServersMU - Comunidad

Zona Programadores => Sources => Mensaje iniciado por: Applayo en Abril 21, 2021, 04:35:33 pm

Título: [Sources] Fix AutoPot in Helper
Publicado por: Applayo en Abril 21, 2021, 04:35:33 pm
Fix AutoPot consertar desconexão automática


[code]    __declspec(naked) void CheckAutoPote( ){
    static DWORD Pointer;
    static DWORD main_addr = 0x0095E1C4;


    _asm
    {
    MOV ECX,DWORD PTR SS:[EBP-0x1874]
    MOV Pointer,ECX
    }


    if ( *(BYTE *)(Pointer + 176) )
    {
    if ( ViewCurHP < ( ViewMaxHP * *(BYTE *)(Pointer + 177) / 100 )
    && *(BYTE *)(*(DWORD *)(Pointer + 4) + 780) == 1
    && ViewCurHP > 0 )
    {
    main_addr = 0x0095E1B9;
    }
    }


    _asm
    {
    JMP [main_addr]
    }
    }[/code]

Creditos: StevenDX
Título: Re: [Sources] Fix AutoPot in Helper
Publicado por: robins1998 en Mayo 27, 2021, 02:35:19 am
Very helpful, thanks for sharing.