Advertisement
wafflecat

pc3

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