[C++/...] Reading character/guild information...

03/21/2008 08:17 TheSpy#1
I've already had a thread on ************ about this, but nobody really reacted. Some have even flamed me for being lazy (though I've learnt how I can read a process's memory). Now I'd like to see if anybody here can help me.

* Guild
o Name
o Nickname (title)
o Level
o Status (master/member)
o Donated GP
o Fortress position
* Character
o Name
o HP
o MP
o Level
o Current/Next Experience
o STR/INT/... (all stats)
o Job alias
o ...


I've already tried it (as stated before) with a memory read, but the information there stays the same from the time you login until you do not logout. Anyway, here's the script I've used for the memory readings:

Code:
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

template<typename _ret_t> _ret_t ReadMemory(char Caption[], int long Address)
{
    DWORD PROC_ID;
    HANDLE PROC_HANDLE;
    _ret_t ret;
    GetWindowThreadProcessId(FindWindow(NULL, (LPCTSTR)Caption), &PROC_ID);
    PROC_HANDLE = OpenProcess(PROCESS_ALL_ACCESS, false, PROC_ID);
    ReadProcessMemory(PROC_HANDLE, (void*)Address, &ret, sizeof(_ret_t), NULL);
    CloseHandle(PROC_HANDLE);
    return ret;
}

int main()
{
    SetConsoleTitle("boring");

   // logged in character
    std::cout << "Your logged in character is..." << std::endl;
    for (unsigned int offset = 0xF0F938; offset < 0xF0F960; offset++)
    {
        std::cout << ReadMemory<unsigned char>("SRO_Client", offset);
    }
    std::cout << std::endl;

    system("pause");

   // ID and password
    for (unsigned int offset = 0x179CC68; offset < 0x179CC98; offset++)
    {
        std::cout << ReadMemory<unsigned char>("SRO_Client", offset);
    }
    std::cout << std::endl;

    system("pause");

    // guild
    /*
    for (unsigned int offset = 0x54016D0; offset < 0x54019C0; offset++)
    {
        std::cout << ReadMemory<unsigned char>("SRO_Client", offset);
    }
    std::cout << std::endl;

    system("pause");
    */

    return 0;
}

My problem can be probably solved by socket programming or something like that, not sure. Also I'd prefer it in C++, just an example, don't need more.

Thanks a lot in advance!
03/21/2008 11:46 andypockett92#2
im not an expert but ... you could post under General -> [Only registered and activated users can see links. Click Here To Register...] or [Only registered and activated users can see links. Click Here To Register...] forums ...

there are also tutorials in the coding section ...
03/22/2008 02:54 Hikkikomori#3
i'm not really familiar with c++, but are you using the correct offsets?

i use these and they work for stuff like AutoIT:
base address is 0x00cf097c
character name offset is 0xcef508
and the guild offset should be 0xcf00dc