Advertisement
Guest User

main.cpp

a guest
Oct 19th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.45 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <iostream>
  3. #include "HackProcess.h"
  4.  
  5. CHackProcess fProcess;
  6. using namespace std;
  7.  
  8. const DWORD Player_Base = 0x5998AC;
  9. const DWORD dw_jump = 0x58A68C;
  10.  
  11. const DWORD Dw_JumpOffset = 0x34C;
  12.  
  13. #define FL_ONGROUND 257;
  14. #define SPACE_BAR 0x20
  15.  
  16. #define F6_Key 0x75
  17.  
  18. bool b_true = true;
  19. bool b_false = false;
  20. bool BunnyHopStatus = false;
  21.  
  22. struct MyPlayer_t;
  23.  
  24. {
  25.     DWORD ClocalPlayer;
  26.     int m_fFlags;
  27.     void ReadInformation()
  28.  
  29.     {
  30.         ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.dwordClient + Player_Base), &ClocalPlayer, sizeof(DWORD), 0;
  31.  
  32.         ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(ClocalPlayer+ Dw_JumpOffset), &m_fFlags, sizeof(int), 0;
  33.     }
  34. }MyPlayer;
  35.  
  36.  
  37. void BunnyHop()
  38.  
  39. {
  40.     if GetAsyncKeyState(SPACE_BAR))
  41.     {
  42.         BunnyHopStatus = !BunnyHopStatus;
  43.         Sleep (250);
  44.  
  45.         if (true)
  46.         {
  47.             (!BunnyHopStatus) { return 0 ;
  48.         }
  49.  
  50.     if(MyPlayer.m_fFlags == FL_ONGROUND)
  51.  
  52.     {
  53.         WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_jump), &b_true, sizeof(bool), NULL);
  54.     }
  55.  
  56.     else if(MyPlayer.m_fFlags != FL_ONGROUND)
  57.     {
  58.         WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_jump), &b_false, sizeof(bool), NULL);
  59.  
  60.     }
  61.  
  62. }
  63.  
  64.  
  65.  
  66. int main()
  67. {
  68.  
  69.     fProcess.RunProcess();
  70.     cout << "Found The Game! Loading Bunny Hop.." << endl;
  71.  
  72.  
  73.     while(!GetAsyncKeyState(F6_Key))
  74.    
  75.     {
  76.         MyPlayer.ReadInformation();
  77.         Bunnyhop();
  78.     }
  79.  
  80.  
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement