Mafia Coders
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Mutli Gaming Hacking Forum
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Make VB6 Trainer

Go down 
AuthorMessage
Mafioso
Admin
Admin
Mafioso


Posts : 40
Join date : 2008-03-17

Make VB6 Trainer Empty
PostSubject: Make VB6 Trainer   Make VB6 Trainer EmptyTue Mar 18, 2008 5:41 am

Im assuming you have vb6,ok lets get started.
im not going to get in depth of the properties.(color,clip controls,etc.)


Open vb6,hit make new Standard.exe,now we have are basic form page.

1.We need to rename this,notice on the righthand side.You will see project1 properties.
if you notice caption is highlighted,in our properties box.thats the name of our forum.go ahead and rename it.My Trainer V1.0 or w/e.

2.ok you need this module,for warrock
too add this module,at the top left of vb6 by the file,and edit,under it is a pic

Make VB6 Trainer Vb6trianereditdn3


Quote :
Public Const PROCESS_ALL_ACCESS = &H1F0FFF
Dim f1holder As Integer
Dim timer_pos As Long

'API Declaration
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public 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
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
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 Function WriteAByte(gamewindowtext As String, address As Long, value As Byte)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", 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 "The Game Is Not Working", 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 "The Game Is Not Working", 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 "The Game Is Not Working", 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 "The Game Is Not Working", 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 "The Game Is Not Working", 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 "The Game Is Not Working", 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 "The Game Is Not Working", 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

ok now we have our module,were ready to build our trainer
now heres how to do a button and hotkeys

3.now to add a button,go to the lefthand side,to the toolbar,double click a button,now you have a button on your form,click it to put were you want it.Notice you can resize it and whatnot.ok now

4.rename this button,look into the properties box again,now your in the properties of this button,scroll threw it,look for caption(and rename it)

5.Adding a code to this button,double click the button,now your in the coding part of the button/trainer.this is what you should see

Quote :
Private Sub Command1_Click()

End Sub

ok,we want to put in our addie like so.ill do gps

Quote :
Private Sub Command1_Click()
Call WriteAlong("WarRock", &H90DC84 , 1)
End Sub

Notice its Writing along our addie we use in uce with &H infront(vb code &H)with a value of 1 for on.To do the Off code it would be in another button of course and a value of 0,like so

Quote :
Private Sub Command2_Click()
Call WriteAlong("WarRock", &H90DC84 , 0)
End Sub

ok,moving on

6.hotkeys,You need two timers for this
you need to Add A Timer,In the toolbox with the button
ok now goto the properties of the timer,Righthand side(when you add something into your trainer or form it will automaticlly be in the properties for that timer or button.in properties look for the interval set it to 1.
now double click on that timer to add in our code(this timer is for the hotkey.

Quote :
If GetKeyPress (VbKeyNumpad0)then
If Timer2.Interval = 0 Then Timer2.Interval = 1
Else: Timer2.Interval = 0
End If

now if you notice GetKeyPress(VBkey) is our hotkey command
heres a few for pointers
VBKeyNumpad0-9
VbKeyShift
VbKeyP
ok and the rest of the code
If Timer2.Interval = 0 Then Timer2.Interval = 1
Else: Timer2.Interval = 0,
this will tell our trainer to turn on the timer we want,by changeing the interval

7.now add the second timer,(leave the interval as 0)and add our code for the cheat,again i will use gps

Quote :
Call WriteALong("WarRock", &H90DC84 ,1)

hopefully You get my point to a hotkey,If you dont understand start with buttons first.

now we have a gps hack with buttons and a hotkey.lets test our trainer before saving.go to the play button at the top.
p.s you must have warrock opened up for your trainer to work.

if everything tested out fine and worked then we are ready to save our trainer.exe

8.go to file and save your trainer,change the names to what you want,then go back to file and look for make project1.exe or w/e u named it.exe and your done find your trainer inside C:\Program Files\Microsoft Visual Studio\VB98

and thats it.woot woot

soon i will post how to add more hotkeys to the same timer,and change the looks of your trainer,even how to add your own icons.etc.

TUTORIAL BY : MAFIOSO
Back to top Go down
https://mafiacoders.forumotion.com
 
Make VB6 Trainer
Back to top 
Page 1 of 1
 Similar topics
-
» Video Tut: Create C++ trainer
» How To Make VB.net Hack
» How to make UD Module
» How to make an undetected module.

Permissions in this forum:You cannot reply to topics in this forum
Mafia Coders :: Warrock :: Visual Basic 6.0-
Jump to: