C# Example

10/04/2008 23:56 pessanha#1
Can some one make a code to show an exemple about how to show any ingame information, MaxHP for example...
Not nacessary in C#, maybe another language..
With this, everybody can make your own bot.
Im a litte bit confused about how to access the memory and get the value that i want.

Tanks anyway
10/05/2008 04:59 GODDNESS#2
Just use cheat engine, dont need C# there is also a topic with a ton of pointers, it's pinned to the top, try looking :D
10/05/2008 05:07 vinceiscoolio#3
Quote:
Originally Posted by GODDNESS View Post
Just use cheat engine, dont need C# there is also a topic with a ton of pointers, it's pinned to the top, try looking :D
lol... you cant make a bot with cheat engine. he wants to be able to look at his stuff ingame and make it show on his application and he might want to send packets
10/05/2008 15:07 phuongnl#4
int CW2IClient::ReadPlayerInfo(void)
{
GetWindowThreadProcessId(m_hWnd, &dwProcessID);
m_hProcess = OpenProcess(PROCESS_VM_READ, FALSE, dwProcessID);
if (!m_hProcess)
return 0x01;
LPBYTE lpBaseAdd,lpCharBaseAdd,lpTempAdd;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)W2I_BASE_ADD, (LPVOID)&lpBaseAdd, 4, NULL))
return 0x02;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)(lpBaseAdd + 0x20), (LPVOID)&lpCharBaseAdd, 4, NULL))
return 0x03;
lpTempAdd = lpCharBaseAdd + 0x3C;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrCorX), 4, NULL))
return 0x04;
lpTempAdd = lpCharBaseAdd + 0x40;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrCorZ), 4, NULL))
return 0x05;
lpTempAdd = lpCharBaseAdd + 0x44;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrCorY), 4, NULL))
return 0x06;
lpTempAdd = lpCharBaseAdd + 0x448;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrLV), 4, NULL))
return 0x07;
lpTempAdd = lpCharBaseAdd + 0x450;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrCurHP), 4, NULL))
return 0x08;
lpTempAdd = lpCharBaseAdd + 0x454;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrCurMP), 4, NULL))
return 0x09;
lpTempAdd = lpCharBaseAdd + 0x478;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrMaxHP), 4, NULL))
return 0x0A;
lpTempAdd = lpCharBaseAdd + 0x47C;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrMaxMP), 4, NULL))
return 0x0B;
lpTempAdd = lpCharBaseAdd + 0x458;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrCurEXP), 4, NULL))
return 0x0C;
lpTempAdd = (LPBYTE)W2I_EXP_ARRAY + (m_sPlayer.plrLV-1)*4;
if (!ReadProcessMemory(m_hProcess, (LPCVOID)lpTempAdd, (LPVOID)&(m_sPlayer.plrMaxEXP), 4, NULL))
return 0x0D;