[Tutorial]Easy VB Trainer
Hi, today im gonna show you how to make a easy trainer in Visual Basic. Im gonna do this in some easy steps!
1. First of all open Visual Basic. (Any version. I prefer Visual Basic 2008 Express)
Now make a new project. Name it whatever you want

2. Make a new module. Name it whatever you want

3. Add this to the module. (Clear out all in the module before inserting or else you will get some errors)

[php]Module Module1
#region "Declarations"
Private Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function WriteFloatMemory 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 Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private 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
Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
Private string1 As Long
Private string2 As Integer
Private RBuff1 As Long
Private RBuff2 As Single
Private RBuff3 As Integer
#end region
#Region "Check Process/ReadDll"
Private Function readdll(ByVal modulename As String)
Dim procmodule As ProcessModule
Dim constant1 As Integer
Dim constant2 As Long
Dim constant3 As Process() = Process.GetProcessesByName("iw4mp")
If constant3.Length = 0 Then
Return 0
End If
For Each procmodule In constant3(0).Modules
If modulename = procmodule.ModuleName Then
constant1 = procmodule.BaseAddress
End If
Next
constant2 = constant1
Return constant2
End Function
Public Function IsProcessOpen(ByVal name As String) As Boolean
For Each clsProcess As Process In Process.GetProcesses
If clsProcess.ProcessName.Contains(name) Then
Return True
End If
Next
' Do nothing
Return False
End Function
#end region
#Region "Hacks"
'WriteMemory
Private Function WriteMemory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
CloseHandle(processHandle)
Return Nothing
End Function
'WriteFloat
Private Function WriteFloat(ByVal Address As Integer, ByVal Value As Single)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
WriteFloatMemory(processHandle, Address, Value, 4, Nothing)
CloseHandle(processHandle)
Return Nothing
End Function
'NOP
Private Function NOP(ByVal Address As Integer, ByVal value As Integer)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
WriteProcessMemory(processHandle, Address, value, 1, Nothing)
CloseHandle(processHandle)
Return Nothing
End Function
#End region
#Region "Functions"
Public Function memoryh4x(ByVal address As String, ByVal value As Long, ByVal bytes As Byte)
If IsProcessOpen("iw4mp") Then
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
WriteMemory(string2, value, bytes)
End If
Return Nothing
End Function
Public Function floath4x(ByVal address As String, ByVal value As Long)
If IsProcessOpen("iw4mp") Then
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
WriteFloat(string2, value)
End If
Return Nothing
End Function
Public Function noph4x(ByVal address As String, ByVal value As Long)
If IsProcessOpen("iw4mp") Then
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
NOP(string2, value)
End If
Return Nothing
End Function
#end region
End Module[/php]
4. Go back to the designing form and make a textbox, a button and a label

5. Doubleclick the button and add
[php]memoryh4x(&H12BC89C, textbox1.text, 4) 'Exp code[/php]

If you want to set a default value like level 70 then [php]memoryh4x(&H12BC89C, 2516000, 4) 'Exp code[/php]
Just fill in whatever value u want, and put it on a button as above.
6. Now debug and test it in barracks!
If everything works, You just made your first trainer in Visual Basic
Credits:
Me for tutorial
Blubb for his awesome module and funcrions forund here
And last CK for his cheat engine tables in attachments
Here are some cheat engine etables so you can find all the adresses needed!!
Virusscans:
Virustotal
Virscan
If you dont even know what to do with the Cheat Engine files, then dont try. Read some tuts and come back in a year!!!
Dont say it, press it
1. First of all open Visual Basic. (Any version. I prefer Visual Basic 2008 Express)
Now make a new project. Name it whatever you want

2. Make a new module. Name it whatever you want

3. Add this to the module. (Clear out all in the module before inserting or else you will get some errors)

[php]Module Module1
#region "Declarations"
Private Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function WriteFloatMemory 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 Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private 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
Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
Private string1 As Long
Private string2 As Integer
Private RBuff1 As Long
Private RBuff2 As Single
Private RBuff3 As Integer
#end region
#Region "Check Process/ReadDll"
Private Function readdll(ByVal modulename As String)
Dim procmodule As ProcessModule
Dim constant1 As Integer
Dim constant2 As Long
Dim constant3 As Process() = Process.GetProcessesByName("iw4mp")
If constant3.Length = 0 Then
Return 0
End If
For Each procmodule In constant3(0).Modules
If modulename = procmodule.ModuleName Then
constant1 = procmodule.BaseAddress
End If
Next
constant2 = constant1
Return constant2
End Function
Public Function IsProcessOpen(ByVal name As String) As Boolean
For Each clsProcess As Process In Process.GetProcesses
If clsProcess.ProcessName.Contains(name) Then
Return True
End If
Next
' Do nothing
Return False
End Function
#end region
#Region "Hacks"
'WriteMemory
Private Function WriteMemory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
CloseHandle(processHandle)
Return Nothing
End Function
'WriteFloat
Private Function WriteFloat(ByVal Address As Integer, ByVal Value As Single)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
WriteFloatMemory(processHandle, Address, Value, 4, Nothing)
CloseHandle(processHandle)
Return Nothing
End Function
'NOP
Private Function NOP(ByVal Address As Integer, ByVal value As Integer)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
WriteProcessMemory(processHandle, Address, value, 1, Nothing)
CloseHandle(processHandle)
Return Nothing
End Function
#End region
#Region "Functions"
Public Function memoryh4x(ByVal address As String, ByVal value As Long, ByVal bytes As Byte)
If IsProcessOpen("iw4mp") Then
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
WriteMemory(string2, value, bytes)
End If
Return Nothing
End Function
Public Function floath4x(ByVal address As String, ByVal value As Long)
If IsProcessOpen("iw4mp") Then
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
WriteFloat(string2, value)
End If
Return Nothing
End Function
Public Function noph4x(ByVal address As String, ByVal value As Long)
If IsProcessOpen("iw4mp") Then
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
NOP(string2, value)
End If
Return Nothing
End Function
#end region
End Module[/php]
4. Go back to the designing form and make a textbox, a button and a label

5. Doubleclick the button and add
[php]memoryh4x(&H12BC89C, textbox1.text, 4) 'Exp code[/php]

If you want to set a default value like level 70 then [php]memoryh4x(&H12BC89C, 2516000, 4) 'Exp code[/php]
Just fill in whatever value u want, and put it on a button as above.
6. Now debug and test it in barracks!
If everything works, You just made your first trainer in Visual Basic
Credits:
Me for tutorial
Blubb for his awesome module and funcrions forund here
And last CK for his cheat engine tables in attachments
Here are some cheat engine etables so you can find all the adresses needed!!
Virusscans:
Virustotal
Virscan
If you dont even know what to do with the Cheat Engine files, then dont try. Read some tuts and come back in a year!!!
Dont say it, press it

CK's MW2 ADRESSES.rar




