Guest User

Untitled

a guest
Jul 9th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.31 KB | None | 0 0
  1. package com.scripts;
  2.  
  3. import com.kbot2.scriptable.Script;
  4. import com.kbot2.scriptable.methods.data.Skills;
  5. import com.kbot2.scriptable.methods.data.Walking;
  6. import com.kbot2.scriptable.methods.wrappers.Tile;
  7. import com.kbot2.scriptable.methods.wrappers.Obj;
  8.  
  9. import java.io.*;
  10. import java.awt.*;
  11.  
  12. import org.jdom.Document;
  13. import org.jdom.Element;
  14. import org.jdom.JDOMException;
  15. import org.jdom.input.SAXBuilder;
  16. import org.jdom.output.XMLOutputter;
  17. import org.jdom.output.Format;
  18.  
  19.  
  20. public class woodcutterArmy extends Script {
  21. public WCArmyPaths paths = new WCArmyPaths();
  22. public WCArmyMethods methods = new WCArmyMethods();
  23.  
  24. int status = 0;
  25. int woodcuttingLevel = 0;
  26.  
  27. //trees
  28. int willows[] = {5551, 5552, 5553};
  29. int normals[] = {1276, 1278};
  30. int oaks[] = {1281};
  31. String normalLocations[] = {"DraynorTrees"};
  32. String oakLocations[] = {"DraynorOaks"};
  33. String willowLocations[] = {"DraynorWillows"};
  34. String cuttingLocation = null;
  35. String cuttingTree = null;
  36.  
  37. //other things
  38. int bankBooths[] = {2213};
  39. int axes[] = {1351, 1349, 1361, 1353, 1355, 1357, 1359, 6739};
  40. boolean yes = true;
  41. boolean start = false;
  42. boolean atBank;
  43.  
  44. // GUI
  45. int globalRuntimeDays = 0;
  46. int globalRuntimeHours = 0;
  47. int globalRuntimeMinutes = 0;
  48. int globalLevelsGained = 0;
  49. int globalExperienceGained = 0;
  50. int bestRuntimeDays = 0;
  51. int bestRuntimeHours = 0;
  52. int bestRuntimeMinutes = 0;
  53. int bestLevelsGained = 0;
  54. int bestExperienceGained = 0;
  55. String selectedAccount;
  56. int mode = 0;
  57. //
  58.  
  59. // Accounts
  60. int currentAccountNo = 0;
  61. int accountNo = 0;
  62. String location = "unknown";
  63. String ranString;
  64. String accountName;
  65. String accountPass;
  66. String users[] = {" "," "," "," "," "," "," "," "," "," "};
  67. String passwords[] = {" "," "," "," "," "," "," "," "," "," "};
  68. //
  69. // Settings
  70. long lowTime = 0;
  71. long highTime = 0;
  72. long timeToNextAccount = 0;
  73. String fileName = "./Settings/WcArmySettings.xml";
  74. woodcutterArmyGUI GUI;
  75. File WcArmySettings = new File(fileName);
  76. Document settings;
  77. Element root;
  78. //
  79.  
  80. public boolean active() {
  81. return true;
  82. }
  83.  
  84. public boolean onStart() {
  85. if (!WcArmySettings.exists()) {
  86. createFile();
  87. log("Created settings file");
  88. }
  89. if (WcArmySettings.exists()) {
  90. readData();
  91. getAccounts();
  92. }
  93. checks.start();
  94. currentLocation.start();
  95. GUI = new woodcutterArmyGUI();
  96. GUI.setVisible(true);
  97. return true;
  98. }
  99.  
  100. public void onStop() {
  101. saveFile();
  102. checks.stop();
  103. currentLocation.stop();
  104. }
  105.  
  106. public int loop() {
  107. if (start && isLoggedIn()) {
  108. if (cuttingLocation == null) {
  109. methods.changeLocation();
  110. return random(400, 600);
  111. }
  112. if (inventory.isFull()) {
  113. if (!atBank) {
  114. methods.walkTo("bank");
  115. }
  116. if (atBank) {
  117. if (!bank.isOpen()) {
  118. methods.openBank();
  119. return random(400, 600);
  120. }
  121. if (bank.isOpen()) {
  122. methods.depositAll();
  123. }
  124. }
  125. }
  126. if (!inventory.isFull()) {
  127. methods.walkTo(cuttingLocation);
  128. if (methods.isChopping()) {
  129. methods.antiBan();
  130. }
  131. if (!methods.isChopping()) {
  132. methods.chopTree(cuttingTree);
  133. }
  134. }
  135. }
  136. return random(400, 600);
  137. }
  138.  
  139. Thread checks = new Thread() {
  140. public void run() {
  141. while(isLoggedIn()) {
  142. try {
  143. woodcuttingLevel = skills.getLevel(Skills.SKILL_WOODCUTTING);
  144. sleep (150);
  145. } catch(Exception e) {
  146. log("Whoops thats not ment to happen :S");
  147. }
  148. }
  149. }
  150. };
  151.  
  152. Thread currentLocation = new Thread() {
  153. public void run() {
  154. while(isLoggedIn()) {
  155. try {
  156. Rectangle lumbridge = new Rectangle(3217, 3203, 15, 31); //the courtyard
  157. Rectangle draynorBank = new Rectangle(3092, 3240, 6, 7); //bank
  158. Rectangle draynorWillows = new Rectangle(3081, 3224, 11, 15); //main willows
  159. Rectangle draynorTrees = new Rectangle(3074, 3265, 13, 11); //some trees just north of the bank
  160. Rectangle draynorOaks = new Rectangle(3075, 3290, 12, 15); //up by the main path / crossroads
  161. Point a = new Point(getMyPlayer().getLocation().getX(), getMyPlayer().getLocation().getY());
  162. location = "unknown";
  163. atBank = false;
  164. if (lumbridge.contains(a)) {
  165. location = "lumbridge";
  166. }
  167. if (draynorBank.contains(a)) {
  168. atBank = true;
  169. location = "draynorbank";
  170. }
  171. if (draynorWillows.contains(a)) {
  172. location = "draynorwillows";
  173. }
  174. if (draynorTrees.contains(a)) {
  175. location = "draynortrees";
  176. }
  177. if (draynorOaks.contains(a)) {
  178. location = "draynoroaks";
  179. }
  180. sleep(100);
  181. } catch(Exception e) {
  182. log ("oopsy daisy");
  183. }
  184. }
  185. }
  186. };
  187.  
  188. public void saveAccounts() {
  189. root.getChild("accounts").getChild("account0").getChild("username").setText(users[0]);
  190. root.getChild("accounts").getChild("account0").getChild("password").setText(passwords[0]);
  191. root.getChild("accounts").getChild("account1").getChild("username").setText(users[1]);
  192. root.getChild("accounts").getChild("account1").getChild("password").setText(passwords[1]);
  193. root.getChild("accounts").getChild("account2").getChild("username").setText(users[2]);
  194. root.getChild("accounts").getChild("account2").getChild("password").setText(passwords[2]);
  195. root.getChild("accounts").getChild("account3").getChild("username").setText(users[3]);
  196. root.getChild("accounts").getChild("account3").getChild("password").setText(passwords[3]);
  197. root.getChild("accounts").getChild("account4").getChild("username").setText(users[4]);
  198. root.getChild("accounts").getChild("account4").getChild("password").setText(passwords[4]);
  199. root.getChild("accounts").getChild("account5").getChild("username").setText(users[5]);
  200. root.getChild("accounts").getChild("account5").getChild("password").setText(passwords[5]);
  201. root.getChild("accounts").getChild("account6").getChild("username").setText(users[6]);
  202. root.getChild("accounts").getChild("account6").getChild("password").setText(passwords[6]);
  203. root.getChild("accounts").getChild("account7").getChild("username").setText(users[7]);
  204. root.getChild("accounts").getChild("account7").getChild("password").setText(passwords[7]);
  205. root.getChild("accounts").getChild("account8").getChild("username").setText(users[8]);
  206. root.getChild("accounts").getChild("account8").getChild("password").setText(passwords[8]);
  207. root.getChild("accounts").getChild("account9").getChild("username").setText(users[9]);
  208. root.getChild("accounts").getChild("account9").getChild("password").setText(passwords[9]);
  209. saveFile();
  210. }
  211.  
  212. public void getAccounts() {
  213. users[0] = root.getChild("accounts").getChild("account0").getChild("username").getText();
  214. passwords[0] = root.getChild("accounts").getChild("account0").getChild("password").getText();
  215. users[1] = root.getChild("accounts").getChild("account1").getChild("username").getText();
  216. passwords[1] = root.getChild("accounts").getChild("account1").getChild("password").getText();
  217. users[2] = root.getChild("accounts").getChild("account2").getChild("username").getText();
  218. passwords[2] = root.getChild("accounts").getChild("account2").getChild("password").getText();
  219. users[3] = root.getChild("accounts").getChild("account3").getChild("username").getText();
  220. passwords[3] = root.getChild("accounts").getChild("account3").getChild("password").getText();
  221. users[4] = root.getChild("accounts").getChild("account4").getChild("username").getText();
  222. passwords[4] = root.getChild("accounts").getChild("account4").getChild("password").getText();
  223. users[5] = root.getChild("accounts").getChild("account5").getChild("username").getText();
  224. passwords[5] = root.getChild("accounts").getChild("account5").getChild("password").getText();
  225. users[6] = root.getChild("accounts").getChild("account6").getChild("username").getText();
  226. passwords[6] = root.getChild("accounts").getChild("account6").getChild("password").getText();
  227. users[7] = root.getChild("accounts").getChild("account7").getChild("username").getText();
  228. passwords[7] = root.getChild("accounts").getChild("account7").getChild("password").getText();
  229. users[8] = root.getChild("accounts").getChild("account8").getChild("username").getText();
  230. passwords[8] = root.getChild("accounts").getChild("account8").getChild("password").getText();
  231. users[9] = root.getChild("accounts").getChild("account9").getChild("username").getText();
  232. passwords[9] = root.getChild("accounts").getChild("account9").getChild("password").getText();
  233. if (users[0].length() < 2) {
  234. users[0] = " ";
  235. }
  236. if (users[1].length() < 2) {
  237. users[1] = " ";
  238. }
  239. if (users[2].length() < 2) {
  240. users[2] = " ";
  241. }
  242. if (users[3].length() < 2) {
  243. users[3] = " ";
  244. }
  245. if (users[4].length() < 2) {
  246. users[4] = " ";
  247. }
  248. if (users[5].length() < 2) {
  249. users[5] = " ";
  250. }
  251. if (users[6].length() < 2) {
  252. users[6] = " ";
  253. }
  254. if (users[7].length() < 2) {
  255. users[7] = " ";
  256. }
  257. if (users[8].length() < 2) {
  258. users[8] = " ";
  259. }
  260. if (users[9].length() < 2) {
  261. users[9] = " ";
  262. }
  263. saveFile();
  264. }
  265.  
  266. public void readData() {
  267. SAXBuilder builder = new SAXBuilder();
  268. try {
  269. settings = builder.build(WcArmySettings);
  270. root = settings.getRootElement();
  271.  
  272. } catch(IOException e) {
  273.  
  274. } catch(JDOMException e) {
  275.  
  276. }
  277. }
  278.  
  279. public void createFile() {
  280. settings = new Document();
  281. Element root = new Element("settings");
  282. Element accounts = new Element("accounts");
  283. accounts.addContent(new Element("account0"));
  284. accounts.addContent(new Element("account1"));
  285. accounts.addContent(new Element("account2"));
  286. accounts.addContent(new Element("account3"));
  287. accounts.addContent(new Element("account4"));
  288. accounts.addContent(new Element("account5"));
  289. accounts.addContent(new Element("account6"));
  290. accounts.addContent(new Element("account7"));
  291. accounts.addContent(new Element("account8"));
  292. accounts.addContent(new Element("account9"));
  293. accounts.getChild("account0").addContent(new Element("username").setText(" "));
  294. accounts.getChild("account0").addContent(new Element("password").setText(" "));
  295. accounts.getChild("account1").addContent(new Element("username").setText(" "));
  296. accounts.getChild("account1").addContent(new Element("password").setText(" "));
  297. accounts.getChild("account2").addContent(new Element("username").setText(" "));
  298. accounts.getChild("account2").addContent(new Element("password").setText(" "));
  299. accounts.getChild("account3").addContent(new Element("username").setText(" "));
  300. accounts.getChild("account3").addContent(new Element("password").setText(" "));
  301. accounts.getChild("account4").addContent(new Element("username").setText(" "));
  302. accounts.getChild("account4").addContent(new Element("password").setText(" "));
  303. accounts.getChild("account5").addContent(new Element("username").setText(" "));
  304. accounts.getChild("account5").addContent(new Element("password").setText(" "));
  305. accounts.getChild("account6").addContent(new Element("username").setText(" "));
  306. accounts.getChild("account6").addContent(new Element("password").setText(" "));
  307. accounts.getChild("account7").addContent(new Element("username").setText(" "));
  308. accounts.getChild("account7").addContent(new Element("password").setText(" "));
  309. accounts.getChild("account8").addContent(new Element("username").setText(" "));
  310. accounts.getChild("account8").addContent(new Element("password").setText(" "));
  311. accounts.getChild("account9").addContent(new Element("username").setText(" "));
  312. accounts.getChild("account9").addContent(new Element("password").setText(" "));
  313. root.addContent(accounts);
  314. settings.setContent(root);
  315. saveFile();
  316. }
  317.  
  318. public void saveFile() {
  319. try {
  320. FileWriter writer = new FileWriter(fileName);
  321. XMLOutputter outputter = new XMLOutputter();
  322. outputter.setFormat(Format.getPrettyFormat());
  323. outputter.output(settings, writer);
  324. log("Settings file saved");
  325. } catch(IOException e) {
  326. e.printStackTrace();
  327. }
  328. }
  329.  
  330. public String getAuthor() {
  331. return "Ryan";
  332. }
  333.  
  334. public String getVersion() {
  335. return "0.1";
  336. }
  337.  
  338. public String getName() {
  339. return "Woodcutting Army";
  340. }
  341.  
  342. public String getDescription() {
  343. return "Will run a woodcutting army";
  344. }
  345.  
  346. public class WCArmyMethods {
  347.  
  348. public void walkTo(String locat) {
  349. String loc = locat.toLowerCase();
  350. if (location.equals("unknown")) {
  351. log("Please report this: ("+getMyPlayer().getLocation().getX() +", " +getMyPlayer().getLocation().getY() +")");
  352. }
  353. if (loc.equals("bank")) {
  354. if (location.equals("draynorwillows")) {
  355. loc = "draynorbank";
  356. }
  357. if (location.equals("draynoroaks")) {
  358. loc = "draynorbank";
  359. }
  360. if (location.equals("draynortrees")) {
  361. loc = "draynorbank";
  362. }
  363. }
  364. if (loc.equals("draynortrees")) {
  365. if (location.equals("draynorbank")) {
  366. walking.walkPath(Walking.randomizePath(paths.draynorBankToDraynorTrees, 2, 2));
  367. }
  368. }
  369. if (loc.equals("draynorwillows")) {
  370. if(location.equals("draynorwillows")) {
  371. return;
  372. }
  373. if(location.equals("draynorbank")) {
  374. walking.walkPath(Walking.randomizePath(paths.draynorBankToDraynorWillows, 2, 2));
  375. }
  376. }
  377. if (loc.equals("draynoroaks")) {
  378. if (location.equals("draynorbank")) {
  379. walking.walkPath(Walking.randomizePath(paths.draynorBankToDraynorOaks, 2, 2));
  380. return;
  381. }
  382. }
  383. if (loc.equals("draynorbank")) {
  384. if (location.equals("draynorwillows")) {
  385. walking.walkPath(Walking.randomizePath(paths.draynorWillowsToDraynorBank, 2, 2));
  386. }
  387. if (location.equals("draynoroaks")) {
  388. walking.walkPath(Walking.randomizePath(paths.draynorOaksTodraynorBank, 2, 2));
  389. return;
  390. }
  391. if (location.equals("draynorbank")) {
  392. return;
  393. }
  394. if (location.equals("lumbridge")) {
  395. walking.walkPath(Walking.randomizePath(paths.lumbridgeToDraynorBank, 2, 2));
  396. return;
  397. }
  398. }
  399. if (loc.equals("lumbridge")) {
  400. if (location.equals("lumbridge")) {
  401. return;
  402. }
  403. if (location.equals("draynorbank")) {
  404. walking.walkPath(Walking.randomizePath(paths.draynorBankToLumbridge, 2, 2));
  405. return;
  406. }
  407. }
  408. }
  409.  
  410. public void changeLocation() {
  411. int rand = 0;
  412. if (mode == 2) {
  413. rand = random(1, 2);
  414. }
  415. if (mode == 1 || rand == 1) {
  416. if (woodcuttingLevel >= 30) {
  417. cuttingLocation = willowLocations[random(0, willowLocations.length)];
  418. cuttingTree = "willow";
  419. }
  420. if (woodcuttingLevel >= 15 && woodcuttingLevel < 30) {
  421. cuttingLocation = oakLocations[random(0, oakLocations.length)];
  422. cuttingTree = "oak";
  423. }
  424. if (woodcuttingLevel < 15) {
  425. cuttingLocation = normalLocations[random(0, normalLocations.length)];
  426. cuttingTree = "normal";
  427. }
  428. }
  429. if (mode == 3 || rand == 2) {
  430.  
  431. }
  432. }
  433.  
  434. public void openBank() {
  435. Obj booth = objects.getClosestObject(15, bankBooths);
  436. if (booth != null) {
  437. if (getMyPlayer().isMoving()) {
  438. return;
  439. }
  440. booth.doAction("quickly");
  441.  
  442. }
  443. }
  444.  
  445. public void depositAll() {
  446. if (!bank.isOpen()) {
  447. return;
  448. }
  449. else bank.depositAllExcept(axes);
  450. }
  451.  
  452. public boolean isChopping() {
  453. if (getMyPlayer().getAnimation() == -1) {
  454. return false;
  455. }
  456. if (getMyPlayer().getAnimation() != -1) {
  457. return true;
  458. }
  459. return false;
  460. }
  461.  
  462. public void chopTree(String tree) {
  463. int[] ids;
  464. Obj treeToChop = null;
  465. String action = null;
  466. if (tree.equals("willow")) {
  467. ids = willows;
  468. action = "Chop down Willow";
  469. treeToChop = getClosestObject(14, ids);
  470. }
  471. if (tree.equals("normal")) {
  472. ids = normals;
  473. action = "Chop down Tree";
  474. treeToChop = getClosestObject(14, ids);
  475. }
  476. if (tree.equals("oak")) {
  477. ids = oaks;
  478. action = "Chop down Oak";
  479. treeToChop = getClosestObject(14, ids);
  480. }
  481. if (treeToChop != null) {
  482. treeToChop.doAction(action);
  483. }
  484. }
  485.  
  486. public void antiBan() {
  487.  
  488. }
  489. }
  490.  
  491. public class WCArmyPaths {
  492. Tile[] draynorBankToLumbridge = new Tile[]{new Tile(3092,3243), new Tile(3095,3247), new Tile(3098,3243), new Tile(3100,3238),
  493. new Tile(3104,3235), new Tile(3109,3233), new Tile(3113,3230), new Tile(3119,3228), new Tile(3124,3228),
  494. new Tile(3129,3228), new Tile(3134,3228), new Tile(3139,3228), new Tile(3144,3228), new Tile(3149,3229),
  495. new Tile(3154,3229), new Tile(3159,3231), new Tile(3164,3231), new Tile(3169,3231), new Tile(3174,3233),
  496. new Tile(3179,3235), new Tile(3184,3235), new Tile(3189,3237), new Tile(3194,3237), new Tile(3198,3241),
  497. new Tile(3201,3245), new Tile(3206,3245), new Tile(3211,3245), new Tile(3216,3245), new Tile(3222,3242),
  498. new Tile(3224,3237), new Tile(3227,3233), new Tile(3230,3229), new Tile(3231,3224), new Tile(3232,3219),
  499. new Tile(3227,3219), new Tile(3222,3219), };
  500.  
  501. Tile[] lumbridgeToDraynorBank = Walking.reversePath(draynorBankToLumbridge);
  502.  
  503. Tile[] draynorBankToDraynorWillows = new Tile[]{new Tile(3092,3243), new Tile(3089,3247), new Tile(3087,3242), new Tile(3087,3237),
  504. new Tile(3087, 3233)};
  505.  
  506. Tile[] draynorWillowsToDraynorBank = Walking.reversePath(draynorBankToDraynorWillows);
  507.  
  508. Tile[] draynorBankToDraynorTrees = new Tile[]{new Tile(3092,3243), new Tile(3089,3247), new Tile(3084,3247), new Tile(3080,3251),
  509. new Tile(3079,3256), new Tile(3080,3261), new Tile(3083,3266), new Tile(3082, 3269)};
  510.  
  511. Tile[] draynorTreesToDraynorBank = Walking.reversePath(draynorBankToDraynorTrees);
  512.  
  513. Tile[] draynorBankToDraynorOaks = new Tile[]{new Tile(3092,3243), new Tile(3089,3247), new Tile(3086,3251), new Tile(3082,3255),
  514. new Tile(3082,3260), new Tile(3083,3265), new Tile(3083,3270), new Tile(3084,3275), new Tile(3085,3280),
  515. new Tile(3080,3282), new Tile(3079,3287), new Tile(3079,3292), new Tile(3077,3297), new Tile(3082,3299), };
  516.  
  517. Tile[] draynorOaksTodraynorBank = Walking.reversePath(draynorBankToDraynorOaks);
  518.  
  519. }
  520.  
  521. public class woodcutterArmyGUI extends javax.swing.JFrame {
  522.  
  523. /** Creates new form woodcutterArmyGUI */
  524. public woodcutterArmyGUI() {
  525. initComponents();
  526. }
  527.  
  528. /** This method is called from within the constructor to
  529. * initiali
  530. * WARNING: Do NOT modify this code. The content of this method is
  531. * always regenerated by the Form Editor.
  532. */
  533. @SuppressWarnings("checked")
  534. // <editor-fold defaultstate="collapsed" desc="Generated Code">
  535. private void initComponents() {
  536.  
  537. jPanel10 = new javax.swing.JPanel();
  538. jPanel11 = new javax.swing.JPanel();
  539. jTabbedPane1 = new javax.swing.JTabbedPane();
  540. jPanel1 = new javax.swing.JPanel();
  541. jPanel5 = new javax.swing.JPanel();
  542. jLabel8 = new javax.swing.JLabel();
  543. jLabel9 = new javax.swing.JLabel();
  544. jLabel10 = new javax.swing.JLabel();
  545. jLabel11 = new javax.swing.JLabel();
  546. jRadioButton1 = new javax.swing.JRadioButton();
  547. jRadioButton2 = new javax.swing.JRadioButton();
  548. jRadioButton3 = new javax.swing.JRadioButton();
  549. jButton3 = new javax.swing.JButton();
  550. jPanel8 = new javax.swing.JPanel();
  551. jLabel24 = new javax.swing.JLabel();
  552. jLabel25 = new javax.swing.JLabel();
  553. jComboBox1 = new javax.swing.JComboBox();
  554. jLabel26 = new javax.swing.JLabel();
  555. jComboBox2 = new javax.swing.JComboBox();
  556. jLabel27 = new javax.swing.JLabel();
  557. jLabel28 = new javax.swing.JLabel();
  558. jComboBox3 = new javax.swing.JComboBox();
  559. jLabel29 = new javax.swing.JLabel();
  560. jComboBox4 = new javax.swing.JComboBox();
  561. jLabel30 = new javax.swing.JLabel();
  562. jPanel2 = new javax.swing.JPanel();
  563. jScrollPane1 = new javax.swing.JScrollPane();
  564. jList1 = new javax.swing.JList();
  565. jPanel3 = new javax.swing.JPanel();
  566. jLabel1 = new javax.swing.JLabel();
  567. jLabel2 = new javax.swing.JLabel();
  568. jLabel3 = new javax.swing.JLabel();
  569. jPasswordField1 = new javax.swing.JPasswordField();
  570. jTextField1 = new javax.swing.JTextField();
  571. jButton1 = new javax.swing.JButton();
  572. jPanel4 = new javax.swing.JPanel();
  573. jLabel4 = new javax.swing.JLabel();
  574. jButton2 = new javax.swing.JButton();
  575. jLabel5 = new javax.swing.JLabel();
  576. jLabel6 = new javax.swing.JLabel();
  577. jLabel7 = new javax.swing.JLabel();
  578. jPanel6 = new javax.swing.JPanel();
  579. jScrollPane2 = new javax.swing.JScrollPane();
  580. jList2 = new javax.swing.JList();
  581. jLabel12 = new javax.swing.JLabel();
  582. jPanel7 = new javax.swing.JPanel();
  583. jLabel14 = new javax.swing.JLabel();
  584. jLabel15 = new javax.swing.JLabel();
  585. jLabel16 = new javax.swing.JLabel();
  586. jLabel17 = new javax.swing.JLabel();
  587. jLabel18 = new javax.swing.JLabel();
  588. jLabel19 = new javax.swing.JLabel();
  589. jLabel20 = new javax.swing.JLabel();
  590. jLabel21 = new javax.swing.JLabel();
  591. jLabel22 = new javax.swing.JLabel();
  592. jLabel23 = new javax.swing.JLabel();
  593. jLabel13 = new javax.swing.JLabel();
  594. jPanel9 = new javax.swing.JPanel();
  595. jLabel31 = new javax.swing.JLabel();
  596. jLabel32 = new javax.swing.JLabel();
  597. jLabel33 = new javax.swing.JLabel();
  598. jLabel34 = new javax.swing.JLabel();
  599. jLabel35 = new javax.swing.JLabel();
  600. jLabel36 = new javax.swing.JLabel();
  601. jLabel37 = new javax.swing.JLabel();
  602. jLabel38 = new javax.swing.JLabel();
  603. jLabel39 = new javax.swing.JLabel();
  604. jLabel40 = new javax.swing.JLabel();
  605. jLabel41 = new javax.swing.JLabel();
  606. jLabel42 = new javax.swing.JLabel();
  607. jLabel43 = new javax.swing.JLabel();
  608. jLabel44 = new javax.swing.JLabel();
  609. jLabel45 = new javax.swing.JLabel();
  610. jLabel46 = new javax.swing.JLabel();
  611. jLabel47 = new javax.swing.JLabel();
  612. jLabel48 = new javax.swing.JLabel();
  613. jLabel49 = new javax.swing.JLabel();
  614. jLabel50 = new javax.swing.JLabel();
  615. jLabel51 = new javax.swing.JLabel();
  616. jLabel52 = new javax.swing.JLabel();
  617. jLabel53 = new javax.swing.JLabel();
  618. jLabel54 = new javax.swing.JLabel();
  619.  
  620. org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10);
  621. jPanel10.setLayout(jPanel10Layout);
  622. jPanel10Layout.setHorizontalGroup(
  623. jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  624. .add(0, 100, Short.MAX_VALUE)
  625. );
  626. jPanel10Layout.setVerticalGroup(
  627. jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  628. .add(0, 100, Short.MAX_VALUE)
  629. );
  630.  
  631. org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11);
  632. jPanel11.setLayout(jPanel11Layout);
  633. jPanel11Layout.setHorizontalGroup(
  634. jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  635. .add(0, 100, Short.MAX_VALUE)
  636. );
  637. jPanel11Layout.setVerticalGroup(
  638. jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  639. .add(0, 100, Short.MAX_VALUE)
  640. );
  641.  
  642. setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
  643. setTitle("Woodcutter Army by Ryan");
  644.  
  645. jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  646.  
  647. jLabel8.setText("What do you want for the accounts ?");
  648.  
  649. jLabel9.setText("Experience");
  650.  
  651. jLabel10.setText("Mixture");
  652.  
  653. jLabel11.setText("Money");
  654.  
  655. org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
  656. jPanel5.setLayout(jPanel5Layout);
  657. jPanel5Layout.setHorizontalGroup(
  658. jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  659. .add(jPanel5Layout.createSequentialGroup()
  660. .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  661. .add(jLabel8)
  662. .add(jPanel5Layout.createSequentialGroup()
  663. .add(45, 45, 45)
  664. .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  665. .add(jLabel11)
  666. .add(jLabel9)
  667. .add(jLabel10))
  668. .add(22, 22, 22)
  669. .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
  670. .add(jRadioButton2)
  671. .add(jRadioButton1)
  672. .add(jRadioButton3))))
  673. .addContainerGap(18, Short.MAX_VALUE))
  674. );
  675. jPanel5Layout.setVerticalGroup(
  676. jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  677. .add(jPanel5Layout.createSequentialGroup()
  678. .add(jLabel8)
  679. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  680. .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
  681. .add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  682. .add(jRadioButton1))
  683. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  684. .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  685. .add(jLabel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  686. .add(jRadioButton2))
  687. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  688. .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  689. .add(jRadioButton3)
  690. .add(jLabel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  691. .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  692. );
  693. {
  694. jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
  695. public void actionPerformed(java.awt.event.ActionEvent evt) {
  696. mode = 3;
  697. selectMode();
  698. }
  699. });
  700. }
  701. {
  702. jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
  703. public void actionPerformed(java.awt.event.ActionEvent evt) {
  704. mode = 2;
  705. selectMode();
  706. }
  707. });
  708. }
  709. {
  710. jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
  711. public void actionPerformed(java.awt.event.ActionEvent evt) {
  712. mode = 1;
  713. selectMode();
  714. }
  715. });
  716. }
  717.  
  718. jButton3.setText("Start Script"); {
  719. jButton3.addActionListener(new java.awt.event.ActionListener() {
  720. public void actionPerformed(java.awt.event.ActionEvent evt) {
  721. startScript();
  722. }
  723. });
  724. }
  725.  
  726. jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  727.  
  728. jLabel24.setText("How long for each account to run ?");
  729.  
  730. jLabel25.setText("Between:");
  731.  
  732. jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "10", "15", "20" }));
  733.  
  734. jLabel26.setText("Hour(s)");
  735.  
  736. jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "10", "20", "30", "40", "50" }));
  737.  
  738. jLabel27.setText("Minutes");
  739.  
  740. jLabel28.setText("And:");
  741.  
  742. jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "10", "15", "20" }));
  743.  
  744. jLabel29.setText("Hour(s)");
  745.  
  746. jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "10", "20", "30", "40", "50" }));
  747.  
  748. jLabel30.setText("Minutes");
  749.  
  750. org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
  751. jPanel8.setLayout(jPanel8Layout);
  752. jPanel8Layout.setHorizontalGroup(
  753. jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  754. .add(jPanel8Layout.createSequentialGroup()
  755. .addContainerGap()
  756. .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  757. .add(jLabel24)
  758. .add(jLabel25)
  759. .add(jPanel8Layout.createSequentialGroup()
  760. .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  761. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  762. .add(jLabel26)
  763. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  764. .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  765. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  766. .add(jLabel27))
  767. .add(jLabel28)
  768. .add(jPanel8Layout.createSequentialGroup()
  769. .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  770. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  771. .add(jLabel29)
  772. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  773. .add(jComboBox4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  774. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  775. .add(jLabel30)))
  776. .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  777. );
  778. jPanel8Layout.setVerticalGroup(
  779. jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  780. .add(jPanel8Layout.createSequentialGroup()
  781. .add(jLabel24)
  782. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  783. .add(jLabel25)
  784. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  785. .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  786. .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  787. .add(jLabel26)
  788. .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  789. .add(jLabel27))
  790. .add(18, 18, 18)
  791. .add(jLabel28)
  792. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  793. .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  794. .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  795. .add(jLabel29)
  796. .add(jComboBox4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  797. .add(jLabel30))
  798. .addContainerGap(33, Short.MAX_VALUE))
  799. );
  800.  
  801. org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
  802. jPanel1.setLayout(jPanel1Layout);
  803. jPanel1Layout.setHorizontalGroup(
  804. jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  805. .add(jPanel1Layout.createSequentialGroup()
  806. .addContainerGap()
  807. .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
  808. .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  809. .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  810. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 75, Short.MAX_VALUE)
  811. .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  812. .addContainerGap())
  813. );
  814. jPanel1Layout.setVerticalGroup(
  815. jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  816. .add(jPanel1Layout.createSequentialGroup()
  817. .addContainerGap()
  818. .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  819. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  820. .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
  821. .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  822. .add(jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  823. .addContainerGap())
  824. );
  825.  
  826. jTabbedPane1.addTab("Settings", jPanel1);
  827.  
  828. jList1.setModel(new javax.swing.AbstractListModel() {
  829. String[] strings = users;
  830. public int getSize() { return strings.length; }
  831. public Object getElementAt(int i) { return strings[i]; }
  832. });
  833. jScrollPane1.setViewportView(jList1);
  834.  
  835. jPanel3.setBackground(new java.awt.Color(204, 204, 255));
  836. jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  837.  
  838. jLabel1.setFont(new java.awt.Font("Tahoma", 2, 11));
  839. jLabel1.setText("Add a new account");
  840.  
  841. jLabel2.setText("Username:");
  842.  
  843. jLabel3.setText("Password:");
  844.  
  845. jButton1.setText("Add account"); {
  846. jButton1.addActionListener(new java.awt.event.ActionListener() {
  847. public void actionPerformed(java.awt.event.ActionEvent evt) {
  848. addAccount();
  849. }
  850. });
  851. }
  852.  
  853. org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
  854. jPanel3.setLayout(jPanel3Layout);
  855. jPanel3Layout.setHorizontalGroup(
  856. jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  857. .add(jPanel3Layout.createSequentialGroup()
  858. .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  859. .add(jPanel3Layout.createSequentialGroup()
  860. .addContainerGap()
  861. .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  862. .add(jLabel3)
  863. .add(jLabel2))
  864. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 16, Short.MAX_VALUE)
  865. .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
  866. .add(jTextField1)
  867. .add(jPasswordField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)))
  868. .add(jPanel3Layout.createSequentialGroup()
  869. .add(51, 51, 51)
  870. .add(jLabel1))
  871. .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
  872. .add(78, 78, 78)
  873. .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)))
  874. .addContainerGap())
  875. );
  876. jPanel3Layout.setVerticalGroup(
  877. jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  878. .add(jPanel3Layout.createSequentialGroup()
  879. .add(jLabel1)
  880. .add(18, 18, 18)
  881. .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  882. .add(jLabel2)
  883. .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  884. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  885. .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  886. .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  887. .add(jLabel3))
  888. .add(13, 13, 13)
  889. .add(jButton1)
  890. .addContainerGap())
  891. );
  892.  
  893. jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  894.  
  895. jLabel4.setFont(new java.awt.Font("Tahoma", 2, 11));
  896.  
  897. jLabel4.setText("Remove a account");
  898.  
  899. jButton2.setText("Remove account"); {
  900. jButton2.addActionListener(new java.awt.event.ActionListener() {
  901. public void actionPerformed(java.awt.event.ActionEvent evt) {
  902. removeAccount();
  903. }
  904. });
  905. }
  906.  
  907. jLabel5.setText("To remove a account just");
  908.  
  909. jLabel6.setText("select it from the list and click");
  910.  
  911. jLabel7.setText("Remove account.");
  912.  
  913. org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
  914. jPanel4.setLayout(jPanel4Layout);
  915. jPanel4Layout.setHorizontalGroup(
  916. jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  917. .add(jPanel4Layout.createSequentialGroup()
  918. .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  919. .add(jPanel4Layout.createSequentialGroup()
  920. .add(34, 34, 34)
  921. .add(jLabel4))
  922. .add(jPanel4Layout.createSequentialGroup()
  923. .addContainerGap()
  924. .add(jLabel5))
  925. .add(jPanel4Layout.createSequentialGroup()
  926. .addContainerGap()
  927. .add(jLabel6))
  928. .add(jPanel4Layout.createSequentialGroup()
  929. .addContainerGap()
  930. .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  931. .add(jPanel4Layout.createSequentialGroup()
  932. .add(10, 10, 10)
  933. .add(jButton2))
  934. .add(jLabel7))))
  935. .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  936. );
  937. jPanel4Layout.setVerticalGroup(
  938. jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  939. .add(jPanel4Layout.createSequentialGroup()
  940. .add(jLabel4)
  941. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  942. .add(jLabel5)
  943. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  944. .add(jLabel6)
  945. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  946. .add(jLabel7)
  947. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 12, Short.MAX_VALUE)
  948. .add(jButton2)
  949. .addContainerGap())
  950. );
  951.  
  952. org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
  953. jPanel2.setLayout(jPanel2Layout);
  954. jPanel2Layout.setHorizontalGroup(
  955. jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  956. .add(jPanel2Layout.createSequentialGroup()
  957. .addContainerGap()
  958. .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  959. .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
  960. .add(jPanel2Layout.createSequentialGroup()
  961. .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  962. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  963. .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
  964. .addContainerGap())
  965. );
  966. jPanel2Layout.setVerticalGroup(
  967. jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  968. .add(jPanel2Layout.createSequentialGroup()
  969. .addContainerGap()
  970. .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
  971. .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  972. .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  973. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  974. .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
  975. .addContainerGap())
  976. );
  977.  
  978. jTabbedPane1.addTab("Accounts settings", jPanel2);
  979.  
  980. jList2.setModel(new javax.swing.AbstractListModel() {
  981. String[] strings = users;
  982. public int getSize() { return strings.length; }
  983. public Object getElementAt(int i) { return strings[i]; }
  984. });
  985. jScrollPane2.setViewportView(jList2);
  986.  
  987. jLabel12.setFont(new java.awt.Font("Tahoma", 2, 11));
  988. jLabel12.setText("Select a account.");
  989.  
  990. jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());
  991.  
  992. jLabel14.setText("Woodcutting Level:");
  993.  
  994. jLabel15.setText("jLabel15");
  995.  
  996. jLabel16.setText("Total Runtime:");
  997.  
  998. jLabel17.setText("jLabel17");
  999.  
  1000. jLabel18.setText("Total Experience gained:");
  1001.  
  1002. jLabel19.setText("jLabel19");
  1003.  
  1004. jLabel20.setText("Total level gained:");
  1005.  
  1006. jLabel21.setText("jLabel21");
  1007.  
  1008. jLabel22.setText("Total money made:");
  1009.  
  1010. jLabel23.setText("jLabel23");
  1011.  
  1012. org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
  1013. jPanel7.setLayout(jPanel7Layout);
  1014. jPanel7Layout.setHorizontalGroup(
  1015. jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1016. .add(jPanel7Layout.createSequentialGroup()
  1017. .addContainerGap()
  1018. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1019. .add(jLabel18)
  1020. .add(jLabel14)
  1021. .add(jLabel16)
  1022. .add(jLabel20)
  1023. .add(jLabel22))
  1024. .add(18, 18, 18)
  1025. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1026. .add(jLabel17)
  1027. .add(jLabel15)
  1028. .add(jLabel19)
  1029. .add(jLabel21)
  1030. .add(jLabel23))
  1031. .addContainerGap(88, Short.MAX_VALUE))
  1032. );
  1033. jPanel7Layout.setVerticalGroup(
  1034. jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1035. .add(jPanel7Layout.createSequentialGroup()
  1036. .add(22, 22, 22)
  1037. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1038. .add(jLabel18)
  1039. .add(jLabel15))
  1040. .add(18, 18, 18)
  1041. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1042. .add(jLabel14)
  1043. .add(jLabel17))
  1044. .add(18, 18, 18)
  1045. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1046. .add(jLabel16)
  1047. .add(jLabel19))
  1048. .add(18, 18, 18)
  1049. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1050. .add(jLabel20)
  1051. .add(jLabel21))
  1052. .add(18, 18, 18)
  1053. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1054. .add(jLabel22)
  1055. .add(jLabel23))
  1056. .addContainerGap(85, Short.MAX_VALUE))
  1057. );
  1058.  
  1059. jLabel13.setFont(new java.awt.Font("Tahoma", 2, 11));
  1060. jLabel13.setText("Information");
  1061.  
  1062. org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
  1063. jPanel6.setLayout(jPanel6Layout);
  1064. jPanel6Layout.setHorizontalGroup(
  1065. jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1066. .add(jPanel6Layout.createSequentialGroup()
  1067. .addContainerGap()
  1068. .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
  1069. .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane2)
  1070. .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  1071. .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1072. .add(jPanel6Layout.createSequentialGroup()
  1073. .add(122, 122, 122)
  1074. .add(jLabel13))
  1075. .add(jPanel6Layout.createSequentialGroup()
  1076. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  1077. .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
  1078. .addContainerGap())
  1079. );
  1080. jPanel6Layout.setVerticalGroup(
  1081. jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1082. .add(jPanel6Layout.createSequentialGroup()
  1083. .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1084. .add(jLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  1085. .add(jLabel13))
  1086. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1087. .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
  1088. .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  1089. .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE))
  1090. .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  1091. );
  1092.  
  1093. jTabbedPane1.addTab("Accounts information", jPanel6);
  1094.  
  1095. jLabel31.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N
  1096. jLabel31.setText("Global stats.");
  1097.  
  1098. jLabel32.setText("Runtime:");
  1099.  
  1100. jLabel33.setText(""+globalRuntimeDays);
  1101.  
  1102. jLabel34.setText("Day(s)");
  1103.  
  1104. jLabel35.setText(""+globalRuntimeHours);
  1105.  
  1106. jLabel36.setText("Hour(s)");
  1107.  
  1108. jLabel37.setText(""+globalRuntimeMinutes);
  1109.  
  1110. jLabel38.setText("Minute(s)");
  1111.  
  1112. jLabel39.setText("Levels gained:");
  1113.  
  1114. jLabel40.setText(""+globalLevelsGained);
  1115.  
  1116. jLabel41.setText("XP gained:");
  1117.  
  1118. jLabel42.setText(""+globalExperienceGained);
  1119.  
  1120. jLabel43.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N
  1121. jLabel43.setText("Your best stats in a single run.");
  1122.  
  1123. jLabel44.setText("Runtime:");
  1124.  
  1125. jLabel45.setText(""+bestRuntimeDays);
  1126.  
  1127. jLabel46.setText("Days(s)");
  1128.  
  1129. jLabel47.setText(""+bestRuntimeHours);
  1130.  
  1131. jLabel48.setText("Hour(s)");
  1132.  
  1133. jLabel49.setText(""+bestRuntimeMinutes);
  1134.  
  1135. jLabel50.setText("Minute(s)");
  1136.  
  1137. jLabel51.setText("Levels gained:");
  1138.  
  1139. jLabel52.setText(""+bestLevelsGained);
  1140.  
  1141. jLabel53.setText("XP gained:");
  1142.  
  1143. jLabel54.setText(""+bestExperienceGained);
  1144.  
  1145. org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
  1146. jPanel9.setLayout(jPanel9Layout);
  1147. jPanel9Layout.setHorizontalGroup(
  1148. jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1149. .add(jPanel9Layout.createSequentialGroup()
  1150. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1151. .add(jPanel9Layout.createSequentialGroup()
  1152. .addContainerGap()
  1153. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1154. .add(jLabel39)
  1155. .add(jLabel32)
  1156. .add(jLabel41)
  1157. .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel31))
  1158. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1159. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1160. .add(jLabel42)
  1161. .add(jPanel9Layout.createSequentialGroup()
  1162. .add(jLabel33)
  1163. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1164. .add(jLabel34)
  1165. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  1166. .add(jLabel35)
  1167. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1168. .add(jLabel36)
  1169. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  1170. .add(jLabel37)
  1171. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1172. .add(jLabel38))
  1173. .add(jLabel40)))
  1174. .add(jPanel9Layout.createSequentialGroup()
  1175. .add(21, 21, 21)
  1176. .add(jLabel43))
  1177. .add(jPanel9Layout.createSequentialGroup()
  1178. .addContainerGap()
  1179. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1180. .add(jLabel51)
  1181. .add(jLabel53)
  1182. .add(jLabel44))
  1183. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1184. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1185. .add(jPanel9Layout.createSequentialGroup()
  1186. .add(jLabel45)
  1187. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1188. .add(jLabel46)
  1189. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  1190. .add(jLabel47)
  1191. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1192. .add(jLabel48)
  1193. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  1194. .add(jLabel49)
  1195. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  1196. .add(jLabel50))
  1197. .add(jLabel54)
  1198. .add(jLabel52))))
  1199. .addContainerGap(31, Short.MAX_VALUE))
  1200. );
  1201. jPanel9Layout.setVerticalGroup(
  1202. jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1203. .add(jPanel9Layout.createSequentialGroup()
  1204. .addContainerGap()
  1205. .add(jLabel31)
  1206. .add(18, 18, 18)
  1207. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1208. .add(jLabel32)
  1209. .add(jLabel33)
  1210. .add(jLabel34)
  1211. .add(jLabel35)
  1212. .add(jLabel36)
  1213. .add(jLabel37)
  1214. .add(jLabel38))
  1215. .add(18, 18, 18)
  1216. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1217. .add(jLabel39)
  1218. .add(jLabel40))
  1219. .add(18, 18, 18)
  1220. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1221. .add(jLabel41)
  1222. .add(jLabel42))
  1223. .add(29, 29, 29)
  1224. .add(jLabel43)
  1225. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  1226. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1227. .add(jLabel44)
  1228. .add(jLabel45)
  1229. .add(jLabel46)
  1230. .add(jLabel47)
  1231. .add(jLabel48)
  1232. .add(jLabel49)
  1233. .add(jLabel50))
  1234. .add(18, 18, 18)
  1235. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1236. .add(jLabel51)
  1237. .add(jLabel52))
  1238. .add(18, 18, 18)
  1239. .add(jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  1240. .add(jLabel53)
  1241. .add(jLabel54))
  1242. .addContainerGap(37, Short.MAX_VALUE))
  1243. );
  1244.  
  1245. jTabbedPane1.addTab("Stats", jPanel9);
  1246.  
  1247. org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
  1248. getContentPane().setLayout(layout);
  1249. layout.setHorizontalGroup(
  1250. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1251. .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE)
  1252. );
  1253. layout.setVerticalGroup(
  1254. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  1255. .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
  1256. );
  1257.  
  1258. pack();
  1259. }// </editor-fold>
  1260. public void selectMode() {
  1261. if (mode == 1) {
  1262. jRadioButton2.setSelected(false);
  1263. jRadioButton3.setSelected(false);
  1264. GUI.repaint();
  1265. }
  1266. if (mode == 2) {
  1267. jRadioButton1.setSelected(false);
  1268. jRadioButton3.setSelected(false);
  1269. GUI.repaint();
  1270. }
  1271. if (mode == 3) {
  1272. jRadioButton1.setSelected(false);
  1273. jRadioButton2.setSelected(false);
  1274. GUI.repaint();
  1275. }
  1276. }
  1277.  
  1278. public void removeAccount() {
  1279. selectedAccount = jList1.getSelectedValue().toString();
  1280. if (users[0].equals(selectedAccount)) {
  1281. users[0] = users[1];
  1282. passwords[0] = passwords[1];
  1283. users[1] = users[2];
  1284. passwords[1] = passwords[2];
  1285. users[2] = users[3];
  1286. passwords[2] = passwords[3];
  1287. users[3] = users[4];
  1288. passwords[3] = passwords[4];
  1289. users[4] = users[5];
  1290. passwords[4] = passwords[5];
  1291. users[5] = users[6];
  1292. passwords[5] = passwords[6];
  1293. users[6] = users[7];
  1294. passwords[6] = passwords[7];
  1295. users[7] = users[8];
  1296. passwords[7] = passwords[8];
  1297. users[8] = users[9];
  1298. passwords[8] = passwords[9];
  1299. users[9] = " ";
  1300. passwords[9] = " ";
  1301. saveAccounts();
  1302. GUI.repaint();
  1303. }
  1304. if (users[1].equals(selectedAccount)) {
  1305. users[1] = users[2];
  1306. passwords[1] = passwords[2];
  1307. users[2] = users[3];
  1308. passwords[2] = passwords[3];
  1309. users[3] = users[4];
  1310. passwords[3] = passwords[4];
  1311. users[4] = users[5];
  1312. passwords[4] = passwords[5];
  1313. users[5] = users[6];
  1314. passwords[5] = passwords[6];
  1315. users[6] = users[7];
  1316. passwords[6] = passwords[7];
  1317. users[7] = users[8];
  1318. passwords[7] = passwords[8];
  1319. users[8] = users[9];
  1320. passwords[8] = passwords[9];
  1321. users[9] = " ";
  1322. passwords[9] = " ";
  1323. saveAccounts();
  1324. GUI.repaint();
  1325. }
  1326. if (users[2].equals(selectedAccount)) {
  1327. users[2] = users[3];
  1328. passwords[2] = passwords[3];
  1329. users[3] = users[4];
  1330. passwords[3] = passwords[4];
  1331. users[4] = users[5];
  1332. passwords[4] = passwords[5];
  1333. users[5] = users[6];
  1334. passwords[5] = passwords[6];
  1335. users[6] = users[7];
  1336. passwords[6] = passwords[7];
  1337. users[7] = users[8];
  1338. passwords[7] = passwords[8];
  1339. users[8] = users[9];
  1340. passwords[8] = passwords[9];
  1341. users[9] = " ";
  1342. passwords[9] = " ";
  1343. saveAccounts();
  1344. GUI.repaint();
  1345. }
  1346. if (users[3].equals(selectedAccount)) {
  1347. users[3] = users[4];
  1348. passwords[3] = passwords[4];
  1349. users[4] = users[5];
  1350. passwords[4] = passwords[5];
  1351. users[5] = users[6];
  1352. passwords[5] = passwords[6];
  1353. users[6] = users[7];
  1354. passwords[6] = passwords[7];
  1355. users[7] = users[8];
  1356. passwords[7] = passwords[8];
  1357. users[8] = users[9];
  1358. passwords[8] = passwords[9];
Add Comment
Please, Sign In to add comment