Начинающий
-
Автор темы
- #1
ProcMem:
Making a triggerbot is veeeeeeeeeery easy when you know the basics and understand memory reading.
You're probably scratching your head and thinking Wtf is memory reading? How do I read memory?
Basically, it's reading information from a process/program. In this tutorial, we will be reading info about the entity(player) in our crosshair and info about our own player, which will become a triggerbot.
You may be thinking, what do I need to read memory?
The easiest way would be ProcMem(Process Memory). It's a class made by Fleep(I think?) that makes memory reading alot easier for beginners, as you save time by having all memory reading functions you need done. This is attached to the thread as a .rar file!
First, we start by creating our main.cpp file and adding ProcMem.cpp and ProcMem.h from the downloaded .rar file. You do this in visual studio by right clicking source files -> Add -> Existing item and choosing ProcMem.cpp. Then you do the same but in Header Files with ProcMem.h.
Then we need to initialize ProcMem in our main.cpp file so we can use the functions from it:
Code:
Code:
Code:
Offsets is basically where the info we need to read is located, so if we are going to read PlayerBase, we need the PlayerBase offset.
I'm not going to cover how to get them through cheat engine, so we are going to use a offset dumper. That is basically a program that gets the offsets for us. These can usually be found in a thread on another forum, just google on
Code:
Now, to the actual memory reading.
To get our own player's info, we read ClientDLL (The module in csgo that contains the info we need) + PlayerBase.
Code:
Now we got to read the memory needed inside our triggerbot function.
Code:
We can do this like this:
Code:
Code:
Code:
Code:
Code:
It is probably detected, but anyways.
Have fun with it!
Пожалуйста, авторизуйтесь для просмотра ссылки.
Making a triggerbot is veeeeeeeeeery easy when you know the basics and understand memory reading.
You're probably scratching your head and thinking Wtf is memory reading? How do I read memory?
Basically, it's reading information from a process/program. In this tutorial, we will be reading info about the entity(player) in our crosshair and info about our own player, which will become a triggerbot.
You may be thinking, what do I need to read memory?
The easiest way would be ProcMem(Process Memory). It's a class made by Fleep(I think?) that makes memory reading alot easier for beginners, as you save time by having all memory reading functions you need done. This is attached to the thread as a .rar file!
First, we start by creating our main.cpp file and adding ProcMem.cpp and ProcMem.h from the downloaded .rar file. You do this in visual studio by right clicking source files -> Add -> Existing item and choosing ProcMem.cpp. Then you do the same but in Header Files with ProcMem.h.
Then we need to initialize ProcMem in our main.cpp file so we can use the functions from it:
Code:
- #include "ProcMem.h" // Memory reading
- ProcMem Mem; // Shortcut
Code:
- Mem.Process("csgo.exe"); // Choosing the process
Code:
- DWORD ClientDLL = Mem.Module("client.dll"); //Module we are reading memory from
Offsets is basically where the info we need to read is located, so if we are going to read PlayerBase, we need the PlayerBase offset.
I'm not going to cover how to get them through cheat engine, so we are going to use a offset dumper. That is basically a program that gets the offsets for us. These can usually be found in a thread on another forum, just google on
Пожалуйста, авторизуйтесь для просмотра ссылки.
. Here is the ones you need: (Updated 12-08-2014)Code:
- // Needs to be updated when counter strike is updated.
- const DWORD playerBase = 0xA68A14;
- const DWORD entityBase = 0x4A0B0C4;
- const DWORD crosshairOffset = 0x23F8;
- // Does not change on updated, in other words, no need to update these!
- const DWORD teamOffset = 0xF0;
- const DWORD healthOffset = 0xFC;
- const DWORD EntLoopDist = 0x10;
Now, to the actual memory reading.
To get our own player's info, we read ClientDLL (The module in csgo that contains the info we need) + PlayerBase.
Code:
- // our player
- DWORD LocalPlayer = Mem.Read<DWORD>(ClientDLL + PlayerBase);
- // our player's team, so we can compare it to the player in our crosshair and shoot if its not our own player's team.
- int LocalTeam = Mem.Read<int>(LocalPlayer + teamOffset);
- // our player's crosshair ID, it is used for reading what is in our crosshair
- int CrossHairID = Mem.Read<int>(LocalPlayer + CrosshairOffset);
Now we got to read the memory needed inside our triggerbot function.
Code:
- void Trigger()
- {
- DWORD EnemyInCH = Mem.Read<DWORD>(ClientDLL + EntityBase + ((CrossHairID - 1) * EntLoopDist)); // CH = Crosshair.
- int EnemyHealth = Mem.Read<int>(EnemyInCH + healthOffset); // Enemy in crosshair's
- int EnemyTeam = Mem.Read<int>(EnemyInCH + teamOffset); // Enemy in crosshair's team, we need this to compare it to our own player's team)
- }
We can do this like this:
Code:
- if (LocalTeam != EnemyTeam)
- {
- // shoot
- }
Code:
- if (EnemyHealth > 0)
- {
- // shoot
- }
Code:
- if (LocalTeam != EnemyTeam && EnemyHealth > 0)
- {
- // Shoot
- }
Пожалуйста, авторизуйтесь для просмотра ссылки.
and try to understand it. You should be able to figure it out if you actually watched the tutorial I linked earlier, but anyways, here's the finished Trigger function code:Code:
- void Trigger()
- {
- DWORD EnemyInCH = Mem.Read<DWORD>(ClientDLL + EntityBase + ((CrossHairID - 1) * EntLoopDist)); // CH = Crosshair.
- int EnemyHealth = Mem.Read<int>(EnemyInCH + healthOffset); // Enemy in crosshair's
- int EnemyTeam = Mem.Read <int> (EnemyInCH + teamOffset); // Enemy in crosshair's team, we need this to compare it to our own player's team)
- if (LocalTeam! = EnemyTeam && EnemyHealth> 0)
- {
- // Here you can add a delay before shooting, to make it look legit. This is done using Sleep ()
- mouse_event (MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
- // use Sleep () here for shooting several shots with an ak for example. Not usable with pisto
- mouse_event (MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
- // use Sleep () here for a 'cooldown' between shots.
- }
Code:
- int main ()
- {
- while (true)
- {
- Trigger ();
- // Add a Sleep () here for less cpu usage.
- }
- }
It is probably detected, but anyways.
Have fun with it!