HTML-Kodu:
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
HTML-Kodu:
Dim PokeBuff(12) As Byte 'RICAVO IL POINTER IN ESI DI 0042A00D PokeBuff(0) = &H89 'E SPOSTO IL VALORE NELLA LOCAZIONE FISSA 1EFCC088 PokeBuff(1) = &H35 PokeBuff(2) = &H88 PokeBuff(3) = &HC0 PokeBuff(4) = &HFC PokeBuff(5) = &H1E PokeBuff(6) = &H5E PokeBuff(7) = &H8B PokeBuff(8) = &HE5 PokeBuff(9) = &H5D PokeBuff(10) = &HC2 PokeBuff(11) = &H4 PokeBuff(12) = &H0 Call WPMbuf("GAME _ WINDOW_NAME", &H42A00D, PokeBuff(0), 13) Call ReadALong("GAME _WINDOW_ NAME", &H1EFCC088, Pointer1) Pointer2 = Hex(Pointer1 + 8)
HTML-Kodu:
Dim leggi as single Call ReadAFloat("METIN2", "&H" & ADDRESS, leggi)
HTML-Kodu:
Call WriteAFloat("METIN2", "&H" & ADDRESS, 1.220000)
Oyuna 11111,5555," " gibi kod göndermek için.
Private Sub Timer1_Timer()
SendKeys " "
End Sub
Yada
Private Sub Timer1_Timer()
SendKeys "4"
End Sub
Hiç yorum yok:
Yorum Gönder