Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Public 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 GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Private Function WriteBytes(ByVal WndText As String, ByVal Address As Long, ByRef buffer() As Byte)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 1, 0&
CloseHandle hProcess
End Function
Public Function WriteAnInt(gamewindowtext As String, Address As Long, value As Integer)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 2, 0&
CloseHandle hProcess
End Function
Public Function WriteALong(gamewindowtext As String, Address As Long, value As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 4, 0&
CloseHandle hProcess
End Function
Public Function ReadAByte(gamewindowtext As String, Address As Long, valbuffer As Byte)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 1, 0&
CloseHandle hProcess
End Function
Public Function ReadAnInt(gamewindowtext As String, Address As Long, valbuffer As Integer)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 2, 0&
CloseHandle hProcess
End Function
Public Function ReadALong(gamewindowtext As String, Address As Long, valbuffer As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
Public Function ReadAFloat(gamewindowtext As String, Address As Long, valbuffer As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
Public Function WriteAFloat(gamewindowtext As String, Address As Long, value As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 4, 0&
CloseHandle hProcess
End Function
Public Function WPM(gamewindowtext As String, Address As Long, value As Long, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Function WPMbuf(gamewindowtext As String, Address As Long, value As Byte, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Function RPM(gamewindowtext As String, Address As Long, value As Long, bytes As Long)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
ReadProcessMem ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Public 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 GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Private Function WriteBytes(ByVal WndText As String, ByVal Address As Long, ByRef buffer() As Byte)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 1, 0&
CloseHandle hProcess
End Function
Public Function WriteAnInt(gamewindowtext As String, Address As Long, value As Integer)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 2, 0&
CloseHandle hProcess
End Function
Public Function WriteALong(gamewindowtext As String, Address As Long, value As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 4, 0&
CloseHandle hProcess
End Function
Public Function ReadAByte(gamewindowtext As String, Address As Long, valbuffer As Byte)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 1, 0&
CloseHandle hProcess
End Function
Public Function ReadAnInt(gamewindowtext As String, Address As Long, valbuffer As Integer)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 2, 0&
CloseHandle hProcess
End Function
Public Function ReadALong(gamewindowtext As String, Address As Long, valbuffer As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
Public Function ReadAFloat(gamewindowtext As String, Address As Long, valbuffer As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
Public Function WriteAFloat(gamewindowtext As String, Address As Long, value As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 4, 0&
CloseHandle hProcess
End Function
Public Function WPM(gamewindowtext As String, Address As Long, value As Long, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Function WPMbuf(gamewindowtext As String, Address As Long, value As Byte, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Function RPM(gamewindowtext As String, Address As Long, value As Long, bytes As Long)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
ReadProcessMem ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Public 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 GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Private Function WriteBytes(ByVal WndText As String, ByVal Address As Long, ByRef buffer() As Byte)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 1, 0&
CloseHandle hProcess
End Function
Public Function WriteAnInt(gamewindowtext As String, Address As Long, value As Integer)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 2, 0&
CloseHandle hProcess
End Function
Public Function WriteALong(gamewindowtext As String, Address As Long, value As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 4, 0&
CloseHandle hProcess
End Function
Public Function ReadAByte(gamewindowtext As String, Address As Long, valbuffer As Byte)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 1, 0&
CloseHandle hProcess
End Function
Public Function ReadAnInt(gamewindowtext As String, Address As Long, valbuffer As Integer)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 2, 0&
CloseHandle hProcess
End Function
Public Function ReadALong(gamewindowtext As String, Address As Long, valbuffer As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
Public Function ReadAFloat(gamewindowtext As String, Address As Long, valbuffer As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, Address, valbuffer, 4, 0&
CloseHandle hProcess
End Function
Public Function WriteAFloat(gamewindowtext As String, Address As Long, value As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "Prima lanciare Metin2, subito dopo il Cheat", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, Address, value, 4, 0&
CloseHandle hProcess
End Function
Public Function WPM(gamewindowtext As String, Address As Long, value As Long, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Function WPMbuf(gamewindowtext As String, Address As Long, value As Byte, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
Public Function RPM(gamewindowtext As String, Address As Long, value As Long, bytes As Long)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
ReadProcessMem ProcessHandle, Address, value, bytes, 0
CloseHandle ProcessHandle
End Function
|