Hack Forums
[.NET] CS:GO TriggerBot Pseudo-ish - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] CS:GO TriggerBot Pseudo-ish (/showthread.php?tid=4940711)



CS:GO TriggerBot Pseudo-ish - Illusionisten - Aug 8, 2015

Now I highly suggest that you do not copy this code unless it's only to play with -insecure parameters and sv_lan 1 as this code is very public
and overused like a pedo rectum in jail. To recreate this from the bottom you will only need some general vb.net knowledge and know a
little about how memory works.
I only made this guide so you could understand a little about how your skid cheat works because this source is a the top of google when
you search and you were just going to copy it and tell people you made it anyway.

Credits to yoda23456 & Kinepak I guess but I believe this source was posted earlier by someone else.

First you will need to declare RPM, mouse_event & async key state to retrieve the neccesary information from the game and so forth
Code
Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Long, ByVal Size As Long, ByRef BytesWritten As Long) As Long
    Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Then we add these integers etc.
Code
Dim triggerbot_loop_thread As System.Threading.Thread = New System.Threading.Thread(AddressOf triggerbot_loop)

    Dim csgo_process As Process()
    Dim exit_thread As Boolean = False
    Dim client_dll_base As Integer

    Dim LocalPlayer_offset As Integer = &HA6B91C 'Outdated
    Dim EntityList_offset As Integer = &H4A0E014 'Outdated

    Dim InCross_offset As Integer = &H23F8 'Pretty sure this offset is outdated aswell
    Dim Team_offset As Integer = &HF0

Then we can finally start by writing our Form_Load event, this where we start our loop which will do the "main work" in our cheat. If you want it to
start by a button click, write this part on another event such as at the <button-name>_click event.

We start by searching for the csgo process and if it's running we should go ahead and find "client.dll" as it's where the information needed is stored.
With that cleared we can start our loop if not we kindly ask the user to start the game first. You could also add this to a loop and wait for csgo to start.
Code
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      csgo_process = Process.GetProcessesByName("csgo")
      If csgo_process.Length > 0 Then
      For Each [Module] As System.Diagnostics.ProcessModule In csgo_process(0).Modules
      If [Module].ModuleName = "client.dll" Then
      client_dll_base = [Module].BaseAddress
      End If
      Next
      triggerbot_loop_thread.Start()
      Else
      MsgBox("Start CS:GO before")
      Application.Exit()
      End If
    End Sub

There is some integers we will need but it's better to call it once instead of making useless chunks of code run again&again so we write
them before the "While"-statement which means "while exit thread is not happening, do this" because exit_thread is a bool we made and set to false
it will not stop before we set the bool to true so we will add that to the Form_Closing event, you could also use exit_thread as a toggle for pausing
the cheat.
Code
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
      exit_thread = True
End Sub

Code
Function triggerbot_loop()
      Dim pointer_to_localplayer As Integer
      Dim pointer_to_incross_player As Integer
      Dim player_index_incross As Integer
      Dim my_team As Integer
      Dim incross_team As Integer
      While (Not exit_thread)

Then we will use GetAsyncKeyState to determine wether our hotkey (currently set as mouse3/middle mouse) is pressed and if it is we
are ready to read some memory.
Code
If GetAsyncKeyState(Keys.MButton) Then

First we will need the pointer to LocalPlayer since it's from there we will reach the information about our player. We will continue
by reading the index of our crosshair and if it is in the right range.
Code
ReadProcessMemory(csgo_process(0).Handle, client_dll_base + LocalPlayer_offset, pointer_to_localplayer, 4, 0)
      ReadProcessMemory(csgo_process(0).Handle, pointer_to_localplayer + InCross_offset, player_index_incross, 4, 0)
      If player_index_incross > 0 And player_index_incross < 65 Then

Now we know that we have a player in our crosshair but have yet to determine if he's a friend or a foe so we read our team id, read the
pointer of the player we are aiming at and compare our team id's to see if they match.
Code
ReadProcessMemory(csgo_process(0).Handle, pointer_to_localplayer + Team_offset, my_team, 4, 0)
      ReadProcessMemory(csgo_process(0).Handle, client_dll_base + EntityList_offset + ((player_index_incross - 1) * &H10), pointer_to_incross_player, 4, 0)
      ReadProcessMemory(csgo_process(0).Handle, pointer_to_incross_player + Team_offset, incross_team, 4, 0)
      If Not my_team = incross_team Then

