Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scripts;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.methods.data.Skills;
- import com.kbot2.scriptable.methods.data.Walking;
- import com.kbot2.scriptable.methods.wrappers.Tile;
- import com.kbot2.scriptable.methods.wrappers.Obj;
- import java.io.*;
- import java.awt.*;
- import org.jdom.Document;
- import org.jdom.Element;
- import org.jdom.JDOMException;
- import org.jdom.input.SAXBuilder;
- import org.jdom.output.XMLOutputter;
- import org.jdom.output.Format;
- public class woodcutterArmy extends Script {
- public WCArmyPaths paths = new WCArmyPaths();
- public WCArmyMethods methods = new WCArmyMethods();
- int status = 0;
- int woodcuttingLevel = 0;
- //trees
- int willows[] = {5551, 5552, 5553};
- int normals[] = {1276, 1278};
- int oaks[] = {1281};
- String normalLocations[] = {"DraynorTrees"};
- String oakLocations[] = {"DraynorOaks"};
- String willowLocations[] = {"DraynorWillows"};
- String cuttingLocation = null;
- String cuttingTree = null;
- //other things
- int bankBooths[] = {2213};
- int axes[] = {1351, 1349, 1361, 1353, 1355, 1357, 1359, 6739};
- boolean yes = true;
- boolean start = false;
- boolean atBank;
- // GUI
- int globalRuntimeDays = 0;
- int globalRuntimeHours = 0;
- int globalRuntimeMinutes = 0;
- int globalLevelsGained = 0;
- int globalExperienceGained = 0;
- int bestRuntimeDays = 0;
- int bestRuntimeHours = 0;
- int bestRuntimeMinutes = 0;
- int bestLevelsGained = 0;
- int bestExperienceGained = 0;
- String selectedAccount;
- int mode = 0;
- //
- // Accounts
- int currentAccountNo = 0;
- int accountNo = 0;
- String location = "unknown";
- String ranString;
- String accountName;
- String accountPass;
- String users[] = {" "," "," "," "," "," "," "," "," "," "};
- String passwords[] = {" "," "," "," "," "," "," "," "," "," "};
- //
- // Settings
- long lowTime = 0;
- long highTime = 0;
- long timeToNextAccount = 0;
- String fileName = "./Settings/WcArmySettings.xml";
- woodcutterArmyGUI GUI;
- File WcArmySettings = new File(fileName);
- Document settings;
- Element root;
- //
- public boolean active() {
- return true;
- }
- public boolean onStart() {
- if (!WcArmySettings.exists()) {
- createFile();
- log("Created settings file");
- }
- if (WcArmySettings.exists()) {
- readData();
- getAccounts();
- }
- checks.start();
- currentLocation.start();
- GUI = new woodcutterArmyGUI();
- GUI.setVisible(true);
- return true;
- }
- public void onStop() {
- saveFile();
- checks.stop();
- currentLocation.stop();
- }
- public int loop() {
- if (start && isLoggedIn()) {
- if (cuttingLocation == null) {
- methods.changeLocation();
- return random(400, 600);
- }
- if (inventory.isFull()) {
- if (!atBank) {
- methods.walkTo("bank");
- }
- if (atBank) {
- if (!bank.isOpen()) {
- methods.openBank();
- return random(400, 600);
- }
- if (bank.isOpen()) {
- methods.depositAll();
- }
- }
- }
- if (!inventory.isFull()) {
- methods.walkTo(cuttingLocation);
- if (methods.isChopping()) {
- methods.antiBan();
- }
- if (!methods.isChopping()) {
- methods.chopTree(cuttingTree);
- }
- }
- }
- return random(400, 600);
- }
- Thread checks = new Thread() {
- public void run() {
- while(isLoggedIn()) {
- try {
- woodcuttingLevel = skills.getLevel(Skills.SKILL_WOODCUTTING);
- sleep (150);
- } catch(Exception e) {
- log("Whoops thats not ment to happen :S");
- }
- }
- }
- };
- Thread currentLocation = new Thread() {
- public void run() {
- while(isLoggedIn()) {
- try {
- Rectangle lumbridge = new Rectangle(3217, 3203, 15, 31); //the courtyard
- Rectangle draynorBank = new Rectangle(3092, 3240, 6, 7); //bank
- Rectangle draynorWillows = new Rectangle(3081, 3224, 11, 15); //main willows
- Rectangle draynorTrees = new Rectangle(3074, 3265, 13, 11); //some trees just north of the bank
- Rectangle draynorOaks = new Rectangle(3075, 3290, 12, 15); //up by the main path / crossroads
- Point a = new Point(getMyPlayer().getLocation().getX(), getMyPlayer().getLocation().getY());
- location = "unknown";
- atBank = false;
- if (lumbridge.contains(a)) {
- location = "lumbridge";
- }
- if (draynorBank.contains(a)) {
- atBank = true;
- location = "draynorbank";
- }
- if (draynorWillows.contains(a)) {
- location = "draynorwillows";
- }
- if (draynorTrees.contains(a)) {
- location = "draynortrees";
- }
- if (draynorOaks.contains(a)) {
- location = "draynoroaks";
- }
- sleep(100);
- } catch(Exception e) {
- log ("oopsy daisy");
- }
- }
- }
- };
- public void saveAccounts() {
- root.getChild("accounts").getChild("account0").getChild("username").setText(users[0]);
- root.getChild("accounts").getChild("account0").getChild("password").setText(passwords[0]);
- root.getChild("accounts").getChild("account1").getChild("username").setText(users[1]);
- root.getChild("accounts").getChild("account1").getChild("password").setText(passwords[1]);
- root.getChild("accounts").getChild("account2").getChild("username").setText(users[2]);
- root.getChild("accounts").getChild("account2").getChild("password").setText(passwords[2]);
- root.getChild("accounts").getChild("account3").getChild("username").setText(users[3]);
- root.getChild("accounts").getChild("account3").getChild("password").setText(passwords[3]);
- root.getChild("accounts").getChild("account4").getChild("username").setText(users[4]);
- root.getChild("accounts").getChild("account4").getChild("password").setText(passwords[4]);
- root.getChild("accounts").getChild("account5").getChild("username").setText(users[5]);
- root.getChild("accounts").getChild("account5").getChild("password").setText(passwords[5]);
- root.getChild("accounts").getChild("account6").getChild("username").setText(users[6]);
- root.getChild("accounts").getChild("account6").getChild("password").setText(passwords[6]);
- root.getChild("accounts").getChild("account7").getChild("username").setText(users[7]);
- root.getChild("accounts").getChild("account7").getChild("password").setText(passwords[7]);
- root.getChild("accounts").getChild("account8").getChild("username").setText(users[8]);
- root.getChild("accounts").getChild("account8").getChild("password").setText(passwords[8]);
- root.getChild("accounts").getChild("account9").getChild("username").setText(users[9]);
- root.getChild("accounts").getChild("account9").getChild("password").setText(passwords[9]);
- saveFile();
- }
- public void getAccounts() {
- users[0] = root.getChild("accounts").getChild("account0").getChild("username").getText();
- passwords[0] = root.getChild("accounts").getChild("account0").getChild("password").getText();
- users[1] = root.getChild("accounts").getChild("account1").getChild("username").getText();
- passwords[1] = root.getChild("accounts").getChild("account1").getChild("password").getText();
- users[2] = root.getChild("accounts").getChild("account2").getChild("username").getText();
- passwords[2] = root.getChild("accounts").getChild("account2").getChild("password").getText();
- users[3] = root.getChild("accounts").getChild("account3").getChild("username").getText();
- passwords[3] = root.getChild("accounts").getChild("account3").getChild("password").getText();
- users[4] = root.getChild("accounts").getChild("account4").getChild("username").getText();
- passwords[4] = root.getChild("accounts").getChild("account4").getChild("password").getText();
- users[5] = root.getChild("accounts").getChild("account5").getChild("username").getText();
- passwords[5] = root.getChild("accounts").getChild("account5").getChild("password").getText();
- users[6] = root.getChild("accounts").getChild("account6").getChild("username").getText();
- passwords[6] = root.getChild("accounts").getChild("account6").getChild("password").getText();
- users[7] = root.getChild("accounts").getChild("account7").getChild("username").getText();
- passwords[7] = root.getChild("accounts").getChild("account7").getChild("password").getText();
- users[8] = root.getChild("accounts").getChild("account8").getChild("username").getText();
- passwords[8] = root.getChild("accounts").getChild("account8").getChild("password").getText();
- users[9] = root.getChild("accounts").getChild("account9").getChild("username").getText();
- passwords[9] = root.getChild("accounts").getChild("account9").getChild("password").getText();
- if (users[0].length() < 2) {
- users[0] = " ";
- }
- if (users[1].length() < 2) {
- users[1] = " ";
- }
- if (users[2].length() < 2) {
- users[2] = " ";
- }
- if (users[3].length() < 2) {
- users[3] = " ";
- }
- if (users[4].length() < 2) {
- users[4] = " ";
- }
- if (users[5].length() < 2) {
- users[5] = " ";
- }
- if (users[6].length() < 2) {
- users[6] = " ";
- }
- if (users[7].length() < 2) {
- users[7] = " ";
- }
- if (users[8].length() < 2) {
- users[8] = " ";
- }
- if (users[9].length() < 2) {
- users[9] = " ";
- }
- saveFile();
- }
- public void readData() {
- SAXBuilder builder = new SAXBuilder();
- try {
- settings = builder.build(WcArmySettings);
- root = settings.getRootElement();
- } catch(IOException e) {
- } catch(JDOMException e) {
- }
- }
- public void createFile() {
- settings = new Document();
- Element root = new Element("settings");
- Element accounts = new Element("accounts");
- accounts.addContent(new Element("account0"));
- accounts.addContent(new Element("account1"));
- accounts.addContent(new Element("account2"));
- accounts.addContent(new Element("account3"));
- accounts.addContent(new Element("account4"));
- accounts.addContent(new Element("account5"));
- accounts.addContent(new Element("account6"));
- accounts.addContent(new Element("account7"));
- accounts.addContent(new Element("account8"));
- accounts.addContent(new Element("account9"));
- accounts.getChild("account0").addContent(new Element("username").setText(" "));
- accounts.getChild("account0").addContent(new Element("password").setText(" "));
- accounts.getChild("account1").addContent(new Element("username").setText(" "));
- accounts.getChild("account1").addContent(new Element("password").setText(" "));
- accounts.getChild("account2").addContent(new Element("username").setText(" "));
- accounts.getChild("account2").addContent(new Element("password").setText(" "));
- accounts.getChild("account3").addContent(new Element("username").setText(" "));
- accounts.getChild("account3").addContent(new Element("password").setText(" "));
- accounts.getChild("account4").addContent(new Element("username").setText(" "));
- accounts.getChild("account4").addContent(new Element("password").setText(" "));
- accounts.getChild("account5").addContent(new Element("username").setText(" "));
- accounts.getChild("account5").addContent(new Element("password").setText(" "));
- accounts.getChild("account6").addContent(new Element("username").setText(" "));
- accounts.getChild("account6").addContent(new Element("password").setText(" "));
- accounts.getChild("account7").addContent(new Element("username").setText(" "));
- accounts.getChild("account7").addContent(new Element("password").setText(" "));
- accounts.getChild("account8").addContent(new Element("username").setText(" "));
- accounts.getChild("account8").addContent(new Element("password").setText(" "));
- accounts.getChild("account9").addContent(new Element("username").setText(" "));
- accounts.getChild("account9").addContent(new Element("password").setText(" "));
- root.addContent(accounts);
- settings.setContent(root);
- saveFile();
- }
- public void saveFile() {
- try {
- FileWriter writer = new FileWriter(fileName);
- XMLOutputter outputter = new XMLOutputter();
- outputter.setFormat(Format.getPrettyFormat());
- outputter.output(settings, writer);
- log("Settings file saved");
- } catch(IOException e) {
- e.printStackTrace();
- }
- }
- public String getAuthor() {
- return "Ryan";
- }
- public String getVersion() {
- return "0.1";
- }
- public String getName() {
- return "Woodcutting Army";
- }
- public String getDescription() {
- return "Will run a woodcutting army";
- }
- public class WCArmyMethods {
- public void walkTo(String locat) {
- String loc = locat.toLowerCase();
- if (location.equals("unknown")) {
- log("Please report this: ("+getMyPlayer().getLocation().getX() +", " +getMyPlayer().getLocation().getY() +")");
- }
- if (loc.equals("bank")) {
- if (location.equals("draynorwillows")) {
- loc = "draynorbank";
- }
- if (location.equals("draynoroaks")) {
- loc = "draynorbank";
- }
- if (location.equals("draynortrees")) {
- loc = "draynorbank";
- }
- }
- if (loc.equals("draynortrees")) {
- if (location.equals("draynorbank")) {
- walking.walkPath(Walking.randomizePath(paths.draynorBankToDraynorTrees, 2, 2));
- }
- }
- if (loc.equals("draynorwillows")) {
- if(location.equals("draynorwillows")) {
- return;
- }
- if(location.equals("draynorbank")) {
- walking.walkPath(Walking.randomizePath(paths.draynorBankToDraynorWillows, 2, 2));
- }
- }
- if (loc.equals("draynoroaks")) {
- if (location.equals("draynorbank")) {
- walking.walkPath(Walking.randomizePath(paths.draynorBankToDraynorOaks, 2, 2));
- return;
- }
- }
- if (loc.equals("draynorbank")) {
- if (location.equals("draynorwillows")) {
- walking.walkPath(Walking.randomizePath(paths.draynorWillowsToDraynorBank, 2, 2));
- }
- if (location.equals("draynoroaks")) {
- walking.walkPath(Walking.randomizePath(paths.draynorOaksTodraynorBank, 2, 2));
- return;
- }
- if (location.equals("draynorbank")) {
- return;
- }
- if (location.equals("lumbridge")) {
- walking.walkPath(Walking.randomizePath(paths.lumbridgeToDraynorBank, 2, 2));
- return;
- }
- }
- if (loc.equals("lumbridge")) {
- if (location.equals("lumbridge")) {
- return;
- }
- if (location.equals("draynorbank")) {
- walking.walkPath(Walking.randomizePath(paths.draynorBankToLumbridge, 2, 2));
- return;
- }
- }
- }
- public void changeLocation() {
- int rand = 0;
- if (mode == 2) {
- rand = random(1, 2);
- }
- if (mode == 1 || rand == 1) {
- if (woodcuttingLevel >= 30) {
- cuttingLocation = willowLocations[random(0, willowLocations.length)];
- cuttingTree = "willow";
- }
- if (woodcuttingLevel >= 15 && woodcuttingLevel < 30) {
- cuttingLocation = oakLocations[random(0, oakLocations.length)];
- cuttingTree = "oak";
- }
- if (woodcuttingLevel < 15) {
- cuttingLocation = normalLocations[random(0, normalLocations.length)];
- cuttingTree = "normal";
- }
- }
- if (mode == 3 || rand == 2) {
- }
- }
- public void openBank() {
- Obj booth = objects.getClosestObject(15, bankBooths);
- if (booth != null) {
- if (getMyPlayer().isMoving()) {
- return;
- }
- booth.doAction("quickly");
- }
- }
- public void depositAll() {
- if (!bank.isOpen()) {
- return;
- }
- else bank.depositAllExcept(axes);
- }
- public boolean isChopping() {
- if (getMyPlayer().getAnimation() == -1) {
- return false;
- }
- if (getMyPlayer().getAnimation() != -1) {
- return true;
- }
- return false;
- }
- public void chopTree(String tree) {
- int[] ids;
- Obj treeToChop = null;
- String action = null;
- if (tree.equals("willow")) {
- ids = willows;
- action = "Chop down Willow";
- treeToChop = getClosestObject(14, ids);
- }
- if (tree.equals("normal")) {
- ids = normals;
- action = "Chop down Tree";
- treeToChop = getClosestObject(14, ids);
- }
- if (tree.equals("oak")) {
- ids = oaks;
- action = "Chop down Oak";
- treeToChop = getClosestObject(14, ids);
- }
- if (treeToChop != null) {
- treeToChop.doAction(action);
- }
- }
- public void antiBan() {
- }
- }
- public class WCArmyPaths {
- Tile[] draynorBankToLumbridge = new Tile[]{new Tile(3092,3243), new Tile(3095,3247), new Tile(3098,3243), new Tile(3100,3238),
- new Tile(3104,3235), new Tile(3109,3233), new Tile(3113,3230), new Tile(3119,3228), new Tile(3124,3228),
- new Tile(3129,3228), new Tile(3134,3228), new Tile(3139,3228), new Tile(3144,3228), new Tile(3149,3229),
- new Tile(3154,3229), new Tile(3159,3231), new Tile(3164,3231), new Tile(3169,3231), new Tile(3174,3233),
- new Tile(3179,3235), new Tile(3184,3235), new Tile(3189,3237), new Tile(3194,3237), new Tile(3198,3241),
- new Tile(3201,3245), new Tile(3206,3245), new Tile(3211,3245), new Tile(3216,3245), new Tile(3222,3242),
- new Tile(3224,3237), new Tile(3227,3233), new Tile(3230,3229), new Tile(3231,3224), new Tile(3232,3219),
- new Tile(3227,3219), new Tile(3222,3219), };
- Tile[] lumbridgeToDraynorBank = Walking.reversePath(draynorBankToLumbridge);
- Tile[] draynorBankToDraynorWillows = new Tile[]{new Tile(3092,3243), new Tile(3089,3247), new Tile(3087,3242), new Tile(3087,3237),
- new Tile(3087, 3233)};
- Tile[] draynorWillowsToDraynorBank = Walking.reversePath(draynorBankToDraynorWillows);
- Tile[] draynorBankToDraynorTrees = new Tile[]{new Tile(3092,3243), new Tile(3089,3247), new Tile(3084,3247), new Tile(3080,3251),
- new Tile(3079,3256), new Tile(3080,3261), new Tile(3083,3266), new Tile(3082, 3269)};
- Tile[] draynorTreesToDraynorBank = Walking.reversePath(draynorBankToDraynorTrees);
- Tile[] draynorBankToDraynorOaks = new Tile[]{new Tile(3092,3243), new Tile(3089,3247), new Tile(3086,3251), new Tile(3082,3255),
- new Tile(3082,3260), new Tile(3083,3265), new Tile(3083,3270), new Tile(3084,3275), new Tile(3085,3280),
- new Tile(3080,3282), new Tile(3079,3287), new Tile(3079,3292), new Tile(3077,3297), new Tile(3082,3299), };
- Tile[] draynorOaksTodraynorBank = Walking.reversePath(draynorBankToDraynorOaks);
- }
- public class woodcutterArmyGUI extends javax.swing.JFrame {
- /** Creates new form woodcutterArmyGUI */
- public woodcutterArmyGUI() {
- initComponents();
- }
- /** This method is called from within the constructor to
- * initiali
- * WARNING: Do NOT modify this code. The content of this method is
- * always regenerated by the Form Editor.
- */
- @SuppressWarnings("checked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jPanel10 = new javax.swing.JPanel();
- jPanel11 = new javax.swing.JPanel();
- jTabbedPane1 = new javax.swing.JTabbedPane();
- jPanel1 = new javax.swing.JPanel();
- jPanel5 = new javax.swing.JPanel();
- jLabel8 = new javax.swing.JLabel();
- jLabel9 = new javax.swing.JLabel();
- jLabel10 = new javax.swing.JLabel();
- jLabel11 = new javax.swing.JLabel();
- jRadioButton1 = new javax.swing.JRadioButton();
- jRadioButton2 = new javax.swing.JRadioButton();
- jRadioButton3 = new javax.swing.JRadioButton();
- jButton3 = new javax.swing.JButton();
- jPanel8 = new javax.swing.JPanel();
- jLabel24 = new javax.swing.JLabel();
- jLabel25 = new javax.swing.JLabel();
- jComboBox1 = new javax.swing.JComboBox();
- jLabel26 = new javax.swing.JLabel();
- jComboBox2 = new javax.swing.JComboBox();
- jLabel27 = new javax.swing.JLabel();
- jLabel28 = new javax.swing.JLabel();
- jComboBox3 = new javax.swing.JComboBox();
- jLabel29 = new javax.swing.JLabel();
- jComboBox4 = new javax.swing.JComboBox();
- jLabel30 = new javax.swing.JLabel();
- jPanel2 = new javax.swing.JPanel();
- jScrollPane1 = new javax.swing.JScrollPane();
- jList1 = new javax.swing.JList();
- jPanel3 = new javax.swing.JPanel();
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- jLabel3 = new javax.swing.JLabel();
- jPasswordField1 = new javax.swing.JPasswordField();
- jTextField1 = new javax.swing.JTextField();
- jButton1 = new javax.swing.JButton();
- jPanel4 = new javax.swing.JPanel();
- jLabel4 = new javax.swing.JLabel();
- jButton2 = new javax.swing.JButton();
- jLabel5 = new javax.swing.JLabel();
- jLabel6 = new javax.swing.JLabel();
- jLabel7 = new javax.swing.JLabel();
- jPanel6 = new javax.swing.JPanel();
- jScrollPane2 = new javax.swing.JScrollPane();
- jList2 = new javax.swing.JList();
- jLabel12 = new javax.swing.JLabel();
- jPanel7 = new javax.swing.JPanel();
- jLabel14 = new javax.swing.JLabel();
- jLabel15 = new javax.swing.JLabel();
- jLabel16 = new javax.swing.JLabel();
- jLabel17 = new javax.swing.JLabel();
- jLabel18 = new javax.swing.JLabel();
- jLabel19 = new javax.swing.JLabel();
- jLabel20 = new javax.swing.JLabel();
- jLabel21 = new javax.swing.JLabel();
- jLabel22 = new javax.swing.JLabel();
- jLabel23 = new javax.swing.JLabel();
- jLabel13 = new javax.swing.JLabel();
- jPanel9 = new javax.swing.JPanel();
- jLabel31 = new javax.swing.JLabel();
- jLabel32 = new javax.swing.JLabel();
- jLabel33 = new javax.swing.JLabel();
- jLabel34 = new javax.swing.JLabel();
- jLabel35 = new javax.swing.JLabel();
- jLabel36 = new javax.swing.JLabel();
- jLabel37 = new javax.swing.JLabel();
- jLabel38 = new javax.swing.JLabel();
- jLabel39 = new javax.swing.JLabel();
- jLabel40 = new javax.swing.JLabel();
- jLabel41 = new javax.swing.JLabel();
- jLabel42 = new javax.swing.JLabel();
- jLabel43 = new javax.swing.JLabel();
- jLabel44 = new javax.swing.JLabel();
- jLabel45 = new javax.swing.JLabel();
- jLabel46 = new javax.swing.JLabel();
- jLabel47 = new javax.swing.JLabel();
- jLabel48 = new javax.swing.JLabel();
- jLabel49 = new javax.swing.JLabel();
- jLabel50 = new javax.swing.JLabel();
- jLabel51 = new javax.swing.JLabel();
- jLabel52 = new javax.swing.JLabel();
- jLabel53 = new javax.swing.JLabel();
- jLabel54 = new javax.swing.JLabel();
- org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10);
- jPanel10.setLayout(jPanel10Layout);
- jPanel10Layout.setHorizontalGroup(
- jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 100, Short.MAX_VALUE)
- );
- jPanel10Layout.setVerticalGroup(
- jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 100, Short.MAX_VALUE)
- );
- org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11);
- jPanel11.setLayout(jPanel11Layout);
- jPanel11Layout.setHorizontalGroup(
- jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 100, Short.MAX_VALUE)
- );
- jPanel11Layout.setVerticalGroup(
- jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 100, Short.MAX_VALUE)
- );
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Woodcutter Army by Ryan");
- jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- jLabel8.setText("What do you want for the accounts ?");
- jLabel9.setText("Experience");
- jLabel10.setText("Mixture");
- jLabel11.setText("Money");
- org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
- jPanel5.setLayout(jPanel5Layout);
- jPanel5Layout.setHorizontalGroup(
- jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel5Layout.createSequentialGroup()
- .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel8)
- .add(jPanel5Layout.createSequentialGroup()
- .add(45, 45, 45)
- .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel11)
- .add(jLabel9)
- .add(jLabel10))
- .add(22, 22, 22)
- .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(jRadioButton2)
- .add(jRadioButton1)
- .add(jRadioButton3))))
- .addContainerGap(18, Short.MAX_VALUE))
- );
- jPanel5Layout.setVerticalGroup(
- jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel5Layout.createSequentialGroup()
- .add(jLabel8)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jRadioButton1))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jRadioButton2))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jRadioButton3)
- .add(jLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- {
- jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- mode = 3;
- selectMode();
- }
- });
- }
- {
- jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- mode = 2;
- selectMode();
- }
- });
- }
- {
- jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- mode = 1;
- selectMode();
- }
- });
- }
- jButton3.setText("Start Script"); {
- jButton3.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- startScript();
- }
- });
- }
- jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- jLabel24.setText("How long for each account to run ?");
- jLabel25.setText("Between:");
- jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "10", "15", "20" }));
- jLabel26.setText("Hour(s)");
- jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "10", "20", "30", "40", "50" }));
- jLabel27.setText("Minutes");
- jLabel28.setText("And:");
- jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "10", "15", "20" }));
- jLabel29.setText("Hour(s)");
- jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "10", "20", "30", "40", "50" }));
- jLabel30.setText("Minutes");
- org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
- jPanel8.setLayout(jPanel8Layout);
- jPanel8Layout.setHorizontalGroup(
- jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel8Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel24)
- .add(jLabel25)
- .add(jPanel8Layout.createSequentialGroup()
- .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel26)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel27))
- .add(jLabel28)
- .add(jPanel8Layout.createSequentialGroup()
- .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel29)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jComboBox4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel30)))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- jPanel8Layout.setVerticalGroup(
- jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel8Layout.createSequentialGroup()
- .add(jLabel24)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel25)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel26)
- .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel27))
- .add(18, 18, 18)
- .add(jLabel28)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel29)
- .add(jComboBox4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel30))
- .addContainerGap(33, Short.MAX_VALUE))
- );
- org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
- .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 75, Short.MAX_VALUE)
- .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap())
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addContainerGap())
- );
- jTabbedPane1.addTab("Settings", jPanel1);
- jList1.setModel(new javax.swing.AbstractListModel() {
- String[] strings = users;
- public int getSize() { return strings.length; }
- public Object getElementAt(int i) { return strings[i]; }
- });
- jScrollPane1.setViewportView(jList1);
- jPanel3.setBackground(new java.awt.Color(204, 204, 255));
- jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- jLabel1.setFont(new java.awt.Font("Tahoma", 2, 11));
- jLabel1.setText("Add a new account");
- jLabel2.setText("Username:");
- jLabel3.setText("Password:");
- jButton1.setText("Add account"); {
- jButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- addAccount();
- }
- });
- }
- org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
- jPanel3.setLayout(jPanel3Layout);
- jPanel3Layout.setHorizontalGroup(
- jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel3Layout.createSequentialGroup()
- .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel3Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel3)
- .add(jLabel2))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 16, Short.MAX_VALUE)
- .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(jTextField1)
- .add(jPasswordField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)))
- .add(jPanel3Layout.createSequentialGroup()
- .add(51, 51, 51)
- .add(jLabel1))
- .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
- .add(78, 78, 78)
- .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)))
- .addContainerGap())
- );
- jPanel3Layout.setVerticalGroup(
- jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel3Layout.createSequentialGroup()
- .add(jLabel1)
- .add(18, 18, 18)
- .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel2)
- .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel3))
- .add(13, 13, 13)
- .add(jButton1)
- .addContainerGap())
- );
- jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- jLabel4.setFont(new java.awt.Font("Tahoma", 2, 11));
- jLabel4.setText("Remove a account");
- jButton2.setText("Remove account"); {
- jButton2.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- removeAccount();
- }
- });
- }
- jLabel5.setText("To remove a account just");
- jLabel6.setText("select it from the list and click");
- jLabel7.setText("Remove account.");
- org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
- jPanel4.setLayout(jPanel4Layout);
- jPanel4Layout.setHorizontalGroup(
- jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel4Layout.createSequentialGroup()
- .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel4Layout.createSequentialGroup()
- .add(34, 34, 34)
- .add(jLabel4))
- .add(jPanel4Layout.createSequentialGroup()
- .addContainerGap()
- .add(jLabel5))
- .add(jPanel4Layout.createSequentialGroup()
- .addContainerGap()
- .add(jLabel6))
- .add(jPanel4Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel4Layout.createSequentialGroup()
- .add(10, 10, 10)
- .add(jButton2))
- .add(jLabel7))))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- jPanel4Layout.setVerticalGroup(
- jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel4Layout.createSequentialGroup()
- .add(jLabel4)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel5)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel6)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel7)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 12, Short.MAX_VALUE)
- .add(jButton2)
- .addContainerGap())
- );
- org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
- jPanel2.setLayout(jPanel2Layout);
- jPanel2Layout.setHorizontalGroup(
- jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel2Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
- .add(jPanel2Layout.createSequentialGroup()
- .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap())
- );
- jPanel2Layout.setVerticalGroup(
- jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel2Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
- .addContainerGap())
- );
- jTabbedPane1.addTab("Accounts settings", jPanel2);
- jList2.setModel(new javax.swing.AbstractListModel() {
- String[] strings = users;
- public int getSize() { return strings.length; }
- public Object getElementAt(int i) { return strings[i]; }
- });
- jScrollPane2.setViewportView(jList2);
- jLabel12.setFont(new java.awt.Font("Tahoma", 2, 11));
- jLabel12.setText("Select a account.");
- jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- jLabel14.setText("Woodcutting Level:");
- jLabel15.setText("jLabel15");
- jLabel16.setText("Total Runtime:");
- jLabel17.setText("jLabel17");
- jLabel18.setText("Total Experience gained:");
- jLabel19.setText("jLabel19");
- jLabel20.setText("Total level gained:");
- jLabel21.setText("jLabel21");
- jLabel22.setText("Total money made:");
- jLabel23.setText("jLabel23");
- org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
- jPanel7.setLayout(jPanel7Layout);
- jPanel7Layout.setHorizontalGroup(
- jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel7Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel18)
- .add(jLabel14)
- .add(jLabel16)
- .add(jLabel20)
- .add(jLabel22))
- .add(18, 18, 18)
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel17)
- .add(jLabel15)
- .add(jLabel19)
- .add(jLabel21)
- .add(jLabel23))
- .addContainerGap(88, Short.MAX_VALUE))
- );
- jPanel7Layout.setVerticalGroup(
- jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel7Layout.createSequentialGroup()
- .add(22, 22, 22)
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel18)
- .add(jLabel15))
- .add(18, 18, 18)
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel14)
- .add(jLabel17))
- .add(18, 18, 18)
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel16)
- .add(jLabel19))
- .add(18, 18, 18)
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel20)
- .add(jLabel21))
- .add(18, 18, 18)
- .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel22)
- .add(jLabel23))
- .addContainerGap(85, Short.MAX_VALUE))
- );
- jLabel13.setFont(new java.awt.Font("Tahoma", 2, 11));
- jLabel13.setText("Information");
- org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
- jPanel6.setLayout(jPanel6Layout);
- jPanel6Layout.setHorizontalGroup(
- jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel6Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
- .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane2)
- .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel6Layout.createSequentialGroup()
- .add(122, 122, 122)
- .add(jLabel13))
- .add(jPanel6Layout.createSequentialGroup()
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
- .addContainerGap())
- );
- jPanel6Layout.setVerticalGroup(
- jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel6Layout.createSequentialGroup()
- .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel13))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- jTabbedPane1.addTab("Accounts information", jPanel6);
- jLabel31.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N
- jLabel31.setText("Global stats.");
- jLabel32.setText("Runtime:");
- jLabel33.setText(""+globalRuntimeDays);
- jLabel34.setText("Day(s)");
- jLabel35.setText(""+globalRuntimeHours);
- jLabel36.setText("Hour(s)");
- jLabel37.setText(""+globalRuntimeMinutes);
- jLabel38.setText("Minute(s)");
- jLabel39.setText("Levels gained:");
- jLabel40.setText(""+globalLevelsGained);
- jLabel41.setText("XP gained:");
- jLabel42.setText(""+globalExperienceGained);
- jLabel43.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N
- jLabel43.setText("Your best stats in a single run.");
- jLabel44.setText("Runtime:");
- jLabel45.setText(""+bestRuntimeDays);
- jLabel46.setText("Days(s)");
- jLabel47.setText(""+bestRuntimeHours);
- jLabel48.setText("Hour(s)");
- jLabel49.setText(""+bestRuntimeMinutes);
- jLabel50.setText("Minute(s)");
- jLabel51.setText("Levels gained:");
- jLabel52.setText(""+bestLevelsGained);
- jLabel53.setText("XP gained:");
- jLabel54.setText(""+bestExperienceGained);
- org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
- jPanel9.setLayout(jPanel9Layout);
- jPanel9Layout.setHorizontalGroup(
- jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel9Layout.createSequentialGroup()
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel9Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel39)
- .add(jLabel32)
- .add(jLabel41)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel31))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel42)
- .add(jPanel9Layout.createSequentialGroup()
- .add(jLabel33)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel34)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel35)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel36)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel37)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel38))
- .add(jLabel40)))
- .add(jPanel9Layout.createSequentialGroup()
- .add(21, 21, 21)
- .add(jLabel43))
- .add(jPanel9Layout.createSequentialGroup()
- .addContainerGap()
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel51)
- .add(jLabel53)
- .add(jLabel44))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel9Layout.createSequentialGroup()
- .add(jLabel45)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel46)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel47)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel48)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jLabel49)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel50))
- .add(jLabel54)
- .add(jLabel52))))
- .addContainerGap(31, Short.MAX_VALUE))
- );
- jPanel9Layout.setVerticalGroup(
- jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel9Layout.createSequentialGroup()
- .addContainerGap()
- .add(jLabel31)
- .add(18, 18, 18)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel32)
- .add(jLabel33)
- .add(jLabel34)
- .add(jLabel35)
- .add(jLabel36)
- .add(jLabel37)
- .add(jLabel38))
- .add(18, 18, 18)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel39)
- .add(jLabel40))
- .add(18, 18, 18)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel41)
- .add(jLabel42))
- .add(29, 29, 29)
- .add(jLabel43)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel44)
- .add(jLabel45)
- .add(jLabel46)
- .add(jLabel47)
- .add(jLabel48)
- .add(jLabel49)
- .add(jLabel50))
- .add(18, 18, 18)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel51)
- .add(jLabel52))
- .add(18, 18, 18)
- .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel53)
- .add(jLabel54))
- .addContainerGap(37, Short.MAX_VALUE))
- );
- jTabbedPane1.addTab("Stats", jPanel9);
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
- );
- pack();
- }// </editor-fold>
- public void selectMode() {
- if (mode == 1) {
- jRadioButton2.setSelected(false);
- jRadioButton3.setSelected(false);
- GUI.repaint();
- }
- if (mode == 2) {
- jRadioButton1.setSelected(false);
- jRadioButton3.setSelected(false);
- GUI.repaint();
- }
- if (mode == 3) {
- jRadioButton1.setSelected(false);
- jRadioButton2.setSelected(false);
- GUI.repaint();
- }
- }
- public void removeAccount() {
- selectedAccount = jList1.getSelectedValue().toString();
- if (users[0].equals(selectedAccount)) {
- users[0] = users[1];
- passwords[0] = passwords[1];
- users[1] = users[2];
- passwords[1] = passwords[2];
- users[2] = users[3];
- passwords[2] = passwords[3];
- users[3] = users[4];
- passwords[3] = passwords[4];
- users[4] = users[5];
- passwords[4] = passwords[5];
- users[5] = users[6];
- passwords[5] = passwords[6];
- users[6] = users[7];
- passwords[6] = passwords[7];
- users[7] = users[8];
- passwords[7] = passwords[8];
- users[8] = users[9];
- passwords[8] = passwords[9];
- users[9] = " ";
- passwords[9] = " ";
- saveAccounts();
- GUI.repaint();
- }
- if (users[1].equals(selectedAccount)) {
- users[1] = users[2];
- passwords[1] = passwords[2];
- users[2] = users[3];
- passwords[2] = passwords[3];
- users[3] = users[4];
- passwords[3] = passwords[4];
- users[4] = users[5];
- passwords[4] = passwords[5];
- users[5] = users[6];
- passwords[5] = passwords[6];
- users[6] = users[7];
- passwords[6] = passwords[7];
- users[7] = users[8];
- passwords[7] = passwords[8];
- users[8] = users[9];
- passwords[8] = passwords[9];
- users[9] = " ";
- passwords[9] = " ";
- saveAccounts();
- GUI.repaint();
- }
- if (users[2].equals(selectedAccount)) {
- users[2] = users[3];
- passwords[2] = passwords[3];
- users[3] = users[4];
- passwords[3] = passwords[4];
- users[4] = users[5];
- passwords[4] = passwords[5];
- users[5] = users[6];
- passwords[5] = passwords[6];
- users[6] = users[7];
- passwords[6] = passwords[7];
- users[7] = users[8];
- passwords[7] = passwords[8];
- users[8] = users[9];
- passwords[8] = passwords[9];
- users[9] = " ";
- passwords[9] = " ";
- saveAccounts();
- GUI.repaint();
- }
- if (users[3].equals(selectedAccount)) {
- users[3] = users[4];
- passwords[3] = passwords[4];
- users[4] = users[5];
- passwords[4] = passwords[5];
- users[5] = users[6];
- passwords[5] = passwords[6];
- users[6] = users[7];
- passwords[6] = passwords[7];
- users[7] = users[8];
- passwords[7] = passwords[8];
- users[8] = users[9];
- passwords[8] = passwords[9];
Add Comment
Please, Sign In to add comment