this is what i have, how can i get this to work?
Code:
/*
Braaains Trainer
by Josh Raff (zraffz@gmail.com)
How it works:
- Enter URL to attack at random.
- Fight and Skip fight
- Enter URL back to main game screen.
- Heal at hostpital.
- Repeat... takes 46 seconds per cycle.
NOTICE: THIS PROGRAM WILL TAKE CONTROL OF YOUR MOUSE AND KEYBOARD!
*/
import java.awt.AWTException;
import java.awt****bot;
import java.awt.event.KeyEvent;
import java.awt.event.InputEvent;
import java.util.Random;
import java.io.*;
public class BT {
public static void sendkeys(String text) {
try {
Robot robot = new Robot();
String string1 = text.toUpperCase();
for(int i=0;i<string1.length();i++) {
robot.keyPress(string1.charAt(i));
}
} catch(java.awt.AWTException exc) {
System.out.println("Error: Something went wrong!");
}
}
public static void main(String[] args) {
String[] listOfURLS = {"f=1794","f=86922","f=1732","f=1701","f=1680","f=1613","f=1660","f=1645","f=1712","f=1720","f=1611","f=1581","f=2011"};
Random random1 = new Random();
int randint = random1.nextInt(listOfURLS.length);
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("---Braaains Trainer---");
System.out.println(" Created by Josh Raff");
System.out.println(" zraffz@gmail.com");
System.out.println("");
try {
//X Coord1 of URL bar
System.out.println("What is the X coord of the URL bar?");
String Xcoord1 = br.readLine();
double number1 = Double.parseDouble(Xcoord1);
//Convert string to int
int Xcoordi1 = Integer.parseInt(Xcoord1.trim());
//System.out.println("TEST: " + Xcoord1);
//Y Coord1 of URL Bar
System.out.println("What is the Y coord of the URL bar?");
String Ycoord1 = br.readLine();
double number2 = Double.parseDouble(Ycoord1);
int Ycoordi1 = Integer.parseInt(Ycoord1.trim());
//System.out.println("TEST: " + Ycoord1);
//X Coord2 of Skip Button
System.out.println("What is the X coord of the Skip button?");
String Xcoord2 = br.readLine();
double number3 = Double.parseDouble(Xcoord2);
int Xcoordi2 = Integer.parseInt(Xcoord2.trim());
//System.out.println("TEST: " + Xcoord2);
//Y Coord2 of Skip Button
System.out.println("What is the Y coord of the Skip button?");
String Ycoord2 = br.readLine();
double number4 = Double.parseDouble(Ycoord2);
int Ycoordi2 = Integer.parseInt(Ycoord2.trim());
//System.out.println("TEST: " + Ycoord2);
//No need to get URL Bar coords again
//X Coord3 of Hospital Button
System.out.println("What is the X coord of the Hospital?");
String Xcoord3 = br.readLine();
double number5 = Double.parseDouble(Xcoord3);
int Xcoordi3 = Integer.parseInt(Xcoord3.trim());
//System.out.println("TEST: " + Xcoord3);
//Y Coord3 of Hospital Button
System.out.println("What is the Y coord of the Hospital?");
String Ycoord3 = br.readLine();
double number6 = Double.parseDouble(Ycoord3);
int Ycoordi3 = Integer.parseInt(Ycoord3.trim());
//System.out.println("TEST: " + Ycoord3);
//X Coord4 of Yes Button
System.out.println("What is the X coord of the Yes button?");
String Xcoord4 = br.readLine();
double number7 = Double.parseDouble(Xcoord4);
int Xcoordi4 = Integer.parseInt(Xcoord4.trim());
//System.out.println("TEST: " + Xcoord4);
//Y Coord4 of Yes Button
System.out.println("What is the Y coord of the Yes button?");
String Ycoord4 = br.readLine();
double number8 = Double.parseDouble(Ycoord4);
int Ycoordi4 = Integer.parseInt(Ycoord4.trim());
//System.out.println("TEST: " + Ycoord4);
Robot robot = new Robot();
//THIS BRINGS US TO THE FIGHT SCREEN
robot.delay(15000);
robot.mouseMove(+ Xcoordi1, + Ycoordi1); //Move mouse to URL bar
robot.mouseMove(231, 59); //Move mouse to URL bar
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
sendkeys("apps.facebook.com/getbraaains/");
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_SLASH);
robot.keyRelease(KeyEvent.VK_SHIFT);
sendkeys(""+listOfURLS[randint]+"");
//sendkeys("f=1794"); //Opponent ID
robot.delay(2000);
robot.keyPress(KeyEvent.VK_ENTER);
//THIS "SKIPS" THE FIGHT
robot.delay(15000);
robot.mouseMove(+ Xcoordi2, + Ycoordi2); //Move mouse to "Skip" button
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
//THIS BRINGS US TO THE MAIN BRAINS SCREEN
robot.delay(15000);
robot.mouseMove(+ Xcoordi1, + Ycoordi1); //Move mouse to URL bar again
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
sendkeys("apps.facebook.com/getbraaains/");
robot.keyPress(KeyEvent.VK_ENTER);
//THIS HEALS US AT THE HOSPITAL
robot.delay(15000);
robot.mouseMove(133, 310); //Move mouse to screen and clicks
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.delay(1000);
robot.mouseWheel(100); //Moves screen up
robot.mouseMove(+ Xcoordi3, + Ycoordi3); //Move mouse to Hostpital
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.mouseMove(+ Xcoordi4, + Ycoordi4); //Move mouse to "Yes" button
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
} catch (AWTException e) {
e.printStackTrace();
}
catch (IOException ioe) {
System.out.println("Error: Coord input was not a number!");
//System.exit(1);
}
}
}
i have Visual Studios Ultimate so i can do java but i've never tried java before so can ANYONE help?
btw this includes minecraft people
@Thunder
can someone teach me how to make minecraft mods?