Quote:
Originally Posted by pycache
Make a new project, console application. Paste this code in. Save the document. Go Build -> Build Solution. Profit.
I took out the patternscanner part of the sourcecode. Replace the 0x00000000's with the current offsets, which you can find by googling "csgo offsets" (first result).
|
Thanks dude :)
Btw, do I have to hold the button I choose in order for the triggerbot to work or I just press the button and the triggerbot is on and starts shooting when people get through my crosshair ?
Edit: pycache, I can't find the offsets, all I got after searching "csgo offsets" was CS:GO Dumper, but it was outdated ... Can't u tell me the offsets ? Please :)
[Only registered and activated users can see links. Click Here To Register...] This is what I get :(
Edit: Got the offsets btw, no need for that, but the code won't compile :( Can u help me ? I sent you a pm :)
So, for all of you who have some problems with compiling the source in the first post, here's one for you, with the updated offsets :D
Code:
// ConsoleApplication9.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#include <tlhelp32.h>
#include <fstream>
#include <sstream>
DWORD dwEntityList, dwLocalPlayer, dwClient, dwTeam, dwCrosshairId, TriggerDelay, TriggerKey;
HANDLE hProcess;
DWORD GetModuleHandleByName(char* ModuleName, DWORD ProcID) {
MODULEENTRY32 Entry;
Entry.dwSize = sizeof(MODULEENTRY32);
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, ProcID);
if (Module32First(hSnap, &Entry) == TRUE) {
if (!_stricmp(Entry.szModule, ModuleName)) {
DWORD hModule = (DWORD)Entry.modBaseAddr;
return hModule;
}
else {
while (Module32Next(hSnap, &Entry) == TRUE) {
if (!_stricmp(Entry.szModule, ModuleName)) {
DWORD hModule = (DWORD)Entry.modBaseAddr;
return hModule;
}
}
return 0;
}
}
CloseHandle(hSnap);
}
HANDLE GetProcessHandleByName(char* ProcessName) {
PROCESSENTRY32 Entry;
Entry.dwSize = sizeof(PROCESSENTRY32);
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (Process32First(hSnap, &Entry) == TRUE) {
if (!_stricmp(Entry.szExeFile, ProcessName)) {
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Entry.th32ProcessID);
return hProc;
}
else {
while (Process32Next(hSnap, &Entry) == TRUE) {
if (!_stricmp(Entry.szExeFile, ProcessName)) {
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Entry.th32ProcessID);
return hProc;
}
}
return 0;
}
}
CloseHandle(hSnap);
}
template <typename ReadType> ReadType Read(DWORD Address) {
ReadType Data;
ReadProcessMemory(hProcess, (LPVOID)(Address), &Data, sizeof(ReadType), 0);
return Data;
}
int eGetTeam(int PlayerNumber) {
return Read<int>((Read<DWORD>(dwClient + dwEntityList + (0x10 * PlayerNumber))) + 0xF0);
}
int eGetHealth(int PlayerNumber) {
return Read<int>((Read<DWORD>(dwClient + dwEntityList + (0x10 * PlayerNumber))) + 0xFC);
}
void Click() {
mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
Sleep(5);
mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
}
void ReadFile()
{
std::ifstream f("trigger.ini");
std::string buf;
int cur = 0;
for (; std::getline(f, buf); cur++)
if (cur == 0) {
std::istringstream ss(&buf[15]);
ss >> TriggerDelay;
}
if (cur == 1) {
std::istringstream ss(&buf[15]);
ss >> TriggerKey;
f.close();
}
}
void UpdateOffsets()
{
dwEntityList = 0x4A0F014;
dwLocalPlayer = 0xA6C90C;
dwCrosshairId = 0x23F8;
dwTeam = 0xF0;
}
int main()
{
hProcess = GetProcessHandleByName("csgo.exe");
dwClient = GetModuleHandleByName("Client.dll", GetProcessId(hProcess));
ReadFile();
UpdateOffsets();
while (!((GetKeyState(VK_F12) & 0x100) != 0)) {
if ((GetKeyState(TriggerKey) & 0x100) != 0) {
int cId = Read<int>((Read<DWORD>(dwClient + dwLocalPlayer)) + dwCrosshairId);
int myTeam = Read<int>((Read<DWORD>(dwClient + dwLocalPlayer)) + dwTeam);
if (cId > 0 && cId <= 64) {
int eTeam = eGetTeam(cId - 1);
int eHealth = eGetHealth(cId - 1);
if (eTeam != 0 && eTeam != myTeam && (eHealth > 0)) {
Sleep(TriggerDelay);
Click();
}
}
}
}
}