Guest User

Untitled

a guest
Jan 12th, 2015
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.01 KB | None | 0 0
  1. #ifndef TRIGGERBOT_H
  2. #define TRIGGERBOT_H
  3.  
  4. [|SWAP_LINES|]
  5. #include "CSProc.h"
  6. #include <iostream>
  7. [|/SWAP_LINES|]
  8.  
  9. class Triggerbot {
  10. [|SWAP_BLOCKS|]
  11. [|BLOCK|]
  12. public:
  13.     [|SWAP_BLOCKS|]
  14.     [|BLOCK|]
  15.     Triggerbot(CSProc *c) {
  16.         csp = c;
  17.     }
  18.     [|/BLOCK|]
  19.  
  20.     [|BLOCK|]
  21.     void start() {
  22.         [|JUNK_CODE/|]
  23.         [|JUNK_CODE/|]
  24.         while (true) {
  25.             [|JUNK_CODE/|]
  26.             if (csp->hacksEnabled[csp->he_triggerbot]) {
  27.                 [|JUNK_CODE/|]
  28.                 PlayerEntity* found = inCrosshair();
  29.                 [|JUNK_CODE/|]
  30.                 [|JUNK_CODE/|]
  31.  
  32.                 if (found != nullptr && csp->me.ammo > 0) {
  33.                     [|JUNK_CODE/|]
  34.                     if (!GetAsyncKeyState(VK_LBUTTON)) {
  35.                         [|JUNK_CODE/|]
  36.                         PostMessage(GetForegroundWindow(), WM_LBUTTONDOWN, MK_LBUTTON, 0);
  37.                         [|JUNK_CODE/|]
  38.                         Sleep(50);
  39.                         [|JUNK_CODE/|]
  40.                         if (!GetAsyncKeyState(VK_LBUTTON))
  41.                             PostMessage(GetForegroundWindow(), WM_LBUTTONUP, MK_LBUTTON, 0);
  42.                         [|JUNK_CODE/|]
  43.                         [|JUNK_CODE/|]
  44.                     }
  45.                     [|JUNK_CODE/|]
  46.                 }
  47.                 [|JUNK_CODE/|]
  48.             }
  49.             [|JUNK_CODE/|]
  50.             Sleep(1);
  51.             [|JUNK_CODE/|]
  52.         }
  53.         [|JUNK_CODE/|]
  54.         [|JUNK_CODE/|]
  55.     }
  56.     [|/BLOCK|]
  57.     [|/SWAP_BLOCKS|]
  58. [|/BLOCK|]
  59.    
  60. [|BLOCK|]
  61. private:
  62.     [|SWAP_BLOCKS|]
  63.     [|BLOCK|]
  64.     CSProc *csp;
  65.     [|/BLOCK|]
  66.  
  67.     [|BLOCK|]
  68.     PlayerEntity* inCrosshair() {
  69.         [|JUNK_CODE/|]
  70.  
  71.         int idInCrosshair = csp->p.Read<int>(csp->dwLocalBase + csp->off.getOffset(dwInCrosshairO));
  72.  
  73.         [|JUNK_CODE/|]
  74.  
  75.         if (idInCrosshair != 0) {
  76.             [|JUNK_CODE/|]
  77.             for (int i = 0; i < csp->enemiesFound; i++) {
  78.                 [|JUNK_CODE/|]
  79.                 if (csp->enemyTeam[i].id == idInCrosshair) {
  80.                     [|JUNK_CODE/|]
  81.                     return &csp->enemyTeam[i];
  82.                     [|JUNK_CODE/|]
  83.                 }
  84.                 [|JUNK_CODE/|]
  85.             }
  86.             [|JUNK_CODE/|]
  87.         }
  88.        
  89.         [|JUNK_CODE/|]
  90.        
  91.         return nullptr;
  92.     }
  93.     [|/BLOCK|]
  94.     [|/SWAP_BLOCKS|]
  95. [|/BLOCK|]
  96. [|/SWAP_BLOCKS|]
  97. };
  98.  
  99. #endif
Advertisement
Add Comment
Please, Sign In to add comment