468x60 Ads

This is an example of a HTML caption with a link.
Mostrando postagens com marcador encontrar address pxg. Mostrar todas as postagens
Mostrando postagens com marcador encontrar address pxg. Mostrar todas as postagens
Já havia feito isso em Pascal, agora estou programando em c++ e refiz o código, esse código lê alguns endereços de memória do cliente pxg, usei como base para criar as funções deste código este link.


Código:
#include <windows.h>
#include <iostream>
#include <TlHelp32.h>
using namespace std;
void RM(uintptr_t *result, uintptr_t address); //Função para obter o valor do endereço base
void RD(double *result, uintptr_t offset, uintptr_t base); //Função para obter os valores
int main(){
//Variaveis
uintptr_t baseaddress, offset, addr;
double PlayerHP, PokemonHP, PlayerLevel, PlayerExp, PlayerMaxHP;
addr = 0x006C53C0; //Endereço base
RM(&baseaddress, addr); //Obtem o valor do endereço base para a soma
RD(&PlayerHP, 0x348, baseaddress); //Define a HP do player
RD(&PlayerMaxHP, 0x350, baseaddress); //Define a HP máxima do player
RD(&PokemonHP, 0x380, baseaddress); //Define a HP do pokemon
RD(&PlayerLevel, 0x370, baseaddress); //Define o Level do player
RD(&PlayerExp, 0x368, baseaddress); //Define a exp atual do player
//Escreve na tela os valores
cout << "Player HP: " << PlayerHP << "/" << PlayerMaxHP << "\n"; cout << "Player Exp: " << PlayerExp << "\n";
cout << "Player Level: " << PlayerLevel << "\n";
cout << "Pokemon HP: " << PokemonHP << "\n";
system("pause");
return 0;
}
void RM(uintptr_t *result, uintptr_t address){
int y;
HWND h = NULL;
DWORD pid;
cout << "Searching PXG Client..." << "\n";
while (h == NULL)
{
h = FindWindow(NULL, "PXG Client");
Sleep(1000);
}
cout << "PXG Client found!" << "\n";
GetWindowThreadProcessId(h, &pid);
HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
ReadProcessMemory(proc, (LPCVOID)address, &y, 8, NULL);
*result = y;
}
void RD(double *result, uintptr_t offset, uintptr_t base){
uintptr_t address = base + offset;
double y;
HWND h = NULL;
DWORD pid;
while (h == NULL)
{
h = FindWindow(NULL, "PXG Client");
Sleep(100);
}
GetWindowThreadProcessId(h, &pid);
HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
ReadProcessMemory(proc, (LPCVOID)address, &y, 8, NULL);
*result = y;
}


Façam bom proveito do código.
READ MORE