i made an Aimbot for the fps C&C Renegade works good and all but i have a hard time turning it on and off so if anyone here could please find a way to turn it on or off from ingame (or if it only works while ur holding down shift or tab or something like that) that would be great.
How it works: detects pixel color of the crosshair (it changes when you scroll over an enemy) and depending on the pixel color, it clicks the button. it is mostly used for sniping.
here is the code:
Code:
import java.awt.*;
import java.awt.event.*;
public class Bot
{
private boolean running = false;
private boolean btnPressed = false;
private Robot myRobot;
private Color middle;
public Bot() throws AWTException
{
myRobot = new Robot();
}
public void startBot()
{
running = true;
checkPointer();
}
public void stopBot()
{
running = false;
}
public void checkPointer()
{
while (running == true)
{
myRobot.delay(1);
middle = myRobot.getPixelColor(399, 300);
if (middle.getRed() < 210 && middle.getRed() > 185 && middle.getGreen() < 10 && middle.getBlue() < 10)
{
myRobot.mousePress(InputEvent.BUTTON1_MASK);
btnPressed = true;
}
else if(btnPressed = true)
{
myRobot.mouseRelease(InputEvent.BUTTON1_MASK);
btnPressed = false;
}
}
}
public void main (String[] args)
{
startBot();
}
}