Ok. i want to make a trainer for a game. I have a collection of some memory addresses i've collected. I wanna know the string of code i use to change it. I do have a module with this as code:
VB Code:
Private Const PROCESS_ALL_ACCESS = &H1F0FFF Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long Private Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer Public Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long --------------- Public Sub WriteAInt(Address As Long, Value As Long) Dim hwnd As Long, pid As Long, phandle As Long 'PSO for PC is the window name hwnd = FindWindow(vbNullString, "PSO for PC") If (hwnd <> 0) Then GetWindowThreadProcessId hwnd, pid phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid) If (phandle <> 0) Then WriteProcessMemory phandle, Address, Value, 4, 0& End If CloseHandle phandle End If End Sub
And lots of declarations in the module. This module was made to create trainers for a game called Phantasy Star Online. i can easily use
VB Code:
Call WriteAInt(address, value)
to edit a memory value for PSO.
I want to be able to edit the memory address values for a different game. How do i convert?


Reply With Quote
