wafflecat

pc4

Feb 28th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.38 KB | None | 0 0
  1. import javax.swing.SwingUtilities;
  2. import javax.swing.event.*;
  3. import com.rarebot.script.methods.Game;
  4. import com.rarebot.script.methods.Game.Tab;
  5. import com.rarebot.script.util.Timer;
  6. import java.awt.*;
  7. import java.awt.event.*;
  8. import java.io.IOException;
  9. import java.net.URISyntaxException;
  10. import javax.swing.*;
  11. import com.rarebot.event.events.MessageEvent;
  12. import com.rarebot.script.wrappers.RSObject;
  13. import com.rarebot.script.wrappers.RSPlayer;
  14. import com.rarebot.script.wrappers.RSTile;
  15. import com.rarebot.script.*;
  16. import com.rarebot.script.methods.Skills;
  17. import com.rarebot.script.wrappers.RSNPC;
  18. import java.awt.event.MouseEvent;
  19. import java.awt.event.MouseListener;
  20. import com.rarebot.event.listeners.MessageListener;
  21. import com.rarebot.event.listeners.PaintListener;
  22. import com.rarebot.script.wrappers.RSArea;
  23. import com.rarebot.script.wrappers.RSComponent;
  24.  
  25. @ScriptManifest(authors = "Chad [Xeroday]", name = "xPestControl", version = 1.60, website = "http://www.powerbot.org/community/topic/529507-xpestcontrol-v159-new-gui-update-flawless/", description = "Flawless pest control. Start near the gangplank.")
  26. public class xPestControl extends Script implements PaintListener, MouseListener, MessageListener {
  27.  
  28. String state = "Loading up...";
  29. public static final String version = Double.toString(xPestControl.class.getAnnotation(ScriptManifest.class).version());
  30. public String URL = "http://www.powerbot.org/community/topic/529507-xpestcontrol-v159-new-gui-update-flawless/";
  31. private final RenderingHints antialiasing = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  32. RSTile joinTile;
  33. RSTile boatTile;
  34. public int gangplankID;
  35. private static final RSTile joinNovice = new RSTile(2657, 2639);
  36. private static final RSTile boatNovice = new RSTile(2661, 2639);
  37. public int gangplankNovice = 14315;
  38. RSTile joinIntermediate = new RSTile(2644, 2644);
  39. RSTile boatIntermediate = new RSTile(2640, 2644);
  40. public int gangplankIntermediate = 25631;
  41. RSTile joinVeteran = new RSTile(2638, 2653);
  42. RSTile boatVeteran = new RSTile(2634, 2653);
  43. public int gangplankVeteran = 25632;
  44. RSTile knightTile;
  45. RSTile W;
  46. RSTile E;
  47. RSTile SE;
  48. RSTile SW;
  49. public int oW = 0;
  50. public int oE = 0;
  51. public int oSE = 0;
  52. public int oSW = 0;
  53. public int inGame = 0;
  54. public int speed = -1337;
  55. RSArea islandArea = new RSArea(new RSTile(2500, 2500), new RSTile(2800, 2700));
  56. public static int squireID = 3781;
  57. RSNPC squire;
  58. RSNPC knight;
  59. RSNPC check;
  60. RSNPC target;
  61. RSObject gangplank;
  62. private final Color color1 = new Color(0, 91, 255);
  63. private final Color color2 = new Color(0, 0, 0);
  64. private final Color color3 = new Color(255, 153, 0);
  65. private final Color color4 = new Color(54, 255, 0);
  66. private final BasicStroke stroke1 = new BasicStroke(5);
  67. private final Font font1 = new Font("Arial", 1, 17);
  68. private final Font font2 = new Font("Arial", 0, 15);
  69. public long startTime = System.currentTimeMillis();
  70. long runTime;
  71. long seconds;
  72. long minutes;
  73. long hours;
  74. int currentXP;
  75. int startXP;
  76. int gainedXP;
  77. int xpPerHour;
  78. int pointsStart = 1337;
  79. int pointsGained;
  80. int pointsPerHour;
  81. public int useAntiban = 0;
  82. public int useSpecial = 0;
  83. public int usePrayer = 0;
  84. public int attackPortals = 0;
  85. public boolean showPaint = true;
  86. public int spec = 0;
  87. public int pray = 0;
  88. String text;
  89. private static final Color MOUSE_COLOR = new Color(132, 198, 99),
  90. MOUSE_BORDER_COLOR = new Color(0, 0, 153),
  91. MOUSE_CENTER_COLOR = new Color(168, 9, 9);
  92. private boolean pressed = false;
  93. private int absoluteY = 0;
  94.  
  95. private static enum State {
  96.  
  97. SLEEP, Gangplank, WalkCenter, Fight, WalkSouth, Lost, WalkPortal
  98. }
  99.  
  100. @Override
  101. public boolean onStart() {
  102. try {
  103. SwingUtilities.invokeAndWait(new Runnable() {
  104.  
  105. @Override
  106. public void run() {
  107.  
  108. Project gui = new Project();
  109. gui.setVisible(true);
  110.  
  111. }
  112. });
  113. } catch (Throwable ignore) {
  114. }
  115. while (speed < 0) {
  116. sleep(200);
  117. }
  118. if (useAntiban > 0) {
  119. try {
  120. SwingUtilities.invokeAndWait(new Runnable() {
  121.  
  122. @Override
  123. public void run() {
  124. AB.setVisible(true);
  125. }
  126. });
  127. } catch (Throwable ignore) {
  128. }
  129. }
  130. while (AB.isVisible()) {
  131. sleep(200);
  132. }
  133. mouse.setSpeed(speed);
  134. startTime = System.currentTimeMillis();
  135. startXP = skills.getCurrentExp(Skills.ATTACK) + skills.getCurrentExp(Skills.CONSTITUTION) + skills.getCurrentExp(Skills.DEFENSE) + skills.getCurrentExp(Skills.STRENGTH);
  136.  
  137. return true;
  138. }
  139.  
  140. @Override
  141. public void onFinish() {
  142. log("Thanks for using xPestControl!");
  143. }
  144.  
  145. private State getState() {
  146. if (players.getMyPlayer() != null && game.isLoggedIn()) {
  147. while (camera.getPitch() < 90) {
  148. camera.setPitch(100);
  149. }
  150. if (calc.distanceTo(joinTile) > 200 || !islandArea.contains(getMyPlayer().getLocation())) {
  151. knight = npcs.getNearest("Void Knight");
  152. if (knightTile != null) {
  153. if (calc.distanceBetween(knightTile, joinTile) < 100) {
  154. knightTile = null;
  155. }
  156. }
  157. if (knight == null && knightTile == null) {
  158. return State.WalkSouth;
  159. } else if (knight != null && (oW + oSW + oSE + oE < 1)) {
  160. knightTile = knight.getLocation();
  161. W = new RSTile(knightTile.getX() - 25, knightTile.getY());
  162. SW = new RSTile(knightTile.getX() - 10, knightTile.getY() - 20);
  163. E = new RSTile(knightTile.getX() + 23, knightTile.getY() - 3);
  164. SE = new RSTile(knightTile.getX() + 14, knightTile.getY() - 19);
  165. if (!knight.isOnScreen() && (oW + oSW + oSE + oE < 1)) {
  166. return State.WalkCenter;
  167. } else if ((calc.distanceTo(knight.getLocation()) <= 5 || knight.isOnScreen())) {
  168. return State.Fight;
  169. }
  170. } else if (oW + oSW + oSE + oE >= 1) {
  171. if (attackPortals > 0) {
  172. check = npcs.getNearest("Shifter", "Brawler", "Defiler", "Ravager", "Torcher", "Spinner", "Portal");
  173. } else {
  174. check = npcs.getNearest("Shifter", "Brawler", "Defiler", "Ravager", "Torcher", "Spinner");
  175. }
  176. if (calc.distanceTo(W) > 9 && calc.distanceTo(SW) > 9 && calc.distanceTo(E) > 9 && calc.distanceTo(SE) > 9 && check == null) {
  177. if (W != null) {
  178. return State.WalkPortal;
  179. } else {
  180. return State.WalkSouth;
  181. }
  182. } else {
  183. if (check != null) {
  184. if (calc.distanceTo(check.getLocation()) < 10) {
  185. return State.Fight;
  186. } else {
  187. walking.walkTo(check.getLocation());
  188. sleep(1000, 1500);
  189. }
  190. } else {
  191. return State.WalkPortal;
  192. }
  193. }
  194. }
  195. } else if (calc.distanceTo(joinTile) < 2) {
  196. reset();
  197. return State.Gangplank;
  198. } else if (calc.distanceTo(boatTile) < 2) {
  199. if (pointsStart == 1337) {
  200. text = interfaces.getComponent(407, 16).getText();
  201. text = text.replace("Commendations: ", "");
  202. pointsStart = Integer.parseInt(text);
  203. } else {
  204. text = interfaces.getComponent(407, 16).getText();
  205. text = text.replace("Commendations: ", "");
  206. if (Integer.parseInt(text) == 500) {
  207. log("Max points. Stopping script & taking screenshot...");
  208. env.saveScreenshot(true);
  209. stopScript(false);
  210. }
  211. pointsGained = Integer.parseInt(text) - pointsStart;
  212. }
  213. return State.SLEEP;
  214. } else {
  215. return State.Lost;
  216. }
  217. }
  218.  
  219. return State.SLEEP;
  220. }
  221.  
  222. @Override
  223. public int loop() {
  224. if (useAntiban == 1) {
  225. AB.antiBanMethod();
  226. if (AB.AFKTimer.isRunning()) {
  227. return 200;
  228. }
  229. }
  230. State currentState = getState();
  231. RSPlayer me = players.getMyPlayer();
  232. if (interfaces.getComponent(244, 4).containsText("must defend the ")) {
  233. inGame = 1;
  234. } else if (islandArea.contains(me.getLocation())) {
  235. knightTile = null;
  236. inGame = 0;
  237. }
  238. if (knightTile != null) {
  239. if (islandArea.contains(knightTile)) {
  240. knightTile = null;
  241. }
  242. }
  243. switch (currentState) {
  244. case SLEEP:
  245. state = "Sleeping";
  246. sleep(1000);
  247. break;
  248. case Gangplank:
  249. state = "Joining";
  250. gangplank = objects.getNearest(gangplankID);
  251. if (gangplank != null) {
  252. if (gangplank.isOnScreen()) {
  253. gangplank.interact("Cross");
  254. sleep(1000, 1337);
  255. }
  256. }
  257. break;
  258. case WalkSouth:
  259. activate();
  260. state = "Walking south";
  261. walking.walkTileMM(new RSTile(me.getLocation().getX(), me.getLocation().getY() - random(8, 10)));
  262. sleep(2000, 2500);
  263. break;
  264. case WalkPortal:
  265. state = "Walking to portal";
  266. if (oW == 1) {
  267. for (int i = 0; i < 5; i++) {
  268. if (calc.distanceTo(W) > 3 && !islandArea.contains(me.getLocation())) {
  269. walking.walkTo(W);
  270. sleep(1000, 1700);
  271. }
  272. }
  273. } else if (oE == 1) {
  274. for (int i = 0; i < 5; i++) {
  275. if (calc.distanceTo(E) > 3 && !islandArea.contains(me.getLocation())) {
  276. walking.walkTo(E);
  277. sleep(1700, 2600);
  278. }
  279. }
  280. } else if (oSW == 1) {
  281. for (int i = 0; i < 3; i++) {
  282. if (calc.distanceTo(SW) > 3 && !islandArea.contains(me.getLocation())) {
  283. walking.walkTo(SW);
  284. sleep(1000, 1600);
  285. }
  286. }
  287. } else if (oSE == 1) {
  288. for (int i = 0; i < 3; i++) {
  289. if (calc.distanceTo(SE) > 3 && !islandArea.contains(me.getLocation())) {
  290. walking.walkTo(SE);
  291. sleep(1000, 1600);
  292. }
  293. }
  294. }
  295. break;
  296. case WalkCenter:
  297. state = "Walking to center";
  298. knight = npcs.getNearest("Void Knight");
  299. squire = npcs.getNearest(squireID);
  300. if (knight != null || squire != null) {
  301. while (!knight.isOnScreen()) {
  302. walking.walkTileMM(knight.getLocation());
  303. sleep(2337, 3333);
  304. }
  305. }
  306. break;
  307. case Fight:
  308. state = "Fighting";
  309. if (me.getInteracting() == null || !me.isInCombat()) {
  310. if (attackPortals > 0) {
  311. target = npcs.getNearest("Shifter", "Brawler", "Defiler", "Ravager", "Torcher", "Spinner", "Portal");
  312. } else {
  313. target = npcs.getNearest("Shifter", "Brawler", "Defiler", "Ravager", "Torcher", "Spinner");
  314. }
  315. if (target != null) {
  316. if (target.isOnScreen()) {
  317. if (target.getHPPercent() > 0 && me.getAnimation() < 0) {
  318. if (target.getName().contains("Portal")) {
  319. if (target.isInCombat()) {
  320. target.interact("Attack " + target.getName());
  321. sleep(800, 1200);
  322. }
  323. } else {
  324. target.interact("Attack " + target.getName());
  325. sleep(1200, 1600);
  326. }
  327. }
  328. } else {
  329. if (oW + oSW + oSE + oE >= 1) {
  330. walking.walkTo(target.getLocation());
  331. sleep(1500, 2500);
  332. }
  333. }
  334. sleep(500, 600);
  335. }
  336. }
  337. break;
  338. case Lost:
  339. sleep(1400, 1800);
  340. if (islandArea.contains(me.getLocation())) {
  341. state = "Attempting to fix";
  342. walking.walkTo(joinTile);
  343. sleep(1000, 1500);
  344. } else if (knightTile != null) {
  345. state = "Attempting to fix";
  346. walking.walkTo(knightTile);
  347. sleep(1000, 1500);
  348. } else {
  349. break;
  350. }
  351.  
  352. }
  353.  
  354.  
  355. return 300;
  356. }
  357.  
  358. public void activate() {
  359. if (useSpecial > 0) {
  360. if (spec == 0) {
  361. state = "Special attack";
  362. game.getTab();
  363. game.openTab(Tab.ATTACK);
  364. sleep(500, 1000);
  365. interfaces.getComponent(884, 8).doClick();
  366. spec++;
  367. }
  368. }
  369. if (usePrayer > 0) {
  370. if (pray == 0) {
  371. state = "Quick prayer";
  372. prayer.setQuickPrayer(true);
  373. pray++;
  374. }
  375. }
  376. }
  377.  
  378. @Override
  379. public void messageReceived(MessageEvent e) {
  380. String x = e.getMessage();
  381. if (!islandArea.contains(players.getMyPlayer().getLocation())) {
  382. if (x.contains("The purple, western portal shield has dropped!")) {
  383. oW = 1;
  384. oE = 0;
  385. oSW = 0;
  386. oSE = 0;
  387. } else if (x.contains("The blue, eastern portal shield has dropped!")) {
  388. oW = 0;
  389. oE = 1;
  390. oSW = 0;
  391. oSE = 0;
  392. } else if (x.contains("The yellow, south-eastern portal shield has dropped!")) {
  393. oW = 0;
  394. oE = 0;
  395. oSW = 0;
  396. oSE = 1;
  397. } else if (x.contains("The red, south-western portal shield has dropped!")) {
  398. oW = 0;
  399. oE = 0;
  400. oSW = 1;
  401. oSE = 0;
  402. } else if (x.contains("Oh dear, you are dead!")) {
  403. spec = 0;
  404. pray = 0;
  405. sleep(1000, 1400);
  406. activate();
  407. walking.walkTo(knightTile);
  408. sleep(2000, 2500);
  409. }
  410. }
  411. }
  412.  
  413. public void paintTile(final Graphics g, final RSTile tile, final Color tileColor, final String caption, final Color captionColor) {
  414. if (calc.tileOnScreen(tile)) {
  415. final RSTile tx = new RSTile(tile.getX() + 1, tile.getY());
  416. final RSTile ty = new RSTile(tile.getX(), tile.getY() + 1);
  417. final RSTile txy = new RSTile(tile.getX() + 1, tile.getY() + 1);
  418. final Point pn = calc.tileToScreen(tile, 0, 0, 0);
  419. final Point px = calc.tileToScreen(tx, 0, 0, 0);
  420. final Point py = calc.tileToScreen(ty, 0, 0, 0);
  421. final Point pxy = calc.tileToScreen(txy, 0, 0, 0);
  422. if (pn.x != -1 && pn.y != -1 && px.x != -1 && px.y != -1 && py.x != -1 && py.y != -1 && pxy.x != -1 && pxy.y != -1) {
  423. g.setColor(new Color(0, 0, 0, 255));
  424. g.drawPolygon(new int[]{py.x, pxy.x, px.x, pn.x}, new int[]{py.y, pxy.y, px.y, pn.y}, 4);
  425. g.setColor(tileColor);
  426. g.fillPolygon(new int[]{py.x, pxy.x, px.x, pn.x}, new int[]{py.y, pxy.y, px.y, pn.y}, 4);
  427. g.setColor(captionColor);
  428. g.setFont(new Font("Arial", Font.BOLD, 11));
  429. g.drawString(caption, Math.max(Math.max(pn.x, px.x), Math.max(py.x, pxy.x)) + 5, Math.min(Math.min(pn.y, px.y), Math.min(py.y, pxy.y)) + 15);
  430. }
  431. }
  432. }
  433.  
  434. public void reset() {
  435. oW = 0;
  436. oE = 0;
  437. oSE = 0;
  438. oSW = 0;
  439. W = null;
  440. SW = null;
  441. E = null;
  442. SE = null;
  443. knightTile = null;
  444. pray = 0;
  445. spec = 0;
  446. }
  447.  
  448. @Override
  449. public void mouseClicked(MouseEvent e) {
  450. RSComponent inter = interfaces.get(271).getComponent(8);
  451. if (inter.getArea().contains(e.getPoint())) {
  452. showPaint = !showPaint;
  453. }
  454. }
  455.  
  456. private void drawMouse(Graphics g) {
  457. ((Graphics2D) g).setRenderingHints(new RenderingHints(
  458. RenderingHints.KEY_ANTIALIASING,
  459. RenderingHints.VALUE_ANTIALIAS_ON));
  460. Point p = mouse.getLocation();
  461. Graphics2D spinG = (Graphics2D) g.create();
  462. Graphics2D spinGRev = (Graphics2D) g.create();
  463. Graphics2D spinG2 = (Graphics2D) g.create();
  464. spinG.setColor(MOUSE_BORDER_COLOR);
  465. spinGRev.setColor(MOUSE_COLOR);
  466. spinG.rotate(System.currentTimeMillis() % 2000d / 2000d * (360d) * 2
  467. * Math.PI / 180.0, p.x, p.y);
  468. spinGRev.rotate(System.currentTimeMillis() % 2000d / 2000d * (-360d)
  469. * 2 * Math.PI / 180.0, p.x, p.y);
  470. final int outerSize = 20;
  471. final int innerSize = 12;
  472. spinG.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  473. BasicStroke.JOIN_ROUND));
  474. spinGRev.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  475. BasicStroke.JOIN_ROUND));
  476. spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
  477. outerSize, 100, 75);
  478. spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
  479. outerSize, -100, 75);
  480. spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
  481. innerSize, innerSize, 100, 75);
  482. spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
  483. innerSize, innerSize, -100, 75);
  484. g.setColor(MOUSE_CENTER_COLOR);
  485. g.fillOval(p.x, p.y, 2, 2);
  486. spinG2.setColor(MOUSE_CENTER_COLOR);
  487. spinG2.rotate(System.currentTimeMillis() % 2000d / 2000d * 360d
  488. * Math.PI / 180.0, p.x, p.y);
  489. spinG2.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  490. BasicStroke.JOIN_ROUND));
  491. spinG2.drawLine(p.x - 5, p.y, p.x + 5, p.y);
  492. spinG2.drawLine(p.x, p.y - 5, p.x, p.y + 5);
  493. }
  494.  
  495. @Override
  496. public void onRepaint(Graphics g1) {
  497. runTime = System.currentTimeMillis() - startTime;
  498. seconds = runTime / 1000;
  499. if (seconds >= 60) {
  500. minutes = seconds / 60;
  501. seconds -= (minutes * 60);
  502. }
  503. if (minutes >= 60) {
  504. hours = minutes / 60;
  505. minutes -= (hours * 60);
  506. }
  507. currentXP = skills.getCurrentExp(Skills.ATTACK) + skills.getCurrentExp(Skills.CONSTITUTION) + skills.getCurrentExp(Skills.DEFENSE) + skills.getCurrentExp(Skills.STRENGTH);
  508. gainedXP = currentXP - startXP;
  509. xpPerHour = (int) ((3600000.0 / (double) runTime) * gainedXP);
  510. pointsPerHour = (int) ((3600000.0 / (double) runTime) * pointsGained);
  511. Graphics2D g = (Graphics2D) g1;
  512. g.setRenderingHints(antialiasing);
  513. if (showPaint) {
  514. g.setColor(color1);
  515. g.fillRoundRect(555, 212, 174, 245, 16, 16);
  516. g.setColor(color2);
  517. g.setStroke(stroke1);
  518. g.drawRoundRect(555, 212, 174, 245, 16, 16);
  519. g.setFont(font1);
  520. g.setColor(color3);
  521. g.drawString("xPestControl v" + version, 566, 232);
  522. g.setFont(font2);
  523. g.setColor(color4);
  524. g.drawString("Time running: " + hours + ":" + minutes + ":" + seconds, 565, 263);
  525. g.drawString("Points gained: " + pointsGained, 565, 288);
  526. g.drawString("Points per hour: " + pointsPerHour, 565, 313);
  527. g.drawString("XP gained: " + gainedXP, 565, 338);
  528. g.drawString("XP per hour: " + xpPerHour, 565, 363);
  529. g.drawString("State: " + state, 565, 388);
  530. g.drawString("Click paint to hide.", 565, 428);
  531. }
  532. if (showPaint == false) {
  533. g.setFont(font2);
  534. g.setColor(color4);
  535. g.drawString("Click to show paint.", 565, 428);
  536. }
  537. drawMouse(g);
  538. try {
  539. paintTile(g, knightTile, new Color(0, 255, 0, 80), "Void Knight", new Color(0, 255, 0, 255));
  540. } catch (NullPointerException x) {
  541. }
  542. try {
  543. paintTile(g, target.getLocation(), new Color(255, 0, 0, 80), "Target", new Color(255, 0, 0, 255));
  544. } catch (NullPointerException x) {
  545. }
  546. try {
  547. paintTile(g, walking.getDestination(), new Color(0, 255, 0, 80), "Destination", new Color(0, 255, 0, 255));
  548. } catch (NullPointerException x) {
  549. }
  550. }
  551.  
  552. @Override
  553. public void mouseEntered(MouseEvent arg0) {
  554. }
  555.  
  556. @Override
  557. public void mouseExited(MouseEvent arg0) {
  558. }
  559.  
  560. @Override
  561. public void mousePressed(MouseEvent arg0) {
  562. Point mp = arg0.getPoint();
  563. final Rectangle toggleRectangle = new Rectangle(493, absoluteY + 3, 16,
  564. 15);
  565. if (toggleRectangle.contains(mp)) {
  566. pressed = !pressed;
  567. }
  568. }
  569.  
  570. @Override
  571. public void mouseReleased(MouseEvent arg0) {
  572. }
  573.  
  574. class Project extends JFrame {
  575.  
  576. /**
  577. *
  578. */
  579. private static final long serialVersionUID = 1L;
  580. public Project() {
  581. initComponents();
  582. }
  583.  
  584. private void button1ActionPerformed(ActionEvent e) throws URISyntaxException, IOException {
  585. java.awt.Desktop myNewBrowserDesktop = java.awt.Desktop.getDesktop();
  586. java.net.URI myNewLocation = new java.net.URI(URL);
  587. myNewBrowserDesktop.browse(myNewLocation);
  588. }
  589.  
  590. private void Start(ActionEvent e) {
  591. if (comboBox1.getSelectedIndex() == 0) {
  592. joinTile = joinNovice;
  593. boatTile = boatNovice;
  594. gangplankID = gangplankNovice;
  595. log("Settings: Novice boat.");
  596. } else if (comboBox1.getSelectedIndex() == 1) {
  597. joinTile = joinIntermediate;
  598. boatTile = boatIntermediate;
  599. gangplankID = gangplankIntermediate;
  600. log("Settings: Intermediate boat.");
  601. } else if (comboBox1.getSelectedIndex() == 2) {
  602. joinTile = joinVeteran;
  603. boatTile = boatVeteran;
  604. gangplankID = gangplankVeteran;
  605. log("Settings: Veteran boat.");
  606. }
  607. if (settingsAntiban.isSelected()) {
  608. useAntiban = 1;
  609. log("Settings: Using antiban.");
  610. }
  611. if (settingsSpecial.isSelected()) {
  612. useSpecial = 1;
  613. log("Settings: Using special attacks.");
  614. }
  615. if (settingsPrayer.isSelected()) {
  616. usePrayer = 1;
  617. log("Settings: Using quick prayer.");
  618. }
  619. if (settingsPortals.isSelected()) {
  620. attackPortals = 1;
  621. log("Settings: Attacking portals.");
  622. }
  623.  
  624. speed = Integer.parseInt(textField1.getText());
  625.  
  626. this.setVisible(false);
  627. }
  628.  
  629. private void initComponents() {
  630. // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
  631. // Generated using JFormDesigner Evaluation license - Ji adf
  632. textField1 = new JTextField();
  633. panel1 = new JPanel();
  634. button1 = new JButton();
  635. button2 = new JButton();
  636. label1 = new JLabel();
  637. settingsAntiban = new JCheckBox();
  638. settingsSpecial = new JCheckBox();
  639. settingsPrayer = new JCheckBox();
  640. settingsPortals = new JCheckBox();
  641. comboBox1 = new JComboBox();
  642.  
  643. //======== this ========
  644. setTitle("xPestControl GUI");
  645. Container contentPane = getContentPane();
  646. contentPane.setLayout(null);
  647.  
  648. //---- textField1 ----
  649. textField1.setText("7");
  650. contentPane.add(textField1);
  651. textField1.setBounds(160, 40, 30, 30);
  652.  
  653. //======== panel1 ========
  654. {
  655.  
  656. // JFormDesigner evaluation mark
  657. panel1.setBorder(new javax.swing.border.CompoundBorder(
  658. new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
  659. "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
  660. javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12),
  661. java.awt.Color.red), panel1.getBorder()));
  662. panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
  663.  
  664. public void propertyChange(java.beans.PropertyChangeEvent e) {
  665. if ("border".equals(e.getPropertyName())) {
  666. throw new RuntimeException();
  667. }
  668. }
  669. });
  670.  
  671. panel1.setLayout(null);
  672.  
  673. { // compute preferred size
  674. Dimension preferredSize = new Dimension();
  675. for (int i = 0; i < panel1.getComponentCount(); i++) {
  676. Rectangle bounds = panel1.getComponent(i).getBounds();
  677. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  678. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  679. }
  680. Insets insets = panel1.getInsets();
  681. preferredSize.width += insets.right;
  682. preferredSize.height += insets.bottom;
  683. panel1.setMinimumSize(preferredSize);
  684. panel1.setPreferredSize(preferredSize);
  685. }
  686. }
  687. contentPane.add(panel1);
  688. panel1.setBounds(110, 100, panel1.getPreferredSize().width, 0);
  689.  
  690. //---- button1 ----
  691. button1.setText("View thread on Powerbot.org");
  692. button1.setFont(new Font("Tahoma", Font.PLAIN, 10));
  693. button1.addActionListener(new ActionListener() {
  694.  
  695. @Override
  696. public void actionPerformed(ActionEvent e) {
  697. try {
  698. button1ActionPerformed(e);
  699. } catch (URISyntaxException ex) {
  700. log.severe(ex.toString());
  701. } catch (IOException ex) {
  702. log.severe(ex.toString());
  703. }
  704. }
  705. });
  706. contentPane.add(button1);
  707. button1.setBounds(-5, 260, 210, button1.getPreferredSize().height);
  708.  
  709. //---- button2 ----
  710. //button2.setText("Start & Check for Update");
  711. button2.setText("Start");
  712. button2.setFont(new Font("Tahoma", Font.PLAIN, 14));
  713. button2.addActionListener(new ActionListener() {
  714.  
  715. @Override
  716. public void actionPerformed(ActionEvent e) {
  717. Start(e);
  718. }
  719. });
  720. contentPane.add(button2);
  721. button2.setBounds(-5, 200, 210, 55);
  722.  
  723. //---- label1 ----
  724. label1.setText("Mouse Speed (Lower is faster)");
  725. contentPane.add(label1);
  726. label1.setBounds(5, 50, 150, 15);
  727.  
  728. //---- settingsAntiban ----
  729. settingsAntiban.setText("Use Antiban");
  730. contentPane.add(settingsAntiban);
  731. settingsAntiban.setBounds(new Rectangle(new Point(5, 75), settingsAntiban.getPreferredSize()));
  732.  
  733. //---- settingsSpecial ----
  734. settingsSpecial.setText("Use Special Attack");
  735. contentPane.add(settingsSpecial);
  736. settingsSpecial.setBounds(new Rectangle(new Point(5, 100), settingsSpecial.getPreferredSize()));
  737.  
  738. //---- settingsPrayer ----
  739. settingsPrayer.setText("Use Quick Prayer");
  740. contentPane.add(settingsPrayer);
  741. settingsPrayer.setBounds(new Rectangle(new Point(5, 125), settingsPrayer.getPreferredSize()));
  742.  
  743. //---- settingsPortals ----
  744. settingsPortals.setText("Attack Portals");
  745. contentPane.add(settingsPortals);
  746. settingsPortals.setBounds(new Rectangle(new Point(5, 150), settingsPortals.getPreferredSize()));
  747.  
  748. //---- comboBox1 ----
  749. comboBox1.setModel(new DefaultComboBoxModel(new String[]{
  750. "Novice",
  751. "Intermediate",
  752. "Expert"
  753. }));
  754. contentPane.add(comboBox1);
  755. comboBox1.setBounds(5, 10, 185, comboBox1.getPreferredSize().height);
  756.  
  757. { // compute preferred size
  758. Dimension preferredSize = new Dimension();
  759. for (int i = 0; i < contentPane.getComponentCount(); i++) {
  760. Rectangle bounds = contentPane.getComponent(i).getBounds();
  761. preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
  762. preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
  763. }
  764. Insets insets = contentPane.getInsets();
  765. preferredSize.width += insets.right;
  766. preferredSize.height += insets.bottom;
  767. contentPane.setMinimumSize(preferredSize);
  768. contentPane.setPreferredSize(preferredSize);
  769. }
  770. pack();
  771. setLocationRelativeTo(getOwner());
  772. // JFormDesigner - End of component initialization //GEN-END:initComponents
  773. }
  774. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  775. // Generated using JFormDesigner Evaluation license - Ji adf
  776. private JTextField textField1;
  777. private JPanel panel1;
  778. private JButton button1;
  779. private JButton button2;
  780. private JLabel label1;
  781. private JCheckBox settingsAntiban;
  782. private JCheckBox settingsSpecial;
  783. private JCheckBox settingsPrayer;
  784. private JCheckBox settingsPortals;
  785. private JComboBox comboBox1;
  786. // JFormDesigner - End of variables declaration //GEN-END:variables
  787. }
  788. public AntiBan AB = new AntiBan();
  789.  
  790. class AntiBan extends JFrame {
  791.  
  792. /**
  793. *
  794. */
  795. private static final long serialVersionUID = 1L;
  796. public Timer antiBanTimer = new Timer(0);
  797. public boolean customAB, AFK, Mouse, Camera, Tabs, LogOut, ABOn;
  798. public int ABFreq;
  799. public double ABFreqTime;
  800. Timer AFKTimer = new Timer(0);
  801.  
  802. public void antiBanMethod() {
  803. if (ABOn) {
  804. if (!antiBanTimer.isRunning() && !AFKTimer.isRunning()) {
  805. antiBan();
  806. antiBanTimer.setEndIn((int) random(ABFreqTime * .33, ABFreqTime * 1.66));
  807. }
  808. }
  809. }
  810.  
  811. @SuppressWarnings("deprecation")
  812. public void antiBan() {
  813. int t = 0;
  814. if (Camera) {
  815. t++;
  816. };
  817. if (Tabs) {
  818. t++;
  819. };
  820. if (AFK) {
  821. t++;
  822. };
  823. if (Mouse) {
  824. t++;
  825. };
  826. t += 0;
  827. switch (random(1, t)) {
  828. case 1:
  829. if (Camera) {
  830. state = "Antiban";
  831. camera.turnTo(getMyPlayer().getLocation().randomize(5, 5), 5);
  832. sleep(random(500, 750));
  833. return;
  834. }
  835. case 2:
  836. if (Tabs) {
  837. switch (random(1, 4)) {
  838. case 1:
  839. state = "Antiban";
  840. game.openTab(Game.TAB_FRIENDS);
  841. mouse.move((585 + random(-35, 35)), (330 + random(-90, 90)));
  842. sleep(750, 3000);
  843. game.openTab(Game.TAB_INVENTORY);
  844. sleep(random(500, 750));
  845. return;
  846.  
  847. case 2:
  848. state = "Antiban";
  849. game.openTab(Game.TAB_CLAN);
  850. mouse.move((585 + random(-35, 35)), (330 + random(-90, 90)));
  851. sleep(750, 1500);
  852. game.openTab(Game.TAB_INVENTORY);
  853. sleep(random(500, 750));
  854. return;
  855.  
  856. default:
  857. state = "Antiban";
  858. game.openTab(Game.TAB_STATS);
  859. mouse.moveRandomly(random(1, 300));
  860. sleep(750, 1500);
  861. game.openTab(Game.TAB_INVENTORY);
  862. sleep(random(500, 750));
  863. return;
  864. }
  865. }
  866. case 3:
  867. if (AFK) {
  868. state = "Antiban";
  869. int r = random(1, 100);
  870. if (r < 75) {
  871. AFKTimer.setEndIn(random(3000, 5000));
  872. } else if (r >= 70 && r < 90) {
  873. AFKTimer.setEndIn(random(5000, 15000));
  874. } else {
  875. AFKTimer.setEndIn(random(10000, 30000));
  876. }
  877. return;
  878. }
  879. case 4:
  880. if (Mouse) {
  881. int s = random(1, 4);
  882. switch (s) {
  883. case 1:
  884. state = "Antiban";
  885. mouse.moveOffScreen();
  886. sleep(750, 1500);
  887. return;
  888. case 2:
  889. state = "Antiban";
  890. mouse.moveSlightly();
  891. sleep(500, 1000);
  892. return;
  893. case 3:
  894. state = "Antiban";
  895. mouse.moveRandomly(random(1, 300));
  896. sleep(750, 1500);
  897. return;
  898. default:
  899. return;
  900. }
  901.  
  902. }
  903. default:
  904. return;
  905. }
  906. }
  907.  
  908. public void setEnabled(boolean a, boolean b, boolean c, boolean d,
  909. boolean e, boolean f, boolean g, boolean h,
  910. boolean i, boolean j, boolean k, boolean l) {
  911.  
  912. ABFreqSlider.setEnabled(a);
  913. ABOnOff.setEnabled(b);
  914. customAntiBanButton.setEnabled(c);
  915. ABLevelOptions.setEnabled(d);
  916. separator1.setEnabled(e);
  917. ABFreqLabel.setEnabled(f);
  918. AFKCheck.setEnabled(g);
  919. mouseMoveCheck.setEnabled(h);
  920. camMoveCheck.setEnabled(i);
  921. logOutCheck.setEnabled(j);
  922. openTabsCheck.setEnabled(k);
  923. ABLevelLabel.setEnabled(l);
  924.  
  925. }
  926.  
  927. public void getSettings() {
  928. if (!ABOnOff.isSelected()) {
  929. ABOn = true;
  930. if (customAntiBanButton.isSelected()) {
  931. customAB = true;
  932. ABFreq = ABFreqSlider.getValue();
  933. AFK = AFKCheck.isSelected();
  934. Mouse = mouseMoveCheck.isSelected();
  935. Camera = camMoveCheck.isSelected();
  936. Tabs = openTabsCheck.isSelected();
  937. LogOut = logOutCheck.isSelected();
  938. } else {
  939. customAB = false;
  940. if (ABLevelOptions.getSelectedItem().toString().contains("Low")) {
  941. ABFreq = 20;
  942. LogOut = true;
  943. Camera = true;
  944. Mouse = true;
  945.  
  946. } else if (ABLevelOptions.getSelectedItem().toString().contains("Medium")) {
  947. ABFreq = 40;
  948. Mouse = true;
  949. LogOut = true;
  950. Camera = true;
  951. AFK = true;
  952.  
  953. } else if (ABLevelOptions.getSelectedItem().toString().contains("High")) {
  954. ABFreq = 60;
  955. LogOut = true;
  956. Camera = true;
  957. Tabs = true;
  958. AFK = true;
  959. Mouse = true;
  960. }
  961. }
  962. log("AntiBan on");
  963. ABFreqTime = ((double) (240 / ABFreq) * 15000);
  964. antiBanTimer = new Timer((int) random(ABFreqTime * .5, ABFreqTime * 1.5));
  965. } else {
  966. log("AntiBan off");
  967. ABOn = false;
  968. }
  969.  
  970. }
  971.  
  972. public void ABToggle() {
  973. if ((ABOnOff.isSelected())) {
  974. setEnabled(false, true, false, false, false, false, false, false, false, false, false, false);
  975. } else {
  976. if (customAntiBanButton.isSelected()) {
  977. setEnabled(true, true, true, false, true, true, true, true, true, false, true, false);
  978. } else {
  979. setEnabled(false, true, true, true, true, false, false, false, false, false, false, true);
  980. }
  981. }
  982. }
  983.  
  984. public void cantCont() {
  985. if ((customAntiBanButton.isSelected() && !AFKCheck.isSelected() && !mouseMoveCheck.isSelected()
  986. && !camMoveCheck.isSelected() && !openTabsCheck.isSelected()) || ABFreqSlider.getValue() == 0) {
  987. contButton.setEnabled(false);
  988. } else {
  989. contButton.setEnabled(true);
  990. }
  991. }
  992.  
  993. public AntiBan() {
  994. initComponents();
  995. }
  996.  
  997. private void ABFreqSliderStateChanged(ChangeEvent e) {
  998. cantCont();
  999. }
  1000.  
  1001. private void ABOnOffStateChanged(ChangeEvent e) {
  1002. ABOnOff.setToolTipText("The AntiBan is currently: " + content());
  1003. ABOnOff.setText("Turn AntiBan " + OPcontent());
  1004. ABToggle();
  1005. cantCont();
  1006. }
  1007.  
  1008. private void customAntiBanButtonStateChanged(ChangeEvent e) {
  1009. ABToggle();
  1010. cantCont();
  1011. }
  1012.  
  1013. private void AFKCheckStateChanged(ChangeEvent e) {
  1014. cantCont();
  1015. }
  1016.  
  1017. private void mouseMoveCheckStateChanged(ChangeEvent e) {
  1018. cantCont();
  1019. }
  1020.  
  1021. private void camMoveCheckStateChanged(ChangeEvent e) {
  1022. cantCont();
  1023. }
  1024.  
  1025. private void logOutCheckStateChanged(ChangeEvent e) {
  1026. cantCont();
  1027. }
  1028.  
  1029. private void openTabsCheckStateChanged(ChangeEvent e) {
  1030. cantCont();
  1031. }
  1032.  
  1033. private void contButtonActionPerformed(ActionEvent e) {
  1034. getSettings();
  1035. setVisible(false);
  1036. }
  1037.  
  1038. String content() {
  1039. if (ABOnOff.isSelected()) {
  1040. return "OFF";
  1041. } else {
  1042. return "ON";
  1043. }
  1044. }
  1045.  
  1046. String OPcontent() {
  1047. if (!ABOnOff.isSelected()) {
  1048. return "OFF";
  1049. } else {
  1050. return "ON";
  1051. }
  1052. }
  1053.  
  1054. private void initComponents() {
  1055. ABFreqSlider = new JSlider();
  1056. ABOnOff = new JToggleButton();
  1057. customAntiBanButton = new JRadioButton();
  1058. ABLevelOptions = new JComboBox();
  1059. separator1 = new JSeparator();
  1060. ABFreqLabel = new JLabel();
  1061. AFKCheck = new JRadioButton();
  1062. mouseMoveCheck = new JRadioButton();
  1063. camMoveCheck = new JRadioButton();
  1064. logOutCheck = new JRadioButton();
  1065. openTabsCheck = new JRadioButton();
  1066. ABLevelLabel = new JLabel();
  1067. contButton = new JButton();
  1068.  
  1069. addWindowListener(new WindowAdapter() {
  1070.  
  1071. public void windowClosing(WindowEvent e) {
  1072. stopScript();
  1073. }
  1074. });
  1075. //======== this ========
  1076. setTitle("AntiBan");
  1077. Container contentPane = getContentPane();
  1078. //---- ABFreqSlider ----
  1079. ABFreqSlider.setMajorTickSpacing(40);
  1080. ABFreqSlider.setSnapToTicks(true);
  1081. ABFreqSlider.setPaintTicks(true);
  1082. ABFreqSlider.setBackground(new Color(238, 238, 238));
  1083. ABFreqSlider.setEnabled(false);
  1084. ABFreqSlider.setPaintLabels(true);
  1085. ABFreqSlider.setMinorTickSpacing(8);
  1086. ABFreqSlider.setMaximum(240);
  1087. ABFreqSlider.setValue(60);
  1088. ABFreqSlider.setToolTipText("Allows you to select the average amount of AntiBans per hour");
  1089. ABFreqSlider.addChangeListener(new ChangeListener() {
  1090.  
  1091. @Override
  1092. public void stateChanged(ChangeEvent e) {
  1093. ABFreqSliderStateChanged(e);
  1094. }
  1095. });
  1096.  
  1097. //---- ABOnOff ----
  1098. ABOnOff.setText("Turn AntiBan Off");
  1099.  
  1100. ABOnOff.setToolTipText("The AntiBan is currently: ON");
  1101. ABOnOff.addChangeListener(new ChangeListener() {
  1102.  
  1103. @Override
  1104. public void stateChanged(ChangeEvent e) {
  1105. ABOnOffStateChanged(e);
  1106. }
  1107. });
  1108.  
  1109. //---- customAntiBanButton ----
  1110. customAntiBanButton.setText("Customized AntiBan");
  1111. customAntiBanButton.setToolTipText("Enables you to customize your AntiBan");
  1112. customAntiBanButton.addChangeListener(new ChangeListener() {
  1113.  
  1114. @Override
  1115. public void stateChanged(ChangeEvent e) {
  1116. customAntiBanButtonStateChanged(e);
  1117. }
  1118. });
  1119.  
  1120. //---- ABLevelOptions ----
  1121. ABLevelOptions.setModel(new DefaultComboBoxModel(new String[]{
  1122. "Low (20 P/H)",
  1123. "Medium (40 P/H)",
  1124. "High (60 P/H)"
  1125. }));
  1126. ABLevelOptions.setSelectedIndex(2);
  1127. ABLevelOptions.setToolTipText("Selects the level of AntiBan");
  1128. //---- separator1 ----
  1129. separator1.setForeground(new Color(100, 100, 100));
  1130. //---- ABFreqLabel ----
  1131. ABFreqLabel.setText("Avg. AntiBans P/H");
  1132. ABFreqLabel.setToolTipText("Average. AntiBans per hour");
  1133. ABFreqLabel.setEnabled(false);
  1134.  
  1135. //---- AFKCheck ----
  1136. AFKCheck.setText("AFK's");
  1137. AFKCheck.setEnabled(false);
  1138. AFKCheck.setToolTipText("If checked, the AntiBan will perform AFK's");
  1139. AFKCheck.addChangeListener(new ChangeListener() {
  1140.  
  1141. @Override
  1142. public void stateChanged(ChangeEvent e) {
  1143. AFKCheckStateChanged(e);
  1144. }
  1145. });
  1146.  
  1147. //---- mouseMoveCheck ----
  1148. mouseMoveCheck.setText("Mouse MoveMents");
  1149. mouseMoveCheck.setEnabled(false);
  1150. mouseMoveCheck.setToolTipText("If checked, the AntiBan will move the mouse");
  1151. mouseMoveCheck.addChangeListener(new ChangeListener() {
  1152.  
  1153. @Override
  1154. public void stateChanged(ChangeEvent e) {
  1155. mouseMoveCheckStateChanged(e);
  1156. }
  1157. });
  1158.  
  1159. //---- camMoveCheck ----
  1160. camMoveCheck.setText("Camera Movements");
  1161. camMoveCheck.setEnabled(false);
  1162. camMoveCheck.setToolTipText("If checked, the AntiBan will move the camera");
  1163. camMoveCheck.addChangeListener(new ChangeListener() {
  1164.  
  1165. @Override
  1166. public void stateChanged(ChangeEvent e) {
  1167. camMoveCheckStateChanged(e);
  1168. }
  1169. });
  1170.  
  1171. //---- logOutCheck ----
  1172. logOutCheck.setText("Log Out if Innactive");
  1173. logOutCheck.setEnabled(false);
  1174. logOutCheck.setVisible(false);
  1175. logOutCheck.setToolTipText("Currently under construction");
  1176. logOutCheck.addChangeListener(new ChangeListener() {
  1177.  
  1178. @Override
  1179. public void stateChanged(ChangeEvent e) {
  1180. logOutCheckStateChanged(e);
  1181. }
  1182. });
  1183.  
  1184. //---- openTabsCheck ----
  1185. openTabsCheck.setText("Open Tabs");
  1186. openTabsCheck.setEnabled(false);
  1187. openTabsCheck.setToolTipText("If checked, the AntiBan will open your friends list tab");
  1188. openTabsCheck.addChangeListener(new ChangeListener() {
  1189.  
  1190. @Override
  1191. public void stateChanged(ChangeEvent e) {
  1192. openTabsCheckStateChanged(e);
  1193. }
  1194. });
  1195.  
  1196. //---- ABLevelLabel ----
  1197. ABLevelLabel.setText("AntiBan Level");
  1198. ABLevelLabel.setToolTipText("AntiBan Level");
  1199.  
  1200. //---- contButton ----
  1201. contButton.setText("Continue");
  1202. contButton.setToolTipText("Starts the Script");
  1203. contButton.addActionListener(new ActionListener() {
  1204.  
  1205. @Override
  1206. public void actionPerformed(ActionEvent e) {
  1207. contButtonActionPerformed(e);
  1208. }
  1209. });
  1210.  
  1211. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  1212. contentPane.setLayout(contentPaneLayout);
  1213. contentPaneLayout.setHorizontalGroup(
  1214. contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addGap(102, 102, 102).addComponent(ABOnOff, GroupLayout.PREFERRED_SIZE, 182, GroupLayout.PREFERRED_SIZE)).addGroup(contentPaneLayout.createSequentialGroup().addContainerGap().addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addComponent(ABFreqLabel).addGap(12, 12, 12).addComponent(ABFreqSlider, GroupLayout.PREFERRED_SIZE, 260, GroupLayout.PREFERRED_SIZE)).addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup().addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(ABLevelLabel).addComponent(customAntiBanButton, GroupLayout.PREFERRED_SIZE, 159, GroupLayout.PREFERRED_SIZE)).addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addGap(18, 18, 18).addComponent(separator1, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE)).addGroup(contentPaneLayout.createSequentialGroup().addGap(27, 27, 27).addComponent(ABLevelOptions, GroupLayout.PREFERRED_SIZE, 140, GroupLayout.PREFERRED_SIZE))).addGap(96, 96, 96)))).addGroup(contentPaneLayout.createSequentialGroup().addGap(20, 20, 20).addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false).addGroup(contentPaneLayout.createSequentialGroup().addComponent(mouseMoveCheck).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(logOutCheck)).addGroup(contentPaneLayout.createSequentialGroup().addComponent(openTabsCheck).addGap(18, 18, 18).addComponent(AFKCheck).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(camMoveCheck)))).addGroup(contentPaneLayout.createSequentialGroup().addGap(109, 109, 109).addComponent(contButton, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE))).addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
  1215. contentPaneLayout.setVerticalGroup(
  1216. contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addGap(10, 10, 10).addComponent(ABOnOff).addGap(18, 18, 18).addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(ABLevelLabel).addComponent(ABLevelOptions, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addGap(18, 18, 18).addComponent(customAntiBanButton, GroupLayout.PREFERRED_SIZE, 44, GroupLayout.PREFERRED_SIZE)).addGroup(contentPaneLayout.createSequentialGroup().addGap(35, 35, 35).addComponent(separator1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))).addGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup().addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(ABFreqSlider, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGroup(contentPaneLayout.createSequentialGroup().addGap(26, 26, 26).addComponent(ABFreqLabel))).addGap(15, 15, 15).addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(openTabsCheck).addComponent(AFKCheck).addComponent(camMoveCheck)).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(logOutCheck).addComponent(mouseMoveCheck)).addGap(18, 18, 18).addComponent(contButton).addContainerGap(12, Short.MAX_VALUE)));
  1217. pack();
  1218. setLocationRelativeTo(getOwner());
  1219. // JFormDesigner - End of component initialization //GEN-END:initComponents
  1220. }
  1221. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  1222. // Generated using JFormDesigner Evaluation license - Joe Titus
  1223. private JSlider ABFreqSlider;
  1224. private JToggleButton ABOnOff;
  1225. private JRadioButton customAntiBanButton;
  1226. private JComboBox ABLevelOptions;
  1227. private JSeparator separator1;
  1228. private JLabel ABFreqLabel;
  1229. private JRadioButton AFKCheck;
  1230. private JRadioButton mouseMoveCheck;
  1231. private JRadioButton camMoveCheck;
  1232. private JRadioButton logOutCheck;
  1233. private JRadioButton openTabsCheck;
  1234. private JLabel ABLevelLabel;
  1235. private JButton contButton;
  1236. // JFormDesigner - End of variables declaration //GEN-END:variables
  1237. }
  1238. }
Advertisement
Add Comment
Please, Sign In to add comment