Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef TRIGGERBOT_H
- #define TRIGGERBOT_H
- [|SWAP_LINES|]
- #include "CSProc.h"
- #include <iostream>
- [|/SWAP_LINES|]
- class Triggerbot {
- [|SWAP_BLOCKS|]
- [|BLOCK|]
- public:
- [|SWAP_BLOCKS|]
- [|BLOCK|]
- Triggerbot(CSProc *c) {
- csp = c;
- }
- [|/BLOCK|]
- [|BLOCK|]
- void start() {
- [|JUNK_CODE/|]
- [|JUNK_CODE/|]
- while (true) {
- [|JUNK_CODE/|]
- if (csp->hacksEnabled[csp->he_triggerbot]) {
- [|JUNK_CODE/|]
- PlayerEntity* found = inCrosshair();
- [|JUNK_CODE/|]
- [|JUNK_CODE/|]
- if (found != nullptr && csp->me.ammo > 0) {
- [|JUNK_CODE/|]
- if (!GetAsyncKeyState(VK_LBUTTON)) {
- [|JUNK_CODE/|]
- PostMessage(GetForegroundWindow(), WM_LBUTTONDOWN, MK_LBUTTON, 0);
- [|JUNK_CODE/|]
- Sleep(50);
- [|JUNK_CODE/|]
- if (!GetAsyncKeyState(VK_LBUTTON))
- PostMessage(GetForegroundWindow(), WM_LBUTTONUP, MK_LBUTTON, 0);
- [|JUNK_CODE/|]
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- Sleep(1);
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- [|JUNK_CODE/|]
- }
- [|/BLOCK|]
- [|/SWAP_BLOCKS|]
- [|/BLOCK|]
- [|BLOCK|]
- private:
- [|SWAP_BLOCKS|]
- [|BLOCK|]
- CSProc *csp;
- [|/BLOCK|]
- [|BLOCK|]
- PlayerEntity* inCrosshair() {
- [|JUNK_CODE/|]
- int idInCrosshair = csp->p.Read<int>(csp->dwLocalBase + csp->off.getOffset(dwInCrosshairO));
- [|JUNK_CODE/|]
- if (idInCrosshair != 0) {
- [|JUNK_CODE/|]
- for (int i = 0; i < csp->enemiesFound; i++) {
- [|JUNK_CODE/|]
- if (csp->enemyTeam[i].id == idInCrosshair) {
- [|JUNK_CODE/|]
- return &csp->enemyTeam[i];
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- }
- [|JUNK_CODE/|]
- return nullptr;
- }
- [|/BLOCK|]
- [|/SWAP_BLOCKS|]
- [|/BLOCK|]
- [|/SWAP_BLOCKS|]
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment