yea, it's good i tested it in this script and its finding this window
yea, it's good i tested it in this script and its finding this window
omg 4:00 am... anyway i made:
andCode:int readByte(int address, int byte) { int value; if(ReadProcessMemory(processHandle, (LPVOID)address, &value, byte, NULL)) return value; return 0; }
and it working, but now i think how to make this what you said:Code:HANDLE processHandle; DWORD procId; HWND hwnd; hwnd = FindWindow("ARKAMECZEK ", NULL); GetWindowThreadProcessId(hwnd, &procId); processHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procId); if(hwnd) { //start int playerCID = SELFID; int myCreatureIndex = 0; for (int i = 1; i < MaxCreatures; i++) { int currentCID = readByte(BattlelistBegin + BattlelistStep * i, 4); if (currentCID == readByte(playerCID,4)) { myCreatureIndex = i; break; } } CloseHandle(processHandle); }maybe cuz im zombie now anyway, if you have any idea to do this msg. Thanks// Do whatever here, e.g:
string playerName = ReadString(battleListStart + battleListStep * i + 0x4);
//for test i made:
and its ok, i have right ID's of creatures, but how can i get name from that addresses?Code:test = readByte(BattlelistBegin + BattlelistStep * myCreatureIndex, 4);
Last edited by Arkamek; 09-17-2014 at 02:22 AM.
Ahhh, I just read your last post and noticed you were passing the window handle not the process handle, sense made.
Regarding ReadString, you'll basically want to return a pointer to a char array, containing the address of the bytes you read.
Are you doing this from an injected DLL? Or are you doing it from a standalone console application or something? If it's injected, you really don't need to do all this ReadProcessMemory crap.
yea Injected DLL, then how can i do it without readprocessmemory?
read
writeCode:DWORD currentCID = *(DWORD *)(BattlelistBegin + BattlelistStep * i);
Code:int new_id = 99999; memcpy((LPVOID)(BattlelistBegin + BattlelistStep * i, new_id, 4);
Thanks bro
Code:void test() { int playerCID = SELFID; int myCreatureIndex = 0; for (int i = 1; i < MaxCreatures; i++) { DWORD currentCID = *(DWORD *)(BattlelistBegin + BattlelistStep * i); if (currentCID == *(DWORD *)(playerCID)) { //My character ID myCreatureIndex = i; break; } } domin = *(DWORD *)(BattlelistBegin + BattlelistStep * myCreatureIndex); }
i trying make:
but don't workCode:char domin[32]; domin[32] = *(char*)((char*)((BattlelistBegin + BattlelistStep * myCreatureIndex) + 0x04));
result is 0/empty
Thanks Man!
Working code:
Code:string tekst;and result = "Arkam"Code:void dominik() { int playerCID = SELFID; int myCreatureIndex = 0; for (int i = 0; i < MaxCreatures; i++) { DWORD currentCID = *(DWORD *)(BattlelistBegin + BattlelistStep * i); if (currentCID == *(DWORD *)(playerCID)) { //My character ID myCreatureIndex = i; break; } } char* name = (char*)((BattlelistBegin + BattlelistStep * myCreatureIndex) + 0x04); tekst = name; }
Thanks again
I have the last question now, how can i read level of character, because i can't find address from it.
Last edited by Arkamek; 09-17-2014 at 01:50 PM.
the correct code
about read level of characterCode:string SelfName() { int playerCID = SELFID; for (int i = 0; i < MaxCreatures; i++) { DWORD currentCID = *(DWORD *)(BattlelistBegin + BattlelistStep * i); if (currentCID == *(DWORD *)(playerCID)) { return (char*)((BattlelistBegin + BattlelistStep * i) + 0x04); } } return NULL; }
Code:http://youtu.be/NcZXDcrCZFA?t=24m13s
Last edited by wgrzelak; 09-17-2014 at 02:26 PM.