Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Request - Trainer With Pointer Source Code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tprice88
How do I cheat?
Reputation: 0

Joined: 07 Dec 2011
Posts: 4

PostPosted: Sat Dec 24, 2011 12:04 am    Post subject: Request - Trainer With Pointer Source Code Reply with quote

I have made tons of trainers with GTS 1.64 and im wanting to learn Visual Basic Or c++. If anyone could upload a source code in either language or both that supports pointers. it would help me alot.
Mainly i want to do this because in the game im hacking i need to set kills to random value between 2000-4000. and gts will not support random values.

Thank you,
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Sat Dec 24, 2011 11:06 am    Post subject: Reply with quote

It would be easier for everyone, if you first learn the basics of C++ (or c#). After that, this kind of stuff will be easy for you.
Back to top
View user's profile Send private message
tprice88
How do I cheat?
Reputation: 0

Joined: 07 Dec 2011
Posts: 4

PostPosted: Sun Dec 25, 2011 6:03 pm    Post subject: Reply with quote

Heres my code i got so far but its not working for visual basic 6.0
this is the module

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long

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
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
Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer

Public Function WPM(gamewindowtext As String, address As Long, value As Long, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, address, value, bytes, 0
CloseHandle ProcessHandle
End Function

Public Function WPMbuf(gamewindowtext As String, address As Long, value As Byte, bytes As Byte)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
WriteProcessMemory ProcessHandle, address, value, bytes, 0
CloseHandle ProcessHandle
End Function


Public Function RPM(gamewindowtext As String, address As Long, value As Long, bytes As Long)
Dim handle As Long
Dim processID As Long
Dim ProcessHandle As Long
handle = FindWindow(vbNullString, gamewindowtext)
GetWindowThreadProcessId handle, processID
ProcessHandle = OpenProcess(&H1F0FFF, True, processID)
ReadProcessMem ProcessHandle, address, value, bytes, 0
CloseHandle ProcessHandle
End Function

AND THIS IS THE CODE FOR THE FORM, ANYONE KNOW WHATS WRONG?

Private Sub Command1_Click()
Dim PointerValue As Long

Dim AddressDec As Long
Dim AddressHex As String
Dim NewAddress As Long

Call RPM("Well of Souls", &H67FBF8, PointerValue, 4)

AddressDec = PointerValue + 1832
AddressHex = Hex(AddressDec)
NewAddress = "&H" & AddressHex

Call WPM("Well of Souls", NewAddress, &H3000, 2)

End Sub
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Dec 26, 2011 1:06 am    Post subject: Reply with quote

I believe that the lines
Code:

AddressDec = Pointer + 1832
AddressHex = Hex(AddressDec)

are useless since hexadecimal and decimal are only a representation methods for numbering,
the value remains the same dude.
If a variable would have the value 255 in decimal, if you'd represent it hex obviously it'd be "FF" Wink

_________________
Stylo
Back to top
View user's profile Send private message
DDS
Expert Cheater
Reputation: 3

Joined: 10 Feb 2011
Posts: 112
Location: Bill's Planet

PostPosted: Tue Dec 27, 2011 8:52 am    Post subject: Reply with quote

Use &H before the numbers when u r turning Addresses into words in vb.net
Example AddressDEC = Something + &H12345

&H = Hexadecimal Numbers

_________________
elDarkDragonSlayer
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Tue Dec 27, 2011 11:26 am    Post subject: Reply with quote

tprice88 wrote:
Heres my code i got so far but its not working for visual basic 6.0
this is the module


Your should really take the time to both learn the language and learn how things work before you start copying code and assuming things. You aren't using pointers properly with the code you are using, which you can easily learn how to properly use reading some coding tutorials.

Also as a side note, I would suggest learning something else other than VB6, it is a dead unsupported language.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
DDS
Expert Cheater
Reputation: 3

Joined: 10 Feb 2011
Posts: 112
Location: Bill's Planet

PostPosted: Wed Dec 28, 2011 9:19 am    Post subject: Reply with quote

@ Pingo u r right the code is wrong i made a boo boo
ill fix it as soon as i can Very Happy

_________________
elDarkDragonSlayer


Last edited by DDS on Wed Dec 28, 2011 12:35 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Wed Dec 28, 2011 11:22 am    Post subject: Reply with quote

@<<< DDS >>
That code doesnt really make sence to me.
The first argument for both read and write is an integer but you're using the process name as a string. Which isnt even used in your functions.
PHandle, when was this created.
Also shouldnt you be writing the offsets as an int array and not a single int.
I might be wrong since i dont code in vb but i thought id point it out incase he tried to just copy it.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites