Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScanContents.h"
- bool TakeScreenshot(std::string WindowToFind, BITMAP &bm, HBITMAP &hbmap, BITMAPINFO &bmi, HDC &hdcShot, HBITMAP &hbitmapOld, HWND &hwnd);
- void SetupBitmapInfo(BITMAPINFO &bmi, int bWidth, int bHeight, int bitsPerPixel);
- bool CompareColour(RGBQUAD * pPixels, int height, int width, int x, int y);
- void ScanBMP(ScanContents * scan);
- bool Aim_Bot(HWND appWnd, std::string GameWindow);
- MouseCoord CurrentMouseXY(0, 0);
- int main()
- {
- std::string GameWindow = "RatzInstagib2.0";
- HWND appWnd = FindWindow(0, GameWindow.c_str());
- while (!appWnd)
- {
- system("CLS");
- std::cout << "Unable to find" << GameWindow.c_str() << std::endl;
- Sleep(500);
- }
- POINT currentPos;
- GetCursorPos(& currentPos);
- CurrentMouseXY.X = currentPos.x;
- CurrentMouseXY.Y = currentPos.y;
- Aim_Bot(appWnd, GameWindow);
- system("pause");
- return 0;
- }
- bool Aim_Bot(HWND appWnd, std::string GameWindow);
- {
- RECT rcWindow;
- GetWindowRect(appWnd, &rcwindow);
- BITMAP bm;
- HBITMAP hbmap;
- HBITMAP hbmapOld;
- BITMAPINFO bmi;
- HDC hdcShot;
- HDC hdcScreen;
- RGBQUAD * pPixels;
- int TimeTakenScreenAndScan;
- while (true)
- {
- if (!GetAsyncKeyState('X'))
- {
- TimeTakenScreenAndScan = clock();
- if (!TakeScreenshot(GameWindow, bm, hbmap, bmi, hdcShot, hbmapOld, appWnd))
- break;
- HBITMAP hbmapNew = CreateCompatibleBitmap(hdcShot, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top);
- HDC hdcShot
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement