Witam znalazłem na internecie skrypt : http://tpforums.org/forum/thread-9448.html który czyta adres z gry :d problem tkwi w tym że każdy adres ma swój tzw. adres bazowy i ktoś niżej podał funkcje na automatyczne szukanie adresu XOR teraz moja prośba mógłby ktoś skleić mi te obydwie funkcje w jeden kod ? bo jak dodawałem te funkcje na czytanie XOR'a to wyskakiwały błędy z góry dziękuje za pomoc.
0
0
http://tpforums.org/forum/thread-9448.html napisał(a)
So far, nothing special. We declared 3 variables and created a function that will return the base address of Tibia.exe.
I wszystko jasne...
0
Tutoriale jak ustalać pointery bazowe w Cheat Engine są na różnych stron do wygooglowania. W tym w języku polskim. Także zamiast czekać na odpowiedzi na forum, dawno byś już sobie o tym poczytał. Dodam że do odczytu i zapisu Pointerów, w taki sposób jak robi to Cheat Engine, z podaniem adresu pointera oraz offsetu do dodania mogą posłużyć takie takie funkcje jak poniżej. Sprawdzanie ewentualnych błędów zrób sobie już sam. Ja z użyciem tych funkcji napisałem kilka trainerów w WinAPI pod gry zarówno DOSowe jak i pod emulowaną Amigę i wszystko działa prawidłowo.
type
TValueType = (vtByte, vtWord, vtDword);
function ReadPointer(DestPid : DWORD; PointerAddress, PointerOffset : DWORD; ValueType : TValueType) : DWORD;
const
TypeArr : array[TValueType] of Byte = (1, 2, 4);
var
BytesRead, HProcess, PtrVar : Cardinal;
begin
HProcess := OpenProcess(PROCESS_ALL_ACCESS, False, DestPid);
ReadProcessMemory(HProcess, Ptr(PointerAddress), @PtrVar, SizeOf(PtrVar), BytesRead);
ReadProcessMemory(HProcess, Ptr(PtrVar + PointerOffset), @Result, TypeArr[ValueType], BytesRead);
CloseHandle(HProcess);
end;
procedure WritePointer(DestPid : DWORD; PointerAddress, PointerOffset : DWORD; NewValue : DWORD; ValueType : TValueType);
const
TypeArr : array[TValueType] of Byte = (1, 2, 4);
var
BytesRead, BytesWrite, HProcess, PtrVar : Cardinal;
begin
HProcess := OpenProcess(PROCESS_ALL_ACCESS, False, DestPid);
ReadProcessMemory(HProcess, Ptr(PointerAddress), @PtrVar, SizeOf(PtrVar), BytesRead);
WriteProcessMemory(HProcess, Ptr(PtrVar + PointerOffset), @NewValue, TypeArr[ValueType], BytesWrite);
CloseHandle(HProcess);
end;