[Delphi]Stamina Hack
Well, first we need a function that can edit values of memory addresses, luckily for you, I have done that:
Then we will need a procedure to repeatingly set the value of an address aka. freeze the address:
Now, that will work fine but it will freeze your program completly, so we need to run it in a new thread:
Code:
function EditMemory(Address: Integer; Value: Integer): Boolean; var ProcessId, WindowName, HandleWindow: Integer; Write: Cardinal; begin WindowName := FindWindow(nil, 'WarRock'); If WindowName = 0 then begin Result := False; Exit; end; GetWindowThreadProcessId(WindowName, @ProcessId); HandleWindow := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId); WriteProcessMemory(HandleWindow, Ptr(Address), @Value, 4, Write); CloseHandle(HandleWindow); Result := True; end;
Code:
procedure StaminaHack(); begin while 1 = 1 do begin EditMyMemory($007F2B34, $42C80000); Sleep(5); end; end;
Code:
procedure TForm1.Button1Click(Sender: TObject); var ThreadID: Cardinal; begin CreateThread(nil, 0, @StaminaHack, nil, 0, ThreadID); end;