Now it's time to take action so we simulate a mouseclick with 15 ms delay between down and up before closing our if-statements because
that's how long it takes for the game to pick up the input sent.
Code
mouse_event(&H2, 0, 0, 0, 1)
      Threading.Thread.Sleep(15)
      mouse_event(&H4, 0, 0, 0, 1)
      Threading.Thread.Sleep(10)
      End If
      End If
      End If
      Threading.Thread.Sleep(10)
      End While
    End Function



* - Nicktron - Aug 8, 2015

Thank you so much for this!! Will help me a lot. :)

Edit: Er du dansker? :p


* - SIM-2830142 - Aug 8, 2015

This tutorial looks pretty legit.

I will see what i can do with this.

Thanks OP!


* - Illusionisten - Aug 8, 2015

(Aug 8, 2015 05:01 AM)Nicktron Wrote:  Thank you so much for this!! Will help me a lot. :)

Edit: Er du dansker? :p
No problem;)

Nope, jeg er norsk


(Aug 8, 2015 05:09 AM)REKT Wrote:  This tutorial looks pretty legit.

I will see what i can do with this.

Thanks OP!

No problemo, just ask if you have problems adding any features or anything


* - SIM-574702 - Aug 8, 2015

About this part. Do you plan to update thread with new info ?
Spoiler (Click to View)


* - Kinepak - Aug 8, 2015

Original thread: https://hackforums.net/showthread.php?tid=4691036

(Aug 8, 2015 10:34 AM)matemisic Wrote:  About this part. Do you plan to update thread with new info ?
Spoiler (Click to View)

Since you know what those value return feel free to start csgo and cheat engine then search for an address that give you 0 when aiming at nothing and > 0 when aiming at a player then look for a pointer since it will be a dynamic address, or you can simply go to unknowncheats and download an offset dumper.


* - Illusionisten - Aug 9, 2015

(Aug 8, 2015 10:34 AM)matemisic Wrote:  About this part. Do you plan to update thread with new info ?
Spoiler (Click to View)

Imo. You shouldn't touch the code at all, seeing that you got 0 knowledge about it. Insta ban inc.


(Aug 8, 2015 10:07 PM)Kinepak Wrote:  Original thread: https://hackforums.net/showthread.php?tid=4691036

Since you know what those value return feel free to start csgo and cheat engine then search for an address that give you 0 when aiming at nothing and > 0 when aiming at a player then look for a pointer since it will be a dynamic address, or you can simply go to unknowncheats and download an offset dumper.

Didn't know you posted it here aswell, didnt want to use source from my own trigger but I wanted atleast to half-ass explain what different part of the code does as youre pretty much bookmarked in all skid's webrowser I think being #1 at google.


* - OffCode - Aug 10, 2015

Yes, This is public Triggerbot Source but its not that hard make it Undetected...


* - Menalix - Aug 10, 2015

To much c&p for my eyes.... even the ReadProcessMemory is stupid so many datatypes gotten wrong. And don't use threading.thread.sleep() for delaying and breaking within it's too unprecise for gaming when sleeping so little, busy waiting is better then.


* - Illusionisten - Aug 11, 2015

(Aug 10, 2015 10:50 AM)Menalix Wrote:  To much c&p for my eyes.... even the ReadProcessMemory is stupid so many datatypes gotten wrong. And don't use threading.thread.sleep() for delaying and breaking within it's too unprecise for gaming when sleeping so little, busy waiting is better then.

Clearly stated that it's not my source, this is the source kids are c+p when they make their first trigger hence why it's used as an example.


* - the wolf of blockchain - Nov 3, 2015

(Aug 11, 2015 07:13 PM)Illusionisten Wrote:  Clearly stated that it's not my source, this is the source kids are c+p when they make their first trigger hence why it's used as an example.

aka "I don't actually know what this is or how it works"


* - TheSuspect - Nov 3, 2015

(Nov 3, 2015 10:58 PM)ch341ser Wrote:  aka "I don't actually know what this is or how it works"

aka " i make raffles for a bhop script that's UD but it's actually pasted !! "


* - Slavoj Žižek - Nov 4, 2015

mix this with menalix'es sound esp source and you will be a global in to time!

but i guess its detected and the offsets are outdated...

good job ;)


* - OffCode - Nov 4, 2015

(Nov 4, 2015 09:16 AM)Blezzedd Wrote:  mix this with menalix'es sound esp source and you will be a global in to time!

but i guess its detected and the offsets are outdated...

good job ;)

Maybe detected but its not hard make undetected i know many people who use this triggerbot source and used over 5 months......


* - Vrekt - Nov 4, 2015

That's old VB shit.
Its Integers now not Longs in the declaration