Advertisement
Guest User

Untitled

a guest
Mar 24th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 121.20 KB | None | 0 0
  1. import java.util.Calendar;
  2. import java.util.Properties;
  3. import java.text.SimpleDateFormat;
  4. import java.awt.*;
  5. import java.awt.event.*;
  6.  
  7. import javax.swing.*;
  8. import java.awt.geom.Rectangle2D;
  9. import java.awt.image.BufferedImage;
  10. import java.io.BufferedReader;
  11. import java.io.File;
  12. import java.io.FileInputStream;
  13. import java.io.FileNotFoundException;
  14. import java.io.FileWriter;
  15. import java.io.IOException;
  16. import java.io.InputStreamReader;
  17. import java.net.URL;
  18. import java.net.URLConnection;
  19. import java.text.NumberFormat;
  20. import java.text.DecimalFormat;
  21. import javax.imageio.ImageIO;
  22.  
  23. import org.rsbot.event.events.MessageEvent;
  24. import org.rsbot.event.listeners.MessageListener;
  25. import org.rsbot.event.listeners.PaintListener;
  26. import org.rsbot.script.Script;
  27. import org.rsbot.script.ScriptManifest;
  28. import org.rsbot.script.methods.Players;
  29. import org.rsbot.script.methods.Skills;
  30. import org.rsbot.script.wrappers.*;
  31. import org.rsbot.util.GlobalConfiguration;
  32. /**
  33. * @author White Bear
  34. * @copyright (C)2010 White Bear
  35. * No one except White Bear has the right to modify this script!
  36. */
  37. @ScriptManifest(authors = { "WhiteBear" }, keywords = "Hunter AIO Flawless", name = "White Bear Bird Snarer", version = 1.18, description =
  38. "Fast and Flawless script to snare birds", website = "http://whitebearrs.orgfree.com")
  39.  
  40. public class WhiteBearBirdSnarer extends Script implements PaintListener, MessageListener, MouseListener, MouseMotionListener {
  41.  
  42. //------------VARIABLES--------------\\
  43. final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);
  44. WhiteBearPaint thePainter = new WhiteBearPaint();
  45. ChatResponder chatRes;
  46. ChatResponderGUI chatGUI;
  47. LoginBot loginBot = new LoginBot();
  48. Antiban antiban = new Antiban();
  49. BufferedImage normal2 = null;
  50. private Properties WBini = new Properties();
  51.  
  52. private int runEnergy = random(50, 88), lvlAmt = 0, minMS = 4, maxMS = 6;
  53. private int exitStage = 0, camTurned = 0, resCount = 0, waitObj = 0, successObj = 0;
  54. private int midTime = 90, randTime = 120, midLength = 10, randLength = 20;
  55. private int counter = 0, relogAfter = -1, gainedEXP = 0, totalBirds = 0, totalFails = 0, totalExp = 0;
  56. private double exp = 0;
  57. private long stopTime = -1, nextBreak = System.currentTimeMillis(), nextLength = 60000;
  58. private long endTime = System.currentTimeMillis(), nextRun = System.currentTimeMillis();
  59. private boolean unactivated = true, checkedTrap = false, foundType = false, breakLogout = false;
  60. private boolean logOutInfo = false, doRest = false, tradeResponse = false;
  61. private boolean useChatRes = true, useFkeys = true, guiStart = false, chatResGUI = false;
  62. private boolean useBreaking = false, randomBreaking = false, checkUpdates = false, currentlyBreaking = false;
  63. private boolean useRemote = false, doingRemote = false, doRelog = false, logOutR = false;
  64. private boolean useSecond = false, useThird = false, useFourth = false, useFifth = false, buryBones = true;
  65. private String totalTime = "00:00:00", remoteName = "", remoteMsg = "", remoteReply = "", status = "Loading...", colour, lastMessage = null;
  66. private RSTile firstLoc = null, secondLoc = null, thirdLoc = null, fourthLoc = null, fifthLoc = null, dropLoc = null;
  67.  
  68. //------------MAIN LOOP--------------\\
  69. public int loop() {
  70. try{
  71. mouse.setSpeed(random(minMS, maxMS));
  72. if (unactivated) {
  73. activate();
  74. unactivated = false;
  75. }
  76. if (game.getClientState() != 10){
  77. interfaces.getComponent(976,6).doClick();
  78. int i = loginBot.loop();
  79. if (i < 1){
  80. return random(100, 200);
  81. }else{
  82. return i;
  83. }
  84. }
  85. if (counter == 398){
  86. env.saveScreenshot(false);
  87. counter = 397;
  88. }
  89. if (logOutR || exitStage == 2){
  90. doLogOut(false,true);
  91. return 1000;
  92. }
  93. if (stopTime > 0 && System.currentTimeMillis() > stopTime) {
  94. log("Stop Time Reached. Logging off in 5 seconds.");
  95. sleep(random(4950, 5600));
  96. doLogOut(false, true);
  97. }
  98. if (doingRemote){
  99. if (doRelog){
  100. endTime = System.currentTimeMillis() + (relogAfter * 60 * 1000);
  101. doLogOut(false,false);
  102. while (endTime > System.currentTimeMillis()){
  103. sleep(100);
  104. }
  105. doingRemote = false;
  106. }else{
  107. doLogOut(false,true);
  108. return 100;
  109. }
  110. }
  111. if (antiban.breakingCheck() && useBreaking){
  112. long endTime = System.currentTimeMillis() + nextLength;
  113. currentlyBreaking = true;
  114. if (breakLogout) {
  115. doLogOut(true, false);
  116. }
  117. log("Taking a break for " + thePainter.formatTime((int) nextLength));
  118. while (System.currentTimeMillis() < endTime && currentlyBreaking == true){
  119. sleep(1000);
  120. }
  121. currentlyBreaking = false;
  122. loginBot.loop();
  123. antiban.breakingNew();
  124. return 10;
  125. }
  126.  
  127. if (!thePainter.savedStats) {
  128. int level = skills.getCurrentLevel(Skills.HUNTER);
  129. if (level >= 80)
  130. useFifth = true;
  131. if (level >= 60)
  132. useFourth = true;
  133. if (level >= 40)
  134. useThird = true;
  135. if (level >= 20)
  136. useSecond = true;
  137. RSTile loc = getMyPlayer().getLocation();
  138. dropLoc = loc;
  139. firstLoc = new RSTile(loc.getX() + 1, loc.getY());
  140. secondLoc = new RSTile(loc.getX() + 1, loc.getY() - 1);
  141. thirdLoc = new RSTile(loc.getX() + 1, loc.getY() + 1);
  142. fourthLoc = new RSTile(loc.getX(), loc.getY() - 1);
  143. fifthLoc = new RSTile(loc.getX(), loc.getY() + 1);
  144. thePainter.saveStats();
  145. camera.setPitch(true);
  146. return 100;
  147. }
  148.  
  149. // interface checks
  150. interfaces.getComponent(741,9).doClick();
  151. interfaces.getComponent(620,18).doClick();
  152. interfaces.getComponent(109,13).doClick();
  153. interfaces.getComponent(335,19).doClick();
  154.  
  155. if (!checkedTrap) {
  156. if (useFkeys && game.getCurrentTab() != 5){
  157. keyboard.pressKey((char) KeyEvent.VK_F1);
  158. sleep(random(50,110));
  159. keyboard.releaseKey((char) KeyEvent.VK_F1);
  160. sleep(random(100,200));
  161. }
  162. if (inventory.contains(10006)){
  163. checkedTrap = true;
  164. }else{
  165. status = "Traps not Found!";
  166. return random(1000,2000);
  167. }
  168. }
  169. try{
  170. RSPlayer modC = antiban.getNearbyMod();
  171. if (modC != null){
  172. if (System.currentTimeMillis() < chatRes.nextModAlert){
  173. chatRes.nextModAlert += 150000;
  174. log.warning("[MOD] There is a Moderator nearby! Name: " + modC.getName());
  175. }
  176. }
  177. }catch(Exception e){}
  178.  
  179. startRunning(runEnergy);
  180.  
  181. if (calc.distanceTo(dropLoc) > 4){
  182. if (!walking.walkTileMM(dropLoc)){
  183. walking.walkPathMM(walking.findPath(dropLoc));
  184. }
  185. return random(1800,2200);
  186. }
  187. if (getMyPlayer().getAnimation() != -1){
  188. status = "Waiting";
  189. return 100;
  190. }
  191. if (inventory.getCount() >= 26){
  192. emptyInv();
  193. return 100;
  194. }
  195. if (checkTrap(firstLoc))
  196. return 100;
  197. if (useSecond && checkTrap(secondLoc))
  198. return 100;
  199. if (useThird && checkTrap(thirdLoc))
  200. return 100;
  201. if (useFourth && checkTrap(fourthLoc))
  202. return 100;
  203. if (useFifth && checkTrap(fifthLoc))
  204. return 100;
  205. if (drop())
  206. return 100;
  207. status = "Waiting";
  208. if (antiban.lookAway())
  209. return 100;
  210. antiban.main();
  211. return random(57,65);
  212. }catch(java.lang.Throwable t){
  213. return 100;
  214. }
  215. }
  216.  
  217. private boolean checkTrap(RSTile loc){
  218. RSTile l = loc;
  219. if (tileCheck(loc,19175) || tileCheck(loc,waitObj) || tileCheck(loc,19176))
  220. return false;
  221. if (tileCheck(l,successObj)){
  222. status = "Check Trap";
  223. mouse.move(calc.tileToScreen(l,random(0.40,0.54),random(0.48,0.53),0));
  224. if (onTile(l,"Check",random(0.40,0.54),random(0.48,0.53),0)){
  225. int m = 0;
  226. while (getMyPlayer().getAnimation() == -1 && m < 31){
  227. m++;
  228. sleep(50);
  229. if (getMyPlayer().isMoving())
  230. m = 0;
  231. }
  232. }
  233. return true;
  234. }
  235. if (tileCheck(l,19174)){
  236. status = "Dismantle Trap";
  237. mouse.move(calc.tileToScreen(l,random(0.40,0.54),random(0.48,0.53),0));
  238. if (onTile(l,"Dismantle",random(0.40,0.54),random(0.48,0.53),0)){
  239. int m = 0;
  240. while (getMyPlayer().getAnimation() == -1 && m < 31){
  241. m++;
  242. sleep(50);
  243. if (getMyPlayer().isMoving())
  244. m = 0;
  245. }
  246. }
  247. return true;
  248. }
  249. if (itemCheck(l,10006)){
  250. status = "Lay Fallen Trap";
  251. int c = inventory.getCount(10006);
  252. mouse.move(calc.tileToScreen(l,random(0.3,0.7),random(0.4,0.8),0));
  253. if (onTile(l,"Lay",random(0.3,0.7),random(0.4,0.8),0)){
  254. int m = 0;
  255. while (inventory.getCount(10006) == c && m < 31){
  256. m++;
  257. sleep(50);
  258. if (getMyPlayer().isMoving())
  259. m = 0;
  260. }
  261. }
  262. return true;
  263. }
  264. if (inventory.getCount(10006) >= 1){
  265. if (calc.distanceTo(l) > 0){
  266. status = "Walking";
  267. tiles.doAction(calc.getTileOnScreen(l), "Walk");
  268. int m = 0;
  269. while (calc.distanceTo(l) > 0 && m < 31){
  270. m++;
  271. sleep(50);
  272. if (getMyPlayer().isMoving())
  273. m = 0;
  274. }
  275. }
  276. if (calc.distanceTo(l) == 0){
  277. status = "Laying Trap";
  278. inventory.getItem(10006).doAction("Lay");
  279. int m = 0;
  280. while (getMyPlayer().getAnimation() == -1 && m < 31){
  281. m++;
  282. sleep(50);
  283. if (getMyPlayer().isMoving())
  284. m = 0;
  285. }
  286. }
  287. }
  288. return true;
  289. }
  290.  
  291. private boolean drop(){
  292. if (inventory.containsOneOf(526) || inventory.containsOneOf(9978)){
  293. if (!canDrop()){
  294. status = "Walking";
  295. if (onTile(dropLoc, "Walk here",random(0.4,0.8),random(0.4,0.8),0)){
  296. int m = 0;
  297. while (calc.distanceTo(dropLoc) > 0 && m < 31){
  298. m++;
  299. sleep(50);
  300. if (getMyPlayer().isMoving())
  301. m = 0;
  302. }
  303. }
  304. }
  305. }
  306. if (canDrop()){
  307. if (inventory.containsOneOf(526)){
  308. status = buryBones ? "Burying Bones" : "Droping Bones";
  309. inventory.getItem(526).doAction(buryBones ? "Bury" : "Drop");
  310. int m = 0;
  311. while (getMyPlayer().getAnimation() == -1 && m < (buryBones ? 31 : 7)){
  312. m++;
  313. sleep(50);
  314. if (getMyPlayer().isMoving())
  315. m = 0;
  316. }
  317. }
  318. if (inventory.containsOneOf(9978)){
  319. status = "Dropping Meat";
  320. int c = inventory.getCount(9978);
  321. inventory.getItem(9978).doAction("Drop");
  322. int m = 0;
  323. while (inventory.getCount(9978) == c && m < 31){
  324. m++;
  325. sleep(50);
  326. if (getMyPlayer().isMoving())
  327. m = 0;
  328. }
  329. }
  330. }
  331. return false;
  332. }
  333.  
  334. private void emptyInv(){
  335. if (!canDrop()){
  336. status = "Walking";
  337. if (onTile(dropLoc, "Walk here",random(0.4,0.8),random(0.4,0.8),0)){
  338. int m = 0;
  339. while (calc.distanceTo(dropLoc) > 0 && m < 31){
  340. m++;
  341. sleep(50);
  342. if (getMyPlayer().isMoving())
  343. m = 0;
  344. }
  345. }
  346. }
  347. status = buryBones ? "Burying Bones" : "Droping Bones";
  348. for (int i = 0; i < 28; i++){
  349. if (interfaces.getComponent(149, 0).getComponent(i).getComponentID() == 526){
  350. interfaces.getComponent(149, 0).getComponent(i).doAction(buryBones ? "Bury" : "Drop");
  351. sleep(random(600,850));
  352. }
  353. }
  354. status = "Dropping Meat";
  355. for (int i = 0; i < 28; i++){
  356. if (interfaces.getComponent(149, 0).getComponent(i).getComponentID() == 9978){
  357. interfaces.getComponent(149, 0).getComponent(i).doAction("Drop");
  358. sleep(random(200,450));
  359. }
  360. }
  361. }
  362. //--------------ON START--------------\\
  363. public boolean onStart() {
  364. chatRes = new ChatResponder();
  365. chatRes.start();
  366. env.disableRandom("Login");
  367. chatGUI = new ChatResponderGUI();
  368. return true;
  369. }
  370.  
  371. //--------------ON FINISH-------------\\
  372. public void onFinish() {
  373. counter = 405;
  374. chatRes.run = false;
  375. if (game.isLoggedIn() && exitStage < 2 && thePainter.runTime >= 3600000) {
  376. env.saveScreenshot(false);
  377. }
  378. log.info("In just " + totalTime + ", you caught " + totalBirds + " birds, gaining " + totalExp + " Hunter exp.");
  379. }
  380.  
  381. //--------------ON REPAINT------------\\
  382. public void onRepaint(final Graphics g) {
  383. try{
  384. if (game.isLoggedIn()){
  385. final Rectangle nameBlock = new Rectangle(interfaces.get(137).getComponent(54).getAbsoluteX(), interfaces.get(137).getComponent(54).getAbsoluteY()+2, 89, 13);
  386. g.setColor(new Color(211,192,155,253));
  387. try { g.fillRect(nameBlock.x, nameBlock.y, nameBlock.width, nameBlock.height); }catch (Exception e){}
  388. }
  389. g.setFont(new Font("sansserif", Font.PLAIN, 12));
  390. if (thePainter.antialias == true) {
  391. ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  392. ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
  393. ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
  394. }
  395. if (currentlyBreaking){
  396. g.setColor(new Color(0,0,0));
  397. g.setColor(Color.BLACK);
  398. g.setFont(new Font("sansserif", Font.BOLD, 14));
  399. g.drawString("Currently taking a break!",10, 30);
  400. }
  401. if (normal2 != null) {
  402. final int mouse_x = mouse.getLocation().x;
  403. final int mouse_y = mouse.getLocation().y;
  404. g.drawImage(normal2, mouse_x - 8, mouse_y - 8, null);
  405. }
  406. }catch(java.lang.Throwable t){}
  407. try{
  408. if (thePainter.savedStats == true && game.getClientState() == 10) {
  409. thePainter.paint(g);
  410. }
  411. }catch (Exception e){}
  412. }
  413.  
  414. private class WhiteBearPaint {
  415. Rectangle clr1 = new Rectangle(210,43,15,15);
  416. Rectangle clr2 = new Rectangle(227,43,15,15);
  417. Rectangle clr3 = new Rectangle(244,43,15,15);
  418. Rectangle clr4 = new Rectangle(261,43,15,15);
  419. Rectangle clr5 = new Rectangle(278,43,15,15);
  420. Rectangle clr6 = new Rectangle(295,43,15,15);
  421. Rectangle cr1 = new Rectangle(210,61,15,15);
  422. Rectangle toogleRest = new Rectangle(210,79,15,15);
  423. Rectangle logOut = new Rectangle(295,79,55,15);
  424. Rectangle logOut2 = new Rectangle(320,220,200,70);
  425. Rectangle logOutYes = new Rectangle(338,255,80,20);
  426. Rectangle logOutNo = new Rectangle(423,255,80,20);
  427.  
  428. Rectangle r = new Rectangle(7, 345, 408, 114);
  429. Rectangle r1 = new Rectangle(420, 345, 77, 20);
  430. Rectangle r2 = new Rectangle(420, 369, 77, 20);
  431. Rectangle r4 = new Rectangle(420, 415, 77, 20);
  432. Rectangle r5 = new Rectangle(420, 439, 77, 20);
  433. Rectangle r6 = new Rectangle(420, 439, 77, 20);
  434. Rectangle r2c = new Rectangle(415, 369, 5, 20);
  435. Rectangle r4c = new Rectangle(415, 415, 5, 20);
  436. Rectangle r5c = new Rectangle(415, 439, 5, 20);
  437. Rectangle r6c = new Rectangle(415, 439, 5, 20);
  438.  
  439. Rectangle sb1 = new Rectangle(12, 370, 398, 16);
  440. boolean savedStats = false, antialias = false;
  441. int currentTab = 0, lastTab = 0;
  442. int start_exp = 0, start_lvl = 0;
  443. int gained_exp = 0, gained_lvl = 0;
  444. int paintX = 7, paintY = 344;
  445. Point p = new Point(0,0);
  446. Color fonts, normalBack, hiddenPaint, lines;
  447. String font = "sansserif";
  448.  
  449. Thread mouseWatcher = new Thread();
  450. final NumberFormat nf = NumberFormat.getInstance();
  451.  
  452. long time_ScriptStart = System.currentTimeMillis();
  453. long runTime = System.currentTimeMillis() - time_ScriptStart;
  454.  
  455. public void proggiePaint(final Graphics g){
  456. final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
  457. Calendar cal = Calendar.getInstance();
  458. SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
  459. String date = sdf.format(cal.getTime());
  460. if (paintX <= 140 && paintY <= 86){
  461. g.setFont(new Font(font, Font.PLAIN, 12));
  462. g.setColor(normalBack);
  463. g.fillRect(7, 235, 133, 76);
  464. g.setColor(fonts);
  465. g.drawString(date, 17, 257);
  466. g.drawString("Version " + Double.toString(properties.version()), 17, 279);
  467. g.drawString("Hunter Lvl: " + skills.getCurrentLevel(Skills.HUNTER), 17, 301);
  468. }else{
  469. g.setFont(new Font(font, Font.PLAIN, 12));
  470. g.setColor(normalBack);
  471. g.fillRect(7, 10, 133, 76);
  472. g.setColor(fonts);
  473. g.drawString(date, 17, 32);
  474. g.drawString("Version " + Double.toString(properties.version()), 17, 54);
  475. g.drawString("Hunter Lvl: " + skills.getCurrentLevel(Skills.HUNTER), 17, 76);
  476. }
  477. }
  478.  
  479. public void paint(final Graphics g) {
  480. //Redefine locations of all rectangles //
  481. r = new Rectangle(paintX, paintY, 408, 114);
  482. r1 = new Rectangle(paintX + 393, paintY + 117, 15, 18);
  483. r2 = new Rectangle(paintX + 220, paintY + 117, 40, 18);
  484. r4 = new Rectangle(paintX + 264, paintY + 117, 40, 18);
  485. r5 = new Rectangle(paintX + 308, paintY + 117, 30, 18);
  486. r6 = new Rectangle(paintX + 343, paintY + 117, 45, 18);
  487. r2c = new Rectangle(paintX + 220, paintY + 114, 40, 3);
  488. r4c = new Rectangle(paintX + 264, paintY + 114, 40, 3);
  489. r5c = new Rectangle(paintX + 308, paintY + 114, 30, 3);
  490. r6c = new Rectangle(paintX + 343, paintY + 114, 45, 3);
  491.  
  492. sb1 = new Rectangle(paintX + 5, paintY + 25, 398, 16);
  493. clr1 = new Rectangle(paintX + 15, paintY + 43,15,15);
  494. clr2 = new Rectangle(paintX + 32, paintY + 43,15,15);
  495. clr3 = new Rectangle(paintX + 49, paintY + 43,15,15);
  496. clr4 = new Rectangle(paintX + 66, paintY + 43,15,15);
  497. clr5 = new Rectangle(paintX + 83, paintY + 43,15,15);
  498. clr6 = new Rectangle(paintX + 100, paintY + 43,15,15);
  499. cr1 = new Rectangle(paintX + 15, paintY + 61,15,15);
  500. toogleRest = new Rectangle(paintX + 15, paintY + 79,15,15);
  501. logOut = new Rectangle(paintX + 100, paintY + 79,55,15);
  502. //=========================================================//
  503. g.setFont(new Font(font, Font.PLAIN, 12));
  504. if (exitStage == 1) {
  505. g.setColor(new Color(0,0,0,100));
  506. g.fillRect(logOut2.x, logOut2.y, logOut2.width, logOut2.height);
  507. g.setColor(Color.WHITE);
  508. g.drawString("Logout: Are you sure?", logOut2.x + 10, logOut2.y + 22);
  509. g.setColor(Color.RED);
  510. g.fillRect(logOutYes.x, logOutYes.y, logOutYes.width, logOutYes.height);
  511. g.setColor(Color.GREEN);
  512. g.fillRect(logOutNo.x, logOutNo.y, logOutNo.width, logOutNo.height);
  513. g.setColor(Color.BLACK);
  514. g.drawString("YES", logOutYes.x + 28, logOutYes.y + 14);
  515. g.drawString("NO", logOutNo.x + 29, logOutNo.y + 14);
  516. }
  517.  
  518. runTime = System.currentTimeMillis() - time_ScriptStart;
  519. totalTime = formatTime((int) runTime);
  520.  
  521. currentTab = paintTab();
  522.  
  523. NumberFormat formatter = new DecimalFormat("#,###,###");
  524.  
  525. if (game.getClientState() == 10){
  526. gainedEXP = skills.getCurrentExp(Skills.HUNTER) - start_exp;
  527. totalExp = gainedEXP;
  528. totalBirds = (int) ((double) gainedEXP / exp);
  529. }
  530.  
  531. switch(currentTab) {
  532. case -1: //PAINT OFF
  533. g.setColor(hiddenPaint);
  534. g.fillRect(r1.x, r1.y, r1.width, r1.height);
  535. g.setColor(fonts);
  536. drawString(g, "O", r1, 5);
  537. break;
  538. case 0: //DEFAULT TAB - MAIN
  539. drawPaint(g, r2c);
  540. g.setColor(lines);
  541. g.drawLine(r.x + 204, r.y + 22, r.x + 204, r.y + 109);
  542. g.setColor(fonts);
  543. g.setFont(new Font(font, Font.BOLD, 14));
  544. drawString(g, properties.name(), r, -40);
  545. g.setFont(new Font(font, Font.PLAIN, 12));
  546. drawStringMain(g, "Runtime: ", totalTime, r, 20, 35, 0, true);
  547. if (isActive()) {
  548. drawStringMain(g, "", status, r, 20, 35, 0, false);
  549. }else{
  550. drawStringMain(g, "", "Script Paused", r, 20, 35, 0, false);
  551. }
  552. int birdsPerHour = 0;
  553. int failsPerHour = 0;
  554. if ((runTime / 1000) > 0) {
  555. birdsPerHour = (int) ((3600000.0 / (double) runTime) * totalBirds);
  556. failsPerHour = (int) ((3600000.0 / (double) runTime) * totalFails);
  557. }
  558. drawStringMain(g, "Birds Caught:", formatter.format((long) (totalBirds)), r, 20, 35, 2, true);
  559. drawStringMain(g, "Birds / Hour:", formatter.format((long) (birdsPerHour)), r, 20, 35, 3, true);
  560.  
  561. drawStringMain(g, "Failed Traps:", formatter.format((long) (totalFails)), r, 20, 35, 2, false);
  562. drawStringMain(g, "Fails / Hour:", formatter.format((long) (failsPerHour)), r, 20, 35, 3, false);
  563. break;
  564. case 2: //STATS
  565. drawPaint(g, r4c);
  566. g.setColor(lines);
  567. g.drawLine(r.x + 204, r.y + 43, r.x + 204, r.y + 109);
  568. drawStats(g);
  569. g.setColor(fonts);
  570. g.setFont(new Font(font, Font.BOLD, 14));
  571. drawString(g, properties.name(), r, -40);
  572. g.setFont(new Font(font, Font.PLAIN, 12));
  573. final int xpTL = skills.getExpToNextLevel(Skills.HUNTER);
  574. final int xpHour = ((int) ((3600000.0 / (double) runTime) * gained_exp));
  575. final int TTL = (int) (((double) xpTL / (double) xpHour) * 3600000);
  576. drawStringMain(g, "Current Level:", skills.getCurrentLevel(Skills.HUNTER) + "", r, 20, 35, 2, true);
  577. drawStringMain(g, "Level Gained:", gained_lvl + " lvl", r, 20, 35, 3, true);
  578. drawStringMain(g, "Time to Lvl:", formatTime(TTL), r, 20, 35, 4, true);
  579.  
  580. drawStringMain(g, "XP Gained:", formatter.format((long) gained_exp) + "xp", r, 20, 35, 2, false);
  581. drawStringMain(g, "XP / Hour:", formatter.format((long) xpHour) + "xp", r, 20, 35, 3, false);
  582. drawStringMain(g, "XP to Lvl:", formatter.format((long) xpTL) + "xp", r, 20, 35, 4, false);
  583. break;
  584. case 3: //ETC
  585. drawPaint(g, r5c);
  586. g.setColor(lines);
  587. g.drawLine(r.x + 204, r.y + 22, r.x + 204, r.y + 109);
  588. g.setColor(fonts);
  589. g.setFont(new Font(font, Font.BOLD, 14));
  590. drawString(g, properties.name(), r, -40);
  591. g.setFont(new Font(font, Font.PLAIN, 12));
  592. if (useBreaking == true) {
  593. if (randomBreaking == true) {
  594. drawStringMain(g, "Break Distance:", "Random", r, 20, 35, 0, true);
  595. drawStringMain(g, "Break Length:", "Random", r, 20, 35, 1, true);
  596. }else{
  597. drawStringMain(g, "Break Distance:", Integer.toString(midTime) + " ±" + Integer.toString(randTime), r, 20, 35, 0, true);
  598. drawStringMain(g, "Break Length:", Integer.toString(midLength) + " ±" + Integer.toString(randLength), r, 20, 35, 1, true);
  599. }
  600. drawStringMain(g, "Next Break:", (String) formatTime((int) (nextBreak - System.currentTimeMillis())), r, 20, 35, 3, true);
  601. drawStringMain(g, "Break Length:", (String) formatTime((int) nextLength), r, 20, 35, 4, true);
  602. }else{
  603. drawStringMain(g, "Breaking is disabled!", "", r, 20, 35, 0, true);
  604. }
  605. drawStringMain(g, "Version :", properties.version() + "", r, 20, 35, 0, false);
  606. drawStringMain(g, "Camera Turns:", Integer.toString(camTurned), r, 20, 35, 2, false);
  607. if (useChatRes){
  608. drawStringMain(g, "Chat Response:", Integer.toString(resCount), r, 20, 35, 3, false);
  609. }else{
  610. drawStringMain(g, "Chat Responder is disabled!", "", r, 20, 35, 3, false);
  611. }
  612. if (useRemote){
  613. drawStringMain(g, "Remote Control:", "Enabled", r, 20, 35, 4, false);
  614. }else{
  615. drawStringMain(g, "Remote Control is disabled!", "", r, 20, 35, 4, false);
  616. }
  617. break;
  618. case 4:
  619. drawPaint(g, r6c);
  620. g.setColor(lines);
  621. g.drawLine(r.x + 204, r.y + 22, r.x + 204, r.y + 109);
  622. g.setColor(fonts);
  623. g.setFont(new Font(font, Font.BOLD, 14));
  624. drawString(g, properties.name(), r, -40);
  625. g.setFont(new Font(font, Font.PLAIN, 12));
  626. g.setColor(Color.WHITE);
  627. g.drawString("Settings", paintX + 15, paintY + 31);
  628. if (useChatRes == true) {
  629. g.setColor(Color.GREEN);
  630. g.drawString("Chat Responder ON", cr1.x + 19, cr1.y + 13);
  631. } else {
  632. g.setColor(Color.RED);
  633. g.drawString("Chat Responder OFF", cr1.x + 19, cr1.y + 13);
  634. }
  635. g.setColor(new Color(0,0,0,190));
  636. g.fillRect(clr1.x, clr1.y,clr1.width, clr1.height);
  637. g.fillRect(cr1.x, cr1.y, cr1.width, cr1.height);
  638. g.setColor(new Color(0,0,70,190));
  639. g.fillRect(clr2.x, clr2.y,clr2.width, clr2.height);
  640. g.setColor(new Color(0,70,0,190));
  641. g.fillRect(clr3.x, clr3.y,clr3.width, clr3.height);
  642. g.setColor(new Color(65,0,0,190));
  643. g.fillRect(clr4.x, clr4.y,clr4.width, clr4.height);
  644. g.setColor(new Color(65,0,65,190));
  645. g.fillRect(clr5.x, clr5.y,clr5.width, clr5.height);
  646. g.setColor(new Color(82,41,0,190));
  647. g.fillRect(clr6.x, clr6.y,clr6.width, clr6.height);
  648. g.setColor(Color.WHITE);
  649. g.drawString("T", cr1.x + 4, cr1.y + 12);
  650. if (exitStage == 0) {
  651. g.setColor(new Color(0,0,0,160));
  652. g.fillRect(logOut.x, logOut.y, logOut.width, logOut.height);
  653. g.setColor(Color.YELLOW);
  654. g.drawString("Log Out", logOut.x + 6, logOut.y + 12);
  655. }
  656. if (counter < 1){
  657. g.setColor(new Color(0,0,0,160));
  658. g.fillRect(logOut.x + 125, logOut.y, logOut.width + 53, logOut.height);
  659. g.setColor(Color.YELLOW);
  660. g.drawString("Take Screenshot", logOut.x + 131, logOut.y + 12);
  661. }
  662. break;
  663. }
  664. if (counter > 1){
  665. proggiePaint(g);
  666. }
  667. if (counter == 400){
  668. counter = 398;
  669. }
  670. if (counter < 398 && counter > 0){
  671. counter -= 1;
  672. }
  673. }
  674.  
  675. public void saveStats() {
  676. if (skills.getCurrentLevel(Skills.HUNTER) != 0 && game.isLoggedIn()) {
  677. nf.setMinimumIntegerDigits(2);
  678. final int stats = Skills.HUNTER;
  679. start_exp = skills.getCurrentExp(stats);
  680. start_lvl = skills.getCurrentLevel(stats);
  681. savedStats = true;
  682. }
  683. }
  684.  
  685. public int paintTab() {
  686. final Point mouse1 = new Point(p);
  687. if (mouseWatcher.isAlive())
  688. return currentTab;
  689. if (thePainter.currentTab == 4 && game.isLoggedIn() == true) {
  690. if (clr1.contains(mouse1)) {
  691. colour = "Black";
  692. setColour();
  693. }
  694. if (clr2.contains(mouse1)) {
  695. colour = "Blue";
  696. setColour();
  697. }
  698. if (clr3.contains(mouse1)) {
  699. colour = "Green";
  700. setColour();
  701. }
  702. if (clr4.contains(mouse1)) {
  703. colour = "Red";
  704. setColour();
  705. }
  706. if (clr5.contains(mouse1)) {
  707. colour = "Purple";
  708. setColour();
  709. }
  710. if (clr6.contains(mouse1)) {
  711. colour = "Brown";
  712. setColour();
  713. }
  714. if (cr1.contains(mouse1)) {
  715. mouseWatcher = new Thread(new MouseWatcher(cr1));
  716. mouseWatcher.start();
  717. if (useChatRes == true) {
  718. useChatRes = false;
  719. } else {
  720. useChatRes = true;
  721. }
  722. }
  723. if (toogleRest.contains(mouse1)){
  724. mouseWatcher = new Thread(new MouseWatcher(toogleRest));
  725. mouseWatcher.start();
  726. if (doRest == false){
  727. doRest = true;
  728. }else{
  729. doRest = false;
  730. }
  731. }
  732. }
  733. if (r1.contains(mouse1)) {
  734. mouseWatcher = new Thread(new MouseWatcher(r1));
  735. mouseWatcher.start();
  736. if (currentTab == -1) {
  737. return lastTab;
  738. } else {
  739. lastTab = currentTab;
  740. return -1;
  741. }
  742. }
  743. if (currentTab == -1)
  744. return currentTab;
  745. if (r2.contains(mouse1))
  746. return 0;
  747. if (r4.contains(mouse1))
  748. return 2;
  749. if (r5.contains(mouse1))
  750. return 3;
  751. if (r6.contains(mouse1))
  752. return 4;
  753. return currentTab;
  754. }
  755.  
  756. public void drawPaint(final Graphics g, final Rectangle rect) {
  757. g.setColor(normalBack);
  758. g.fillRect(r1.x, r1.y, r1.width, r1.height);
  759. g.fillRect(r2.x, r2.y, r2.width, r2.height);
  760. g.fillRect(r4.x, r4.y, r4.width, r4.height);
  761. g.fillRect(r5.x, r5.y, r5.width, r5.height);
  762. g.fillRect(r6.x, r6.y, r6.width, r6.height);
  763. g.fillRect(rect.x, rect.y, rect.width, rect.height);
  764. g.fillRect(r.x, r.y, r.width, r.height);
  765. g.setColor(fonts);
  766. g.setFont(new Font(font, Font.PLAIN, 10));
  767. drawString(g, "X", r1, 4);
  768. drawString(g, "Main", r2, 4);
  769. drawString(g, "Stats", r4, 4);
  770. drawString(g, "Etc", r5, 4);
  771. drawString(g, "Setting", r6, 4);
  772. g.setColor(normalBack);
  773. }
  774.  
  775. public void drawStat(final Graphics g, final int index, final int count) {
  776. g.setFont(new Font(font, Font.PLAIN, 11));
  777. g.setColor(new Color(97, 97, 97, 185));
  778. int half = sb1.height / 2;
  779. g.fillRect(sb1.x, sb1.y, sb1.width, half);
  780. g.setColor(new Color(60, 60, 60, 185));
  781. g.fillRect(sb1.x, sb1.y + half, sb1.width, half);
  782. final int percent = skills.getPercentToNextLevel(Skills.HUNTER);
  783. g.setColor(new Color(255 - 2 * percent, (int) (1.7 * percent), 0, 150));
  784. g.fillRect(sb1.x + 2, sb1.y + 2, (int) (((double) (sb1.width - 4) / 100.0) * (double) percent), sb1.height - 4);
  785. g.setColor(Color.WHITE);
  786. g.drawString("Hunter", sb1.x + 3, sb1.y + 12);
  787. drawStringEnd(g, percent + "%", sb1, -3, 4);
  788. }
  789.  
  790. public void drawStats(final Graphics g) {
  791. if (savedStats == true) {
  792. final int stats = Skills.HUNTER;
  793. gained_exp = skills.getCurrentExp(stats) - start_exp;
  794. gained_lvl = skills.getCurrentLevel(stats) - start_lvl;
  795. drawStat(g,1,1);
  796. }
  797. }
  798.  
  799. public void setColour() {
  800. if (colour.equals("Blue")) {
  801. fonts = Color.YELLOW;
  802. normalBack = new Color(0,0,70,230);
  803. hiddenPaint = new Color(0,0,70,120);
  804. lines = new Color(19,51,200,200);
  805. } else if (colour.equals("Green")) {
  806. fonts = Color.YELLOW;
  807. normalBack = new Color(0,70,0,230);
  808. hiddenPaint = new Color(0,70,0,120);
  809. lines = new Color(19,200,51,200);
  810. } else if (colour.equals("Red")) {
  811. fonts = Color.YELLOW;
  812. normalBack = new Color(65,0,0,230);
  813. hiddenPaint = new Color(65,0,0,120);
  814. lines = new Color(205,0,0,200);
  815. } else if (colour.equals("Purple")) {
  816. fonts = new Color(255,122,224,250);
  817. normalBack = new Color(65,0,65,230);
  818. hiddenPaint = new Color(65,0,65,120);
  819. lines = new Color(180,0,180,200);
  820. } else if (colour.equals("Brown")) {
  821. fonts = new Color(51,204,0,250);
  822. normalBack = new Color(82,41,0,230);
  823. hiddenPaint = new Color(82,41,0,120);
  824. lines = new Color(142,91,0,200);
  825. } else {
  826. fonts = Color.WHITE;
  827. normalBack = new Color(0,0,0,230);
  828. hiddenPaint = new Color(0,0,0,130);
  829. lines = new Color(100,100,100,200);
  830. }
  831. }
  832.  
  833. public void drawString(final Graphics g, final String str, final Rectangle rect, final int offset) {
  834. final FontMetrics font = g.getFontMetrics();
  835. final Rectangle2D bounds = font.getStringBounds(str, g);
  836. final int width = (int) bounds.getWidth();
  837. g.drawString(str, rect.x + ((rect.width - width) / 2), rect.y + ((rect.height / 2) + offset));
  838. }
  839.  
  840. public void drawStringEnd(final Graphics g, final String str, final Rectangle rect, final int xOffset, final int yOffset) {
  841. final FontMetrics font = g.getFontMetrics();
  842. final Rectangle2D bounds = font.getStringBounds(str, g);
  843. final int width = (int) bounds.getWidth();
  844. g.drawString(str, (rect.x + rect.width) - width + xOffset, rect.y + ((rect.height / 2) + yOffset));
  845. }
  846.  
  847. public void drawStringMain(final Graphics g, final String str, final String val, final Rectangle rect, final int xOffset, final int yOffset, final int index, final boolean leftSide) {
  848. final FontMetrics font = g.getFontMetrics();
  849. final Rectangle2D bounds = font.getStringBounds(val, g);
  850. final int indexMult = 17;
  851. final int width = (int) bounds.getWidth();
  852. if (leftSide) {
  853. g.drawString(str, rect.x + xOffset, rect.y + yOffset + (index * indexMult));
  854. g.drawString(val, rect.x + (rect.width / 2) - width - xOffset, rect.y + yOffset + (index * indexMult));
  855. } else {
  856. g.drawString(str, rect.x + (rect.width / 2) + xOffset, rect.y + yOffset + (index * indexMult));
  857. g.drawString(val, rect.x + rect.width - width - xOffset, rect.y + yOffset + (index * indexMult));
  858. }
  859. }
  860.  
  861. public String formatTime(final int milliseconds) {
  862. final long t_seconds = milliseconds / 1000;
  863. final long t_minutes = t_seconds / 60;
  864. final long t_hours = t_minutes / 60;
  865. final int seconds = (int) (t_seconds % 60);
  866. final int minutes = (int) (t_minutes % 60);
  867. final int hours = (int) (t_hours % 60);
  868. return (nf.format(hours) + ":" + nf.format(minutes) + ":" + nf.format(seconds));
  869. }
  870.  
  871. public class MouseWatcher implements Runnable {
  872.  
  873. Rectangle rect = null;
  874.  
  875. MouseWatcher(final Rectangle rect) {
  876. this.rect = rect;
  877. }
  878.  
  879. public void run() {
  880. Point mouse1 = new Point(p);
  881. while (rect.contains(mouse1)) {
  882. try {
  883. mouse1 = new Point(p);
  884. Thread.sleep(50);
  885. } catch(Exception e) { }
  886. }
  887. }
  888. }
  889. }
  890.  
  891. //--------------SERVER MSG------------\\
  892. public void messageReceived(MessageEvent arg0) {
  893. try{
  894. String serverString = arg0.getMessage();
  895. if (arg0.getID() > 0 && arg0.getID() < 10)
  896. return;
  897. if (serverString.contains("You've just advanced")) {
  898. if (lvlAmt == 0){
  899. log("[Alert] You have just leveled, thanks to White Bear Bird Snarer!");
  900. }else{
  901. if (random(1,3) == 1){
  902. log("[Alert] Another level by White Bear Bird Snarer!");
  903. }else{
  904. log("[Alert] Congratulations! Your Hunter skill have just leveled!");
  905. }
  906. }
  907. lvlAmt += 1;
  908. }
  909. if (serverString.contains("Oh dear")) {
  910. log.severe("[Alert] You were killed! Aborting script!");
  911. logOutR = true;
  912. }
  913. if (serverString.contains("wishes to trade with you")) {
  914. tradeResponse = true;
  915. }
  916. if (serverString.contains("System update in") && !serverString.contains(":")) {
  917. log.warning("There will be a system update soon, so we logged out");
  918. logOutR = true;
  919. }
  920. if (serverString.contains("dismantle the trap") && !serverString.contains(":")) {
  921. totalFails++;
  922. }
  923. if (serverString.contains("that you laid has fallen over") && !serverString.contains(":")) {
  924. totalFails++;
  925. }
  926. if (serverString.contains("Welcome to ScapeRune") && !serverString.contains(":")) {
  927. // log.severe("[Alert] A cat just kidnapped you! Stopping script and logging you out!");
  928. // logOutR = true;
  929. }
  930. }catch(java.lang.Throwable t){}
  931. }
  932.  
  933. //---------------ANTIBAN--------------\\
  934. private class Antiban {
  935. int moveMouseB = 75;
  936. int allRand = 21, cam = 27, skill = 45, player = 18, friend = 61;
  937. boolean checkFriend = false, checkExperience = true, screenLookaway = false;
  938.  
  939. //Antiban timeouts and next times
  940. long timeOutB1 = 20000, timeOutB2 = 50000;
  941. long timeFriend = System.currentTimeMillis(), timeExp = System.currentTimeMillis();
  942. long timeLook = System.currentTimeMillis();
  943. long timeOutFriend = 20000, timeOutExp = 20000;
  944.  
  945. private void main() {
  946. mouse.setSpeed(random(minMS + 1, maxMS + 1));
  947. if (!chatRes.typing){
  948. if(nextRun < System.currentTimeMillis() && walking.getEnergy() >= random(79,90)){
  949. nextRun = System.currentTimeMillis() + 7000;
  950. walking.setRun(true);
  951. sleep(100);
  952. }
  953. int random = random(1, allRand);
  954. if (random == 1) {
  955. if (random(1,3) == 1){
  956. chatRes.wait = true;
  957. mouse.move(random(5, game.getWidth()), random(5, game.getHeight()));
  958. chatRes.wait = false;
  959. }
  960. }
  961. if (random == 2){
  962. int randCamera = random(1,cam);
  963. if (randCamera <= 4){
  964. camTurned += 1;
  965. chatRes.wait = true;
  966. turnCamera();
  967. chatRes.wait = false;
  968. }
  969. }
  970. if (checkExperience && random == 6){
  971. if(System.currentTimeMillis() > timeExp && random(1,skill) == 1 && getMyPlayer().getAnimation() != -1){
  972. if(game.getCurrentTab() != 1){
  973. chatRes.wait = true;
  974. game.openTab(1);
  975. Point stats = new Point(interfaces.get(320).getComponent(136).getAbsoluteX()+20,interfaces.get(320).getComponent(136).getAbsoluteY()+10);
  976. mouse.move(stats,5,5);
  977. sleepCR(random(28,31));
  978. timeExp = System.currentTimeMillis() + (long) random(timeOutExp - 1500, timeOutExp + 1500);
  979. chatRes.wait = false;
  980. }
  981. }
  982. }
  983. if (random == 7){
  984. if (random(0,2) == 0){
  985. if (checkFriend && System.currentTimeMillis() > timeFriend && random(1,friend) == 1){
  986. if (getMyPlayer().getAnimation() != -1 || (getMyPlayer().isMoving() && calc.distanceTo(walking.getDestination()) > 5)){
  987. chatRes.wait = true;
  988. game.openTab(9);
  989. sleepCR(random(18,25));
  990. timeFriend = System.currentTimeMillis() + (long) random(timeOutFriend - 1500, timeOutFriend + 1500);
  991. chatRes.wait = false;
  992. }
  993. }
  994. }
  995. }
  996. if (random == 8){
  997. final int chance2 = random(1,player);
  998. if(chance2 == 1){
  999. RSPlayer player = players.getNearest(Players.ALL_FILTER);
  1000. if (player != null && calc.distanceTo(player) != 0) {
  1001. chatRes.wait = true;
  1002. mouse.move(player.getScreenLocation(), 5, 5);
  1003. sleepCR(random(6,9));
  1004. mouse.click(false);
  1005. sleepCR(random(15,17));
  1006. mouse.move(random(10, 450), random(10, 495));
  1007. chatRes.wait = false;
  1008. }
  1009. }
  1010. }
  1011. }
  1012. mouse.setSpeed(random(minMS, maxMS));
  1013. }
  1014.  
  1015. private void turnCamera(){
  1016. final char[] LR = new char[] { KeyEvent.VK_LEFT,
  1017. KeyEvent.VK_RIGHT };
  1018. final int randomLR = random(0, 2);
  1019. final int randomAll = random(0, 4);
  1020.  
  1021. if (random(0, 3) == 0) {
  1022. keyboard.pressKey(LR[randomLR]);
  1023. sleepCR(random(2,9));
  1024. keyboard.releaseKey(LR[randomLR]);
  1025. } else {
  1026. keyboard.pressKey(LR[randomLR]);
  1027. if (randomAll > 1) {
  1028. sleepCR(random(6,11));
  1029. } else {
  1030. sleepCR(random(9,12));
  1031. }
  1032. keyboard.releaseKey(LR[randomLR]);
  1033. }
  1034. }
  1035.  
  1036. private boolean lookAway(){
  1037. if (!chatRes.typing && screenLookaway && timeLook < System.currentTimeMillis() && random(0,111) == 0 && canSlack()){
  1038. chatRes.pause = true;
  1039. status = "Antiban";
  1040. if (random(0,moveMouseB) <= 50){
  1041. mouse.setSpeed(random(3,5));
  1042. mouse.move(random(40,game.getWidth() - 50), game.getHeight());
  1043. mouse.setSpeed(random(minMS, maxMS));
  1044. }
  1045. int r1 = random(0,101);
  1046. if (!foundType)
  1047. r1 = 1;
  1048. int to = 0;
  1049. if (!inventory.isFull()){
  1050. int m = 0;
  1051. while (valid() && canSlack() && m < 801){
  1052. m++;
  1053. sleep(100);
  1054. }
  1055. if (r1 > 57){
  1056. to = random(400,1500);
  1057. sleep(to);
  1058. }
  1059. log.info("[Antiban] Simulated looking away from screen, waited an extra " + to + " ms.");
  1060. timeLook = (long) (System.currentTimeMillis() + random(timeOutB1, timeOutB2));
  1061. }
  1062. chatRes.pause = false;
  1063. return true;
  1064. }
  1065. return false;
  1066. }
  1067.  
  1068. private RSPlayer getNearbyMod() {
  1069. RSPlayer[] modCheck = players.getAll();
  1070. int Dist = 18;
  1071. RSPlayer closest = null;
  1072. int element = 0;
  1073. int size = modCheck.length;
  1074. while (element < size) {
  1075. if (modCheck[element] != null) {
  1076. try {
  1077. if (modCheck[element].getName().startsWith("Mod")) {
  1078. int distance = calc.distanceTo(modCheck[element]);
  1079. if (distance < Dist) {
  1080. Dist = distance;
  1081. closest = modCheck[element];
  1082. }
  1083. }
  1084. } catch (Exception ignored) {
  1085. }
  1086. }
  1087. element += 1;
  1088. }
  1089. return closest;
  1090. }
  1091.  
  1092. private void breakingNew(){
  1093. if (randomBreaking){
  1094. long varTime = random(7200000,18000000);
  1095. nextBreak = System.currentTimeMillis() + varTime;
  1096. long varLength = random(120000,600000);
  1097. nextLength = varLength;
  1098. }else{
  1099. int diff = randTime * 1000 * 60;
  1100. long varTime = random((midTime * 1000 * 60) - diff, (midTime * 1000 * 60) + diff);
  1101. nextBreak = System.currentTimeMillis() + varTime;
  1102. int diff2 = randLength * 1000 * 60;
  1103. long varLength = random((midLength * 1000 * 60) - diff2, (midLength * 1000 * 60) + diff2);
  1104. nextLength = varLength;
  1105. }
  1106. }
  1107.  
  1108. private boolean breakingCheck(){
  1109. if (nextBreak <= System.currentTimeMillis()){
  1110. return true;
  1111. }
  1112. return false;
  1113. }
  1114.  
  1115. private boolean personalize() {
  1116. try {
  1117. WBini.load(new FileInputStream(new File(GlobalConfiguration.Paths.getSettingsDirectory(),"WhiteBearBirdSnarer.ini")));
  1118. } catch (java.lang.Exception e) {}
  1119. if (WBini.getProperty("ABallRand") == null)
  1120. WBini.setProperty("ABallRand", Integer.toString(random(20,23)));
  1121. if (WBini.getProperty("ABcam") == null)
  1122. WBini.setProperty("ABcam", Integer.toString(random(26,29)));
  1123. if (WBini.getProperty("ABskill") == null)
  1124. WBini.setProperty("ABskill", Integer.toString(random(44,49)));
  1125. if (WBini.getProperty("ABplayer") == null)
  1126. WBini.setProperty("ABplayer", Integer.toString(random(19,23)));
  1127. if (WBini.getProperty("ABfriend") == null)
  1128. WBini.setProperty("ABfriend", Integer.toString(random(59,69)));
  1129.  
  1130. if (WBini.getProperty("ABtimeOutFriend") == null)
  1131. WBini.setProperty("ABtimeOutFriend", Integer.toString(random(33000,60000)));
  1132. if (WBini.getProperty("ABtimeOutExp") == null)
  1133. WBini.setProperty("ABtimeOutExp", Integer.toString(random(25000,50000)));
  1134.  
  1135. if (WBini.getProperty("ABmoveMouseB") == null)
  1136. WBini.setProperty("ABmoveMouseB", Integer.toString(random(55,105)));
  1137. try {
  1138. WBini.store(new FileWriter(new File(GlobalConfiguration.Paths.getSettingsDirectory(),
  1139. "WhiteBearBirdSnarer.ini")),
  1140. "The GUI Settings for White Bear Bird Snarer (Version: " + Double.toString(properties.version()) + ")");
  1141. } catch (java.lang.Exception e) {
  1142. log.severe("[ERROR] Could not save settings file!");
  1143. return false;
  1144. }
  1145. boolean load = antiban.load();
  1146. while (!load){
  1147. load = antiban.load();
  1148. }
  1149. return true;
  1150. }
  1151.  
  1152. private boolean load() {
  1153. try {
  1154. WBini.load(new FileInputStream(new File(GlobalConfiguration.Paths.getSettingsDirectory(),"WhiteBearBirdSnarer.ini")));
  1155. } catch (java.lang.Exception e) {
  1156. log.severe("[ERROR] Could not load settings file!");
  1157. return false;
  1158. }
  1159. if (WBini.getProperty("ABallRand") != null)
  1160. allRand = Integer.parseInt(WBini.getProperty("ABallRand"));
  1161. if (WBini.getProperty("ABcam") != null)
  1162. cam = Integer.parseInt(WBini.getProperty("ABcam"));
  1163. if (WBini.getProperty("ABskill") != null)
  1164. skill = Integer.parseInt(WBini.getProperty("ABskill"));
  1165. if (WBini.getProperty("ABplayer") != null)
  1166. player = Integer.parseInt(WBini.getProperty("ABplayer"));
  1167. if (WBini.getProperty("ABfriend") != null)
  1168. friend = Integer.parseInt(WBini.getProperty("ABfriend"));
  1169. if (WBini.getProperty("ABtimeOutFriend") != null)
  1170. timeOutFriend = Integer.parseInt(WBini.getProperty("ABtimeOutFriend"));
  1171. if (WBini.getProperty("ABtimeOutExp") != null)
  1172. timeOutExp = Integer.parseInt(WBini.getProperty("ABtimeOutExp"));
  1173. if (WBini.getProperty("ABmoveMouseB") != null)
  1174. moveMouseB = Integer.parseInt(WBini.getProperty("ABmoveMouseB"));
  1175. return true;
  1176. }
  1177.  
  1178. private boolean sleepCR(int amtOfHalfSecs){
  1179. for (int x = 0; x < (amtOfHalfSecs + 1); x++){
  1180. sleep(random(48,53));
  1181. if (chatRes.typing){
  1182. return false;
  1183. }
  1184. }
  1185. return true;
  1186. }
  1187. }
  1188.  
  1189. //--------------METHODS---------------\\
  1190. private void activate() {
  1191. if (!game.isFixed()){
  1192. log.warning("Your screen size is not Fixed!");
  1193. log.warning("The script will encounter problems if you don't change it to fixed!");
  1194. }
  1195. WhiteBearGUI gui = new WhiteBearGUI();
  1196. gui.WhiteBearGUI.setVisible(true);
  1197. while (!guiStart) {
  1198. sleep(100);
  1199. }
  1200. gui = null;
  1201. thePainter.setColour();
  1202. if (stopTime > 0){
  1203. log.info("Script will stop after " + thePainter.formatTime((int) stopTime));
  1204. long stoppingTime = stopTime + System.currentTimeMillis();
  1205. stopTime = stoppingTime;
  1206. }
  1207. if(checkUpdates == true){
  1208. URLConnection url = null;
  1209. BufferedReader in = null;
  1210. try{
  1211. url = new URL("http://whitebearrs.orgfree.com/content/newapi/snareV.txt").openConnection();
  1212. in = new BufferedReader(new InputStreamReader(url.getInputStream()));
  1213. String ver = in.readLine();
  1214. if(Double.parseDouble(ver) > properties.version()) {
  1215. log.warning("Latest version: " + ver + "! Please update the script!");
  1216. } else if (Double.parseDouble(ver) < properties.version()) {
  1217. log.info("You are using a beta version of this script!");
  1218. } else {
  1219. log.info("You are using the latest version of this script!");
  1220. }
  1221. if(in != null)
  1222. in.close();
  1223. } catch (java.lang.Exception e){
  1224. log.warning("An error occurred while checking for update!");
  1225. }
  1226. }
  1227. try {
  1228. final URL cursorURL2 = new URL("http://i31.tinypic.com/bge6nc.png");
  1229. normal2 = ImageIO.read(cursorURL2);
  1230. } catch (java.lang.Exception e) {
  1231. log.warning("Unable to load cursor images.");
  1232. }
  1233. antiban.breakingNew();
  1234. boolean per = antiban.personalize();
  1235. while (!per){
  1236. per = antiban.personalize();
  1237. }
  1238. if (!game.isLoggedIn()){
  1239. loginBot.loop();
  1240. }
  1241. thePainter.time_ScriptStart = System.currentTimeMillis();
  1242. }
  1243.  
  1244. private boolean canDrop(){
  1245. if (calc.distanceTo(dropLoc) == 0){
  1246. return true;
  1247. }
  1248. if (!useFourth && calc.distanceTo(fourthLoc) == 0){
  1249. return true;
  1250. }
  1251. if (!useFifth && calc.distanceTo(fifthLoc) == 0){
  1252. return true;
  1253. }
  1254. if (getMyPlayer().getLocation().getX() == dropLoc.getX()){
  1255. return true;
  1256. }
  1257. return false;
  1258. }
  1259. private boolean canSlack(){
  1260. if (useFifth){
  1261. if (!(tileCheck(fifthLoc,19175) && tileCheck(fifthLoc,waitObj) && tileCheck(fifthLoc,19176)))
  1262. return false;
  1263. }
  1264. if (useFourth){
  1265. if (!(tileCheck(fourthLoc,19175) && tileCheck(fourthLoc,waitObj) && tileCheck(fourthLoc,19176)))
  1266. return false;
  1267. }
  1268. if (useThird){
  1269. if (!(tileCheck(thirdLoc,19175) && tileCheck(thirdLoc,waitObj) && tileCheck(thirdLoc,19176)))
  1270. return false;
  1271. }
  1272. if (useSecond){
  1273. if (!(tileCheck(secondLoc,19175) && tileCheck(secondLoc,waitObj) && tileCheck(secondLoc,19176)))
  1274. return false;
  1275. }
  1276. if (!(tileCheck(firstLoc,19175) && tileCheck(firstLoc,waitObj) && tileCheck(firstLoc,19176)))
  1277. return false;
  1278. return true;
  1279. }
  1280. private boolean tileCheck(RSTile loc, int obj){
  1281. RSObject[] objs = objects.getAllAt(loc);
  1282. if (objs == null){
  1283. return false;
  1284. }
  1285. for (int i = 0; i < objs.length; i++) {
  1286. if (objs[i].getID() == obj) {
  1287. return true;
  1288. }
  1289. }
  1290. return false;
  1291. }
  1292. private boolean itemCheck(RSTile loc, int item){
  1293. RSGroundItem[] items = groundItems.getAllAt(loc);
  1294. if (items == null){
  1295. return false;
  1296. }
  1297. for (int i = 0; i < items.length; i++) {
  1298. if (items[i].getItem().getID() == item) {
  1299. return true;
  1300. }
  1301. }
  1302. return false;
  1303. }
  1304. private boolean doLogOut(boolean toLobby, boolean stopScript) {
  1305. status = "Logging out";
  1306. while (bank.isOpen()) {
  1307. bank.close();
  1308. mouse.move(random(10, 430), random(10, 465));
  1309. sleep(random(200, 400));
  1310. }
  1311. while (!game.isOnLogoutTab()) {
  1312. mouse.move(random(game.getWidth() - 15, game.getWidth() - 5), random(5,16));
  1313. mouse.click(true);
  1314. if (bank.isOpen()){
  1315. bank.close();
  1316. }
  1317. int timesToWait = 0;
  1318. while (!game.isOnLogoutTab() && timesToWait < 5) {
  1319. sleep(random(200, 400));
  1320. timesToWait++;
  1321. }
  1322. }
  1323. int maximum = 0;
  1324. while (game.isLoggedIn() == true && maximum < 20){
  1325. if (toLobby){
  1326. interfaces.get(182).getComponent(2).doClick();
  1327. }else{
  1328. interfaces.get(182).getComponent(6).doClick();
  1329. }
  1330. sleep(1000);
  1331. }
  1332. if (!toLobby && stopScript){
  1333. stopScript(false);
  1334. }
  1335. return true;
  1336. }
  1337.  
  1338. private boolean onTile(final RSTile tile, final String action,
  1339. final double dx, final double dy, final int height) {
  1340. Point checkScreen;
  1341. try {
  1342. checkScreen = calc.tileToScreen(tile, dx, dy, height);
  1343. if (!calc.pointOnScreen(checkScreen)) {
  1344. if (calc.distanceTo(tile) <= 8) {
  1345. if (getMyPlayer().isMoving()) {
  1346. return false;
  1347. }
  1348. walking.walkTileMM(tile);
  1349. walking.sleep(1000);
  1350. return false;
  1351. }
  1352. return false;
  1353. }
  1354. } catch (final Exception e) {}
  1355. try {
  1356. boolean stop = false;
  1357. for (int i = 0; i <= 50; i++) {
  1358. checkScreen = calc.tileToScreen(tile, dx, dy, height);
  1359. if (!calc.pointOnScreen(checkScreen)) {
  1360. return false;
  1361. }
  1362. mouse.move(checkScreen);
  1363. final Object[] menuItems = menu.getItems();
  1364. for (int a = 0; a < menuItems.length; a++) {
  1365. if (menuItems[a].toString().toLowerCase().contains(action.toLowerCase())) {
  1366. stop = true;
  1367. break;
  1368. }
  1369. }
  1370. if (stop) {
  1371. break;
  1372. }
  1373. }
  1374. } catch (final Exception e) {}
  1375. try {
  1376. return menu.doAction(action);
  1377. } catch (final Exception e) {}
  1378. return false;
  1379. }
  1380.  
  1381. private void startRunning(final int energy) {
  1382. if (nextRun < System.currentTimeMillis() && walking.getEnergy() >= energy && !walking.isRunEnabled()) {
  1383. nextRun = System.currentTimeMillis() + 7000;
  1384. runEnergy = random(40, 95);
  1385. walking.setRun(true);
  1386. sleep(random(400, 600));
  1387. }
  1388. }
  1389.  
  1390. private boolean valid(){
  1391. return game.isLoggedIn();
  1392. }
  1393.  
  1394. //-----------MOUSE LISTENER-----------\\
  1395. public void mouseClicked(MouseEvent arg0) {}
  1396. public void mouseEntered(MouseEvent arg0) {}
  1397. public void mouseExited(MouseEvent arg0) {}
  1398. public void mouseReleased(MouseEvent arg0) {}
  1399.  
  1400. public void mouseMoved(MouseEvent e) {
  1401. thePainter.p = e.getPoint();
  1402. }
  1403.  
  1404. public void mouseDragged(MouseEvent arg0) {
  1405. Point p = arg0.getPoint();
  1406. processPaint(p);
  1407. }
  1408.  
  1409. public void mousePressed(MouseEvent e) {
  1410. Point p = e.getPoint();
  1411. processPaint(p);
  1412.  
  1413. if (thePainter.logOutYes.contains(p) && exitStage == 1) {
  1414. exitStage = 2;
  1415. if (logOutInfo == false) {
  1416. log("You will be logged out when the current loop ends (i.e. in a while)");
  1417. logOutInfo = true;
  1418. }
  1419. }
  1420. if (thePainter.logOutNo.contains(p) && exitStage == 1) {
  1421. exitStage = 0;
  1422. }
  1423. if (thePainter.logOut.contains(p) && exitStage == 0 && thePainter.currentTab == 4) {
  1424. thePainter.currentTab = 0;
  1425. exitStage = 1;
  1426. }
  1427. if (thePainter.currentTab == 4 && counter == 0 && new Rectangle(thePainter.logOut.x + 125, thePainter.logOut.y,
  1428. thePainter.logOut.width + 53, thePainter.logOut.height).contains(p)){
  1429. thePainter.currentTab = 0;
  1430. counter = 400;
  1431. }
  1432. }
  1433.  
  1434. private void processPaint(Point mouse){
  1435. Point p = mouse;
  1436. int totalWidth = 408, totalHeight = 135, moveHeight = 114;
  1437. int mouseX = p.x;
  1438. int mouseY = p.y;
  1439. if (game.getClientState() == 10 && (mouseX >= thePainter.paintX && mouseX <= (thePainter.paintX + totalWidth)
  1440. && mouseY >= thePainter.paintY && mouseY <= (thePainter.paintY + moveHeight)))
  1441. if (thePainter.currentTab != -1 && thePainter.currentTab != 4) {
  1442. thePainter.paintX = mouseX - (totalWidth / 2);
  1443. thePainter.paintY = mouseY - (totalHeight / 2);
  1444. }
  1445. if (thePainter.paintX < 4)
  1446. thePainter.paintX = 4;
  1447. if (thePainter.paintY < 4)
  1448. thePainter.paintY = 4;
  1449. if ((thePainter.paintX + totalWidth) > 761)
  1450. thePainter.paintX = 761 - totalWidth;
  1451. if ((thePainter.paintY + totalHeight) > 494)
  1452. thePainter.paintY = 494 - totalHeight;
  1453. }
  1454.  
  1455. //---------------LOGINBOT-------------\\
  1456. private class LoginBot{
  1457. private static final int INTERFACE_MAIN = 905;
  1458. private static final int INTERFACE_MAIN_CHILD = 59;
  1459. private static final int INTERFACE_MAIN_CHILD_COMPONENT_ID = 4;
  1460. private static final int INTERFACE_LOGIN_SCREEN = 596;
  1461. private static final int INTERFACE_USERNAME = 65;
  1462. private static final int INTERFACE_USERNAME_WINDOW = 37;
  1463. private static final int INTERFACE_PASSWORD = 71;
  1464. private static final int INTERFACE_PASSWORD_WINDOW = 39;
  1465. private static final int INTERFACE_BUTTON_LOGIN = 42;
  1466. private static final int INTERFACE_TEXT_RETURN = 11;
  1467. private static final int INTERFACE_BUTTON_BACK = 55;
  1468. private static final int INTERFACE_WELCOME_SCREEN = 906;
  1469. private static final int INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_1 = 145;
  1470. private static final int INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_2 = 155;
  1471. private static final int INTERFACE_WELCOME_SCREEN_TEXT_RETURN = 221;
  1472.  
  1473. static final int INDEX_LOGGED_OUT = 3;
  1474. static final int INDEX_LOBBY = 7;
  1475. int worldFullCount = 0, invalidCount = 0;
  1476.  
  1477. private int loop() {
  1478. interfaces.getComponent(976,6).doClick();
  1479. String username = account.getName().replaceAll("_", " ").toLowerCase().trim();
  1480. String returnText = interfaces.get(INTERFACE_LOGIN_SCREEN).
  1481. getComponent(INTERFACE_TEXT_RETURN).getText().toLowerCase();
  1482. int textlength;
  1483. if (game.getClientState() != INDEX_LOGGED_OUT) {
  1484. if (!game.isWelcomeScreen()) {
  1485. sleep(random(1000, 2000));
  1486. }
  1487. if (game.getClientState() == INDEX_LOBBY) {
  1488. RSInterface welcome_screen = interfaces.get(INTERFACE_WELCOME_SCREEN);
  1489. RSComponent welcome_screen_button_play_1 = welcome_screen.getComponent(INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_1);
  1490. RSComponent welcome_screen_button_play_2 = welcome_screen.getComponent(INTERFACE_WELCOME_SCREEN_BUTTON_PLAY_2);
  1491.  
  1492. mouse.click(
  1493. welcome_screen_button_play_1.getAbsoluteX(),
  1494. welcome_screen_button_play_1.getAbsoluteY(),
  1495. welcome_screen_button_play_2.getAbsoluteX() + welcome_screen_button_play_2.getWidth() - welcome_screen_button_play_1.getAbsoluteX(),
  1496. welcome_screen_button_play_1.getHeight(),
  1497. true
  1498. );
  1499.  
  1500. for (int i = 0; i < 4 && game.getClientState() == 6; i++) {
  1501. sleep(500);
  1502. }
  1503. returnText = interfaces.get(INTERFACE_WELCOME_SCREEN).
  1504. getComponent(INTERFACE_WELCOME_SCREEN_TEXT_RETURN).getText().toLowerCase();
  1505.  
  1506. if (returnText.contains("member")) {
  1507. log("Unable to login to a members world. Stopping script.");
  1508. RSComponent back_button1 = interfaces.get(INTERFACE_WELCOME_SCREEN).getComponent(228);
  1509. RSComponent back_button2 = interfaces.get(INTERFACE_WELCOME_SCREEN).getComponent(231);
  1510. mouse.click(back_button1.getAbsoluteX(),back_button1.getAbsoluteY(),
  1511. back_button2.getAbsoluteX() + back_button2.getWidth() - back_button1.getAbsoluteX(),
  1512. back_button1.getHeight(),true);
  1513. interfaces.get(INTERFACE_WELCOME_SCREEN).getComponent(203).doClick();
  1514. stopScript(false);
  1515. }
  1516. }
  1517. return -1;
  1518. }
  1519. if (!game.isLoggedIn()) {
  1520. if (returnText.contains("update")) {
  1521. log("Runescape has been updated, please reload RSBot.");
  1522. stopScript(false);
  1523. }
  1524. if (returnText.contains("disable")) {
  1525. log("Your account is banned/disabled.");
  1526. stopScript(false);
  1527. }
  1528. if (returnText.contains("incorrect")) {
  1529. log("Failed to login five times in a row. Stopping script.");
  1530. stopScript(false);
  1531. }
  1532. if (returnText.contains("invalid")) {
  1533. if (invalidCount > 6) {
  1534. log("Unable to login after 6 attempts. Stopping script.");
  1535. log("Please verify that your RSBot account profile is correct.");
  1536. stopScript(false);
  1537. }
  1538. interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_BUTTON_BACK).doClick();
  1539. invalidCount++;
  1540. return random(500, 2000);
  1541. }
  1542. if (returnText.contains("error connecting")) {
  1543. log("Error connecting to Runescape server. Stopping script.");
  1544. interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_BUTTON_BACK).doClick();
  1545. stopScript(false);
  1546. return random(500, 2000);
  1547. }
  1548. if (returnText.contains("full")) {
  1549. if (worldFullCount > 30) {
  1550. log("World is Full. Waiting for 15 seconds.");
  1551. sleep(random(10000, 15000));
  1552. worldFullCount = 0;
  1553. }
  1554. sleep(random(1000, 1200));
  1555. worldFullCount++;
  1556. }
  1557. if (returnText.contains("world")) {
  1558. return random(1000, 1200);
  1559. }
  1560. if (returnText.contains("performing login")) {
  1561. return random(1000, 1200);
  1562. }
  1563. }
  1564. if (game.getClientState() == INDEX_LOGGED_OUT) {
  1565. if (!atLoginScreen()) {
  1566. interfaces.getComponent(INTERFACE_MAIN, INTERFACE_MAIN_CHILD).getComponent(INTERFACE_MAIN_CHILD_COMPONENT_ID).doAction("");
  1567. return random(500, 600);
  1568. }
  1569. if (isUsernameFilled() && isPasswordFilled()) {
  1570. interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_BUTTON_LOGIN).doClick();
  1571. return random(500, 600);
  1572. }
  1573.  
  1574. if (!isUsernameFilled() && interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_USERNAME).getText().length() >= 1){
  1575. atLoginInterface(interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_USERNAME_WINDOW));
  1576. sleep(random(400,600));
  1577. textlength = interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_USERNAME).getText().length() + random(3, 5);
  1578. for (int i = 0; i <= textlength + random(1, 5); i++) {
  1579. keyboard.sendText("\b", false);
  1580. if (random(0, 2) == 1) {
  1581. sleep(random(25, 100));
  1582. }
  1583. }
  1584. keyboard.sendText(username, false);
  1585. sleep(random(100,200));
  1586. }
  1587. if (!isPasswordFilled() && interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_PASSWORD).getText().length() >= 1){
  1588. atLoginInterface(interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_PASSWORD_WINDOW));
  1589. sleep(random(400, 600));
  1590. textlength = interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_PASSWORD).getText().length() + random(3, 5);
  1591. for (int i = 0; i <= textlength + random(1, 5); i++) {
  1592. keyboard.sendText("\b", false);
  1593. if (random(0, 2) == 1) {
  1594. sleep(random(25, 100));
  1595. }
  1596. }
  1597. sleep(random(100,200));
  1598. }
  1599.  
  1600. if (!isUsernameFilled()){
  1601. atLoginInterface(interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_USERNAME_WINDOW));
  1602. sleep(random(400,600));
  1603. keyboard.sendText(username, true);
  1604. sleep(random(100,200));
  1605. keyboard.sendText(account.getPassword(), true);
  1606. return random(1300,1500);
  1607. }
  1608. if (!isPasswordFilled()) {
  1609. atLoginInterface(interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_PASSWORD_WINDOW));
  1610. sleep(random(400,600));
  1611. keyboard.sendText(account.getPassword(), true);
  1612. return random(1300,1500);
  1613. }
  1614. return random(500,600);
  1615. }
  1616. return random(500, 2000);
  1617. }
  1618.  
  1619. private boolean atLoginInterface(RSComponent i) {
  1620. if (!i.isValid())
  1621. return false;
  1622. Rectangle pos = i.getArea();
  1623. if (pos.x == -1 || pos.y == -1 || pos.width == -1 || pos.height == -1)
  1624. return false;
  1625. int dy = (int) (pos.getHeight() - 4) / 2;
  1626. int maxRandomX = (int) (pos.getMaxX() - pos.getCenterX());
  1627. int midx = (int) (pos.getCenterX());
  1628. int midy = (int) (pos.getMinY() + pos.getHeight() / 2);
  1629. if (i.getIndex() == INTERFACE_PASSWORD_WINDOW) {
  1630. mouse.click(minX(i), midy + random(-dy, dy), true);
  1631. } else {
  1632. mouse.click(midx + random(1, maxRandomX), midy + random(-dy, dy), true);
  1633. }
  1634. return true;
  1635. }
  1636. private int minX(RSComponent a) {
  1637. int x = 0;
  1638. Rectangle pos = a.getArea();
  1639. int dx = (int) (pos.getWidth() - 4) / 2;
  1640. int midx = (int) (pos.getMinX() + pos.getWidth() / 2);
  1641. if (pos.x == -1 || pos.y == -1 || pos.width == -1 || pos.height == -1)
  1642. return 0;
  1643. for (int i = 0; i < interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_PASSWORD).getText().length(); i++) {
  1644. x += 11;
  1645. }
  1646. if (x > 44) {
  1647. return (int) (pos.getMinX() + x + 15);
  1648. } else {
  1649. return midx + random(-dx, dx);
  1650. }
  1651. }
  1652. private boolean atLoginScreen() {
  1653. return interfaces.get(INTERFACE_LOGIN_SCREEN).isValid();
  1654. }
  1655. private boolean isUsernameFilled() {
  1656. String username = account.getName().replaceAll("_", " ").toLowerCase().trim();
  1657. return interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_USERNAME).getText().equalsIgnoreCase(username);
  1658. }
  1659. private boolean isPasswordFilled() {
  1660. return interfaces.get(INTERFACE_LOGIN_SCREEN).getComponent(INTERFACE_PASSWORD).getText().length() == account.getPassword().length();
  1661. }
  1662. }
  1663.  
  1664. //-----------CHAT RESPONDER-----------\\
  1665. private class ChatResponder extends Thread {
  1666. long lastSaidHi = System.currentTimeMillis() - 110000, lastDenyBot = System.currentTimeMillis() - 110000;
  1667. long lastLevelUp = System.currentTimeMillis() - 300000, nextCustom = System.currentTimeMillis() - 1000000;
  1668. long lastSaidLevel = System.currentTimeMillis() - 110000, nextModAlert = System.currentTimeMillis(), sayNo = System.currentTimeMillis();
  1669. int level = 0; //records hunter level
  1670. boolean run = true, doLevelRes = false, doCustomRes = false;
  1671. boolean typing = false; //read by antiban (true = suppress antiban)
  1672. boolean wait = false; //written by antiban (true = chat responder will wait)
  1673. boolean pause = false; //true if look away from screen is active
  1674.  
  1675. //Chat Responder Customization
  1676. String[] tradeRes = {"No thanks", "No thx", "Nope", "Im fine"},
  1677. greetingRes = {"hi!", "hi.", "hi", "hello", "hello!", "hello.", "hello..", "yo", "yo!", "yes?", "what", "what?", "hey!"},
  1678. botterRes = {"huh", "zzz", "...", "???", "?????", "what", "what?", "no", "nop", "nope"},
  1679. levelRes = {"yay", "haha", ":)", "yay!", "yay!!!", "finally..."},
  1680. customDetect = {}, customRes = {};
  1681. double customTO = 160000, customTOR = 30000;
  1682.  
  1683. public void run() {
  1684. while (!thePainter.savedStats || getChatMessage() == null) {
  1685. sleepNE(200);
  1686. }
  1687. while (run) {
  1688. try{
  1689. if (game.getClientState() == 10 && !pause){
  1690. if (useChatRes && tradeResponse){
  1691. if (sayNo < System.currentTimeMillis()){
  1692. tradeResponse = false;
  1693. int timeOut = random(110000,130000);
  1694. sayNo = System.currentTimeMillis() + timeOut;
  1695. sleepNE(random(300,700));
  1696. String[] res = tradeRes;
  1697. int rand = random(0, res.length);
  1698. sendText(res[rand]);
  1699. log("[Response] Said No to a Trade Request. Timeout: " + timeOut / 1000 + " sec");
  1700. }
  1701. }
  1702. String m = getChatMessage().toLowerCase();
  1703. if (m != null && !m.equals(lastMessage) && (m.contains(getMyPlayer().getName().toLowerCase() + ": <") != true)) {
  1704. remoteControl(m);
  1705. if (useChatRes) {
  1706. response(m);
  1707. }else{
  1708. sleepNE(random(700,850));
  1709. }
  1710. lastMessage = m;
  1711. }else{
  1712. sleepNE(random(600,700));
  1713. }
  1714. }else{
  1715. sleepNE(random(300,400));
  1716. }
  1717. }catch(java.lang.Throwable t){}
  1718. }
  1719. }
  1720.  
  1721. private boolean findText(String t, String[] check){
  1722. String[] m = check;
  1723. for (int i = 0; i < m.length; i++){
  1724. if (t.contains(m[i])){
  1725. return true;
  1726. }
  1727. }
  1728. return false;
  1729. }
  1730.  
  1731. private void remoteControl(String m){
  1732. if (useRemote){
  1733. try{
  1734. String[] m2 = m.split("</col>");
  1735. if (m2[2].toLowerCase().contains(remoteName)){
  1736. //character talked to you!
  1737. if (m2[3].toLowerCase().contains(remoteMsg)){
  1738. log.warning("Remote Control password detected! Logging out soon.");
  1739. String ans = "/" + remoteReply;
  1740. sendText(ans);
  1741. doingRemote = true;
  1742. }else{
  1743. log.warning("Your Remote Control Character talked to you!");
  1744. }
  1745. }
  1746. }catch (Exception e){}
  1747. }
  1748. }
  1749.  
  1750. private void response(String m){
  1751. if (doLevelRes){
  1752. if (level > 0 && skills.getCurrentLevel(Skills.HUNTER) > level && (System.currentTimeMillis() - 200000) >= lastLevelUp){
  1753. lastLevelUp = System.currentTimeMillis();
  1754. if (calc.distanceTo(players.getNearest(Players.ALL_FILTER).getLocation()) < 11 && random(0,11) <= 7){
  1755. resCount++;
  1756. sleepNE(random(200,600));
  1757. String[] r = levelRes;
  1758. final int ra = random(0, r.length);
  1759. sendText(r[ra]);
  1760. log("[Response] Level Up Response: " + r[ra]);
  1761. sleepNE(random(150,250));
  1762. }
  1763. level = skills.getCurrentLevel(Skills.HUNTER);
  1764. return;
  1765. }
  1766. level = skills.getCurrentLevel(Skills.HUNTER);
  1767. }
  1768. if ((System.currentTimeMillis() - 150000) >= lastSaidLevel) {
  1769. if (findText(m, new String[]{"huntin","hunter","hunnter","hunntin"}) && findText(m, new String[]{"level","levl","lvel","lvl"})) {
  1770. lastSaidLevel = System.currentTimeMillis();
  1771. resCount++;
  1772. sleepNE(random(600,2000));
  1773. final int random = random(1, 11);
  1774. if (random == 1) {
  1775. sendText("hunter lvl " + skills.getCurrentLevel(Skills.HUNTER));
  1776. } else if (random == 2) {
  1777. sendText("level: " + skills.getCurrentLevel(Skills.HUNTER));
  1778. } else if (random == 3) {
  1779. sendText("" + skills.getCurrentLevel(Skills.HUNTER));
  1780. } else if (random == 4) {
  1781. sendText("mines " + skills.getCurrentLevel(Skills.HUNTER));
  1782. } else if (random == 5) {
  1783. sendText("lv " + skills.getCurrentLevel(Skills.HUNTER));
  1784. } else if (random == 6) {
  1785. sendText(Integer.toString(skills.getCurrentLevel(Skills.HUNTER)));
  1786. } else if (random > 6) {
  1787. sleepNE(random(100,200));
  1788. keyboard.sendKey((char) KeyEvent.VK_ENTER);
  1789. sleepNE(random(800,1300));
  1790. keyboard.sendKey('S');
  1791. sleepNE(random(800,1300));
  1792. keyboard.sendKey('U');
  1793. sleepNE(random(800,1300));
  1794. keyboard.sendKey('2');
  1795. }
  1796. log("[Response] Answered to Level Question: '" + m + "'");
  1797. sleepNE(random(200,300));
  1798. return;
  1799. }
  1800. }
  1801. if (findText(m, new String[]{"bottin","botin","botttin","botter","bottter","boter","bootin","boottin","booter","bootter"})) {
  1802. if (m.contains("?") || m.contains(getMyPlayer().getName().toLowerCase()) || m.contains("!")) {
  1803. if ((System.currentTimeMillis() - 130000) >= lastDenyBot) {
  1804. lastDenyBot = System.currentTimeMillis();
  1805. resCount++;
  1806. sleepNE(random(600,2000));
  1807. String[] bot = botterRes;
  1808. final int random3 = random(0, bot.length);
  1809. sendText(bot[random3]);
  1810. log("[Response] Answered to Botting Message: '" + m + "'");
  1811. sleepNE(random(150,250));
  1812. return;
  1813. }
  1814. }
  1815. }
  1816. if (findText(m, new String[]{"hi ","hello","hi<","hey","hi!","hi.","yo!","yo.","yo<"})) {
  1817. if ((System.currentTimeMillis() - 130000) >= lastSaidHi) {
  1818. lastSaidHi = System.currentTimeMillis();
  1819. resCount++;
  1820. sleepNE(random(600,1600));
  1821. String[] hi = greetingRes;
  1822. final int random2 = random(0, hi.length);
  1823. sendText(hi[random2]);
  1824. log("[Response] Answered to Greeting: '" + m + "'");
  1825. sleepNE(random(150,250));
  1826. return;
  1827. }
  1828. }
  1829. if (doCustomRes && findText(m, customDetect) && System.currentTimeMillis() > nextCustom){
  1830. nextCustom = (long) (System.currentTimeMillis() + random(customTO - customTOR, customTO + customTOR));
  1831. resCount++;
  1832. sleepNE(random(500,1400));
  1833. final int r = random(0, customRes.length);
  1834. sendText(customRes[r]);
  1835. log("[Response] Custom Response: '" + m + "'");
  1836. sleepNE(random(150,250));
  1837. return;
  1838. }
  1839. sleepNE(random(650,750));
  1840. }
  1841.  
  1842. private void sendText(final String text) {
  1843. final char[] chs = text.toCharArray();
  1844. typing = true;
  1845. if (wait){
  1846. for(int i = 0; i < 21; i++){
  1847. sleepNE(10);
  1848. if (!wait){
  1849. i = 21;
  1850. }
  1851. }
  1852. }
  1853. for (final char element : chs) {
  1854. keyboard.sendKey(element);
  1855. sleepNE(random(280,550));
  1856. }
  1857. keyboard.sendKey((char) KeyEvent.VK_ENTER);
  1858. typing = false;
  1859. }
  1860.  
  1861. private String getChatMessage() {
  1862. try {
  1863. String text = null;
  1864. for (int x = 280; x >= 180; x--){
  1865. if (interfaces.get(137).getComponent(x).getText() != null) {
  1866. if (interfaces.get(137).getComponent(x).getText().contains("<col=")) {
  1867. text = interfaces.get(137).getComponent(x).getText();
  1868. break;
  1869. }
  1870. }
  1871. }
  1872. return text;
  1873. } catch (Exception e){}
  1874. return null;
  1875. }
  1876.  
  1877. private void sleepNE(int ms){
  1878. try {
  1879. Thread.sleep(ms);
  1880. } catch (Exception e){}
  1881. }
  1882. }
  1883.  
  1884. //-----------------GUI----------------\\
  1885. private class WhiteBearGUI {
  1886. private static final long serialVersionUID = 1L;
  1887. public boolean first = false, useSetting = true;
  1888.  
  1889. public boolean loadSettings(){
  1890. try {
  1891. WBini.load(new FileInputStream(new File(GlobalConfiguration.Paths.getSettingsDirectory(),"WhiteBearBirdSnarer.ini")));
  1892. } catch (FileNotFoundException e) {
  1893. log.warning("[GUI] Settings file was not found!");
  1894. first = true;
  1895. return false;
  1896. } catch (IOException e) {
  1897. log.warning("[GUI] Error occurred when loading settings!");
  1898. return false;
  1899. }
  1900. try{
  1901. if (WBini.getProperty("UseSetting") != null)
  1902. useSetting = Boolean.parseBoolean(WBini.getProperty("UseSetting"));
  1903. }catch (java.lang.Exception e){}
  1904. if (useSetting){
  1905. try{
  1906. if (WBini.getProperty("Location") != null)
  1907. locationCombo.setSelectedIndex(Integer.valueOf(WBini.getProperty("Location")));
  1908. if (WBini.getProperty("BuryBones") != null)
  1909. rbBuryBones.setSelected(Boolean.parseBoolean(WBini.getProperty("BuryBones")));
  1910. if (WBini.getProperty("UseChatRes") != null)
  1911. radioButton12.setSelected(Boolean.parseBoolean(WBini.getProperty("UseChatRes")));
  1912. if (WBini.getProperty("CheckUpdate") != null)
  1913. radioButton25.setSelected(Boolean.parseBoolean(WBini.getProperty("CheckUpdate")));
  1914. if (WBini.getProperty("PaintColour") != null)
  1915. clrSelected.setSelectedIndex(Integer.valueOf(WBini.getProperty("PaintColour")));
  1916. if (WBini.getProperty("PaintFont") != null)
  1917. tfTextFont.setText(WBini.getProperty("PaintFont"));
  1918. if (WBini.getProperty("Fkeys") != null)
  1919. radioButton23.setSelected(Boolean.parseBoolean(WBini.getProperty("Fkeys")));
  1920. if (WBini.getProperty("MinMouseSpeed") != null)
  1921. jTextField.setText(WBini.getProperty("MinMouseSpeed"));
  1922. if (WBini.getProperty("MaxMouseSpeed") != null)
  1923. jTextField2.setText(WBini.getProperty("MaxMouseSpeed"));
  1924. if (WBini.getProperty("Antialias") != null)
  1925. radioButton22.setSelected(Boolean.parseBoolean(WBini.getProperty("Antialias")));
  1926. if (WBini.getProperty("Breaking") != null)
  1927. radioButton1.setSelected(Boolean.parseBoolean(WBini.getProperty("Breaking")));
  1928. if (WBini.getProperty("RandomBreak") != null)
  1929. radioButton2.setSelected(Boolean.parseBoolean(WBini.getProperty("RandomBreak")));
  1930. if (WBini.getProperty("CheckFriend") != null)
  1931. check2.setSelected(Boolean.parseBoolean(WBini.getProperty("CheckFriend")));
  1932. if (WBini.getProperty("CheckExperience") != null)
  1933. check3.setSelected(Boolean.parseBoolean(WBini.getProperty("CheckExperience")));
  1934. if (WBini.getProperty("ScreenLookaway") != null)
  1935. check4.setSelected(Boolean.parseBoolean(WBini.getProperty("ScreenLookaway")));
  1936. if (WBini.getProperty("TimeoutA1") != null)
  1937. jTextField3.setText(WBini.getProperty("TimeoutA1"));
  1938. if (WBini.getProperty("TimeoutA2") != null)
  1939. jTextField4.setText(WBini.getProperty("TimeoutA2"));
  1940. if (WBini.getProperty("BreakLogout") != null)
  1941. radioButton3.setSelected(Boolean.parseBoolean(WBini.getProperty("BreakLogout")));
  1942. if (WBini.getProperty("MidTime") != null)
  1943. formattedTextField1.setText(WBini.getProperty("MidTime"));
  1944. if (WBini.getProperty("RandTime") != null)
  1945. formattedTextField3.setText(WBini.getProperty("RandTime"));
  1946. if (WBini.getProperty("MidLength") != null)
  1947. formattedTextField2.setText(WBini.getProperty("MidLength"));
  1948. if (WBini.getProperty("RandLength") != null)
  1949. formattedTextField4.setText(WBini.getProperty("RandLength"));
  1950. if (WBini.getProperty("AutoStopH") != null)
  1951. textHour.setText(WBini.getProperty("AutoStopH"));
  1952. if (WBini.getProperty("AutoStopM") != null)
  1953. textMinute.setText(WBini.getProperty("AutoStopM"));
  1954. if (WBini.getProperty("AutoStopS") != null)
  1955. textSecond.setText(WBini.getProperty("AutoStopS"));
  1956. if (WBini.getProperty("Remote") != null)
  1957. radioButton11.setSelected(Boolean.parseBoolean(WBini.getProperty("Remote")));
  1958. if (WBini.getProperty("RemoteName") != null)
  1959. formattedTextField11.setText(WBini.getProperty("RemoteName"));
  1960. if (WBini.getProperty("RemoteText") != null)
  1961. formattedTextField21.setText(WBini.getProperty("RemoteText"));
  1962. if (WBini.getProperty("RemoteReply") != null)
  1963. formattedTextField22.setText(WBini.getProperty("RemoteReply"));
  1964. if (WBini.getProperty("Relog") != null)
  1965. radioButton26.setSelected(Boolean.parseBoolean(WBini.getProperty("Relog")));
  1966. if (WBini.getProperty("RelogTime") != null)
  1967. formattedTextField31.setText(WBini.getProperty("RelogTime"));
  1968.  
  1969. if (WBini.getProperty("CRuseLevelRes") != null)
  1970. chatRes.doLevelRes = Boolean.parseBoolean(WBini.getProperty("CRuseLevelRes"));
  1971. if (WBini.getProperty("CRuseCustomRes") != null)
  1972. chatRes.doCustomRes = Boolean.parseBoolean(WBini.getProperty("CRuseCustomRes"));
  1973. if (WBini.getProperty("CRtradeRes") != null)
  1974. chatRes.tradeRes = WBini.getProperty("CRtradeRes").toLowerCase().split("/");
  1975. if (WBini.getProperty("CRgreetingRes") != null)
  1976. chatRes.greetingRes = WBini.getProperty("CRgreetingRes").toLowerCase().split("/");
  1977. if (WBini.getProperty("CRbotterRes") != null)
  1978. chatRes.botterRes = WBini.getProperty("CRbotterRes").toLowerCase().split("/");
  1979. if (WBini.getProperty("CRlevelRes") != null)
  1980. chatRes.levelRes = WBini.getProperty("CRlevelRes").toLowerCase().split("/");
  1981. if (WBini.getProperty("CRdetection") != null)
  1982. chatRes.customDetect = WBini.getProperty("CRdetection").toLowerCase().split("/");
  1983. if (WBini.getProperty("CRresponse") != null)
  1984. chatRes.customRes = WBini.getProperty("CRresponse").toLowerCase().split("/");
  1985. if (WBini.getProperty("CRcustomTO") != null)
  1986. chatRes.customTO = Integer.parseInt(WBini.getProperty("CRcustomTO"));
  1987. if (WBini.getProperty("CRcustomTOR") != null)
  1988. chatRes.customTOR = Integer.parseInt(WBini.getProperty("CRcustomTOR"));
  1989. }catch (java.lang.Exception e){
  1990. log.warning("[GUI] Settings file is corrupt, using default settings!");
  1991. }
  1992. }
  1993. return true;
  1994. }
  1995.  
  1996. private WhiteBearGUI() {
  1997. initComponents();
  1998. }
  1999.  
  2000. private void toogle1ActionPerformed(ActionEvent e) {
  2001. label7.setText("Instructions:");
  2002. textArea1.setText(" Set graphics mode as Safe Mode\n Set screen size as Fixed\n Start at Bank or Essence Mine\n Have a pickaxe equipped or in inventory");
  2003. }
  2004.  
  2005. private void toogle2ActionPerformed(ActionEvent e) {
  2006. label7.setText("Remote Control:");
  2007. textArea1.setText(" Fill in the 'Remote' tab\n Fields are all not case-sensitive\n Ensure both characters are in clan\n Ensure clan chat appears in chatbox");
  2008. }
  2009.  
  2010. private void toogle3ActionPerformed(ActionEvent e) {
  2011. label7.setText("Notes:");
  2012. textArea1.setText(" Have at least 10 bird snares\n Have fun botting!");
  2013. }
  2014.  
  2015. private void button1ActionPerformed(ActionEvent e) {
  2016. if (chatResGUI){
  2017. log.severe("Chat Responder GUI is still active!");
  2018. }else{
  2019. colour = (String) clrSelected.getSelectedItem();
  2020. useBreaking = radioButton1.isSelected();
  2021. randomBreaking = radioButton2.isSelected();
  2022. thePainter.antialias = !radioButton22.isSelected();
  2023. thePainter.font = tfTextFont.getText();
  2024. checkUpdates = radioButton25.isSelected();
  2025. useFkeys = !radioButton23.isSelected();
  2026. useChatRes = radioButton12.isSelected();
  2027. antiban.checkFriend = check2.isSelected();
  2028. antiban.checkExperience = check3.isSelected();
  2029. antiban.screenLookaway = check4.isSelected();
  2030. breakLogout = radioButton3.isSelected();
  2031. buryBones = rbBuryBones.isSelected();
  2032. minMS = Integer.parseInt(jTextField.getText());
  2033. maxMS = Integer.parseInt(jTextField2.getText());
  2034. if (minMS >= maxMS) {
  2035. maxMS = minMS + 1;
  2036. }
  2037. String tempLoc = (String) locationCombo.getSelectedItem();
  2038. if (tempLoc.contains("Crimson")){
  2039. waitObj = 19179;
  2040. successObj = 19180;
  2041. exp = 34;
  2042. }else if (tempLoc.contains("Copper")){
  2043. waitObj = 19185;
  2044. successObj = 19186;
  2045. exp = 61;
  2046. }else if (tempLoc.contains("Cerulean")){
  2047. waitObj = 19181;
  2048. successObj = 19182;
  2049. exp = 64.67;
  2050. }else if (tempLoc.contains("Tropical")){
  2051. waitObj = 19177;
  2052. successObj = 19178;
  2053. exp = 95.2;
  2054. }
  2055. midTime = Integer.parseInt(formattedTextField1.getText());
  2056. randTime = Integer.parseInt(formattedTextField3.getText());
  2057. midLength = Integer.parseInt(formattedTextField2.getText());
  2058. randLength = Integer.parseInt(formattedTextField4.getText());
  2059. if (midTime < 10){
  2060. midTime = 10;
  2061. }else if (midTime >= 50001){
  2062. midTime = 50000;
  2063. }
  2064. if (randTime < 3){
  2065. randTime = 3;
  2066. }else if (randTime >= 20001){
  2067. randTime = 20000;
  2068. }
  2069. if (randTime > midTime){
  2070. randTime = midTime - 1;
  2071. }
  2072.  
  2073. if (midLength < 2){
  2074. midLength = 2;
  2075. }else if (midLength >= 35001){
  2076. midLength = 35000;
  2077. }
  2078. if (randLength < 1){
  2079. randLength = 1;
  2080. }else if (randLength >= 15001){
  2081. randLength = 15000;
  2082. }
  2083. if (randLength > midLength){
  2084. randLength = midLength - 1;
  2085. }
  2086. long hour = Long.parseLong(textHour.getText());
  2087. long minute = Long.parseLong(textMinute.getText());
  2088. long second = Long.parseLong(textSecond.getText());
  2089. if (hour <= 0 && minute <= 0 && second <= 0){
  2090. stopTime = -1;
  2091. }else{
  2092. long tempTime = 0;
  2093. if (hour > 1){
  2094. long tempHr = tempTime;
  2095. tempTime = tempHr + hour * 3600000;
  2096. }
  2097. if (minute > 1){
  2098. long tempMin = tempTime;
  2099. tempTime = tempMin + minute * 60000;
  2100. }
  2101. if (second > 1){
  2102. long tempSec = tempTime;
  2103. tempTime = tempSec + second * 1000;
  2104. }
  2105. stopTime = hour * 3600000 + minute * 60000 + second * 1000;
  2106. }
  2107. useRemote = radioButton11.isSelected();
  2108. doRelog = radioButton26.isSelected();
  2109. try{
  2110. remoteName = formattedTextField11.getText().toLowerCase();
  2111. }catch (Exception ee){ remoteName = "";}
  2112. try{
  2113. remoteMsg = formattedTextField21.getText().toLowerCase();
  2114. }catch (Exception eee){ remoteMsg = "";}
  2115. try{
  2116. remoteReply = formattedTextField22.getText().toLowerCase();
  2117. }catch (Exception eeep){ remoteMsg = "";}
  2118. try{
  2119. relogAfter = Integer.parseInt(formattedTextField31.getText());
  2120. }catch (Exception eeee){ relogAfter = -1;}
  2121. WBini.setProperty("UseSetting", String.valueOf(useSetting ? true : false));
  2122. if (useSetting){
  2123. WBini.setProperty("Location", String.valueOf(locationCombo
  2124. .getSelectedIndex()));
  2125. WBini.setProperty("BuryBones", String.valueOf(rbBuryBones
  2126. .isSelected() ? true : false));
  2127. WBini.setProperty("UseChatRes", String.valueOf(radioButton12
  2128. .isSelected() ? true : false));
  2129. WBini.setProperty("CheckUpdate", String.valueOf(radioButton25
  2130. .isSelected() ? true : false));
  2131. WBini.setProperty("PaintColour", String.valueOf(clrSelected
  2132. .getSelectedIndex()));
  2133. WBini.setProperty("PaintFont", tfTextFont.getText());
  2134. WBini.setProperty("Fkeys", String.valueOf(radioButton23
  2135. .isSelected() ? true : false));
  2136. WBini.setProperty("MinMouseSpeed", jTextField.getText());
  2137. WBini.setProperty("MaxMouseSpeed", jTextField2.getText());
  2138. WBini.setProperty("Antialias", String.valueOf(radioButton22
  2139. .isSelected() ? true : false));
  2140. WBini.setProperty("Breaking", String.valueOf(radioButton1
  2141. .isSelected() ? true : false));
  2142. WBini.setProperty("RandomBreak", String.valueOf(radioButton2
  2143. .isSelected() ? true : false));
  2144. WBini.setProperty("CheckFriend", String.valueOf(check2
  2145. .isSelected() ? true : false));
  2146. WBini.setProperty("CheckExperience", String.valueOf(check3
  2147. .isSelected() ? true : false));
  2148. WBini.setProperty("ScreenLookaway", String.valueOf(check4
  2149. .isSelected() ? true : false));
  2150. WBini.setProperty("TimeoutA1", jTextField3.getText());
  2151. WBini.setProperty("TimeoutA2", jTextField4.getText());
  2152. WBini.setProperty("BreakLogout", String.valueOf(radioButton3
  2153. .isSelected() ? true : false));
  2154. WBini.setProperty("MidTime", formattedTextField1.getText());
  2155. WBini.setProperty("RandTime", formattedTextField3.getText());
  2156. WBini.setProperty("MidLength", formattedTextField2.getText());
  2157. WBini.setProperty("RandLength", formattedTextField4.getText());
  2158. WBini.setProperty("AutoStopH", textHour.getText());
  2159. WBini.setProperty("AutoStopM", textMinute.getText());
  2160. WBini.setProperty("AutoStopS", textSecond.getText());
  2161. WBini.setProperty("Remote", String.valueOf(radioButton11
  2162. .isSelected() ? true : false));
  2163. WBini.setProperty("RemoteName", formattedTextField11.getText());
  2164. WBini.setProperty("RemoteText", formattedTextField21.getText());
  2165. WBini.setProperty("RemoteReply", formattedTextField22.getText());
  2166. WBini.setProperty("Relog", String.valueOf(radioButton26
  2167. .isSelected() ? true : false));
  2168. WBini.setProperty("RelogTime", formattedTextField31.getText());
  2169. }
  2170. try {
  2171. WBini.store(new FileWriter(new File(GlobalConfiguration.Paths.getSettingsDirectory(),
  2172. "WhiteBearBirdSnarer.ini")),
  2173. "The GUI Settings for White Bear Bird Snarer (Version: " + Double.toString(properties.version()) + ")");
  2174. if (first)
  2175. log("[GUI] Created a settings file!");
  2176. } catch (IOException ioe) {
  2177. log.warning("[GUI] Error occurred when saving GUI settings!");
  2178. }
  2179.  
  2180. guiStart = true;
  2181. WhiteBearGUI.dispose();
  2182. }
  2183. }
  2184.  
  2185. private void button2ActionPerformed(ActionEvent e) {
  2186. if (!chatResGUI){
  2187. chatResGUI = true;
  2188. chatGUI.WhiteBearGUI.setVisible(true);
  2189. }
  2190. }
  2191.  
  2192. private void radioButton2ActionPerformed(ActionEvent e) {
  2193. randomBreaking = radioButton2.isSelected();
  2194. if (randomBreaking == true){
  2195. formattedTextField1.setEnabled(false);
  2196. formattedTextField2.setEnabled(false);
  2197. formattedTextField3.setEnabled(false);
  2198. formattedTextField4.setEnabled(false);
  2199. }else{
  2200. formattedTextField1.setEnabled(true);
  2201. formattedTextField2.setEnabled(true);
  2202. formattedTextField3.setEnabled(true);
  2203. formattedTextField4.setEnabled(true);
  2204. }
  2205. }
  2206.  
  2207. private void initComponents() {
  2208. WhiteBearGUI = new JFrame();
  2209. panel1 = new JPanel();
  2210. tabbedPane1 = new JTabbedPane();
  2211. panel6 = new JPanel();
  2212. radioButton12 = new JCheckBox();
  2213. textArea1 = new JTextArea();
  2214. label3 = new JLabel();
  2215. locationCombo = new JComboBox();
  2216. radioButton25 = new JCheckBox();
  2217. toogle1 = new JButton();
  2218. toogle2 = new JButton();
  2219. toogle3 = new JButton();
  2220. label7 = new JLabel();
  2221. button2 = new JButton();
  2222. rbBuryBones = new JCheckBox();
  2223. panel2 = new JPanel();
  2224. jTextField = new JFormattedTextField();
  2225. radioButton22 = new JCheckBox();
  2226. label4 = new JLabel();
  2227. clrSelected = new JComboBox();
  2228. label5 = new JLabel();
  2229. label6 = new JLabel();
  2230. label16 = new JLabel();
  2231. textSecond = new JFormattedTextField();
  2232. label15 = new JLabel();
  2233. textMinute = new JFormattedTextField();
  2234. label14 = new JLabel();
  2235. textHour = new JFormattedTextField();
  2236. label13 = new JLabel();
  2237. jTextField2 = new JFormattedTextField();
  2238. label21 = new JLabel();
  2239. radioButton23 = new JCheckBox();
  2240. label30 = new JLabel();
  2241. tfTextFont = new JFormattedTextField();
  2242. panel3 = new JPanel();
  2243. radioButton1 = new JCheckBox();
  2244. radioButton2 = new JCheckBox();
  2245. label8 = new JLabel();
  2246. formattedTextField1 = new JFormattedTextField();
  2247. label9 = new JLabel();
  2248. label10 = new JLabel();
  2249. formattedTextField3 = new JFormattedTextField();
  2250. label11 = new JLabel();
  2251. formattedTextField2 = new JFormattedTextField();
  2252. label12 = new JLabel();
  2253. formattedTextField4 = new JFormattedTextField();
  2254. radioButton3 = new JCheckBox();
  2255. panel5 = new JPanel();
  2256. check3 = new JCheckBox();
  2257. check2 = new JCheckBox();
  2258. check4 = new JCheckBox();
  2259. label22 = new JLabel();
  2260. jTextField3 = new JFormattedTextField();
  2261. label23 = new JLabel();
  2262. jTextField4 = new JFormattedTextField();
  2263. label24 = new JLabel();
  2264. label25 = new JLabel();
  2265. panel4 = new JPanel();
  2266. textArea3 = new JTextArea();
  2267. radioButton11 = new JCheckBox();
  2268. label17 = new JLabel();
  2269. formattedTextField11 = new JFormattedTextField();
  2270. label18 = new JLabel();
  2271. formattedTextField21 = new JFormattedTextField();
  2272. radioButton26 = new JCheckBox();
  2273. formattedTextField31 = new JFormattedTextField();
  2274. label19 = new JLabel();
  2275. label20 = new JLabel();
  2276. formattedTextField22 = new JFormattedTextField();
  2277. button1 = new JButton();
  2278. label1 = new JLabel();
  2279. label2 = new JLabel();
  2280.  
  2281. //======== WhiteBearGUI ========
  2282. {
  2283. WhiteBearGUI.setAlwaysOnTop(true);
  2284. WhiteBearGUI.setBackground(Color.black);
  2285. WhiteBearGUI.setResizable(false);
  2286. WhiteBearGUI.setMinimumSize(new Dimension(405, 405));
  2287. WhiteBearGUI.setTitle("White Bear Bird Snarer");
  2288. WhiteBearGUI.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  2289. WhiteBearGUI.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2290. Container WhiteBearGUIContentPane = WhiteBearGUI.getContentPane();
  2291. WhiteBearGUIContentPane.setLayout(null);
  2292.  
  2293. //======== panel1 ========
  2294. {
  2295. panel1.setBackground(Color.black);
  2296. panel1.setForeground(Color.green);
  2297. panel1.setMinimumSize(new Dimension(100, 200));
  2298. panel1.setLayout(null);
  2299.  
  2300. //======== tabbedPane1 ========
  2301. {
  2302. tabbedPane1.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2303. tabbedPane1.setForeground(new Color(0, 153, 0));
  2304.  
  2305. //======== panel6 ========
  2306. {
  2307. panel6.setBackground(Color.black);
  2308. panel6.setLayout(null);
  2309.  
  2310. //---- radioButton12 ----
  2311. radioButton12.setText("Use Chat Responder");
  2312. radioButton12.setBackground(Color.black);
  2313. radioButton12.setForeground(Color.yellow);
  2314. radioButton12.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2315. radioButton12.setSelected(true);
  2316. panel6.add(radioButton12);
  2317. radioButton12.setBounds(new Rectangle(new Point(17, 178), radioButton12.getPreferredSize()));
  2318.  
  2319. //---- textArea1 ----
  2320. textArea1.setText(" Set graphics mode as Safe Mode\n Set screen size as Fixed\n Start at first snare location\n Ensure the tiles around you can be walked on");
  2321. textArea1.setLineWrap(true);
  2322. textArea1.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  2323. textArea1.setTabSize(0);
  2324. textArea1.setBackground(Color.black);
  2325. textArea1.setForeground(new Color(204, 255, 0));
  2326. textArea1.setEditable(false);
  2327. textArea1.setBorder(null);
  2328. textArea1.setOpaque(false);
  2329. textArea1.setRequestFocusEnabled(false);
  2330. textArea1.setFocusable(false);
  2331. panel6.add(textArea1);
  2332. textArea1.setBounds(20, 30, 330, 85);
  2333.  
  2334. //---- label3 ----
  2335. label3.setText("Bird");
  2336. label3.setBackground(new Color(51, 51, 51));
  2337. label3.setForeground(new Color(255, 255, 102));
  2338. label3.setFont(new Font("Century Gothic", Font.BOLD, 14));
  2339. panel6.add(label3);
  2340. label3.setBounds(20, 118, 45, 20);
  2341.  
  2342. //---- locationCombo ----
  2343. locationCombo.setBackground(Color.black);
  2344. locationCombo.setForeground(new Color(51, 51, 51));
  2345. locationCombo.setBorder(null);
  2346. locationCombo.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2347. locationCombo.setModel(new DefaultComboBoxModel(new String[] {
  2348. "Crimson Swift",
  2349. "Copper Longtail",
  2350. "Cerulean Twitch",
  2351. "Tropical Wagtail"
  2352. }));
  2353. locationCombo.setSelectedIndex(0);
  2354. panel6.add(locationCombo);
  2355. locationCombo.setBounds(75, 117, 130, 25);
  2356.  
  2357. //---- radioButton25 ----
  2358. radioButton25.setText("Check for Updates");
  2359. radioButton25.setBackground(Color.black);
  2360. radioButton25.setForeground(Color.yellow);
  2361. radioButton25.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2362. radioButton25.setSelected(true);
  2363. panel6.add(radioButton25);
  2364. radioButton25.setBounds(17, 207, 150, 25);
  2365.  
  2366. //---- toogle1 ----
  2367. toogle1.setText("1");
  2368. toogle1.setBackground(Color.black);
  2369. toogle1.setFont(new Font("Century Gothic", Font.BOLD, 10));
  2370. toogle1.setForeground(new Color(0, 102, 51));
  2371. toogle1.addActionListener(new ActionListener() {
  2372. @Override
  2373. public void actionPerformed(ActionEvent e) {
  2374. toogle1ActionPerformed(e);
  2375. }
  2376. });
  2377. panel6.add(toogle1);
  2378. toogle1.setBounds(225, 5, 40, 20);
  2379.  
  2380. //---- toogle2 ----
  2381. toogle2.setText("2");
  2382. toogle2.setBackground(Color.black);
  2383. toogle2.setFont(new Font("Century Gothic", Font.BOLD, 10));
  2384. toogle2.setForeground(new Color(0, 102, 51));
  2385. toogle2.addActionListener(new ActionListener() {
  2386. @Override
  2387. public void actionPerformed(ActionEvent e) {
  2388. toogle2ActionPerformed(e);
  2389. }
  2390. });
  2391. panel6.add(toogle2);
  2392. toogle2.setBounds(270, 5, 40, 20);
  2393.  
  2394. //---- toogle3 ----
  2395. toogle3.setText("3");
  2396. toogle3.setBackground(Color.black);
  2397. toogle3.setFont(new Font("Century Gothic", Font.BOLD, 10));
  2398. toogle3.setForeground(new Color(0, 102, 51));
  2399. toogle3.addActionListener(new ActionListener() {
  2400. @Override
  2401. public void actionPerformed(ActionEvent e) {
  2402. toogle3ActionPerformed(e);
  2403. }
  2404. });
  2405. panel6.add(toogle3);
  2406. toogle3.setBounds(315, 5, 40, 20);
  2407.  
  2408. //---- label7 ----
  2409. label7.setText("Instructions:");
  2410. label7.setBackground(new Color(51, 51, 51));
  2411. label7.setForeground(new Color(204, 255, 0));
  2412. label7.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  2413. panel6.add(label7);
  2414. label7.setBounds(20, 9, 190, 20);
  2415.  
  2416. //---- button2 ----
  2417. button2.setText("Customize");
  2418. button2.setBackground(Color.black);
  2419. button2.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2420. button2.setForeground(new Color(0, 102, 51));
  2421. button2.addActionListener(new ActionListener() {
  2422. @Override
  2423. public void actionPerformed(ActionEvent e) {
  2424. button2ActionPerformed(e);
  2425. }
  2426. });
  2427. panel6.add(button2);
  2428. button2.setBounds(185, 181, 95, 23);
  2429.  
  2430. //---- rbBuryBones ----
  2431. rbBuryBones.setText("Bury Bones");
  2432. rbBuryBones.setBackground(Color.black);
  2433. rbBuryBones.setForeground(Color.yellow);
  2434. rbBuryBones.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2435. rbBuryBones.setSelected(true);
  2436. panel6.add(rbBuryBones);
  2437. rbBuryBones.setBounds(17, 148, 155, 25);
  2438.  
  2439. { // compute preferred size
  2440. Dimension preferredSize = new Dimension();
  2441. for(int i = 0; i < panel6.getComponentCount(); i++) {
  2442. Rectangle bounds = panel6.getComponent(i).getBounds();
  2443. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  2444. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  2445. }
  2446. Insets insets = panel6.getInsets();
  2447. preferredSize.width += insets.right;
  2448. preferredSize.height += insets.bottom;
  2449. panel6.setMinimumSize(preferredSize);
  2450. panel6.setPreferredSize(preferredSize);
  2451. }
  2452. }
  2453. tabbedPane1.addTab("Info", panel6);
  2454.  
  2455.  
  2456. //======== panel2 ========
  2457. {
  2458. panel2.setBackground(Color.black);
  2459. panel2.setLayout(null);
  2460.  
  2461. //---- jTextField ----
  2462. jTextField.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2463. jTextField.setForeground(new Color(255, 255, 204));
  2464. jTextField.setBackground(Color.gray);
  2465. jTextField.setText("4");
  2466. panel2.add(jTextField);
  2467. jTextField.setBounds(120, 96, 35, 23);
  2468.  
  2469. //---- radioButton22 ----
  2470. radioButton22.setText("Disable Paint Antialias");
  2471. radioButton22.setBackground(Color.black);
  2472. radioButton22.setForeground(Color.yellow);
  2473. radioButton22.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2474. panel2.add(radioButton22);
  2475. radioButton22.setBounds(17, 132, 175, 25);
  2476.  
  2477. //---- label4 ----
  2478. label4.setText("Paint Colour");
  2479. label4.setBackground(new Color(51, 51, 51));
  2480. label4.setForeground(new Color(255, 255, 102));
  2481. label4.setFont(new Font("Century Gothic", Font.BOLD, 14));
  2482. panel2.add(label4);
  2483. label4.setBounds(20, 14, 90, 20);
  2484.  
  2485. //---- clrSelected ----
  2486. clrSelected.setBackground(Color.black);
  2487. clrSelected.setForeground(new Color(51, 51, 51));
  2488. clrSelected.setBorder(null);
  2489. clrSelected.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2490. clrSelected.setModel(new DefaultComboBoxModel(new String[] {
  2491. "Black",
  2492. "Blue",
  2493. "Green",
  2494. "Red",
  2495. "Purple",
  2496. "Brown"
  2497. }));
  2498. clrSelected.setSelectedIndex(0);
  2499. panel2.add(clrSelected);
  2500. clrSelected.setBounds(118, 13, 110, 25);
  2501.  
  2502. //---- label5 ----
  2503. label5.setText("Mouse Speed");
  2504. label5.setBackground(new Color(51, 51, 51));
  2505. label5.setForeground(new Color(255, 255, 102));
  2506. label5.setFont(new Font("Century Gothic", Font.BOLD, 14));
  2507. panel2.add(label5);
  2508. label5.setBounds(20, 96, 100, 20);
  2509.  
  2510. //---- label6 ----
  2511. label6.setText("(higher = slower)");
  2512. label6.setBackground(new Color(51, 51, 51));
  2513. label6.setForeground(new Color(255, 255, 102));
  2514. label6.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2515. panel2.add(label6);
  2516. label6.setBounds(225, 96, 105, 20);
  2517.  
  2518. //---- label16 ----
  2519. label16.setText("(hr:min:sec)");
  2520. label16.setBackground(new Color(51, 51, 51));
  2521. label16.setForeground(new Color(255, 255, 102));
  2522. label16.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2523. panel2.add(label16);
  2524. label16.setBounds(220, 202, 80, 20);
  2525.  
  2526. //---- textSecond ----
  2527. textSecond.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2528. textSecond.setForeground(new Color(255, 255, 204));
  2529. textSecond.setBackground(Color.gray);
  2530. textSecond.setText("0");
  2531. panel2.add(textSecond);
  2532. textSecond.setBounds(185, 202, 30, 23);
  2533.  
  2534. //---- label15 ----
  2535. label15.setText(":");
  2536. label15.setBackground(new Color(51, 51, 51));
  2537. label15.setForeground(new Color(255, 255, 102));
  2538. label15.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2539. panel2.add(label15);
  2540. label15.setBounds(175, 202, 10, 20);
  2541.  
  2542. //---- textMinute ----
  2543. textMinute.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2544. textMinute.setForeground(new Color(255, 255, 204));
  2545. textMinute.setBackground(Color.gray);
  2546. textMinute.setText("0");
  2547. panel2.add(textMinute);
  2548. textMinute.setBounds(140, 202, 30, 23);
  2549.  
  2550. //---- label14 ----
  2551. label14.setText(":");
  2552. label14.setBackground(new Color(51, 51, 51));
  2553. label14.setForeground(new Color(255, 255, 102));
  2554. label14.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2555. panel2.add(label14);
  2556. label14.setBounds(135, 202, 10, 20);
  2557.  
  2558. //---- textHour ----
  2559. textHour.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2560. textHour.setForeground(new Color(255, 255, 204));
  2561. textHour.setBackground(Color.gray);
  2562. textHour.setText("0");
  2563. panel2.add(textHour);
  2564. textHour.setBounds(100, 202, 30, 23);
  2565.  
  2566. //---- label13 ----
  2567. label13.setText("Auto Stop:");
  2568. label13.setBackground(new Color(51, 51, 51));
  2569. label13.setForeground(new Color(255, 255, 102));
  2570. label13.setFont(new Font("Century Gothic", Font.BOLD, 14));
  2571. panel2.add(label13);
  2572. label13.setBounds(20, 202, 75, 20);
  2573.  
  2574. //---- jTextField2 ----
  2575. jTextField2.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2576. jTextField2.setForeground(new Color(255, 255, 204));
  2577. jTextField2.setBackground(Color.gray);
  2578. jTextField2.setText("6");
  2579. panel2.add(jTextField2);
  2580. jTextField2.setBounds(180, 96, 35, 23);
  2581.  
  2582. //---- label21 ----
  2583. label21.setText("to");
  2584. label21.setBackground(new Color(51, 51, 51));
  2585. label21.setForeground(new Color(255, 255, 102));
  2586. label21.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2587. panel2.add(label21);
  2588. label21.setBounds(162, 96, 15, 20);
  2589.  
  2590. //---- radioButton23 ----
  2591. radioButton23.setText("Disable F-keys");
  2592. radioButton23.setBackground(Color.black);
  2593. radioButton23.setForeground(Color.yellow);
  2594. radioButton23.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2595. panel2.add(radioButton23);
  2596. radioButton23.setBounds(17, 163, 133, 25);
  2597.  
  2598. //---- label30 ----
  2599. label30.setText("Paint Font");
  2600. label30.setBackground(new Color(51, 51, 51));
  2601. label30.setForeground(new Color(255, 255, 102));
  2602. label30.setFont(new Font("Century Gothic", Font.BOLD, 14));
  2603. panel2.add(label30);
  2604. label30.setBounds(20, 55, 90, 20);
  2605.  
  2606. //---- tfTextFont ----
  2607. tfTextFont.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2608. tfTextFont.setForeground(new Color(255, 255, 204));
  2609. tfTextFont.setBackground(Color.gray);
  2610. tfTextFont.setText("sansserif");
  2611. panel2.add(tfTextFont);
  2612. tfTextFont.setBounds(119, 55, 108, 23);
  2613.  
  2614. { // compute preferred size
  2615. Dimension preferredSize = new Dimension();
  2616. for(int i = 0; i < panel2.getComponentCount(); i++) {
  2617. Rectangle bounds = panel2.getComponent(i).getBounds();
  2618. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  2619. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  2620. }
  2621. Insets insets = panel2.getInsets();
  2622. preferredSize.width += insets.right;
  2623. preferredSize.height += insets.bottom;
  2624. panel2.setMinimumSize(preferredSize);
  2625. panel2.setPreferredSize(preferredSize);
  2626. }
  2627. }
  2628. tabbedPane1.addTab("Option", panel2);
  2629.  
  2630.  
  2631. //======== panel3 ========
  2632. {
  2633. panel3.setBackground(Color.black);
  2634. panel3.setLayout(null);
  2635.  
  2636. //---- radioButton1 ----
  2637. radioButton1.setText("Use Breaking");
  2638. radioButton1.setBackground(Color.black);
  2639. radioButton1.setForeground(Color.yellow);
  2640. radioButton1.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2641. panel3.add(radioButton1);
  2642. radioButton1.setBounds(17, 20, 120, 25);
  2643.  
  2644. //---- radioButton2 ----
  2645. radioButton2.setText("Completely Random");
  2646. radioButton2.setBackground(Color.black);
  2647. radioButton2.setForeground(Color.yellow);
  2648. radioButton2.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2649. radioButton2.addActionListener(new ActionListener() {
  2650. @Override
  2651. public void actionPerformed(ActionEvent e) {
  2652. radioButton2ActionPerformed(e);
  2653. }
  2654. });
  2655. panel3.add(radioButton2);
  2656. radioButton2.setBounds(175, 20, 170, 25);
  2657.  
  2658. //---- label8 ----
  2659. label8.setText("Time between breaks:");
  2660. label8.setBackground(new Color(51, 51, 51));
  2661. label8.setForeground(new Color(255, 255, 102));
  2662. label8.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2663. panel3.add(label8);
  2664. label8.setBounds(20, 65, 140, 20);
  2665.  
  2666. //---- formattedTextField1 ----
  2667. formattedTextField1.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2668. formattedTextField1.setForeground(new Color(255, 255, 204));
  2669. formattedTextField1.setBackground(Color.gray);
  2670. formattedTextField1.setText("90");
  2671. panel3.add(formattedTextField1);
  2672. formattedTextField1.setBounds(160, 65, 45, 23);
  2673.  
  2674. //---- label9 ----
  2675. label9.setText("\u00b1");
  2676. label9.setBackground(new Color(51, 51, 51));
  2677. label9.setForeground(new Color(255, 255, 102));
  2678. label9.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2679. panel3.add(label9);
  2680. label9.setBounds(225, 65, 15, 20);
  2681.  
  2682. //---- label10 ----
  2683. label10.setText("(time unit: minutes)");
  2684. label10.setBackground(new Color(51, 51, 51));
  2685. label10.setForeground(new Color(255, 255, 102));
  2686. label10.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2687. panel3.add(label10);
  2688. label10.setBounds(240, 135, 110, 20);
  2689.  
  2690. //---- formattedTextField3 ----
  2691. formattedTextField3.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2692. formattedTextField3.setForeground(new Color(255, 255, 204));
  2693. formattedTextField3.setBackground(Color.gray);
  2694. formattedTextField3.setText("90");
  2695. panel3.add(formattedTextField3);
  2696. formattedTextField3.setBounds(240, 65, 45, 23);
  2697.  
  2698. //---- label11 ----
  2699. label11.setText("Length of breaks:");
  2700. label11.setBackground(new Color(51, 51, 51));
  2701. label11.setForeground(new Color(255, 255, 102));
  2702. label11.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2703. panel3.add(label11);
  2704. label11.setBounds(20, 110, 110, 20);
  2705.  
  2706. //---- formattedTextField2 ----
  2707. formattedTextField2.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2708. formattedTextField2.setForeground(new Color(255, 255, 204));
  2709. formattedTextField2.setBackground(Color.gray);
  2710. formattedTextField2.setText("8");
  2711. panel3.add(formattedTextField2);
  2712. formattedTextField2.setBounds(160, 110, 45, 23);
  2713.  
  2714. //---- label12 ----
  2715. label12.setText("\u00b1");
  2716. label12.setBackground(new Color(51, 51, 51));
  2717. label12.setForeground(new Color(255, 255, 102));
  2718. label12.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2719. panel3.add(label12);
  2720. label12.setBounds(225, 110, 15, 20);
  2721.  
  2722. //---- formattedTextField4 ----
  2723. formattedTextField4.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2724. formattedTextField4.setForeground(new Color(255, 255, 204));
  2725. formattedTextField4.setBackground(Color.gray);
  2726. formattedTextField4.setText("2");
  2727. panel3.add(formattedTextField4);
  2728. formattedTextField4.setBounds(240, 110, 45, 23);
  2729.  
  2730. //---- radioButton3 ----
  2731. radioButton3.setText("Logout before break starts");
  2732. radioButton3.setBackground(Color.black);
  2733. radioButton3.setForeground(Color.yellow);
  2734. radioButton3.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2735. panel3.add(radioButton3);
  2736. radioButton3.setBounds(17, 170, 208, 25);
  2737.  
  2738. { // compute preferred size
  2739. Dimension preferredSize = new Dimension();
  2740. for(int i = 0; i < panel3.getComponentCount(); i++) {
  2741. Rectangle bounds = panel3.getComponent(i).getBounds();
  2742. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  2743. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  2744. }
  2745. Insets insets = panel3.getInsets();
  2746. preferredSize.width += insets.right;
  2747. preferredSize.height += insets.bottom;
  2748. panel3.setMinimumSize(preferredSize);
  2749. panel3.setPreferredSize(preferredSize);
  2750. }
  2751. }
  2752. tabbedPane1.addTab("Breaking", panel3);
  2753.  
  2754.  
  2755. //======== panel5 ========
  2756. {
  2757. panel5.setBackground(Color.black);
  2758. panel5.setLayout(null);
  2759.  
  2760. //---- check3 ----
  2761. check3.setText("Check hunter exp");
  2762. check3.setBackground(Color.black);
  2763. check3.setForeground(Color.yellow);
  2764. check3.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2765. check3.setSelected(true);
  2766. panel5.add(check3);
  2767. check3.setBounds(17, 15, 145, 25);
  2768.  
  2769. //---- check2 ----
  2770. check2.setText("Check friends");
  2771. check2.setBackground(Color.black);
  2772. check2.setForeground(Color.yellow);
  2773. check2.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2774. panel5.add(check2);
  2775. check2.setBounds(175, 15, 145, 25);
  2776.  
  2777. //---- check4 ----
  2778. check4.setText("Imitate looking away from screen when waiting");
  2779. check4.setBackground(Color.black);
  2780. check4.setForeground(Color.yellow);
  2781. check4.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2782. panel5.add(check4);
  2783. check4.setBounds(17, 64, 338, 25);
  2784.  
  2785. //---- label22 ----
  2786. label22.setText("Timeout");
  2787. label22.setBackground(new Color(51, 51, 51));
  2788. label22.setForeground(new Color(255, 255, 102));
  2789. label22.setFont(new Font("Century Gothic", Font.BOLD, 14));
  2790. panel5.add(label22);
  2791. label22.setBounds(20, 97, 100, 20);
  2792.  
  2793. //---- jTextField3 ----
  2794. jTextField3.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2795. jTextField3.setForeground(new Color(255, 255, 204));
  2796. jTextField3.setBackground(Color.gray);
  2797. jTextField3.setText("20");
  2798. panel5.add(jTextField3);
  2799. jTextField3.setBounds(119, 97, 40, 23);
  2800.  
  2801. //---- label23 ----
  2802. label23.setText("Max:");
  2803. label23.setBackground(new Color(51, 51, 51));
  2804. label23.setForeground(new Color(255, 255, 102));
  2805. label23.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2806. panel5.add(label23);
  2807. label23.setBounds(167, 97, 38, 20);
  2808.  
  2809. //---- jTextField4 ----
  2810. jTextField4.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2811. jTextField4.setForeground(new Color(255, 255, 204));
  2812. jTextField4.setBackground(Color.gray);
  2813. jTextField4.setText("50");
  2814. panel5.add(jTextField4);
  2815. jTextField4.setBounds(203, 97, 40, 23);
  2816.  
  2817. //---- label24 ----
  2818. label24.setText("(in seconds)");
  2819. label24.setBackground(new Color(51, 51, 51));
  2820. label24.setForeground(new Color(255, 255, 102));
  2821. label24.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2822. panel5.add(label24);
  2823. label24.setBounds(251, 97, 83, 20);
  2824.  
  2825. //---- label25 ----
  2826. label25.setText("Min:");
  2827. label25.setBackground(new Color(51, 51, 51));
  2828. label25.setForeground(new Color(255, 255, 102));
  2829. label25.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2830. panel5.add(label25);
  2831. label25.setBounds(86, 97, 36, 20);
  2832.  
  2833. { // compute preferred size
  2834. Dimension preferredSize = new Dimension();
  2835. for(int i = 0; i < panel5.getComponentCount(); i++) {
  2836. Rectangle bounds = panel5.getComponent(i).getBounds();
  2837. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  2838. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  2839. }
  2840. Insets insets = panel5.getInsets();
  2841. preferredSize.width += insets.right;
  2842. preferredSize.height += insets.bottom;
  2843. panel5.setMinimumSize(preferredSize);
  2844. panel5.setPreferredSize(preferredSize);
  2845. }
  2846. }
  2847. tabbedPane1.addTab("Antiban", panel5);
  2848.  
  2849.  
  2850. //======== panel4 ========
  2851. {
  2852. panel4.setBackground(Color.black);
  2853. panel4.setLayout(null);
  2854.  
  2855. //---- textArea3 ----
  2856. textArea3.setText("Allows remote stopping of script. When the character says the pass to you in clan chat, you will be logged out, thus \nallowing you to login to your account.");
  2857. textArea3.setLineWrap(true);
  2858. textArea3.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2859. textArea3.setTabSize(0);
  2860. textArea3.setBackground(Color.gray);
  2861. textArea3.setForeground(new Color(255, 255, 104));
  2862. textArea3.setEditable(false);
  2863. textArea3.setBorder(null);
  2864. panel4.add(textArea3);
  2865. textArea3.setBounds(5, 5, 355, 52);
  2866.  
  2867. //---- radioButton11 ----
  2868. radioButton11.setText("Enable Remote Control");
  2869. radioButton11.setBackground(Color.black);
  2870. radioButton11.setForeground(Color.yellow);
  2871. radioButton11.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2872. panel4.add(radioButton11);
  2873. radioButton11.setBounds(17, 65, 180, 25);
  2874.  
  2875. //---- label17 ----
  2876. label17.setText("Character name");
  2877. label17.setBackground(new Color(51, 51, 51));
  2878. label17.setForeground(new Color(255, 255, 102));
  2879. label17.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2880. panel4.add(label17);
  2881. label17.setBounds(20, 100, 110, 20);
  2882.  
  2883. //---- formattedTextField11 ----
  2884. formattedTextField11.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2885. formattedTextField11.setForeground(new Color(255, 255, 204));
  2886. formattedTextField11.setBackground(Color.gray);
  2887. formattedTextField11.setText("Zezima");
  2888. panel4.add(formattedTextField11);
  2889. formattedTextField11.setBounds(135, 100, 120, 23);
  2890.  
  2891. //---- label18 ----
  2892. label18.setText("Pass");
  2893. label18.setBackground(new Color(51, 51, 51));
  2894. label18.setForeground(new Color(255, 255, 102));
  2895. label18.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2896. panel4.add(label18);
  2897. label18.setBounds(20, 135, 35, 20);
  2898.  
  2899. //---- formattedTextField21 ----
  2900. formattedTextField21.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2901. formattedTextField21.setForeground(new Color(255, 255, 204));
  2902. formattedTextField21.setBackground(Color.gray);
  2903. formattedTextField21.setText("Lets go shopping");
  2904. panel4.add(formattedTextField21);
  2905. formattedTextField21.setBounds(65, 135, 190, 23);
  2906.  
  2907. //---- radioButton26 ----
  2908. radioButton26.setText("Relog after");
  2909. radioButton26.setBackground(Color.black);
  2910. radioButton26.setForeground(Color.yellow);
  2911. radioButton26.setFont(new Font("Century Gothic", Font.BOLD, 13));
  2912. panel4.add(radioButton26);
  2913. radioButton26.setBounds(17, 208, 103, 25);
  2914.  
  2915. //---- formattedTextField31 ----
  2916. formattedTextField31.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2917. formattedTextField31.setForeground(new Color(255, 255, 204));
  2918. formattedTextField31.setBackground(Color.gray);
  2919. formattedTextField31.setText("15");
  2920. panel4.add(formattedTextField31);
  2921. formattedTextField31.setBounds(125, 208, 45, 23);
  2922.  
  2923. //---- label19 ----
  2924. label19.setText("minutes");
  2925. label19.setBackground(new Color(51, 51, 51));
  2926. label19.setForeground(new Color(255, 255, 102));
  2927. label19.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2928. panel4.add(label19);
  2929. label19.setBounds(175, 209, 60, 20);
  2930.  
  2931. //---- label20 ----
  2932. label20.setText("Reply");
  2933. label20.setBackground(new Color(51, 51, 51));
  2934. label20.setForeground(new Color(255, 255, 102));
  2935. label20.setFont(new Font("Century Gothic", Font.BOLD, 12));
  2936. panel4.add(label20);
  2937. label20.setBounds(20, 170, 40, 20);
  2938.  
  2939. //---- formattedTextField22 ----
  2940. formattedTextField22.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2941. formattedTextField22.setForeground(new Color(255, 255, 204));
  2942. formattedTextField22.setBackground(Color.gray);
  2943. formattedTextField22.setText("Sure!");
  2944. panel4.add(formattedTextField22);
  2945. formattedTextField22.setBounds(75, 170, 180, 23);
  2946.  
  2947. { // compute preferred size
  2948. Dimension preferredSize = new Dimension();
  2949. for(int i = 0; i < panel4.getComponentCount(); i++) {
  2950. Rectangle bounds = panel4.getComponent(i).getBounds();
  2951. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  2952. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  2953. }
  2954. Insets insets = panel4.getInsets();
  2955. preferredSize.width += insets.right;
  2956. preferredSize.height += insets.bottom;
  2957. panel4.setMinimumSize(preferredSize);
  2958. panel4.setPreferredSize(preferredSize);
  2959. }
  2960. }
  2961. tabbedPane1.addTab("Remote", panel4);
  2962.  
  2963. }
  2964. panel1.add(tabbedPane1);
  2965. tabbedPane1.setBounds(15, 55, 370, 275);
  2966.  
  2967. //---- button1 ----
  2968. button1.setText("Start Snaring Birds!");
  2969. button1.setBackground(Color.black);
  2970. button1.setFont(new Font("Century Gothic", Font.BOLD, 18));
  2971. button1.setForeground(new Color(0, 102, 51));
  2972. button1.addActionListener(new ActionListener() {
  2973. @Override
  2974. public void actionPerformed(ActionEvent e) {
  2975. button1ActionPerformed(e);
  2976. }
  2977. });
  2978. panel1.add(button1);
  2979. button1.setBounds(25, 335, 350, 55);
  2980.  
  2981. //---- label1 ----
  2982. label1.setText("White Bear Bird Snarer");
  2983. label1.setBackground(new Color(51, 51, 51));
  2984. label1.setForeground(new Color(153, 255, 153));
  2985. label1.setFont(new Font("Century Gothic", Font.BOLD, 24));
  2986. label1.setHorizontalAlignment(SwingConstants.CENTER);
  2987. panel1.add(label1);
  2988. label1.setBounds(40, 5, 315, 50);
  2989.  
  2990. //---- label2 ----
  2991. label2.setText("Version: 1.02");
  2992. label2.setBackground(new Color(51, 51, 51));
  2993. label2.setForeground(new Color(204, 255, 0));
  2994. label2.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  2995. panel1.add(label2);
  2996. label2.setBounds(300, 51, 83, 20);
  2997.  
  2998. { // compute preferred size
  2999. Dimension preferredSize = new Dimension();
  3000. for(int i = 0; i < panel1.getComponentCount(); i++) {
  3001. Rectangle bounds = panel1.getComponent(i).getBounds();
  3002. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  3003. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  3004. }
  3005. Insets insets = panel1.getInsets();
  3006. preferredSize.width += insets.right;
  3007. preferredSize.height += insets.bottom;
  3008. panel1.setMinimumSize(preferredSize);
  3009. panel1.setPreferredSize(preferredSize);
  3010. }
  3011. }
  3012. WhiteBearGUIContentPane.add(panel1);
  3013. panel1.setBounds(0, 0, 400, 405);
  3014.  
  3015. WhiteBearGUIContentPane.setPreferredSize(new Dimension(405, 425));
  3016. WhiteBearGUI.setSize(405, 425);
  3017. WhiteBearGUI.setLocationRelativeTo(WhiteBearGUI.getOwner());
  3018. loadSettings();
  3019. }
  3020. }
  3021.  
  3022. private JFrame WhiteBearGUI;
  3023. private JPanel panel1;
  3024. private JTabbedPane tabbedPane1;
  3025. private JPanel panel6;
  3026. private JCheckBox radioButton12;
  3027. private JTextArea textArea1;
  3028. private JLabel label3;
  3029. private JComboBox locationCombo;
  3030. private JCheckBox radioButton25;
  3031. private JButton toogle1;
  3032. private JButton toogle2;
  3033. private JButton toogle3;
  3034. private JLabel label7;
  3035. private JButton button2;
  3036. private JCheckBox rbBuryBones;
  3037. private JPanel panel2;
  3038. private JFormattedTextField jTextField;
  3039. private JCheckBox radioButton22;
  3040. private JLabel label4;
  3041. private JComboBox clrSelected;
  3042. private JLabel label5;
  3043. private JLabel label6;
  3044. private JLabel label16;
  3045. private JFormattedTextField textSecond;
  3046. private JLabel label15;
  3047. private JFormattedTextField textMinute;
  3048. private JLabel label14;
  3049. private JFormattedTextField textHour;
  3050. private JLabel label13;
  3051. private JFormattedTextField jTextField2;
  3052. private JLabel label21;
  3053. private JCheckBox radioButton23;
  3054. private JLabel label30;
  3055. private JFormattedTextField tfTextFont;
  3056. private JPanel panel3;
  3057. private JCheckBox radioButton1;
  3058. private JCheckBox radioButton2;
  3059. private JLabel label8;
  3060. private JFormattedTextField formattedTextField1;
  3061. private JLabel label9;
  3062. private JLabel label10;
  3063. private JFormattedTextField formattedTextField3;
  3064. private JLabel label11;
  3065. private JFormattedTextField formattedTextField2;
  3066. private JLabel label12;
  3067. private JFormattedTextField formattedTextField4;
  3068. private JCheckBox radioButton3;
  3069. private JPanel panel5;
  3070. private JCheckBox check3;
  3071. private JCheckBox check2;
  3072. private JCheckBox check4;
  3073. private JLabel label22;
  3074. private JFormattedTextField jTextField3;
  3075. private JLabel label23;
  3076. private JFormattedTextField jTextField4;
  3077. private JLabel label24;
  3078. private JLabel label25;
  3079. private JPanel panel4;
  3080. private JTextArea textArea3;
  3081. private JCheckBox radioButton11;
  3082. private JLabel label17;
  3083. private JFormattedTextField formattedTextField11;
  3084. private JLabel label18;
  3085. private JFormattedTextField formattedTextField21;
  3086. private JCheckBox radioButton26;
  3087. private JFormattedTextField formattedTextField31;
  3088. private JLabel label19;
  3089. private JLabel label20;
  3090. private JFormattedTextField formattedTextField22;
  3091. private JButton button1;
  3092. private JLabel label1;
  3093. private JLabel label2;
  3094. }
  3095.  
  3096. private class ChatResponderGUI {
  3097. private static final long serialVersionUID = 1L;
  3098.  
  3099. public boolean loadSettings(){
  3100. try {
  3101. WBini.load(new FileInputStream(new File(GlobalConfiguration.Paths.getSettingsDirectory(),"WhiteBearBirdSnarer.ini")));
  3102. } catch (FileNotFoundException e) {
  3103. log.warning("[GUI] Settings file was not found!");
  3104. return false;
  3105. } catch (IOException e) {
  3106. log.warning("[GUI] Error occurred when loading settings!");
  3107. return false;
  3108. }
  3109. try{
  3110. if (WBini.getProperty("CRuseLevelRes") != null)
  3111. radioButton2.setSelected(Boolean.parseBoolean(WBini.getProperty("CRuseLevelRes")));
  3112. if (WBini.getProperty("CRuseCustomRes") != null)
  3113. radioButton1.setSelected(Boolean.parseBoolean(WBini.getProperty("CRuseCustomRes")));
  3114. if (WBini.getProperty("CRtradeRes") != null)
  3115. textArea3.setText(WBini.getProperty("CRtradeRes"));
  3116. if (WBini.getProperty("CRgreetingRes") != null)
  3117. textArea7.setText(WBini.getProperty("CRgreetingRes"));
  3118. if (WBini.getProperty("CRbotterRes") != null)
  3119. textArea8.setText(WBini.getProperty("CRbotterRes"));
  3120. if (WBini.getProperty("CRlevelRes") != null)
  3121. textArea9.setText(WBini.getProperty("CRlevelRes"));
  3122. if (WBini.getProperty("CRdetection") != null)
  3123. textArea10.setText(WBini.getProperty("CRdetection"));
  3124. if (WBini.getProperty("CRresponse") != null)
  3125. textArea11.setText(WBini.getProperty("CRresponse"));
  3126. if (WBini.getProperty("CRcustomTO") != null)
  3127. formattedTextField1.setText(WBini.getProperty("CRcustomTO"));
  3128. if (WBini.getProperty("CRcustomTOR") != null)
  3129. formattedTextField3.setText(WBini.getProperty("CRcustomTOR"));
  3130. }catch (java.lang.Exception e){
  3131. log.warning("[GUI] Settings file is corrupt, using default settings!");
  3132. }
  3133. return true;
  3134. }
  3135. private ChatResponderGUI() {
  3136. initComponentx();
  3137. }
  3138.  
  3139. private void button1ActionPerformed(ActionEvent e) {
  3140. try{
  3141. chatRes.tradeRes = textArea3.getText().toLowerCase().split("/");
  3142. chatRes.greetingRes = textArea7.getText().toLowerCase().split("/");
  3143. chatRes.botterRes = textArea8.getText().toLowerCase().split("/");
  3144. chatRes.levelRes = textArea9.getText().toLowerCase().split("/");
  3145. chatRes.customDetect = textArea10.getText().toLowerCase().split("/");
  3146. chatRes.customRes = textArea11.getText().toLowerCase().split("/");
  3147. chatRes.doLevelRes = radioButton2.isSelected();
  3148. chatRes.doCustomRes = radioButton1.isSelected();
  3149. chatRes.customTO = Integer.parseInt(formattedTextField1.getText());
  3150. chatRes.customTOR = Integer.parseInt(formattedTextField3.getText());
  3151.  
  3152. WBini.setProperty("CRuseLevelRes", String.valueOf(radioButton2
  3153. .isSelected() ? true : false));
  3154. WBini.setProperty("CRuseCustomRes", String.valueOf(radioButton1
  3155. .isSelected() ? true : false));
  3156. WBini.setProperty("CRtradeRes", textArea3.getText());
  3157. WBini.setProperty("CRgreetingRes", textArea7.getText());
  3158. WBini.setProperty("CRbotterRes", textArea8.getText());
  3159. WBini.setProperty("CRlevelRes", textArea9.getText());
  3160. WBini.setProperty("CRdetection", textArea10.getText());
  3161. WBini.setProperty("CRresponse", textArea11.getText());
  3162. WBini.setProperty("CRcustomTO", formattedTextField1.getText());
  3163. WBini.setProperty("CRcustomTOR", formattedTextField3.getText());
  3164. try {
  3165. WBini.store(new FileWriter(new File(GlobalConfiguration.Paths.getSettingsDirectory(),
  3166. "WhiteBearBirdSnarer.ini")),
  3167. "The GUI Settings for White Bear Bird Snarer (Version: " + Double.toString(properties.version()) + ")");
  3168. } catch (IOException ioe) {
  3169. log.warning("[GUI] Error occurred when saving GUI settings!");
  3170. }
  3171. chatResGUI = false;
  3172. WhiteBearGUI.dispose();
  3173. }catch (java.lang.Exception ex){
  3174. log.severe("Error occurred when saving GUI options.");
  3175. }
  3176. }
  3177.  
  3178. private void button2ActionPerformed(ActionEvent e) {
  3179. tabbedPane1.setSelectedIndex(1);
  3180. }
  3181.  
  3182. private void button3ActionPerformed(ActionEvent e) {
  3183. tabbedPane1.setSelectedIndex(2);
  3184. }
  3185.  
  3186. private void back1ActionPerformed(ActionEvent e) {
  3187. tabbedPane1.setSelectedIndex(0);
  3188. }
  3189.  
  3190. private void back2ActionPerformed(ActionEvent e) {
  3191. tabbedPane1.setSelectedIndex(0);
  3192. }
  3193.  
  3194. private void initComponentx() {
  3195. WhiteBearGUI = new JFrame();
  3196. panel1 = new JPanel();
  3197. tabbedPane1 = new JTabbedPane();
  3198. panel6 = new JPanel();
  3199. textArea1 = new JTextArea();
  3200. textArea2 = new JTextArea();
  3201. button2 = new JButton();
  3202. textArea4 = new JTextArea();
  3203. textArea5 = new JTextArea();
  3204. button3 = new JButton();
  3205. textArea6 = new JTextArea();
  3206. panel4 = new JPanel();
  3207. label17 = new JLabel();
  3208. label18 = new JLabel();
  3209. label20 = new JLabel();
  3210. label30 = new JLabel();
  3211. textArea3 = new JTextArea();
  3212. textArea7 = new JTextArea();
  3213. textArea8 = new JTextArea();
  3214. textArea9 = new JTextArea();
  3215. label19 = new JLabel();
  3216. button4 = new JButton();
  3217. radioButton2 = new JCheckBox();
  3218. panel3 = new JPanel();
  3219. radioButton1 = new JCheckBox();
  3220. label8 = new JLabel();
  3221. formattedTextField1 = new JFormattedTextField();
  3222. label9 = new JLabel();
  3223. formattedTextField3 = new JFormattedTextField();
  3224. button5 = new JButton();
  3225. label21 = new JLabel();
  3226. textArea10 = new JTextArea();
  3227. textArea11 = new JTextArea();
  3228. label22 = new JLabel();
  3229. button1 = new JButton();
  3230. label1 = new JLabel();
  3231.  
  3232. //======== WhiteBearGUI ========
  3233. {
  3234. WhiteBearGUI.setAlwaysOnTop(true);
  3235. WhiteBearGUI.setBackground(Color.black);
  3236. WhiteBearGUI.setResizable(false);
  3237. WhiteBearGUI.setMinimumSize(new Dimension(405, 405));
  3238. WhiteBearGUI.setTitle("White Bear Essence Miner");
  3239. WhiteBearGUI.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  3240. WhiteBearGUI.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3241. Container WhiteBearGUIContentPane = WhiteBearGUI.getContentPane();
  3242. WhiteBearGUIContentPane.setLayout(null);
  3243.  
  3244. //======== panel1 ========
  3245. {
  3246. panel1.setBackground(Color.black);
  3247. panel1.setForeground(Color.green);
  3248. panel1.setMinimumSize(new Dimension(100, 200));
  3249. panel1.setLayout(null);
  3250.  
  3251. //======== tabbedPane1 ========
  3252. {
  3253. tabbedPane1.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3254. tabbedPane1.setForeground(new Color(0, 153, 0));
  3255. tabbedPane1.setEnabled(false);
  3256.  
  3257. //======== panel6 ========
  3258. {
  3259. panel6.setBackground(Color.black);
  3260. panel6.setLayout(null);
  3261.  
  3262. //---- textArea1 ----
  3263. textArea1.setText(" This GUI allows you to change Chat Responder\nsettings. Just click start if you do not know what\nto do.");
  3264. textArea1.setLineWrap(true);
  3265. textArea1.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  3266. textArea1.setTabSize(0);
  3267. textArea1.setBackground(Color.black);
  3268. textArea1.setForeground(new Color(204, 255, 0));
  3269. textArea1.setEditable(false);
  3270. textArea1.setBorder(null);
  3271. textArea1.setOpaque(false);
  3272. textArea1.setRequestFocusEnabled(false);
  3273. textArea1.setFocusable(false);
  3274. panel6.add(textArea1);
  3275. textArea1.setBounds(20, 10, 330, 60);
  3276.  
  3277. //---- textArea2 ----
  3278. textArea2.setText(" For responses, separate each response with /\nE.g. For hi/hello/yes?, the possible responses\nare hi, hello and yes?. When the bot needs to\nrespond, it will randomly pick one response");
  3279. textArea2.setLineWrap(true);
  3280. textArea2.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  3281. textArea2.setTabSize(0);
  3282. textArea2.setBackground(Color.black);
  3283. textArea2.setForeground(new Color(204, 255, 0));
  3284. textArea2.setEditable(false);
  3285. textArea2.setBorder(null);
  3286. textArea2.setOpaque(false);
  3287. textArea2.setRequestFocusEnabled(false);
  3288. textArea2.setFocusable(false);
  3289. panel6.add(textArea2);
  3290. textArea2.setBounds(20, 80, 330, 78);
  3291.  
  3292. //---- button2 ----
  3293. button2.setText("Customize Responses");
  3294. button2.setBackground(Color.black);
  3295. button2.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3296. button2.setForeground(new Color(0, 102, 51));
  3297. button2.addActionListener(new ActionListener() {
  3298. @Override
  3299. public void actionPerformed(ActionEvent e) {
  3300. button2ActionPerformed(e);
  3301. }
  3302. });
  3303. panel6.add(button2);
  3304. button2.setBounds(190, 157, 160, 23);
  3305.  
  3306. //---- textArea4 ----
  3307. textArea4.setText("and use it.");
  3308. textArea4.setLineWrap(true);
  3309. textArea4.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  3310. textArea4.setTabSize(0);
  3311. textArea4.setBackground(Color.black);
  3312. textArea4.setForeground(new Color(204, 255, 0));
  3313. textArea4.setEditable(false);
  3314. textArea4.setBorder(null);
  3315. textArea4.setOpaque(false);
  3316. textArea4.setRequestFocusEnabled(false);
  3317. textArea4.setFocusable(false);
  3318. panel6.add(textArea4);
  3319. textArea4.setBounds(20, 156, 85, 20);
  3320.  
  3321. //---- textArea5 ----
  3322. textArea5.setText(" You can also set a custom detection, reply");
  3323. textArea5.setLineWrap(true);
  3324. textArea5.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  3325. textArea5.setTabSize(0);
  3326. textArea5.setBackground(Color.black);
  3327. textArea5.setForeground(new Color(204, 255, 0));
  3328. textArea5.setEditable(false);
  3329. textArea5.setBorder(null);
  3330. textArea5.setOpaque(false);
  3331. textArea5.setRequestFocusEnabled(false);
  3332. textArea5.setFocusable(false);
  3333. panel6.add(textArea5);
  3334. textArea5.setBounds(20, 190, 330, 20);
  3335.  
  3336. //---- button3 ----
  3337. button3.setText("Custom detection");
  3338. button3.setBackground(Color.black);
  3339. button3.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3340. button3.setForeground(new Color(0, 102, 51));
  3341. button3.addActionListener(new ActionListener() {
  3342. @Override
  3343. public void actionPerformed(ActionEvent e) {
  3344. button3ActionPerformed(e);
  3345. }
  3346. });
  3347. panel6.add(button3);
  3348. button3.setBounds(210, 207, 140, 23);
  3349.  
  3350. //---- textArea6 ----
  3351. textArea6.setText("and timeout.");
  3352. textArea6.setLineWrap(true);
  3353. textArea6.setFont(new Font("Century Gothic", Font.PLAIN, 14));
  3354. textArea6.setTabSize(0);
  3355. textArea6.setBackground(Color.black);
  3356. textArea6.setForeground(new Color(204, 255, 0));
  3357. textArea6.setEditable(false);
  3358. textArea6.setBorder(null);
  3359. textArea6.setOpaque(false);
  3360. textArea6.setRequestFocusEnabled(false);
  3361. textArea6.setFocusable(false);
  3362. panel6.add(textArea6);
  3363. textArea6.setBounds(20, 209, 100, 20);
  3364.  
  3365. { // compute preferred size
  3366. Dimension preferredSize = new Dimension();
  3367. for(int i = 0; i < panel6.getComponentCount(); i++) {
  3368. Rectangle bounds = panel6.getComponent(i).getBounds();
  3369. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  3370. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  3371. }
  3372. Insets insets = panel6.getInsets();
  3373. preferredSize.width += insets.right;
  3374. preferredSize.height += insets.bottom;
  3375. panel6.setMinimumSize(preferredSize);
  3376. panel6.setPreferredSize(preferredSize);
  3377. }
  3378. }
  3379. tabbedPane1.addTab("Info", panel6);
  3380.  
  3381.  
  3382. //======== panel4 ========
  3383. {
  3384. panel4.setBackground(Color.black);
  3385. panel4.setLayout(null);
  3386.  
  3387. //---- label17 ----
  3388. label17.setText("Trade Response");
  3389. label17.setBackground(new Color(51, 51, 51));
  3390. label17.setForeground(new Color(255, 255, 102));
  3391. label17.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3392. label17.setHorizontalAlignment(SwingConstants.LEFT);
  3393. panel4.add(label17);
  3394. label17.setBounds(5, 15, 110, 20);
  3395.  
  3396. //---- label18 ----
  3397. label18.setText("Greeting Response");
  3398. label18.setBackground(new Color(51, 51, 51));
  3399. label18.setForeground(new Color(255, 255, 102));
  3400. label18.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3401. label18.setHorizontalAlignment(SwingConstants.LEFT);
  3402. panel4.add(label18);
  3403. label18.setBounds(5, 65, 120, 20);
  3404.  
  3405. //---- label20 ----
  3406. label20.setText("Botter! Response");
  3407. label20.setBackground(new Color(51, 51, 51));
  3408. label20.setForeground(new Color(255, 255, 102));
  3409. label20.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3410. panel4.add(label20);
  3411. label20.setBounds(5, 115, 115, 20);
  3412.  
  3413. //---- label30 ----
  3414. label30.setText("Level up (yourself)");
  3415. label30.setBackground(new Color(51, 51, 51));
  3416. label30.setForeground(new Color(255, 255, 102));
  3417. label30.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3418. panel4.add(label30);
  3419. label30.setBounds(5, 165, 115, 20);
  3420.  
  3421. //---- textArea3 ----
  3422. textArea3.setForeground(new Color(255, 255, 204));
  3423. textArea3.setBackground(Color.gray);
  3424. textArea3.setText("no thanks/no thx/nope/im fine");
  3425. textArea3.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3426. textArea3.setLineWrap(true);
  3427. panel4.add(textArea3);
  3428. textArea3.setBounds(130, 15, 225, 37);
  3429.  
  3430. //---- textArea7 ----
  3431. textArea7.setForeground(new Color(255, 255, 204));
  3432. textArea7.setBackground(Color.gray);
  3433. textArea7.setText("hi!/hi./hi/hello/hello!/hello./hello../yo/yo!/yes?/what/what?/hey!");
  3434. textArea7.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3435. textArea7.setLineWrap(true);
  3436. panel4.add(textArea7);
  3437. textArea7.setBounds(130, 65, 225, 37);
  3438.  
  3439. //---- textArea8 ----
  3440. textArea8.setForeground(new Color(255, 255, 204));
  3441. textArea8.setBackground(Color.gray);
  3442. textArea8.setText("huh/zzz/.../???/?????/what/what?/no/nop/nope");
  3443. textArea8.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3444. textArea8.setLineWrap(true);
  3445. panel4.add(textArea8);
  3446. textArea8.setBounds(130, 115, 225, 37);
  3447.  
  3448. //---- textArea9 ----
  3449. textArea9.setForeground(new Color(255, 255, 204));
  3450. textArea9.setBackground(Color.gray);
  3451. textArea9.setText("yay/haha/:)/yay!/yay!!!/finally...");
  3452. textArea9.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3453. textArea9.setLineWrap(true);
  3454. panel4.add(textArea9);
  3455. textArea9.setBounds(130, 165, 225, 37);
  3456.  
  3457. //---- label19 ----
  3458. label19.setText("(70% chance to talk)");
  3459. label19.setBackground(new Color(51, 51, 51));
  3460. label19.setForeground(new Color(255, 255, 102));
  3461. label19.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3462. panel4.add(label19);
  3463. label19.setBounds(4, 182, 130, 20);
  3464.  
  3465. //---- button4 ----
  3466. button4.setText("Back");
  3467. button4.setBackground(Color.black);
  3468. button4.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3469. button4.setForeground(new Color(0, 102, 51));
  3470. button4.addActionListener(new ActionListener() {
  3471. @Override
  3472. public void actionPerformed(ActionEvent e) {
  3473. back1ActionPerformed(e);
  3474. }
  3475. });
  3476. panel4.add(button4);
  3477. button4.setBounds(285, 215, 70, 23);
  3478.  
  3479. //---- radioButton2 ----
  3480. radioButton2.setText("Use Level up Response");
  3481. radioButton2.setBackground(Color.black);
  3482. radioButton2.setForeground(Color.yellow);
  3483. radioButton2.setFont(new Font("Century Gothic", Font.BOLD, 13));
  3484. panel4.add(radioButton2);
  3485. radioButton2.setBounds(10, 210, 183, 25);
  3486.  
  3487. { // compute preferred size
  3488. Dimension preferredSize = new Dimension();
  3489. for(int i = 0; i < panel4.getComponentCount(); i++) {
  3490. Rectangle bounds = panel4.getComponent(i).getBounds();
  3491. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  3492. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  3493. }
  3494. Insets insets = panel4.getInsets();
  3495. preferredSize.width += insets.right;
  3496. preferredSize.height += insets.bottom;
  3497. panel4.setMinimumSize(preferredSize);
  3498. panel4.setPreferredSize(preferredSize);
  3499. }
  3500. }
  3501. tabbedPane1.addTab("Responses", panel4);
  3502.  
  3503.  
  3504. //======== panel3 ========
  3505. {
  3506. panel3.setBackground(Color.black);
  3507. panel3.setLayout(null);
  3508.  
  3509. //---- radioButton1 ----
  3510. radioButton1.setText("Use Custom Detection");
  3511. radioButton1.setBackground(Color.black);
  3512. radioButton1.setForeground(Color.yellow);
  3513. radioButton1.setFont(new Font("Century Gothic", Font.BOLD, 13));
  3514. panel3.add(radioButton1);
  3515. radioButton1.setBounds(17, 15, 183, 25);
  3516.  
  3517. //---- label8 ----
  3518. label8.setText("Timeout (seconds):");
  3519. label8.setBackground(new Color(51, 51, 51));
  3520. label8.setForeground(new Color(255, 255, 102));
  3521. label8.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3522. panel3.add(label8);
  3523. label8.setBounds(25, 160, 125, 20);
  3524.  
  3525. //---- formattedTextField1 ----
  3526. formattedTextField1.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3527. formattedTextField1.setForeground(new Color(255, 255, 204));
  3528. formattedTextField1.setBackground(Color.gray);
  3529. formattedTextField1.setText("160");
  3530. panel3.add(formattedTextField1);
  3531. formattedTextField1.setBounds(155, 160, 70, 23);
  3532.  
  3533. //---- label9 ----
  3534. label9.setText("\u00b1");
  3535. label9.setBackground(new Color(51, 51, 51));
  3536. label9.setForeground(new Color(255, 255, 102));
  3537. label9.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3538. panel3.add(label9);
  3539. label9.setBounds(230, 160, 15, 20);
  3540.  
  3541. //---- formattedTextField3 ----
  3542. formattedTextField3.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3543. formattedTextField3.setForeground(new Color(255, 255, 204));
  3544. formattedTextField3.setBackground(Color.gray);
  3545. formattedTextField3.setText("30");
  3546. panel3.add(formattedTextField3);
  3547. formattedTextField3.setBounds(245, 160, 59, 23);
  3548.  
  3549. //---- button5 ----
  3550. button5.setText("Back");
  3551. button5.setBackground(Color.black);
  3552. button5.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3553. button5.setForeground(new Color(0, 102, 51));
  3554. button5.addActionListener(new ActionListener() {
  3555. @Override
  3556. public void actionPerformed(ActionEvent e) {
  3557. back2ActionPerformed(e);
  3558. }
  3559. });
  3560. panel3.add(button5);
  3561. button5.setBounds(285, 215, 70, 23);
  3562.  
  3563. //---- label21 ----
  3564. label21.setText("Detect:");
  3565. label21.setBackground(new Color(51, 51, 51));
  3566. label21.setForeground(new Color(255, 255, 102));
  3567. label21.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3568. label21.setHorizontalAlignment(SwingConstants.LEFT);
  3569. panel3.add(label21);
  3570. label21.setBounds(25, 50, 55, 20);
  3571.  
  3572. //---- textArea10 ----
  3573. textArea10.setForeground(new Color(255, 255, 204));
  3574. textArea10.setBackground(Color.gray);
  3575. textArea10.setText("i love u/i luv u/i love you/i luv you/i lov u/i love you");
  3576. textArea10.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3577. textArea10.setLineWrap(true);
  3578. panel3.add(textArea10);
  3579. textArea10.setBounds(95, 50, 235, 37);
  3580.  
  3581. //---- textArea11 ----
  3582. textArea11.setForeground(new Color(255, 255, 204));
  3583. textArea11.setBackground(Color.gray);
  3584. textArea11.setText("yuck/yuk/gross/eww/zzz/.../zzzz/....");
  3585. textArea11.setFont(new Font("Century Gothic", Font.PLAIN, 12));
  3586. textArea11.setLineWrap(true);
  3587. panel3.add(textArea11);
  3588. textArea11.setBounds(95, 100, 235, 37);
  3589.  
  3590. //---- label22 ----
  3591. label22.setText("Respond:");
  3592. label22.setBackground(new Color(51, 51, 51));
  3593. label22.setForeground(new Color(255, 255, 102));
  3594. label22.setFont(new Font("Century Gothic", Font.BOLD, 12));
  3595. label22.setHorizontalAlignment(SwingConstants.LEFT);
  3596. panel3.add(label22);
  3597. label22.setBounds(25, 100, 65, 20);
  3598.  
  3599. { // compute preferred size
  3600. Dimension preferredSize = new Dimension();
  3601. for(int i = 0; i < panel3.getComponentCount(); i++) {
  3602. Rectangle bounds = panel3.getComponent(i).getBounds();
  3603. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  3604. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  3605. }
  3606. Insets insets = panel3.getInsets();
  3607. preferredSize.width += insets.right;
  3608. preferredSize.height += insets.bottom;
  3609. panel3.setMinimumSize(preferredSize);
  3610. panel3.setPreferredSize(preferredSize);
  3611. }
  3612. }
  3613. tabbedPane1.addTab("Custom", panel3);
  3614.  
  3615. }
  3616. panel1.add(tabbedPane1);
  3617. tabbedPane1.setBounds(15, 45, 370, 275);
  3618.  
  3619. //---- button1 ----
  3620. button1.setText("Start Snaring Birds!");
  3621. button1.setBackground(Color.black);
  3622. button1.setFont(new Font("Century Gothic", Font.BOLD, 18));
  3623. button1.setForeground(new Color(0, 102, 51));
  3624. button1.addActionListener(new ActionListener() {
  3625. @Override
  3626. public void actionPerformed(ActionEvent e) {
  3627. button1ActionPerformed(e);
  3628. }
  3629. });
  3630. panel1.add(button1);
  3631. button1.setBounds(25, 325, 350, 55);
  3632.  
  3633. //---- label1 ----
  3634. label1.setText("Chat Responder Customization");
  3635. label1.setBackground(new Color(51, 51, 51));
  3636. label1.setForeground(new Color(153, 255, 153));
  3637. label1.setFont(new Font("Century Gothic", Font.BOLD, 20));
  3638. panel1.add(label1);
  3639. label1.setBounds(50, 5, 315, 40);
  3640.  
  3641. { // compute preferred size
  3642. Dimension preferredSize = new Dimension();
  3643. for(int i = 0; i < panel1.getComponentCount(); i++) {
  3644. Rectangle bounds = panel1.getComponent(i).getBounds();
  3645. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  3646. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  3647. }
  3648. Insets insets = panel1.getInsets();
  3649. preferredSize.width += insets.right;
  3650. preferredSize.height += insets.bottom;
  3651. panel1.setMinimumSize(preferredSize);
  3652. panel1.setPreferredSize(preferredSize);
  3653. }
  3654. }
  3655. WhiteBearGUIContentPane.add(panel1);
  3656. panel1.setBounds(0, 0, 400, 395);
  3657.  
  3658. WhiteBearGUIContentPane.setPreferredSize(new Dimension(405, 420));
  3659. WhiteBearGUI.setSize(405, 420);
  3660. WhiteBearGUI.setLocationRelativeTo(WhiteBearGUI.getOwner());
  3661. loadSettings();
  3662. }
  3663. }
  3664.  
  3665. private JFrame WhiteBearGUI;
  3666. private JPanel panel1;
  3667. private JTabbedPane tabbedPane1;
  3668. private JPanel panel6;
  3669. private JTextArea textArea1;
  3670. private JTextArea textArea2;
  3671. private JButton button2;
  3672. private JTextArea textArea4;
  3673. private JTextArea textArea5;
  3674. private JButton button3;
  3675. private JTextArea textArea6;
  3676. private JPanel panel4;
  3677. private JLabel label17;
  3678. private JLabel label18;
  3679. private JLabel label20;
  3680. private JLabel label30;
  3681. private JTextArea textArea3;
  3682. private JTextArea textArea7;
  3683. private JTextArea textArea8;
  3684. private JTextArea textArea9;
  3685. private JLabel label19;
  3686. private JButton button4;
  3687. private JCheckBox radioButton2;
  3688. private JPanel panel3;
  3689. private JCheckBox radioButton1;
  3690. private JLabel label8;
  3691. private JFormattedTextField formattedTextField1;
  3692. private JLabel label9;
  3693. private JFormattedTextField formattedTextField3;
  3694. private JButton button5;
  3695. private JLabel label21;
  3696. private JTextArea textArea10;
  3697. private JTextArea textArea11;
  3698. private JLabel label22;
  3699. private JButton button1;
  3700. private JLabel label1;
  3701. }
  3702. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement