Combat Arms AFK Bot Help?

Posts 1–6 of 6 · Page 1 of 1
Combat Arms AFK Bot Help?
Can anyone help me program a AFK Bot for Combat Arms? You'll get credit with the program.
Do you want an example code? It is very easy.
Here is the code :

Code:
 
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(50);

Note : That if you would like to make this afk unbuggy , use "IsIconic" to check for the game's window if minimized ; then simply turn it off and vise verse , here is the full code :

Code:
HWND MainHwnd = FindWindow(0, "Your Game's Window name here");
		
if (IsIconic(MainHwnd))
{

}
			else 
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(50);
}
Quote Originally Posted by Code4Dot View Post
Here is the code :

Code:
 
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(50);

Note : That if you would like to make this afk unbuggy , use "IsIconic" to check for the game's window if minimized ; then simply turn it off and vise verse , here is the full code :

Code:
HWND MainHwnd = FindWindow(0, "Your Game's Window name here");
		
if (IsIconic(MainHwnd))
{

}
			else 
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(50);
}
do i need any button or something ?
Quote Originally Posted by minthae1991 View Post
do i need any button or something ?
Nope , and here is a better code for it :

Code:
void AFKBOT()
{
HWND MainHwnd = FindWindow(0, "Your Game's Window name here");		
if (!IsIconic(MainHwnd))
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(50);
}
}
and then , simply call AFKBOT();
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us