Franciccio90
Numero di messaggi : 31
| Titolo: [Guida]Come creare LockMob VB.Net (Metin2) Mer 14 Lug 2010, 19:45 | |
| Come prima cosa aprite visual studio nuovo progetto Windows Form. Ora ke siete nel progetto create 2 bottoni uno di on e l'altro di off. Adesso create un nuovo modulo per ki nn lo sapesse Progetto > Aggiungi modulo alla schermata premete ok, entrate nel modulo e dikiariamo diverse cose - Codice:
-
Public Declare Function WriteByte Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Byte, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Public Declare Function ReadSingle Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Boolean Public Declare Function WriteSingle Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Boolean Public Const PROCESS_ALL_ACCESS = &H1F0FFF Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer Public Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Public buff As String Public hProcess As Long Public Function caricaProcesso() Dim MetinProcesso As Process() MetinProcesso = Process.GetProcessesByName("metin2client.bin") If MetinProcesso.Length <> 0 Then hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, MetinProcesso(0).Id) If hProcess = IntPtr.Zero Then MsgBox("Unable To Open Process!", MsgBoxStyle.Critical, "Errore") End End If Else If MetinProcesso.Length = 0 Then MsgBox("Devi prima aprire il gioco!", MsgBoxStyle.Critical, "Errore!") End End If Return True End Function
quest'ultima funzione la dovremmo scrivere nel form_load cosi - Codice:
-
caricaProcesso()
Ora creiamo la funzione per trovare offset delle assi. - Codice:
-
Public Function GetAdd(ByVal Addybase As String, ByVal of1 As Integer, ByVal of2 As Integer) Dim addy As String ReadProcessMemory(hProcess, "&H" & Addybase, buff, 4, Nothing) addy = "&H" & Conversion.Hex(buff + of1) ReadProcessMemory(hProcess, addy, buff, 4, Nothing) addy = "&H" & Conversion.Hex(buff + of2) Return addy End Function
Adesso ke abbiamo fatto la funzione possiamo trovare le coordinate quindi - Codice:
-
Public Function X() As String ReadSingle(hProcess, GetAdd("619980", 16, 1412), buff, 4, Nothing) Return buff End Function Public Function Y() As String ReadSingle(hProcess, GetAdd("619980", 16, 1416), buff, 4, Nothing) Return buff End Function Public Function Z() As String ReadSingle(hProcess, GetAdd("619980", 16, 1420), buff, 4, Nothing) Return buff End Function
Ora torniamo al form facciamo doppio click sul bottone di on e scriviamo questo - Codice:
-
WriteSingle(hProcess, &H600144, X(), 4, Nothing) WriteSingle(hProcess, &H60014A, Y(), 4, Nothing) WriteSingle(hProcess, &H600153, Z(), 4, Nothing) Dim xyz() As Byte = {&HA1, &H44, &H1, &H60, &H0, &H89, &H86, &HA8, &H3, &H0, &H0, &H8B, &HD, &H4A, &H1, &H60, &H0, &H89, &H8E, &HAC, &H3, &H0, &H0, &H8B, &H15, &H53, &H1, &H60, &H0, &H89, &H96, &HB0, &H3, &H0, &H0, &H5F, &HE9, &H9, &H3E, &HEA, &HFF, &H90} For i = 0 To xyz.lenght - 1 WriteByte(hProcess, &H0060015D + i, xyz(i), 1, Nothing) Next Dim lock() As Byte = {&HE9, &HE2, &HC1, &H15, &H0, &H90} For i = 0 To lock.lenght - 1 WriteByte(hProcess, &H4A3F76 + i,lock(i), 1, Nothing) Next
Ora andate nel bottone di off e scrivete - Codice:
-
Dim unlock() As Byte = {&H89, &H86, &HA8, &H3, &H0, &H0} For i = 0 To unlock.lenght - 1 WriteByte(hProcess,&H4A3F76 + i,unlock(i), 1, Nothing) Next
Ora avrete completato il LockMob! (Non funziona a causa dell'aggiornamento sta a voi aggiornarlo ) | |
|