• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 13

    Thread: Colour Aimbot.

    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      dunk's Avatar
      Join Date
      Jul 2012
      Posts
      33
      Thanks (-->)
      2
      Thanks (<--)
      0

      Colour Aimbot.

      John Kittz
      Hey guys. I need help. Everything is written in the screenshot. I repeat all of them, but his program scans but my says "press any key" .
      Attached Thumbnails Attached Thumbnails AimbotLogic.png   AimbotLogic.png   AimbotLogic.png   AimbotLogic.png  
      Where amazing happens.

    2. #2
      Hacker
      Learning to hack games!
       
      Pawning
       
      Fleep's Avatar
      Join Date
      May 2012
      Posts
      626
      Thanks (-->)
      208
      Thanks (<--)
      727

      Re: Colour Aimbot.

      I can only assume that you are somehow skipping the main part of the program e.g. not calling a function.
      Post your code if you want us to figure out the problem.

      Fleep

    3. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      dunk's Avatar
      Join Date
      Jul 2012
      Posts
      33
      Thanks (-->)
      2
      Thanks (<--)
      0

      Re: Colour Aimbot.

      Code:
      #include "ScanContents.h"
      
      bool TakeScreenshot(std::string WindowToFind, BITMAP &amp;bm, HBITMAP &amp;hbmap, BITMAPINFO &amp;bmi, HDC &amp;hdcShot, HBITMAP &amp;hbitmapOld, HWND &amp;hwnd);
      
      void SetupBitmapInfo(BITMAPINFO &amp;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 = "rgb - Windows Photo Viewer";
      	HWND appWnd = FindWindow(0, GameWindow.c_str());
      
      	while(!appWnd)
      	{
      		system ("CLS");
      		appWnd = FindWindow(0, GameWindow.c_str());
      	  std::cout &lt;&lt; "Unable to find" &lt;&lt; GameWindow.c_str() &lt;&lt; std::endl;
      	  Sleep(500);
      
      	}
      
      	  POINT currentPos;
      		GetCursorPos(&amp; currentPos);
      		CurrentMouseXY.X = currentPos.x;
      		CurrentMouseXY.Y = currentPos.y;
      
      		Aim_Bot(appWnd, GameWindow);
      		system("pause");
      		return 0;
      
      }
      
      bool TakeScreenshot(std::string WindowToFind, BITMAP &amp;bm, HBITMAP &amp;hbmap, BITMAPINFO &amp;bmi, HDC &amp;hdcShot, HBITMAP &amp;hbitmapOld, HWND &amp;hwnd)
      {
      	RECT rc;
      	GetWindowRect(hwnd, &amp;rc);
      
      	hdcShot = CreateCompatibleDC(0);
      	hbmap = CreateCompatibleBitmap(GetDC(0), rc.right - rc.left, rc.bottom - rc.top);
      	SelectObject(hdcShot, hbmap);
      
      	BitBlt(hdcShot, 0, 0, rc.right - rc.left, rc.bottom - rc.top, GetDC(0), rc.left, rc.top, SRCCOPY);
      
      	if(!GetObject(hbmap, sizeof(BITMAP), (LPSTR)&amp;bm))
      		return false;
      
      	int bitsPerPixel = bm.bmBitsPixel;
      
      	if(bitsPerPixel != 32 || bm.bmPlanes != 1)
      		return false;
      	SetupBitmapInfo(bmi, bm.bmWidth, bm.bmHeight, bitsPerPixel);
      	return true;
      }
      
      bool Aim_Bot(HWND appWnd, std::string GameWindow)
      {
      	RECT rcWindow;
      	GetWindowRect(appWnd, &amp;rcWindow);
      	BITMAP bm;
      	HBITMAP hbmap;
      	HBITMAP hbmapOld;
      	BITMAPINFO bmi;
      	HDC hdcShot;
      	HDC hdcScreen;
      
      	RGBQUAD * pPixels;
      
      	int TimeTakenSrceenAndScan;
      	while(true)
      	{
      		if(!GetAsyncKeyState('X'))
      		{
      			TimeTakenSrceenAndScan = clock();
      			
      			 if(TakeScreenshot(GameWindow, bm, hbmap, bmi, hdcShot, hbmapOld, appWnd))
      				 break;
      
      		
      			 HBITMAP hbmapNew = CreateCompatibleBitmap(hdcShot, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top);
      
      			 HDC hdcShotNew = CreateCompatibleDC(hdcShot);
      
      			 HBITMAP OldBmp = (HBITMAP) SelectObject(hdcShotNew, hbmapNew);
      
      			 BitBlt(hdcShotNew, 0, 0, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, hdcShot, 0, 0, SRCCOPY);
      
      			 pPixels = new RGBQUAD[bm.bmWidth * bm.bmHeight];
      			 if(!pPixels)return false;
      
      			 SelectObject(hdcShotNew, OldBmp);
      
      			 if(!GetDIBits(hdcShotNew, hbmapNew, 0, bm.bmHeight, pPixels, &amp;bmi, DIB_RGB_COLORS))
      			 {
      				 ReleaseDC(appWnd, hdcShot);
      				 delete&#91;] pPixels;
      				 return false;
      			 }
      			 ReleaseDC(appWnd, hdcShot);
      
      			 ScanContents scanContentsMain(bm, rcWindow, pPixels);
      
      			 ScanBMP(&amp;scanContentsMain);
      
      			 if(pPixels)
      				 free(pPixels);
      			 SelectObject(hdcShot, hbmapOld);
      			 DeleteObject(hbmap);
      			 DeleteDC(hdcShot);
      			 DeleteObject(hbmapNew);
      			 DeleteObject(OldBmp);
      			 DeleteDC(hdcShotNew);
      			 std::cout &lt;&lt; "out of scan, took" &lt;&lt; clock() - TimeTakenSrceenAndScan &lt;&lt; "milliseconds" &lt;&lt; std::endl;
      		}
      	}
      }
      
      void SetupBitmapInfo(BITMAPINFO &amp;bmi, int bWidth, int bHeight, int bitsPerPixel)
      {
      	bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
      	bmi.bmiHeader.biWidth = bWidth;
        bmi.bmiHeader.biHeight = bHeight;
      	bmi.bmiHeader.biPlanes = 1;
      	bmi.bmiHeader.biBitCount = bitsPerPixel;
      	bmi.bmiHeader.biCompression = BI_RGB;
      	bmi.bmiHeader.biSizeImage = 0;
      }
      
      void ScanBMP(ScanContents * scan)
      {
      	for(int y = (scan-&gt;RcWindow.bottom - scan-&gt;RcWindow.top)/2;
      		y &lt; ((scan-&gt;RcWindow.bottom - scan-&gt;RcWindow.top) - (scan-&gt;RcWindow.bottom - scan-&gt;RcWindow.top)/3.5);
      		y++)
      	{
      		for(int x = (scan-&gt;RcWindow.right - scan-&gt;RcWindow.left)/4;
      		x &lt; ((scan-&gt;RcWindow.right - scan-&gt;RcWindow.left) - (scan-&gt;RcWindow.right - scan-&gt;RcWindow.left)/4);
      		x++)
      		{
      			SetCursorPos(x+scan-&gt;RcWindow.left, (y+4)+scan-&gt;RcWindow.top);
      
      			if(CompareColour(scan-&gt;PPixels, scan-&gt;Bm.bmHeight, scan-&gt;Bm.bmWidth, x, y))
      			{
      				SetCursorPos(x+scan-&gt;RcWindow.left, (y+4)+scan-&gt;RcWindow.top);
      
      				POINT currentPos;
      				GetCursorPos(&amp;currentPos);
      
      				//ShootBot (x+scan-&gt;RcWindow.left, y+scan-&gt;RcWindow.top);
      
      				CurrentMouseXY.X = currentPos.x;
      				CurrentMouseXY.Y = currentPos.y;
      				return;
      			}
      
      		}
      	}
      
      }
      
      bool CompareColour(RGBQUAD * pPixels, int height, int width, int x, int y)
      {
      	int p = (height-y-1)*width+x;
      
      	std::cout &lt;&lt; (int)pPixels[p].rgbRed &lt;&lt; ", " &lt;&lt; (int)pPixels[p].rgbGreen &lt;&lt; ", " &lt;&lt; (int)pPixels[p].rgbBlue &lt;&lt; std::endl;
      	Sleep(100);
      	if((int) pPixels[p].rgbRed &lt; 30 &amp;&amp; (int)pPixels[p].rgbGreen &lt; 30 &amp;&amp; (int)pPixels[p].rgbBlue &gt; 215)
      	{
      		system("pause");
      		return true;
      	}
      
      	if(GetAsyncKeyState(VK_DELETE))
      	{
      		exit(0);
      	}
      	return false;
      }
      Where amazing happens.

    4. #4
      Hacker
      Retired
       
      Pawning
       
      Crazywink's Avatar
      Join Date
      Jul 2012
      Location
      US
      Posts
      647
      Thanks (-->)
      111
      Thanks (<--)
      226

      Re: Colour Aimbot.

      Code:
      if((int) pPixels[p].rgbRed &lt; 30 &amp;&amp; (int)pPixels[p].rgbGreen &lt; 30 &amp;&amp; (int)pPixels[p].rgbBlue &gt; 215)
        {
          system("pause");
          return true;
        }
      I don't think you need this part at all. Would explain why it's getting hung up. Try commenting this out and running it.

    5. #5
      Hacker
      Retired
       
      Pawning
       
      Crazywink's Avatar
      Join Date
      Jul 2012
      Location
      US
      Posts
      647
      Thanks (-->)
      111
      Thanks (<--)
      226

      Re: Colour Aimbot.

      [quote author=crazywink link=topic=436.msg2637#msg2637 date=1343739437]
      Code:
      if((int) pPixels[p].rgbRed &lt; 30 &amp;&amp; (int)pPixels[p].rgbGreen &lt; 30 &amp;&amp; (int)pPixels[p].rgbBlue &gt; 215)
        {
          system("pause");
          return true;
        }
      I don't think you need this part at all. Would explain why it's getting hung up. Try commenting this out and running it.
      [/quote]


      Sorry, what I meant to say is try commenting out the
      Code:
      system("pause");
      from the above code.

      So it should be:
      Code:
      if((int) pPixels[p].rgbRed &lt; 30 &amp;&amp; (int)pPixels[p].rgbGreen &lt; 30 &amp;&amp; (int)pPixels[p].rgbBlue &gt; 215)
        {
          return true;
        }
      The system("pause"); was pausing before it returned the value.

    6. #6
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491

      Re: Colour Aimbot.

      Also a little tip, if you ever plan to release anything in the future, I recommend staying away from findWindow and using process name instead. Window's names can differ for people depending on programs and parameters given on the program's launch.
      Just a tip
      Colour Aimbot.

    7. #7
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      dunk's Avatar
      Join Date
      Jul 2012
      Posts
      33
      Thanks (-->)
      2
      Thanks (<--)
      0

      Re: Colour Aimbot.

      I wrote as you said. Now all the work. But something strange was going on!
      Attached Thumbnails Attached Thumbnails 2132.png   2132.png   2132.png   2132.png  
      Where amazing happens.

    8. #8
      Hacker
      Retired
       
      Pawning
       
      Crazywink's Avatar
      Join Date
      Jul 2012
      Location
      US
      Posts
      647
      Thanks (-->)
      111
      Thanks (<--)
      226

      Re: Colour Aimbot.

      Something strange is still going on, or was going on?

    9. #9
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      dunk's Avatar
      Join Date
      Jul 2012
      Posts
      33
      Thanks (-->)
      2
      Thanks (<--)
      0

      Re: Colour Aimbot.

      Its still going programm now write me hieroglyphs.
      P.S. My Windows is Russian language.
      Where amazing happens.

    10. #10
      Hacker
      Retired
       
      Pawning
       
      Crazywink's Avatar
      Join Date
      Jul 2012
      Location
      US
      Posts
      647
      Thanks (-->)
      111
      Thanks (<--)
      226

      Re: Colour Aimbot.

      Cheats'n'Trainers
      Oh, gotcha. Well, glad I was able to help.

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Off Topic] Colour Grading
      By keto in forum Off Topic
      Replies: 3
      Last Post: 04-18-2015, 06:00 AM
    2. [Help] C++ colour aimbot doesn't work in full screen game
      By vincentsiau in forum GH Tutorials Help
      Replies: 11
      Last Post: 08-04-2012, 10:24 AM
    3. [Help] Colour Aimbot Error
      By dunk in forum GH Tutorials Help
      Replies: 5
      Last Post: 07-17-2012, 04:29 PM
    4. [Help] Colour Aim bot RGB
      By EricFerel in forum GH Tutorials Help
      Replies: 4
      Last Post: 06-05-2012, 05:44 AM