Advertisement
Guest User

Untitled

a guest
Jun 10th, 2011
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.75 KB | None | 0 0
  1. import org.rsbot.script.ScriptManifest;
  2. import org.rsbot.script.Script;
  3.  
  4. import java.awt.*;
  5.  
  6. import javax.imageio.ImageIO;
  7. import javax.swing.*;
  8.  
  9. import java.io.IOException;
  10. import java.net.MalformedURLException;
  11. import java.net.URL;
  12.  
  13. import org.rsbot.event.events.MessageEvent;
  14. import org.rsbot.event.listeners.MessageListener;
  15. import org.rsbot.event.listeners.MessageListener;
  16. import org.rsbot.event.listeners.PaintListener;
  17. import org.rsbot.script.methods.Skills;
  18. import org.rsbot.script.methods.Game;
  19. import org.rsbot.script.util.Filter;
  20. import org.rsbot.script.wrappers.RSArea;
  21. import org.rsbot.script.wrappers.RSGroundItem;
  22. import org.rsbot.script.wrappers.RSNPC;
  23. import org.rsbot.script.wrappers.RSObject;
  24. import org.rsbot.script.wrappers.RSTile;
  25. import org.rsbot.script.wrappers.RSTilePath;
  26. import org.rsbot.script.wrappers.RSWeb;
  27. import org.rsbot.script.methods.*;
  28.  
  29. import java.awt.event.ActionEvent;
  30. import java.awt.event.ActionListener;
  31. import java.awt.event.MouseEvent;
  32. import java.awt.event.MouseListener;
  33. import java.awt.event.MouseMotionListener;
  34. import java.awt.image.BufferedImage;
  35.  
  36. @ScriptManifest(authors = {"eShade"}, keywords = {"woodcutting"}, name = "ShadeChop", description = "AIO woodcutter, multiple locations, banking and powerchopping!", version = 1.9)
  37. public class ShadeChop extends Script implements PaintListener, MessageListener, MouseListener, MouseMotionListener {
  38.  
  39. //Paths to banks
  40.  
  41. RSTile[] walkToBankTower = {
  42. new RSTile(2701, 3398), new RSTile(2700, 3391),
  43. new RSTile(2695, 3391), new RSTile(2690, 3392),
  44. new RSTile(2687, 3396), new RSTile(2687, 3401),
  45. new RSTile(2687, 3406), new RSTile(2687, 3411),
  46. new RSTile(2687, 3416), new RSTile(2691, 3420),
  47. new RSTile(2696, 3424), new RSTile(2700, 3427),
  48. new RSTile(2704, 3430), new RSTile(2709, 3432),
  49. new RSTile(2714, 3434), new RSTile(2719, 3434),
  50. new RSTile(2724, 3434), new RSTile(2728, 3437),
  51. new RSTile(2730, 3442), new RSTile(2732, 3447),
  52. new RSTile(2731, 3452), new RSTile(2729, 3457),
  53. new RSTile(2726, 3461), new RSTile(2724, 3466),
  54. new RSTile(2724, 3471), new RSTile(2725, 3476),
  55. new RSTile(2725, 3481), new RSTile(2725, 3486),
  56. new RSTile(2725, 3491)
  57. };
  58.  
  59. RSTile[] walkToBankEastVarrock = {
  60. new RSTile(3279, 3415), new RSTile(3283, 3418),
  61. new RSTile(3284, 3423), new RSTile(3278, 3428),
  62. new RSTile(3273, 3429), new RSTile(3268, 3429),
  63. new RSTile(3263, 3429), new RSTile(3258, 3429),
  64. new RSTile(3253, 3429), new RSTile(3253, 3424),
  65. new RSTile(3252, 3421)
  66. };
  67.  
  68. RSTile[] walkToBankRimmington = {
  69. new RSTile(2933, 3233), new RSTile(2938, 3233),
  70. new RSTile(2945, 3232), new RSTile(2950, 3231),
  71. new RSTile(2955, 3229), new RSTile(2959, 3226),
  72. new RSTile(2964, 3226), new RSTile(2969, 3225),
  73. new RSTile(2974, 3225), new RSTile(2979, 3223),
  74. new RSTile(2984, 3223), new RSTile(2989, 3224),
  75. new RSTile(2994, 3226), new RSTile(2997, 3230),
  76. new RSTile(2999, 3235), new RSTile(3002, 3239),
  77. new RSTile(3007, 3241), new RSTile(3012, 3241),
  78. new RSTile(3017, 3241), new RSTile(3022, 3241),
  79. new RSTile(3027, 3241), new RSTile(3028, 3236),
  80. new RSTile(3033, 3236), new RSTile(3038, 3236),
  81. new RSTile(3043, 3236)
  82. };
  83.  
  84. RSTile[] walkToBankPortSarim = {
  85. new RSTile(3057, 3254), new RSTile(3051, 3254),
  86. new RSTile(3046, 3253), new RSTile(3043, 3249),
  87. new RSTile(3042, 3244), new RSTile(3041, 3239),
  88. new RSTile(3044, 3235)
  89. };
  90.  
  91. RSTile[] walkToBankGE = {
  92. new RSTile(3209, 3501), new RSTile(3204, 3501),
  93. new RSTile(3199, 3501), new RSTile(3195, 3498),
  94. new RSTile(3194, 3493), new RSTile(3193, 3488),
  95. new RSTile(3188, 3486), new RSTile(3183, 3488),
  96. new RSTile(3178, 3488), new RSTile(3173, 3490),
  97. new RSTile(3168, 3490)
  98. };
  99.  
  100. RSTile[] walkToBankIvyCastle = {
  101. new RSTile(3218, 3500), new RSTile(3213, 3501),
  102. new RSTile(3208, 3502), new RSTile(3203, 3502),
  103. new RSTile(3198, 3500), new RSTile(3196, 3495),
  104. new RSTile(3193, 3491), new RSTile(3190, 3487),
  105. new RSTile(3185, 3487), new RSTile(3180, 3488),
  106. new RSTile(3175, 3488), new RSTile(3170, 3489)
  107. };
  108.  
  109. RSTile[] walkToBankGnome = {
  110. new RSTile(2487, 3399), new RSTile(2482, 3400),
  111. new RSTile(2477, 3401), new RSTile(2472, 3403),
  112. new RSTile(2466, 3404), new RSTile(2461, 3404),
  113. new RSTile(2456, 3405), new RSTile(2451, 3407),
  114. new RSTile(2448, 3411), new RSTile(2444, 3414)
  115. };
  116.  
  117. RSTile[] walkToBankVarrockBank = {
  118. new RSTile(3157, 3456), new RSTile(3162, 3456),
  119. new RSTile(3167, 3456), new RSTile(3172, 3456),
  120. new RSTile(3177, 3454), new RSTile(3182, 3453),
  121. new RSTile(3186, 3450), new RSTile(3186, 3445),
  122. new RSTile(3186, 3440)
  123. };
  124.  
  125. RSTile[] walkToBankDraynor = {
  126. new RSTile(3088, 3231), new RSTile(3087, 3236),
  127. new RSTile(3086, 3241), new RSTile(3085, 3246),
  128. new RSTile(3089, 3249), new RSTile(3091, 3244)
  129. };
  130.  
  131. RSTile[] walkToBankFalador = {new RSTile(3003, 3317), new RSTile(3017, 3317), new RSTile(3005, 3330), new RSTile(3006, 3343), new RSTile (3012, 3355)};
  132. RSTile[] walkToBankSeersMaples = {new RSTile(2726, 3492)};
  133.  
  134. RSTile[] walkToBankCatherby = {
  135. new RSTile(2758, 3431), new RSTile(2763, 3431),
  136. new RSTile(2768, 3431), new RSTile(2773, 3431),
  137. new RSTile(2778, 3431), new RSTile(2783, 3431),
  138. new RSTile(2788, 3433), new RSTile(2793, 3434),
  139. new RSTile(2798, 3432), new RSTile(2803, 3432),
  140. new RSTile(2808, 3434), new RSTile(2808, 3439)
  141. };
  142.  
  143. RSTile[] walkToBankEdgeville = { new RSTile(3086, 3470), new RSTile(3091, 3469),
  144. new RSTile(3093, 3474), new RSTile(3094, 3479),
  145. new RSTile(3091, 3483), new RSTile(3088, 3487),
  146. new RSTile(3091, 3491)
  147. };
  148. RSTile[] walkToBankSeers = {new RSTile(2711, 3462), new RSTile(2720, 3467), new RSTile(2724, 3477), new RSTile(2725, 3490) };
  149.  
  150. //Paths to trees
  151.  
  152.  
  153. RSTile[] walkToTreesIvyCastle = {
  154. new RSTile(3170, 3489), new RSTile(3175, 3489),
  155. new RSTile(3180, 3489), new RSTile(3185, 3489),
  156. new RSTile(3190, 3489), new RSTile(3195, 3489),
  157. new RSTile(3195, 3494), new RSTile(3197, 3499),
  158. new RSTile(3201, 3502), new RSTile(3206, 3502),
  159. new RSTile(3211, 3502), new RSTile(3216, 3501),
  160. new RSTile(3220, 3498)
  161. };
  162.  
  163. RSTile[] walkToTreesRimmington = {
  164. new RSTile(3042, 3236), new RSTile(3037, 3236),
  165. new RSTile(3032, 3236), new RSTile(3027, 3236),
  166. new RSTile(3026, 3241), new RSTile(3022, 3244),
  167. new RSTile(3017, 3244), new RSTile(3012, 3242),
  168. new RSTile(3007, 3242), new RSTile(3002, 3243),
  169. new RSTile(2998, 3246), new RSTile(2994, 3249),
  170. new RSTile(2989, 3251), new RSTile(2986, 3255),
  171. new RSTile(2981, 3257), new RSTile(2976, 3257),
  172. new RSTile(2971, 3257), new RSTile(2966, 3257),
  173. new RSTile(2963, 3253), new RSTile(2962, 3248),
  174. new RSTile(2959, 3244), new RSTile(2954, 3243),
  175. new RSTile(2949, 3242), new RSTile(2946, 3238),
  176. new RSTile(2942, 3235), new RSTile(2937, 3233),
  177. new RSTile(2930, 3233)
  178. };
  179.  
  180. RSTile[] walkToTreesGnome = {
  181. new RSTile(2444, 3414), new RSTile(2446, 3409),
  182. new RSTile(2451, 3407), new RSTile(2456, 3405),
  183. new RSTile(2461, 3405), new RSTile(2466, 3405),
  184. new RSTile(2471, 3404), new RSTile(2476, 3403),
  185. new RSTile(2481, 3401), new RSTile(2486, 3399)
  186. };
  187.  
  188. RSTile[] walkToTreesPortSarim = {
  189. new RSTile(3047, 3236), new RSTile(3042, 3236),
  190. new RSTile(3042, 3241), new RSTile(3042, 3246),
  191. new RSTile(3047, 3247), new RSTile(3051, 3250),
  192. new RSTile(3055, 3253), new RSTile(3060, 3253)
  193. };
  194.  
  195. RSTile[] walkToTreesEastVarrock = {
  196. new RSTile(3253, 3421), new RSTile(3253, 3426),
  197. new RSTile(3258, 3427), new RSTile(3263, 3428),
  198. new RSTile(3268, 3428), new RSTile(3273, 3428),
  199. new RSTile(3278, 3428), new RSTile(3283, 3426),
  200. new RSTile(3283, 3419), new RSTile(3280, 3415)
  201. };
  202.  
  203. RSTile[] walkToTreesGE = {
  204. new RSTile(3168, 3489), new RSTile(3173, 3488),
  205. new RSTile(3178, 3487), new RSTile(3183, 3487),
  206. new RSTile(3188, 3487), new RSTile(3193, 3488),
  207. new RSTile(3195, 3493), new RSTile(3195, 3498),
  208. new RSTile(3199, 3501), new RSTile(3204, 3503), new RSTile(3212, 3502), new RSTile(3209, 3502)
  209. };
  210.  
  211. RSTile[] walkToTreesVarrockBank = {
  212. new RSTile(3186, 3442), new RSTile(3186, 3447),
  213. new RSTile(3183, 3451), new RSTile(3178, 3451),
  214. new RSTile(3173, 3451), new RSTile(3168, 3451),
  215. new RSTile(3163, 3453), new RSTile(3158, 3455)
  216. };
  217.  
  218. RSTile[] walkToTreesTower = {
  219. new RSTile(2725, 3490), new RSTile(2725, 3485),
  220. new RSTile(2724, 3480), new RSTile(2723, 3475),
  221. new RSTile(2722, 3470), new RSTile(2722, 3464),
  222. new RSTile(2722, 3459), new RSTile(2722, 3454),
  223. new RSTile(2722, 3449), new RSTile(2722, 3444),
  224. new RSTile(2722, 3439), new RSTile(2722, 3434),
  225. new RSTile(2722, 3429), new RSTile(2722, 3424),
  226. new RSTile(2722, 3419), new RSTile(2722, 3414),
  227. new RSTile(2722, 3409), new RSTile(2720, 3404),
  228. new RSTile(2717, 3400), new RSTile(2715, 3395),
  229. new RSTile(2712, 3391), new RSTile(2707, 3391),
  230. new RSTile(2702, 3393), new RSTile(2701, 3398)
  231. };
  232. RSTile[] walkToTreesDraynor = {new RSTile(3088, 3236)};
  233. RSTile[] walkToTreesFalador = {new RSTile (3012, 3355), new RSTile(3006, 3343), new RSTile(3005, 3330), new RSTile(3017, 3317), new RSTile(3003, 3317)};
  234. RSTile[] walkToTreesSeersMaples = {new RSTile(2728, 3500)};
  235.  
  236. RSTile[] walkToTreesCatherby = {
  237. new RSTile(2809, 3440), new RSTile(2809, 3435),
  238. new RSTile(2803, 3434), new RSTile(2798, 3433),
  239. new RSTile(2793, 3433), new RSTile(2788, 3433),
  240. new RSTile(2783, 3432), new RSTile(2778, 3431),
  241. new RSTile(2773, 3430), new RSTile(2768, 3430),
  242. new RSTile(2763, 3430), new RSTile(2758, 3430)
  243. };
  244.  
  245. RSTile[] walkToTreesEdgeville = {new RSTile(3094, 3490), new RSTile(3089, 3491),
  246. new RSTile(3091, 3486), new RSTile(3091, 3481),
  247. new RSTile(3094, 3477), new RSTile(3094, 3472),
  248. new RSTile(3089, 3470), new RSTile(3085, 3473)
  249. };
  250. RSTile[] walkToTreesSeers = {new RSTile(2725, 3490), new RSTile(2724, 3477), new RSTile(2720, 3467), new RSTile(2711, 3462) };
  251.  
  252. // Tree ID's
  253.  
  254. int[] yewTree = {1309, 38755, 40411, 38755, 38782, 38755};
  255. int[] mapleTree = {1307};
  256. int[] magicTree = {1306};
  257. int[] willowTree = {5551, 5552, 5553, 1308, 8481, 8482, 8483, 8484, 8485, 8486, 8487, 8488, 38627, 38616, 38627, 2210, 142, 2372, 139};
  258. int[] oakTree = {1281};
  259. int[] normalTree = {1278};
  260. int[] ivyTree = {46324, 46320, 46318, 46322};
  261. int[] teakTree = {9036};
  262. int[] mahoganyTree = {9034};
  263.  
  264. //Log ID's
  265.  
  266. int yewLog = 1515;
  267. int mapleLog = 1517;
  268. int magicLog = 1513;
  269. int willowLog = 1519;
  270. int oakLog = 1512;
  271. int normalLog = 1511;
  272.  
  273. //RS Areas
  274.  
  275.  
  276.  
  277. // Variables
  278.  
  279. private int[] treeID;
  280. private int logID;
  281. private RSTile[] placeToCut;
  282. private RSTile[] placeToBank;
  283. private int bankerID;
  284. RSArea area;
  285. private int mousespeed1;
  286. public boolean ispowerchopping;
  287. public boolean antiban;
  288. public boolean showhide = true;
  289. public String treesChopping = "";
  290. public String location = "";
  291.  
  292. public boolean gnomeTrees;
  293.  
  294. private int hatchetID[] = { 1349, 1351, 1353, 1355, 1357, 1359, 1361, 6739, 13470 };
  295. private int depositBox = 36788;
  296. private int gnomeStairsUp = 1742;
  297. private int gnomeStairsDown = 1744;
  298. private int[] birdNestID = { 5070, 5071, 5072, 5073, 5074, 5075, 5076, 7413, 11966 };
  299.  
  300. private String status = "Loading...";
  301. private String action = "Chop";
  302. private int gainedExp0;
  303. private int startExp;
  304. boolean showPaint = true;
  305. private int gnomeBankerID = 166;
  306. private int gainedLevel;
  307. int door = 21405;
  308. public int fexpHour = 0;
  309. private static final Color MOUSE_COLOR = new Color(168, 157, 113),
  310. MOUSE_BORDER_COLOR = new Color(168, 157, 113),
  311. MOUSE_CENTER_COLOR = new Color(168, 157, 113);
  312. private boolean pressed = false;
  313. private int absoluteY = 0;
  314. public long startTime = 0;
  315. public long millis = 0;
  316. public long hours = 0;
  317. public long minutes = 0;
  318. private Timer timer;
  319. int tab = 0;
  320. Point p;
  321. RSTilePath pathToTrees;
  322. RSTilePath pathToBank;
  323. public long seconds = 0;
  324. public long last = 0;
  325. private boolean guiWait = true;
  326. private static int profit = 0;
  327. private static int profitPerHour;
  328. private long runTime;
  329. private int startLevel;
  330. public String mode = "";
  331. private int lvlsGained;
  332. private int expGained;
  333. private int Percent;
  334. public int currLevel;
  335. public int expHour;
  336. int logPrice;
  337. private int logsChopped = 0;
  338. private int ivyChopped = 0;
  339. private int logsHour;
  340.  
  341. Point m = new Point(-1,-1);
  342. gui g = new gui();
  343.  
  344. BufferedImage normal = null;
  345. BufferedImage clicked = null;
  346.  
  347. private final Image img1 = getImage("http://i.imgur.com/xYmW1.png");
  348. private final Image img2 = getImage("http://i.imgur.com/9VhkR.png");
  349.  
  350. public boolean onStart() {
  351. g.setVisible(true);
  352. while(guiWait) sleep(500);
  353. log("Loading ShadeChop...");
  354. mouse.setSpeed(random(3, 4));
  355. startExp = skills.getCurrentExp(Skills.WOODCUTTING);
  356. startLevel = skills.getCurrentLevel(Skills.WOODCUTTING);
  357. startTime = System.currentTimeMillis();
  358. if(ispowerchopping == false){
  359. pathToTrees = walking.newTilePath(placeToCut);
  360. pathToBank = walking.newTilePath(placeToBank);
  361. }
  362. if(logID == 0){
  363. } else
  364. logPrice = grandExchange.lookup(logID).getGuidePrice();
  365. log.severe("Welcome to ShadeChop. The most advanced AIO Woodcutter...");
  366. log("Your favourite location not on here? Request on my thread!");
  367. return true;
  368. }
  369.  
  370. private void bank() {
  371. camera.setPitch(true);
  372. status = "Banking...";
  373. openBank();
  374. depositLogs();
  375. closeBank();
  376. }
  377.  
  378. private void openBank() {
  379. final RSNPC bank = npcs.getNearest(bankerID);
  380. bank.interact("Bank Banker");
  381. sleep(2000);
  382. }
  383.  
  384. private void depositLogs() {
  385. bank.depositAllExcept(hatchetID);
  386. sleep(500);
  387. }
  388.  
  389. private void closeBank() {
  390. if (!bank.isOpen()) {
  391. sleep(500);
  392. } else {
  393. walkToTrees();
  394. }
  395. }
  396.  
  397. public boolean atBank() {
  398. if(bankerID != depositBox){
  399. RSNPC bank = npcs.getNearest(bankerID);
  400. if (bank != null) {
  401. if (bank.isOnScreen()) {
  402. return true;
  403. } else if(!bank.isOnScreen()) {
  404. status = "Finding banker...";
  405. RSNPC banker = npcs.getNearest(bankerID);
  406. camera.turnTo(banker.getLocation());
  407. while (calc.distanceTo(banker) >= 20) {
  408. walking.walkTileMM(banker.getLocation()); }
  409. }
  410.  
  411. }
  412. } else if(bankerID == depositBox){
  413. RSObject bank = objects.getNearest(bankerID);
  414. if (bank != null) {
  415. if (bank.isOnScreen()) {
  416. return true;
  417. }
  418. }
  419. }
  420. return false;
  421. }
  422.  
  423. public void onFinish() {
  424. log.severe("Please post proggies on my thread!");
  425. log("Logs Chopped: " + logsChopped);
  426. log("Money Gained: " + profit);
  427. log("~ eShade");
  428. env.saveScreenshot(true);
  429. }
  430.  
  431.  
  432. private void Chop() {
  433. if (objects.getNearest(treeID) != null & !inventory.isFull()) {
  434. RSObject tree = objects.getNearest(treeID);
  435. if (calc.tileOnScreen(tree.getLocation())) {
  436. if (getMyPlayer().getAnimation() == -1) {
  437. status = "Chopping...";
  438. tree.interact("Chop");
  439. sleep(900, 1200);
  440. }
  441. } else if (!tree.isOnScreen()) {
  442. status = "Finding tree...";
  443. objects.getNearest(treeID);
  444. camera.turnTo(tree.getLocation());
  445. while (calc.distanceTo(tree) >= 5) {
  446. walking.walkTileMM(tree.getLocation()); }
  447. }
  448. }
  449. sleep(900, 1200);
  450. }
  451.  
  452. private void nest() {
  453. RSGroundItem nest = groundItems.getNearest(birdNestID);
  454. if(nest != null && !inventory.isFull()) {
  455. if(nest.isOnScreen()) {
  456. status = "Taking nest";
  457. nest.interact("Take");
  458. sleep(random(600,800));
  459. }
  460. }
  461. }
  462.  
  463.  
  464.  
  465. private void bankLogs(){
  466. status = "Banking...";
  467. camera.setPitch(true);
  468. openBox();
  469. depositBox();
  470. closeBox();
  471. }
  472. private void openBox(){
  473. final RSObject bankDepositBox = objects.getNearest(bankerID);
  474. bankDepositBox.interact("Deposit");
  475. sleep(2000);
  476. }
  477. private void depositBox(){
  478. bank.depositAllExcept(hatchetID);
  479. sleep(1000);
  480. }
  481. private void closeBox() {
  482. if (!bank.isDepositOpen()) {
  483. sleep(750);
  484. } else {
  485. bank.close();
  486. }
  487. }
  488.  
  489. public int loop() {
  490. checkRun();
  491. if (inventory.isFull()) {
  492. if(ispowerchopping == true){
  493. inventory.dropAllExcept(hatchetID);
  494. } else
  495. if (atBank()) {
  496. if(bankerID == depositBox){
  497. bankLogs();
  498. } else if(bankerID != depositBox) {
  499. bank();
  500. }
  501. } else {
  502. if(ispowerchopping == false){
  503. walkToBank();
  504. }
  505. }
  506. } else {
  507. if (atTrees()) {
  508. nest();
  509. Chop();
  510. if(antiban == true){
  511. if (random(1, 5) == 3) {
  512. antiBanList();
  513. }
  514. } else if(antiban == false) {
  515.  
  516. }
  517. } else {
  518. if(ispowerchopping == false){
  519. walkToTrees();
  520. }
  521. }
  522. }
  523. return (random(800, 1300));
  524. }
  525.  
  526. private void walkToBank() {
  527. status = "Going to bank...";
  528. pathToBank.traverse();
  529. }
  530.  
  531. private void walkToTrees() {
  532. status = "Going to trees...";
  533. pathToTrees.traverse();
  534. }
  535.  
  536.  
  537. public boolean atTrees() {
  538. RSObject tree = objects.getNearest(treeID);
  539. if (tree != null) {
  540. if (!tree.isOnScreen()) {
  541. camera.turnTo(objects.getNearest(treeID));
  542. walking.walkTo(tree.getLocation());
  543. }
  544. if (tree.isOnScreen()) {
  545. return true;
  546. }
  547. }
  548. return false;
  549. }
  550.  
  551.  
  552. public void checkRun() {
  553. if (!walking.isRunEnabled()) {
  554. if (walking.getEnergy() > random(15, 100)) {
  555. walking.setRun(true);
  556. }
  557. }
  558. }
  559.  
  560. public void depositBoxOpen() {
  561. status = "Banking...";
  562. RSObject object = objects.getNearest(36788);
  563. if (object != null) {
  564. if (object.isOnScreen()) {
  565. object.doClick();
  566. }
  567. }
  568. }
  569.  
  570. public void depositBoxBank(){
  571. status = "Banking...";
  572. if(bank.isDepositOpen()) {
  573. bank.depositAllExcept(hatchetID);
  574. sleep(random(300,600));
  575. bank.close();
  576. sleep(random(200,400));
  577. }
  578. }
  579.  
  580.  
  581. public void superAntiMoveMouse() {
  582. switch (random(0, 10)) {
  583. case 0:
  584. mouse.setSpeed(random(6, 9));
  585. mouse.moveSlightly();
  586. mouse.moveSlightly();
  587. mouse.moveSlightly();
  588. break;
  589. case 1:
  590. mouse.setSpeed(random(6, 9));
  591. mouse.moveSlightly();
  592. mouse.moveSlightly();
  593. break;
  594. case 2:
  595. mouse.setSpeed(random(6, 9));
  596. mouse.moveSlightly();
  597. mouse.moveSlightly();
  598. mouse.moveSlightly();
  599. mouse.moveSlightly();
  600. mouse.moveSlightly();
  601. mouse.moveSlightly();
  602. break;
  603. }
  604. }
  605.  
  606. public void randomtab() {
  607. switch (random(0, 12)) {
  608. case 0:
  609. game.openTab(Game.TAB_STATS);
  610. game.openTab(Game.TAB_INVENTORY);
  611. break;
  612. case 1:
  613. game.openTab(Game.TAB_INVENTORY);
  614. break;
  615. case 2:
  616. game.openTab(Game.TAB_CLAN);
  617. game.openTab(Game.TAB_INVENTORY);
  618. break;
  619. case 3:
  620. game.openTab(Game.TAB_FRIENDS);
  621. game.openTab(Game.TAB_INVENTORY);
  622. break;
  623. case 4:
  624. game.openTab(Game.TAB_CLAN);
  625. game.openTab(Game.TAB_INVENTORY);
  626. break;
  627. case 5:
  628. game.openTab(Game.TAB_EQUIPMENT);
  629. game.openTab(Game.TAB_INVENTORY);
  630. break;
  631. case 6:
  632. game.openTab(Game.TAB_MAGIC);
  633. game.openTab(Game.TAB_INVENTORY);
  634. break;
  635. case 7:
  636. game.openTab(Game.TAB_QUESTS);
  637. game.openTab(Game.TAB_INVENTORY);
  638. break;
  639. case 8:
  640. game.openTab(Game.TAB_FRIENDS_CHAT);
  641. game.openTab(Game.TAB_INVENTORY);
  642. break;
  643. case 9:
  644. game.openTab(Game.TAB_NOTES);
  645. game.openTab(Game.TAB_INVENTORY);
  646. break;
  647. case 10:
  648. game.openTab(Game.TAB_PRAYER);
  649. game.openTab(Game.TAB_INVENTORY);
  650. break;
  651. case 11:
  652. game.openTab(Game.TAB_MUSIC);
  653. game.openTab(Game.TAB_INVENTORY);
  654. break;
  655. }
  656. }
  657.  
  658. public void randomXPcheck() {
  659. game.openTab(Game.TAB_STATS);
  660. switch (random(0, 20)) {
  661. case 0:
  662. skills.doHover(Skills.INTERFACE_FISHING);
  663. sleep(random(5000, 7000));
  664. game.openTab(Game.TAB_INVENTORY);
  665. break;
  666. case 1:
  667. skills.doHover(Skills.INTERFACE_WOODCUTTING);
  668. sleep(random(5000, 7000));
  669. game.openTab(Game.TAB_INVENTORY);
  670. break;
  671. case 2:
  672. skills.doHover(Skills.INTERFACE_ATTACK);
  673. sleep(random(5000, 7000));
  674. game.openTab(Game.TAB_INVENTORY);
  675. break;
  676. case 3:
  677. skills.doHover(Skills.INTERFACE_STRENGTH);
  678. sleep(random(5000, 7000));
  679. game.openTab(Game.TAB_INVENTORY);
  680. break;
  681. case 4:
  682. skills.doHover(Skills.INTERFACE_COOKING);
  683. sleep(random(5000, 7000));
  684. game.openTab(Game.TAB_INVENTORY);
  685. break;
  686. case 5:
  687. skills.doHover(Skills.INTERFACE_RANGE);
  688. sleep(random(5000, 7000));
  689. game.openTab(Game.TAB_INVENTORY);
  690. break;
  691. case 6:
  692. skills.doHover(Skills.INTERFACE_FIREMAKING);
  693. sleep(random(5000, 7000));
  694. game.openTab(Game.TAB_INVENTORY);
  695. break;
  696. case 7:
  697. skills.doHover(Skills.INTERFACE_CONSTRUCTION);
  698. sleep(random(5000, 7000));
  699. game.openTab(Game.TAB_INVENTORY);
  700. break;
  701. case 8:
  702. skills.doHover(Skills.INTERFACE_RUNECRAFTING);
  703. sleep(random(5000, 7000));
  704. game.openTab(Game.TAB_INVENTORY);
  705. break;
  706. case 9:
  707. skills.doHover(Skills.INTERFACE_SUMMONING);
  708. sleep(random(5000, 7000));
  709. game.openTab(Game.TAB_INVENTORY);
  710. break;
  711. case 10:
  712. skills.doHover(Skills.INTERFACE_SLAYER);
  713. sleep(random(5000, 7000));
  714. game.openTab(Game.TAB_INVENTORY);
  715. break;
  716. case 11:
  717. skills.doHover(Skills.INTERFACE_CRAFTING);
  718. sleep(random(5000, 7000));
  719. game.openTab(Game.TAB_INVENTORY);
  720. break;
  721. case 12:
  722. skills.doHover(Skills.INTERFACE_FARMING);
  723. sleep(random(5000, 7000));
  724. game.openTab(Game.TAB_INVENTORY);
  725. break;
  726. case 13:
  727. skills.doHover(Skills.INTERFACE_AGILITY);
  728. sleep(random(5000, 7000));
  729. game.openTab(Game.TAB_INVENTORY);
  730. break;
  731. case 14:
  732. skills.doHover(Skills.INTERFACE_THIEVING);
  733. sleep(random(5000, 7000));
  734. game.openTab(Game.TAB_INVENTORY);
  735. break;
  736. case 15:
  737. skills.doHover(Skills.INTERFACE_HUNTER);
  738. sleep(random(5000, 7000));
  739. game.openTab(Game.TAB_INVENTORY);
  740. break;
  741. case 16:
  742. skills.doHover(Skills.INTERFACE_MINING);
  743. sleep(random(5000, 7000));
  744. game.openTab(Game.TAB_INVENTORY);
  745. break;
  746. case 17:
  747. skills.doHover(Skills.INTERFACE_SMITHING);
  748. sleep(random(5000, 7000));
  749. game.openTab(Game.TAB_INVENTORY);
  750. break;
  751. case 18:
  752. skills.doHover(Skills.INTERFACE_MAGIC);
  753. sleep(random(5000, 7000));
  754. game.openTab(Game.TAB_INVENTORY);
  755. break;
  756. case 19:
  757. skills.doHover(Skills.INTERFACE_FLETCHING);
  758. sleep(random(5000, 7000));
  759. game.openTab(Game.TAB_INVENTORY);
  760. break;
  761. case 20:
  762. skills.doHover(Skills.INTERFACE_PRAYER);
  763. sleep(random(5000, 7000));
  764. game.openTab(Game.TAB_INVENTORY);
  765. break;
  766. }
  767. }
  768.  
  769. public int antiBanList2() {
  770. switch (random(0, 17)) {
  771. case 8:
  772. superAntiMoveMouse();
  773. AntiBanCamera();
  774. break;
  775. case 9:
  776. break;
  777. case 10:
  778. AntiBanCamera();
  779. break;
  780. case 11:
  781. case 12:
  782. break;
  783. case 13:
  784. superAntiMoveMouse();
  785. AntiBanCamera();
  786. break;
  787. case 14:
  788. AntiBanCamera();
  789. break;
  790. case 15:
  791. case 16:
  792. case 17:
  793. break;
  794. default:
  795. break;
  796. }
  797. return 500;
  798. }
  799.  
  800. public int antiBanList() {
  801. switch (random(0, 17)) {
  802. case 8:
  803. superAntiMoveMouse();
  804. AntiBanCamera();
  805. break;
  806. case 9:
  807. randomXPcheck();
  808. break;
  809. case 10:
  810. randomtab();
  811. AntiBanCamera();
  812. break;
  813. case 11:
  814. case 12:
  815. randomtab();
  816. break;
  817. case 13:
  818. superAntiMoveMouse();
  819. AntiBanCamera();
  820. break;
  821. case 14:
  822. randomXPcheck();
  823. AntiBanCamera();
  824. break;
  825. case 15:
  826. case 16:
  827. case 17:
  828. break;
  829. default:
  830. break;
  831. }
  832. return 500;
  833. }
  834.  
  835. private void AntiBanCamera() {
  836. int randomNum = random(1, 50);
  837. if (randomNum == 1 || randomNum == 2 || randomNum == 3) {
  838. camera.moveRandomly(random(2000, 5500));
  839. }
  840. if (randomNum == 4 || randomNum == 5) {
  841. camera.setAngle(random(10, 40));
  842. }
  843. if (randomNum == 6) {
  844. camera.setPitch(random(40, 68));
  845. }
  846. if (randomNum == 7) {
  847. camera.setPitch(random(20, 45));
  848. }
  849. if (randomNum == 8) {
  850. camera.setPitch(random(68, 90));
  851. } else
  852. sleep(50, 70);
  853. }
  854.  
  855. private Image getImage(String url) {
  856. try {
  857. return ImageIO.read(new URL(url));
  858. } catch (IOException e) {
  859. return null;
  860. }
  861. }
  862.  
  863. private void drawMouse(Graphics g) {
  864. ((Graphics2D) g).setRenderingHints(new RenderingHints(
  865. RenderingHints.KEY_ANTIALIASING,
  866. RenderingHints.VALUE_ANTIALIAS_ON));
  867. Point p = mouse.getLocation();
  868. Graphics2D spinG = (Graphics2D) g.create();
  869. Graphics2D spinGRev = (Graphics2D) g.create();
  870. Graphics2D spinG2 = (Graphics2D) g.create();
  871. spinG.setColor(MOUSE_BORDER_COLOR);
  872. spinGRev.setColor(MOUSE_COLOR);
  873. spinG.rotate(System.currentTimeMillis() % 2000d / 2000d * (360d) * 2
  874. * Math.PI / 180.0, p.x, p.y);
  875. spinGRev.rotate(System.currentTimeMillis() % 2000d / 2000d * (-360d)
  876. * 2 * Math.PI / 180.0, p.x, p.y);
  877. final int outerSize = 20;
  878. final int innerSize = 12;
  879. spinG.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  880. BasicStroke.JOIN_ROUND));
  881. spinGRev.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  882. BasicStroke.JOIN_ROUND));
  883. spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
  884. outerSize, 100, 75);
  885. spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
  886. outerSize, -100, 75);
  887. spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
  888. innerSize, innerSize, 100, 75);
  889. spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
  890. innerSize, innerSize, -100, 75);
  891. g.setColor(MOUSE_CENTER_COLOR);
  892. g.fillOval(p.x, p.y, 2, 2);
  893. spinG2.setColor(MOUSE_CENTER_COLOR);
  894. spinG2.rotate(System.currentTimeMillis() % 2000d / 2000d * 360d
  895. * Math.PI / 180.0, p.x, p.y);
  896. spinG2.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  897. BasicStroke.JOIN_ROUND));
  898. spinG2.drawLine(p.x - 5, p.y, p.x + 5, p.y);
  899. spinG2.drawLine(p.x, p.y - 5, p.x, p.y + 5);
  900. }
  901.  
  902. public String outputTTL(){
  903. long runTime = System.currentTimeMillis()-startTime;
  904. int xptl = skills.getExpToNextLevel(Skills.WOODCUTTING);
  905. long ttl = (long)(xptl * ((double)runTime/expGained));
  906. int ttlH = (int)(ttl/3600000D);
  907. int ttlM = (int)((ttl%3600000D)/60000D);
  908. int ttlS = (int)(((ttl%3600000D)%60000D)/1000D);
  909. return (ttlH+":"+ttlM+":"+ttlS);
  910. }
  911.  
  912. private final Color color1 = new Color(242, 127, 178);
  913.  
  914. private final Font font1 = new Font("Tahoma", 1, 11);
  915. private final Color color2 = new Color(255, 0, 0);
  916. private final Color color3 = new Color(0, 0, 0);
  917. private final Color color4 = new Color(168, 157, 113);
  918. private final Color color5 = new Color(242, 240, 242);
  919.  
  920. private final BasicStroke stroke1 = new BasicStroke(2);
  921.  
  922.  
  923.  
  924.  
  925. public void onRepaint(Graphics g1) {
  926. Graphics2D g = (Graphics2D)g1;
  927.  
  928. millis = System.currentTimeMillis() - startTime;
  929. hours = millis / (1000 * 60 * 60);
  930. millis -= hours * (1000 * 60 * 60);
  931. minutes = millis / (1000 * 60);
  932. millis -= minutes * (1000 * 60);
  933. seconds = millis / 1000;
  934.  
  935.  
  936. lvlsGained = currLevel - startLevel;
  937. expGained = skills.getCurrentExp(Skills.WOODCUTTING) - startExp;
  938. currLevel = skills.getCurrentLevel(skills.WOODCUTTING);
  939. expHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
  940. runTime = System.currentTimeMillis() - startTime;
  941. profit = (logsChopped * logPrice);
  942. profitPerHour = (int) ((profit) * 3600000D / runTime);
  943. logsHour = (int) ((logsChopped) * 3600000D / (System.currentTimeMillis() - startTime));
  944. final int percentBar = (int) (skills.getPercentToNextLevel(skills.WOODCUTTING)*5.16);
  945.  
  946. drawMouse(g);
  947.  
  948. if(showPaint){
  949. g.drawImage(img1, 7, 344, null);
  950. g.setFont(font1);
  951. g.setColor(color3);
  952. g.drawString(" " + hours + ":" + minutes + ":" + seconds, 102, 359);
  953. g.drawString(" " + logsChopped, 106, 402);
  954. g.drawString(" " + logsHour, 95, 417);
  955. g.drawString(" " + expGained, 92, 373);
  956. g.drawString(" " + expHour, 90, 387);
  957. g.drawString(" " + currLevel, 99, 431);
  958. g.drawString(" " + lvlsGained, 105, 446);
  959. g.drawString(" " + profit, 264, 359);
  960. g.drawString(" " + profitPerHour, 270, 374);
  961. g.drawString(" " + status, 236, 400);
  962. g.drawString(" " + treesChopping, 277, 414);
  963. g.drawString(" " + location, 248, 429);
  964. g.drawString(" " + +skills.getExpToNextLevel(skills.WOODCUTTING), 106, 461);
  965.  
  966. g.setColor(color3);
  967. g.setStroke(stroke1);
  968. g.drawRoundRect(2, 3, 516, 16, 16, 16);
  969. g.setColor(color3);
  970. g.fillRoundRect(2, 3, 516, 16, 16, 16);
  971. g.setColor(color3);
  972. g.setStroke(stroke1);
  973. g.drawRoundRect(2, 3, 516, 16, 16, 16);
  974. g.setColor(color4);
  975. g.fillRoundRect(2, 3, percentBar, 16, 16, 16);
  976. g.setColor(color3);
  977. g.drawRoundRect(2, 3, percentBar, 16, 16, 16);
  978. g.setFont(font1);
  979. g.setColor(color5);
  980. g.drawString("" + skills.getPercentToNextLevel(Skills.WOODCUTTING) +"% To Level " + (skills.getCurrentLevel(Skills.WOODCUTTING)+1) + " (" + (skills.getCurrentLevel(Skills.WOODCUTTING) - startLevel) +")" + " || TTL: " + outputTTL(), 174, 16);
  981. }
  982. g.drawImage(img2, 317, 239, null);
  983. }
  984.  
  985. public void mouseClicked(MouseEvent e) {
  986. int x = e.getX();
  987. int y = e.getY();
  988. if (x >= 317 && x < 317 + 200 && y >= 239 && y < 239 + 100) {
  989. showPaint = !showPaint;
  990. }
  991. }
  992.  
  993.  
  994. public void mouseEntered(MouseEvent e) {
  995. }
  996.  
  997. public void mouseExited(MouseEvent e) {
  998. }
  999.  
  1000. public void mousePressed(MouseEvent arg0) {
  1001. Point mp = arg0.getPoint();
  1002. final Rectangle toggleRectangle = new Rectangle(493, absoluteY + 3, 16,
  1003. 15);
  1004. if (toggleRectangle.contains(mp)) {
  1005. pressed = !pressed;
  1006. }
  1007. }
  1008.  
  1009. public void mouseReleased(MouseEvent arg0) {
  1010. }
  1011.  
  1012. @Override
  1013. public void messageReceived(MessageEvent e) {
  1014. String txt = e.getMessage();
  1015. if (txt.contains("You get some")) {
  1016. logsChopped++;
  1017. }
  1018. if (txt.contains("You need a")) {
  1019. stopScript();
  1020. log.severe("Make sure you have the required equipment in your invent!");
  1021. }
  1022. if(txt.contains("nest")) {
  1023. nest();
  1024. }
  1025. }
  1026.  
  1027.  
  1028. class gui extends JFrame {
  1029. public gui() {
  1030. initComponents();
  1031. }
  1032.  
  1033. private void isBankingActionPerformed(ActionEvent e) {
  1034. if (isBanking.isSelected()) {
  1035. mode = "Banking";
  1036. ispowerchopping = false;
  1037. }
  1038. }
  1039.  
  1040. private void isPowerchoppingActionPerformed(ActionEvent e) {
  1041. if (isPowerchopping.isSelected()) {
  1042. ispowerchopping = true;
  1043. mode = "Powerchopping";
  1044. }
  1045.  
  1046. }
  1047.  
  1048. private void button1ActionPerformed(ActionEvent e) {
  1049. String treesToCut = bankLocation.getSelectedItem().toString();
  1050. if(treesToCut.equals("Yews | Catherby")) {
  1051. placeToBank = walkToBankCatherby;
  1052. placeToCut = walkToTreesCatherby;
  1053. bankerID = 494;
  1054. location = "Catherby";
  1055. treeID = yewTree;
  1056. treesChopping = "Yews";
  1057. logID = yewLog;
  1058. } else if(treesToCut.equals("Yews | GrandExchange")) {
  1059. placeToBank = walkToBankGE;
  1060. placeToCut = walkToTreesGE;
  1061. bankerID = 6533;
  1062. location = "GrandExchange";
  1063. logID = yewLog;
  1064. treeID = yewTree;
  1065. treesChopping = "Yews";
  1066. } else if(treesToCut.equals("Yews | Edgeville")) {
  1067. placeToBank = walkToBankEdgeville;
  1068. placeToCut = walkToTreesEdgeville;
  1069. bankerID = 553;
  1070. location = "Edgeville";
  1071. logID = yewLog;
  1072. treeID = yewTree;
  1073. treesChopping = "Yews";
  1074. } else if(treesToCut.equals("Yews | Seers Village")) {
  1075. placeToBank = walkToBankSeers;
  1076. treesChopping = "Yews";
  1077. placeToCut = walkToTreesSeers;
  1078. bankerID = 494;
  1079. logID = yewLog;
  1080. treeID = yewTree;
  1081. location = "Seers Village";
  1082. } else if(treesToCut.equals("Maples | Seers Village")) {
  1083. placeToBank = walkToBankSeersMaples;
  1084. placeToCut = walkToTreesSeersMaples;
  1085. bankerID = 494;
  1086. location = "Seers Village";
  1087. logID = mapleLog;
  1088. treesChopping = "Maples";
  1089. treeID = mapleTree;
  1090. } else if(treesToCut.equals("Yews | Falador")) {
  1091. bankerID = 6200;
  1092. location = "Falador";
  1093. logID = yewLog;
  1094. treeID = yewTree;
  1095. placeToBank = walkToBankFalador;
  1096. placeToCut = walkToTreesFalador;
  1097. treesChopping = "Yews";
  1098. } else if(treesToCut.equals("Willows | Draynor")) {
  1099. placeToBank = walkToBankDraynor;
  1100. placeToCut = walkToTreesDraynor;
  1101. treeID = willowTree;
  1102. logID = willowLog;
  1103. location = "Draynor village";
  1104. bankerID = 4458;
  1105. treesChopping = "Willows";
  1106. } else if(treesToCut.equals("Magics | SorcTower")) {
  1107. placeToBank = walkToBankTower;
  1108. placeToCut = walkToTreesTower;
  1109. treeID = magicTree;
  1110. logID = magicLog;
  1111. bankerID = 494;
  1112. location = "SorcTower";
  1113. treesChopping = "Magics";
  1114. } else if(treesToCut.equals("Willows | Port Sarim")) {
  1115. placeToBank = walkToBankPortSarim;
  1116. placeToCut = walkToTreesPortSarim;
  1117. treeID = willowTree;
  1118. logID = willowLog;
  1119. location = "Port Sarim";
  1120. treesChopping = "Willows";
  1121. bankerID = depositBox;
  1122. } else if(treesToCut.equals("Oaks | East-Varrock")) {
  1123. placeToBank = walkToBankEastVarrock;
  1124. placeToCut = walkToTreesEastVarrock;
  1125. treeID = oakTree;
  1126. logID = oakLog;
  1127. location = "East Varrock Gate";
  1128. treesChopping = "Oaks";
  1129. bankerID = 553;
  1130. } else if(treesToCut.equals("Yews | Rimmington")) {
  1131. placeToBank = walkToBankRimmington;
  1132. placeToCut = walkToTreesRimmington;
  1133. treeID = yewTree;
  1134. treesChopping = "Yews";
  1135. logID = yewLog;
  1136. location = "Rimmington";
  1137. bankerID = depositBox;
  1138. } else if(treesToCut.equals("Trees | Varrock west bank")) {
  1139. placeToBank = walkToBankVarrockBank;
  1140. treesChopping = "Normal";
  1141. location = "Varrock west bank";
  1142. placeToCut = walkToTreesVarrockBank;
  1143. treeID = normalTree;
  1144. logID = normalLog;
  1145. bankerID = 553;
  1146. }
  1147. String treesToPowercut = powerchopping.getSelectedItem().toString();
  1148. if(treesToPowercut.equals("Tree")) {
  1149. treeID = normalTree;
  1150. treesChopping = "Normal";
  1151. location = "N/A";
  1152. logID = 0;
  1153. } if(treesToPowercut.equals("Oak")) {
  1154. treeID = oakTree;
  1155. treesChopping = "Oak";
  1156. location = "N/A";
  1157. logID = 0;
  1158. } if(treesToPowercut.equals("Willow")) {
  1159. treeID = willowTree;
  1160. location = "N/A";
  1161. treesChopping = "Willow";
  1162. logID = 0;
  1163. } if(treesToPowercut.equals("Maple")) {
  1164. treeID = mapleTree;
  1165. location = "N/A";
  1166. treesChopping = "Maple";
  1167. logID = 0;
  1168. } if(treesToPowercut.equals("Teak")) {
  1169. treeID = teakTree;
  1170. treesChopping = "Teak";
  1171. location = "N/A";
  1172. logID = 0;
  1173. } if(treesToPowercut.equals("Mahogany")) {
  1174. treeID = mahoganyTree;
  1175. treesChopping = "Mahogany";
  1176. location = "N/A";
  1177. logID = 0;
  1178. }
  1179.  
  1180. String antiban2 = antiban1.getSelectedItem().toString();
  1181. if(antiban2.equals("Full Antiban")) {
  1182. antiban = true;
  1183. } if(antiban2.equals("No Antiban")) {
  1184. antiban = false;
  1185. }
  1186. guiWait = false;
  1187. g.dispose();
  1188.  
  1189. }
  1190.  
  1191. private void initComponents() {
  1192. label1 = new JLabel();
  1193. button1 = new JButton();
  1194. tabbedPane1 = new JTabbedPane();
  1195. panel1 = new JPanel();
  1196. scrollPane1 = new JScrollPane();
  1197. textArea1 = new JTextArea();
  1198. panel2 = new JPanel();
  1199. bankLocation = new JComboBox();
  1200. label10 = new JLabel();
  1201. isBanking = new JCheckBox();
  1202. label11 = new JLabel();
  1203. label12 = new JLabel();
  1204. label13 = new JLabel();
  1205. label14 = new JLabel();
  1206. label15 = new JLabel();
  1207. antiban1 = new JComboBox();
  1208. label16 = new JLabel();
  1209. label17 = new JLabel();
  1210. panel3 = new JPanel();
  1211. powerchopping = new JComboBox();
  1212. label2 = new JLabel();
  1213. label3 = new JLabel();
  1214. label4 = new JLabel();
  1215. isPowerchopping = new JCheckBox();
  1216. label5 = new JLabel();
  1217. label6 = new JLabel();
  1218. label7 = new JLabel();
  1219. label8 = new JLabel();
  1220. antiban2 = new JComboBox();
  1221. label9 = new JLabel();
  1222.  
  1223. //======== this ========
  1224. setForeground(Color.magenta);
  1225. setBackground(Color.black);
  1226. Container contentPane = getContentPane();
  1227.  
  1228. //---- label1 ----
  1229. label1.setText("ShadeChop GUI ~ developed by eShade");
  1230. label1.setFont(label1.getFont().deriveFont(label1.getFont().getSize() + 9f));
  1231.  
  1232.  
  1233. //---- isPowerChopping ----
  1234. isPowerchopping.addActionListener(new ActionListener() {
  1235. @Override
  1236. public void actionPerformed(ActionEvent e) {
  1237. isPowerchoppingActionPerformed(e);
  1238. }
  1239. });
  1240.  
  1241. //----isBanking ----
  1242. isBanking.addActionListener(new ActionListener() {
  1243. @Override
  1244. public void actionPerformed(ActionEvent e) {
  1245. isBankingActionPerformed(e);
  1246. }
  1247. });
  1248.  
  1249. //---- button1 ----
  1250. button1.setText("Start Chopping!");
  1251. button1.setFont(new Font("Calibri", Font.PLAIN, 26));
  1252. button1.setBackground(new Color(204, 0, 204));
  1253. button1.addActionListener(new ActionListener() {
  1254. @Override
  1255. public void actionPerformed(ActionEvent e) {
  1256. button1ActionPerformed(e);
  1257. }
  1258. });
  1259.  
  1260. //======== tabbedPane1 ========
  1261. {
  1262.  
  1263. //======== panel1 ========
  1264. {
  1265.  
  1266.  
  1267. //======== scrollPane1 ========
  1268. {
  1269.  
  1270. //---- textArea1 ----
  1271. textArea1.setText("ShadeChop is coded/developed by eShade. Please do\not use this script if you downloaded it from a\nsite other than powerbot.org.\n\nPlease do not copy/steal/modify and of this code,\nhowever, you may use tree/hatchet ID's.\n\nPlease select your settings and make sure you\nstart next to your chosen trees/bank.\n\nPlease report any bugs so I can fix them asap. \n\n~eShade");
  1272. scrollPane1.setViewportView(textArea1);
  1273. }
  1274.  
  1275. GroupLayout panel1Layout = new GroupLayout(panel1);
  1276. panel1.setLayout(panel1Layout);
  1277. panel1Layout.setHorizontalGroup(
  1278. panel1Layout.createParallelGroup()
  1279. .addGroup(panel1Layout.createSequentialGroup()
  1280. .addContainerGap()
  1281. .addComponent(scrollPane1, GroupLayout.PREFERRED_SIZE, 409, GroupLayout.PREFERRED_SIZE)
  1282. .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  1283. );
  1284. panel1Layout.setVerticalGroup(
  1285. panel1Layout.createParallelGroup()
  1286. .addGroup(panel1Layout.createSequentialGroup()
  1287. .addContainerGap()
  1288. .addComponent(scrollPane1, GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
  1289. .addContainerGap())
  1290. );
  1291. }
  1292. tabbedPane1.addTab("About ShadeChop/FAQ", panel1);
  1293.  
  1294.  
  1295. //======== panel2 ========
  1296. {
  1297.  
  1298. //---- bankLocation ----
  1299. bankLocation.setModel(new DefaultComboBoxModel(new String[] {
  1300. "Select your location...",
  1301. "Trees | Varrock west bank",
  1302. "Oaks | East-Varrock",
  1303. "Willows | Draynor",
  1304. "Willows | Port Sarim",
  1305. "Willows | Barbarian Outpost",
  1306. "Maples | Seers Village",
  1307. "Yews | Catherby",
  1308. "Yews | Edgeville",
  1309. "Yews | GrandExchange",
  1310. "Yews | Seers Village",
  1311. "Yews | Falador",
  1312. "Yews | Rimmington",
  1313. "Magics | SorcTower"
  1314. }));
  1315.  
  1316. //---- label10 ----
  1317. label10.setText("Are you banking?");
  1318. label10.setFont(label10.getFont().deriveFont(label10.getFont().getSize() + 5f));
  1319.  
  1320. //---- label11 ----
  1321. label11.setText("1)");
  1322. label11.setFont(label11.getFont().deriveFont(label11.getFont().getSize() + 6f));
  1323.  
  1324. //---- label12 ----
  1325. label12.setText("Select your location...");
  1326.  
  1327. //---- label13 ----
  1328. label13.setText("2)");
  1329. label13.setFont(label13.getFont().deriveFont(label13.getFont().getSize() + 6f));
  1330.  
  1331. //---- label14 ----
  1332. label14.setText("Choose your antiban...");
  1333.  
  1334. //---- label15 ----
  1335.  
  1336.  
  1337. //---- antiban1 ----
  1338. antiban1.setModel(new DefaultComboBoxModel(new String[] {
  1339. "Full Antiban",
  1340. "No Antiban"
  1341. }));
  1342.  
  1343. //---- label16 ----
  1344. label16.setText("Antiban:");
  1345.  
  1346. //---- label17 ----
  1347. label17.setText("Now click Start Chopping!");
  1348. label17.setFont(label17.getFont().deriveFont(label17.getFont().getSize() + 9f));
  1349.  
  1350.  
  1351. GroupLayout panel2Layout = new GroupLayout(panel2);
  1352. panel2.setLayout(panel2Layout);
  1353. panel2Layout.setHorizontalGroup(
  1354. panel2Layout.createParallelGroup()
  1355. .addGroup(panel2Layout.createSequentialGroup()
  1356. .addContainerGap()
  1357. .addGroup(panel2Layout.createParallelGroup()
  1358. .addGroup(panel2Layout.createSequentialGroup()
  1359. .addComponent(label10)
  1360. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1361. .addComponent(isBanking))
  1362. .addGroup(panel2Layout.createSequentialGroup()
  1363. .addComponent(label11)
  1364. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1365. .addGroup(panel2Layout.createParallelGroup()
  1366. .addComponent(bankLocation, GroupLayout.PREFERRED_SIZE, 306, GroupLayout.PREFERRED_SIZE)
  1367. .addComponent(label12)))
  1368. .addGroup(panel2Layout.createSequentialGroup()
  1369. .addComponent(label13)
  1370. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1371. .addGroup(panel2Layout.createParallelGroup()
  1372.  
  1373. .addGroup(panel2Layout.createSequentialGroup()
  1374. .addComponent(label16)
  1375. .addGap(10, 10, 10)
  1376. .addComponent(antiban1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  1377. .addComponent(label14)
  1378. .addComponent(label17))))
  1379. .addContainerGap(15, Short.MAX_VALUE))
  1380. );
  1381. panel2Layout.setVerticalGroup(
  1382. panel2Layout.createParallelGroup()
  1383. .addGroup(panel2Layout.createSequentialGroup()
  1384. .addContainerGap()
  1385. .addGroup(panel2Layout.createParallelGroup()
  1386. .addComponent(label10)
  1387. .addComponent(isBanking))
  1388. .addGap(24, 24, 24)
  1389. .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  1390. .addComponent(label11)
  1391. .addComponent(label12))
  1392. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1393. .addComponent(bankLocation, GroupLayout.PREFERRED_SIZE, 31, GroupLayout.PREFERRED_SIZE)
  1394. .addGap(18, 18, 18)
  1395. .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  1396. .addComponent(label13)
  1397. .addComponent(label14))
  1398. .addGap(9, 9, 9)
  1399. .addGap(9, 9, 9)
  1400. .addGroup(panel2Layout.createParallelGroup()
  1401. .addGroup(panel2Layout.createSequentialGroup()
  1402. .addGap(3, 3, 3)
  1403. .addComponent(label16))
  1404. .addComponent(antiban1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  1405. .addGap(18, 18, 18)
  1406. .addComponent(label17)
  1407. .addContainerGap(25, Short.MAX_VALUE))
  1408. );
  1409. }
  1410. tabbedPane1.addTab("Banking Options...", panel2);
  1411.  
  1412.  
  1413. //======== panel3 ========
  1414. {
  1415.  
  1416. //---- powerchopping ----
  1417. powerchopping.setModel(new DefaultComboBoxModel(new String[] {
  1418. "Choose your tree...",
  1419. "Tree",
  1420. "Oak",
  1421. "Willow",
  1422. "Maple",
  1423. "Teak"
  1424. }));
  1425.  
  1426. //---- label2 ----
  1427. label2.setText(" Are you powerchopping?");
  1428. label2.setFont(label2.getFont().deriveFont(label2.getFont().getSize() + 5f));
  1429.  
  1430. //---- label3 ----
  1431. label3.setText("Choose your tree...");
  1432.  
  1433. //---- label4 ----
  1434. label4.setText("Choose your antiban...");
  1435.  
  1436. //---- label5 ----
  1437. label5.setText("1)");
  1438. label5.setFont(label5.getFont().deriveFont(label5.getFont().getSize() + 6f));
  1439.  
  1440. //---- label6 ----
  1441. label6.setText("2)");
  1442. label6.setFont(label6.getFont().deriveFont(label6.getFont().getSize() + 6f));
  1443.  
  1444.  
  1445. //---- label8 ----
  1446. label8.setText("Antiban:");
  1447.  
  1448. //---- antiban2 ----
  1449. antiban2.setModel(new DefaultComboBoxModel(new String[] {
  1450. "Full Antiban",
  1451. "No Antiban"
  1452. }));
  1453.  
  1454. //---- label9 ----
  1455. label9.setText("Now click Start Chopping!");
  1456. label9.setFont(label9.getFont().deriveFont(label9.getFont().getSize() + 9f));
  1457.  
  1458.  
  1459. GroupLayout panel3Layout = new GroupLayout(panel3);
  1460. panel3.setLayout(panel3Layout);
  1461. panel3Layout.setHorizontalGroup(
  1462. panel3Layout.createParallelGroup()
  1463. .addGroup(panel3Layout.createSequentialGroup()
  1464. .addContainerGap()
  1465. .addGroup(panel3Layout.createParallelGroup()
  1466. .addGroup(panel3Layout.createSequentialGroup()
  1467. .addComponent(label2)
  1468. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1469. .addComponent(isPowerchopping))
  1470. .addGroup(panel3Layout.createSequentialGroup()
  1471. .addComponent(label5)
  1472. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1473. .addGroup(panel3Layout.createParallelGroup()
  1474. .addComponent(powerchopping, GroupLayout.PREFERRED_SIZE, 312, GroupLayout.PREFERRED_SIZE)
  1475. .addComponent(label3)))
  1476. .addGroup(panel3Layout.createSequentialGroup()
  1477. .addComponent(label6)
  1478. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1479. .addGroup(panel3Layout.createParallelGroup()
  1480.  
  1481. .addComponent(label4)
  1482. .addGroup(panel3Layout.createSequentialGroup()
  1483. .addComponent(label8)
  1484. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1485. .addComponent(antiban2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  1486. .addComponent(label9))))
  1487. .addContainerGap(19, Short.MAX_VALUE))
  1488. );
  1489. panel3Layout.setVerticalGroup(
  1490. panel3Layout.createParallelGroup()
  1491. .addGroup(panel3Layout.createSequentialGroup()
  1492. .addContainerGap()
  1493. .addGroup(panel3Layout.createParallelGroup()
  1494. .addComponent(label2)
  1495. .addGroup(panel3Layout.createSequentialGroup()
  1496. .addComponent(isPowerchopping)
  1497. .addGap(26, 26, 26)
  1498. .addGroup(panel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  1499. .addComponent(label5)
  1500. .addComponent(label3))
  1501. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1502. .addComponent(powerchopping, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
  1503. .addGap(29, 29, 29)
  1504. .addGroup(panel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  1505. .addComponent(label6)
  1506. .addComponent(label4))
  1507. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1508.  
  1509. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1510. .addGroup(panel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  1511. .addComponent(label8)
  1512. .addComponent(antiban2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
  1513. .addGap(18, 18, 18)
  1514. .addComponent(label9)))
  1515. .addContainerGap(14, Short.MAX_VALUE))
  1516. );
  1517. }
  1518. tabbedPane1.addTab("PowerChopping Options...", panel3);
  1519.  
  1520. }
  1521.  
  1522. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  1523. contentPane.setLayout(contentPaneLayout);
  1524. contentPaneLayout.setHorizontalGroup(
  1525. contentPaneLayout.createParallelGroup()
  1526. .addGroup(contentPaneLayout.createSequentialGroup()
  1527. .addGroup(contentPaneLayout.createParallelGroup()
  1528. .addGroup(contentPaneLayout.createSequentialGroup()
  1529. .addGap(20, 20, 20)
  1530. .addComponent(label1))
  1531. .addGroup(contentPaneLayout.createSequentialGroup()
  1532. .addContainerGap()
  1533. .addComponent(button1, GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE))
  1534. .addGroup(contentPaneLayout.createSequentialGroup()
  1535. .addContainerGap()
  1536. .addComponent(tabbedPane1, GroupLayout.PREFERRED_SIZE, 431, GroupLayout.PREFERRED_SIZE)))
  1537. .addContainerGap())
  1538. );
  1539. contentPaneLayout.setVerticalGroup(
  1540. contentPaneLayout.createParallelGroup()
  1541. .addGroup(contentPaneLayout.createSequentialGroup()
  1542. .addContainerGap()
  1543. .addComponent(label1)
  1544. .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  1545. .addComponent(tabbedPane1, GroupLayout.PREFERRED_SIZE, 307, GroupLayout.PREFERRED_SIZE)
  1546. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  1547. .addComponent(button1, GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE)
  1548. .addContainerGap())
  1549. );
  1550. pack();
  1551. setLocationRelativeTo(getOwner());
  1552. // JFormDesigner - End of component initialization //GEN-END:initComponents
  1553. }
  1554.  
  1555. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  1556. // Generated using JFormDesigner Evaluation license - Jack Daniel
  1557. private JLabel label1;
  1558. private JButton button1;
  1559. private JTabbedPane tabbedPane1;
  1560. private JPanel panel1;
  1561. private JScrollPane scrollPane1;
  1562. private JTextArea textArea1;
  1563. private JPanel panel2;
  1564. private JComboBox bankLocation;
  1565. private JLabel label10;
  1566. private JCheckBox isBanking;
  1567. private JLabel label11;
  1568. private JLabel label12;
  1569. private JLabel label13;
  1570. private JLabel label14;
  1571. private JLabel label15;
  1572. private JComboBox antiban1;
  1573. private JLabel label16;
  1574. private JLabel label17;
  1575. private JPanel panel3;
  1576. private JComboBox powerchopping;
  1577. private JLabel label2;
  1578. private JLabel label3;
  1579. private JLabel label4;
  1580. private JCheckBox isPowerchopping;
  1581. private JLabel label5;
  1582. private JLabel label6;
  1583. private JLabel label7;
  1584. private JLabel label8;
  1585. private JComboBox antiban2;
  1586. private JLabel label9;
  1587. // JFormDesigner - End of variables declaration //GEN-END:variables
  1588. }
  1589.  
  1590.  
  1591. @Override
  1592. public void mouseDragged(MouseEvent e) {
  1593. // TODO Auto-generated method stub
  1594.  
  1595. }
  1596.  
  1597. @Override
  1598. public void mouseMoved(MouseEvent e) {
  1599. // TODO Auto-generated method stub
  1600.  
  1601. }
  1602.  
  1603.  
  1604. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement