FileForums

FileForums (https://fileforums.com/index.php)
-   General Gaming (https://fileforums.com/forumdisplay.php?f=25)
-   -   how made a trainer with vb6 (https://fileforums.com/showthread.php?t=56003)

adel444 28-11-2003 16:30

how made a trainer with vb6
 
hi

i'm try write trainer with this code but its not work

can anybady tell my whats the wrong or tell my the correct code

i'm change the name window and address and value

but nothink test it maybe am wrong in somethink maybe



-----------------

When you start VB a menu will pop up.
Click on Standard EXE.
There is a properties box; you can edit the look, color and a lot more
There is your project box, when you have multiple forms, modules or other projects open this will help you navigate easier.
You must add a module to make a trainer, to add a module follow the instructions below.
Go to the project button at the top and click add module. A box will popup, in the box you will insert the code below.

Module Code:

Private Const PROCESS_ALL_ACCESS = &H1F0FFF
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVallpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Private 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 GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer
Public Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Sub WriteAInt(Address As Long, Value As Integer)
Dim hwnd As Long, pid As Long, phandle As Long
'2: 9090, write in reverse
hwnd = FindWindow(vbNullString, "Delta Force 2, V1.06.15")
If (hwnd <> 0) Then
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle <> 0) Then
WriteProcessMemory phandle, Address, Value, 2, 0&
End If
CloseHandle phandle
End If
End Sub

*NOTE*
Where it says Delta Force 2, V1.06.15 you can change that to any game name, just find the window name by alt-tabbing out of the game.
You can add a button 2 ways. You can click the button and draw the button or double click the button for a set height and width.



Adding Pokes to the Button:

Now say we want to make GPS ON for DF2. We would double click the button and put Call WriteAInt(&H42697C, &H9090) and GPS OFF would be Call WriteAInt(&H0042697C, &H757E)
Now you do the same with GPS OFF just make another button and put the off code in it. That’s all that’s to coding a button.


Adding color to your project:

In this tutorial I will teach you how to add color to your project. First we will add color to the form. First click on the form. Now go over to the properties box on the right.
Now scroll down to where it says Backcolor and choose whatever color you want.
Now to change a buttons color click on the button and then scroll down to Style and choose the option 1 - Graphical. Now scroll up to Backcolor and change that to whatever you want your button color to be. You can also change the font color, size and style from the properties box.

Freezing Buttons:

This tutorial will explain how to freeze a button for an option like freeze ammo. The first thing you need to do is add a timer.
After doing that you will need to click the time and go over to the properties box and put the Interval at 100 and Enabled=True. Now double click on the time and in between the Private Sub Timer1_Timer () and End Sub enter your addy and value code like I did below. (I used the GPS code for DF2)

Call WriteAInt(&H42697C, &H9090) <---On Addy.

Now all we did was make the code freeze, but now we want to make the code freeze and unfreeze when we click it. So now double click on the the button (I’m using the GPS code on and off) and insert the code below in the button.

If Timer1.Enabled = True Then
Timer1.Enabled = False
Command1.Caption = "Gps OFF"
Else
Timer1.Enabled = True
Command1.Caption = "Gps ON"
End If

cdkiller 30-11-2003 08:05

i wouldn´t code a trainer in vb6.0.
try coding it in asm. their are lot´s of sources on the net.

RkShaRkz 27-12-2004 01:48

i don't know how old this thread is.....
 
well, the VB code is just fine, altho i might recommend a different "recognition" scheme..... tracking apps just by its window name is kinda lame :))
and, your trainer works also (if u made it), but u need correct memory addresses to make it work for any game........
example:
memory address 0x05832 might work for shotgun ammo in one game, but it would crash the other game, or just it would have no effect, because in the other game the shotgun shells are at 0x052135 .......
the memory addresses are just random numbers i used for an example.....

so, unless you have the correct "numbers", your trainer won't do much.... except possibly lagging the game.....


All times are GMT -7. The time now is 03:34.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com