vb6 trainer making{how To}

Posts 1–10 of 10 · Page 1 of 1
vb6 trainer making{how To}
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

click this and add new module(copy and paste this code in)

Code:
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
Code:
Private Sub Command1_Click()

End Sub
ok,we want to put in our addie like so.ill do gps
Code:
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

Code:
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.
Code:
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
Code:
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.
Quote Originally Posted by cjg333 View Post
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

click this and add new module(copy and paste this code in)

Code:
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
Code:
Private Sub Command1_Click()

End Sub
ok,we want to put in our addie like so.ill do gps
Code:
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

Code:
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.
Code:
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
Code:
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.
There are lots of tuts like this but this is well explained! Thanks!
Nice tut yeah but i have 1 question how do you hold adresses? Cuz i dont like to hold Numpad 0 or something forever
Quote Originally Posted by Robinnator View Post
Nice tut yeah but i have 1 question how do you hold adresses? Cuz i dont like to hold Numpad 0 or something forever

well in a timer it frezes the addie for you,so you dont have to hold the button down constantly
I put this:
If GetKeyPress (VbKeyNumpad0)then
If Timer2.Interval = 0 Then Timer2.Interval = 1
Else: Timer2.Interval = 0
End If

in timer 1, and this

Call WriteALong("WarRock", &H90DC84 ,1) in timer 2 but only as unlimited stamina... I run i press Numpad0 and my stamina shoots full but then it runs out again
Quote Originally Posted by Robinnator View Post
I put this:
If GetKeyPress (VbKeyNumpad0)then
If Timer2.Interval = 0 Then Timer2.Interval = 1
Else: Timer2.Interval = 0
End If

in timer 1, and this

Call WriteALong("WarRock", &H90DC84 ,1) in timer 2 but only as unlimited stamina... I run i press Numpad0 and my stamina shoots full but then it runs out again
That means that your changing the vaule but it's not freezing it at full(Just to screw with people I think I'll freeze mine at near empty one time... )
Ok i understand but how do i get it working so it would HOLD the adress?? Because i dont like holding numpad0 and numpad1 for no spread/recoil ....
And can someone help me with the superjump?
Private Sub Command10_Click()
Dim superjump As Long
Dim superjump1 As Long
Dim value As Long
Call ReadALong("Warrock", &H896E28, superjump)
superjump1 = superjump + &H180
value = AddressInput2.Text

Call WriteALong("Warrock", superjump1, value)

End Sub
But this is wrong can someone tell me how it does work?
Quote Originally Posted by Robinnator View Post
Ok i understand but how do i get it working so it would HOLD the adress?? Because i dont like holding numpad0 and numpad1 for no spread/recoil ....
And can someone help me with the superjump?


But this is wrong can someone tell me how it does work?


man there are differnet ways of doing it it something like stamina or no spread wont stay froze.what you have to do is change it,make the timer of the cheat have interval of 1,then in the hotkey fucntion,put timer2.enabled = true,and you should be able to use thatt for off to,just do diff hotkey with timer2.enabled = false,sometimes you have to try diff methods

heres an example

Code:
If GetKeyPress(vbKeyNumpad4) Then
Timer6 = True
End If
If GetKeyPress(vbKeyNumpad5) Then
Timer6 = False
End If
If GetKeyPress(vbKeyNumpad4) Then
Timer2 = True
End If
If GetKeyPress(vbKeyNumpad5) Then
Timer2 = False
End If
So this goes in a timer? or does this one
If GetKeyPress(vbKeyNumpad4) Then
Timer6 = True
End If
go to Command 1 or sommethin?

and thhat timer 2 looks like this :
Call WriteALong("WarRock", &H7DB120, 1120403456)
thx
thx for the tutorial its helps mee
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us