Guest User

Untitled

a guest
Jan 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.26 KB | None | 0 0
  1. import org.rsbot.event.events.MessageEvent;
  2. import org.rsbot.event.listeners.MessageListener;
  3. import org.rsbot.event.listeners.PaintListener;
  4. import org.rsbot.script.Script;
  5. import org.rsbot.script.ScriptManifest;
  6. import org.rsbot.script.methods.Skills;
  7. import org.rsbot.script.wrappers.RSObject;
  8. import java.awt.*;
  9. import javax.swing.*;
  10. import java.awt.Font;
  11. import java.awt.event.*;
  12. import javax.swing.GroupLayout;
  13. import javax.swing.LayoutStyle;
  14.  
  15.  
  16. @ScriptManifest
  17. (
  18. authors = {"NetRom"},
  19. version = 1.3,
  20. keywords = "Fletch",
  21. description = "Fletchs much : D",
  22. name = "NetRomFletch"
  23. )
  24.  
  25.  
  26. public class NetRomFletch extends Script implements PaintListener, MessageListener {
  27.  
  28. int varrockID = 782;
  29. int knife = 946;
  30. int bowstring = 1777;
  31. int shaft = 52;
  32. int headless = 53;
  33. int feather = 314;
  34.  
  35. private int chosen = 0;
  36.  
  37. private int[] logID = {1521, 1519, 1517, 1515, 1513};
  38. private int[] unsID = {54, 56, 60, 58, 64, 62, 68, 66, 72, 70};
  39. private int[] arrowTip = {39, 40, 41, 42, 43, 44, 11237};
  40.  
  41. int tipNeeded;
  42. int bowNeeded;
  43. int logNeeded;
  44.  
  45. gooeyf g = new gooeyf();
  46.  
  47. private boolean guiWait = true;
  48.  
  49. public long startTime = 0;
  50.  
  51. public long millis = 0;
  52.  
  53. public long hours = 0;
  54.  
  55. public long minutes = 0;
  56.  
  57. public long seconds = 0;
  58.  
  59. public long last = 0;
  60.  
  61. private int startExp;
  62.  
  63. private int expGained;
  64.  
  65. public int expHour = 0;
  66.  
  67. int lvlsGained = 0;
  68.  
  69.  
  70. //***********onStart**********\\
  71. public boolean onStart() {
  72. startTime = System.currentTimeMillis();
  73. startExp = skills.getCurrentExp(Skills.FLETCHING);
  74. log("My Script Started, yay!");
  75. {
  76. g.setVisible(true);
  77. while(guiWait)sleep(500);
  78. try {
  79. SwingUtilities.invokeAndWait(new Runnable() {
  80.  
  81. public void run() {
  82. gooeyf anything = new gooeyf();
  83. }
  84. });
  85. } catch (Throwable e) {
  86. }
  87. }
  88. return true;
  89. }
  90.  
  91.  
  92. //************Loop************\\
  93. public int loop() {
  94. antibanM();
  95. antibanC();
  96. mouse.setSpeed(6);
  97.  
  98. switch(chosen){
  99.  
  100. //Shortbows
  101. case 1:
  102. antibanM();
  103. antibanC();
  104. if(inventory.getCount(logNeeded) == 0) {
  105. if(atBank()) {
  106. doBank();
  107. }
  108. }
  109. inventory.useItem(knife, logNeeded);
  110. sleep(random(1500, 1800));
  111. log("Status: Fletching Shortbows");
  112. if (interfaces.get(905).getComponent(14).doClick()) {
  113. sleep(random(50700, 51000));
  114. }
  115. break;
  116.  
  117. //Longbows
  118. case 2:
  119. antibanM();
  120. antibanC();
  121. if(inventory.getCount(logNeeded) == 0) {
  122. if(atBank()) {
  123. doBank();
  124. }
  125. }
  126. inventory.useItem(knife, logNeeded);
  127. sleep(random(1500, 1800));
  128. log("Status: Fletching Longbows");
  129. if (interfaces.get(905).getComponent(15).doClick()) {
  130. sleep(random(50700, 51000));
  131. }
  132. break;
  133.  
  134. //Stringing
  135. case 3:
  136. antibanM();
  137. antibanC();
  138. if(inventory.getCount(bowNeeded, bowstring) == 0) {
  139. if(atBank()) {
  140. doBankString();
  141. }
  142. }
  143. inventory.useItem(bowstring, bowNeeded);
  144. sleep(random(1500, 1800));
  145. log("Status: Stringing Bows");
  146. if (interfaces.get(905).getComponent(14).doClick()) {
  147. sleep(random(16700, 17000));
  148. }
  149. break;
  150.  
  151. //Headless Arrows
  152. case 4:
  153. antibanM();
  154. antibanC();
  155. inventory.useItem(feather, shaft);
  156. sleep(random(1500, 1800));
  157. log("Status: Fletching Headless Arrows");
  158. if (interfaces.get(905).getComponent(14).doClick()) {
  159. sleep(random(12000, 13000));
  160. }
  161. break;
  162.  
  163. //Arrows
  164. case 5:
  165. antibanM();
  166. antibanC();
  167. inventory.useItem(headless, tipNeeded);
  168. sleep(random(1500, 1800));
  169. log("Status: Fletching Arrows");
  170. if (interfaces.get(905).getComponent(14).doClick()) {
  171. sleep(random(12000, 13000));
  172. }
  173. break;
  174.  
  175. //**************End Of*************\\
  176.  
  177. }
  178. return 0;
  179. }
  180.  
  181. //**************Banking**************\\
  182.  
  183. private boolean atBank() {
  184. RSObject bank = objects.getNearest(varrockID);
  185. bank.interact("Use-quickly");
  186. if(bank != null) {
  187. if(bank.isOnScreen()) {
  188. return true;
  189. }
  190. }
  191. return false;
  192. }
  193.  
  194.  
  195. private void doBank() {
  196. mouse.setSpeed(5);
  197. if(bank.isOpen()) {
  198.  
  199. log("Status: Banking");
  200.  
  201. if(bank.getCount(logNeeded) <= 27) {
  202.  
  203. log("Out of required materials, stopping script.");
  204. stopScript();
  205.  
  206. } else {
  207.  
  208. bank.depositAllExcept(knife);
  209. sleep (random(800, 1000));
  210.  
  211. bank.withdraw(logNeeded, 27);
  212. sleep (random(800, 1000));
  213.  
  214. bank.close();
  215.  
  216. }
  217. }
  218. }
  219.  
  220. private void doBankString() {
  221. mouse.setSpeed(5);
  222. if(bank.isOpen()) {
  223.  
  224. if(bank.getCount(bowstring) <= 14) {
  225.  
  226. log("Out of required materials, stopping script.");
  227. stopScript();
  228.  
  229. } else {
  230.  
  231. bank.depositAll();
  232. sleep (random(800, 1000));
  233.  
  234. bank.withdraw(bowstring, 14);
  235. sleep (random(800, 1000));
  236.  
  237. bank.withdraw(bowNeeded, 14);
  238. sleep (random(800, 1000));
  239.  
  240. bank.close();
  241.  
  242. }
  243. }
  244. }
  245.  
  246. //**********onFinish**********\\
  247. public void onFinish() {
  248. log("Thx 4 using my script son, you so beast");
  249. log("You used this script for" + + hours + ":" + minutes + ":" + seconds + " and your exp gain is + " exp in just "!");
  250. }
  251.  
  252.  
  253. //*******Message Events*******\\
  254.  
  255. public void messageReceived(MessageEvent e) {
  256. String txt = e.getMessage().toLowerCase();
  257. if(txt.contains("gz")) {
  258. lvlsGained++;
  259. sleep(random(500, 1500));
  260. if (interfaces.canContinue()) {
  261. interfaces.clickContinue();
  262. }
  263. }
  264. }
  265.  
  266.  
  267. //**************GUI**************\\
  268.  
  269. class gooeyf extends JFrame {
  270. public gooeyf() {
  271. initComponents();
  272. }
  273.  
  274. private void longbowsActionPerformed(ActionEvent e) {
  275.  
  276. String chosen1 = comboBox1.getSelectedItem().toString();
  277.  
  278. if(chosen1.equals("Oak")) {
  279. logNeeded = logID[0];
  280. chosen = 2;
  281.  
  282. } else if(chosen1.equals("Willow")) {
  283. logNeeded = logID[1];
  284. chosen = 2;
  285.  
  286. } else if(chosen1.equals("Maple")) {
  287. logNeeded = logID[2];
  288. chosen = 2;
  289.  
  290. } else if(chosen1.equals("Yew")) {
  291. logNeeded = logID[3];
  292. chosen = 2;
  293.  
  294. } else if(chosen1.equals("Magic")) {
  295. logNeeded = logID[4];
  296. chosen = 2;
  297.  
  298. }
  299.  
  300. guiWait = false;
  301. g.setVisible(false);
  302. }
  303.  
  304. private void shortbowsActionPerformed(ActionEvent e) {
  305. String chosen2 = comboBox2.getSelectedItem().toString();
  306.  
  307. if(chosen2.equals("Oak")) {
  308. logNeeded = logID[0];
  309. chosen = 1;
  310.  
  311. } else if(chosen2.equals("Willow")) {
  312. logNeeded = logID[1];
  313. chosen = 1;
  314.  
  315. } else if(chosen2.equals("Maple")) {
  316. logNeeded = logID[2];
  317. chosen = 1;
  318.  
  319. } else if(chosen2.equals("Yew")) {
  320. logNeeded = logID[3];
  321. chosen = 1;
  322.  
  323. } else if(chosen2.equals("Magic")) {
  324. logNeeded = logID[4];
  325. chosen = 1;
  326.  
  327. }
  328.  
  329. guiWait = false;
  330. g.setVisible(false);
  331. }
  332.  
  333. private void stringingActionPerformed(ActionEvent e) {
  334. String chosen3 = comboBox3.getSelectedItem().toString();
  335.  
  336. if(chosen3.equals("Oak Longbow")) {
  337. bowNeeded = unsID[1];
  338. chosen = 3;
  339.  
  340. } else if(chosen3.equals("Oak Shortbow")) {
  341. bowNeeded = unsID[0];
  342. chosen = 3;
  343.  
  344. } else if(chosen3.equals("Willow Longbow")) {
  345. bowNeeded = unsID[3];
  346. chosen = 3;
  347.  
  348. } else if(chosen3.equals("Willow Shortbow")) {
  349. bowNeeded = unsID[2];
  350. chosen = 3;
  351.  
  352. } else if(chosen3.equals("Maple Longbow")) {
  353. bowNeeded = unsID[5];
  354. chosen = 3;
  355.  
  356. } else if(chosen3.equals("Maple Shortbow")) {
  357. bowNeeded = unsID[4];
  358. chosen = 3;
  359.  
  360. } else if(chosen3.equals("Yew Longbow")) {
  361. bowNeeded = unsID[7];
  362. chosen = 3;
  363.  
  364. } else if(chosen3.equals("Yew Shortbow")) {
  365. bowNeeded = unsID[6];
  366. chosen = 3;
  367.  
  368. } else if(chosen3.equals("Magic Longbow")) {
  369. bowNeeded = unsID[9];
  370. chosen = 3;
  371.  
  372. } else if(chosen3.equals("Magic Shortbow")) {
  373. bowNeeded = unsID[8];
  374. chosen = 3;
  375. }
  376.  
  377. guiWait = false;
  378. g.setVisible(false);
  379. }
  380.  
  381. private void arrowsActionPerformed(ActionEvent e) {
  382. String chosen4 = comboBox4.getSelectedItem().toString();
  383.  
  384. if(chosen4.equals("Headless")) {
  385. chosen = 4;
  386.  
  387. } else if(chosen4.equals("Bronze")) {
  388. chosen = 5;
  389. tipNeeded = arrowTip[0];
  390.  
  391. } else if(chosen4.equals("Iron")) {
  392. chosen = 5;
  393. tipNeeded = arrowTip[1];
  394.  
  395. } else if(chosen4.equals("Steel")) {
  396. chosen = 5;
  397. tipNeeded = arrowTip[2];
  398.  
  399. } else if(chosen4.equals("Mithril")) {
  400. chosen = 5;
  401. tipNeeded = arrowTip[3];
  402.  
  403. } else if(chosen4.equals("Adamant")) {
  404. chosen = 5;
  405. tipNeeded = arrowTip[4];
  406.  
  407. } else if(chosen4.equals("Runite")) {
  408. chosen = 5;
  409. tipNeeded = arrowTip[5];
  410.  
  411. } else if(chosen4.equals("Dragon")) {
  412. chosen = 5;
  413. tipNeeded = arrowTip[6];
  414.  
  415. }
  416.  
  417. guiWait = false;
  418. g.setVisible(false);
  419. }
  420.  
  421. private void initComponents() {
  422. // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
  423. // Generated using JFormDesigner Evaluation license - Adam Bennett
  424. tabbedPane1 = new JTabbedPane();
  425. panel1 = new JPanel();
  426. label1 = new JLabel();
  427. label2 = new JLabel();
  428. label3 = new JLabel();
  429. label4 = new JLabel();
  430. panel2 = new JPanel();
  431. label5 = new JLabel();
  432. comboBox1 = new JComboBox();
  433. button1 = new JButton();
  434. label9 = new JLabel();
  435. panel3 = new JPanel();
  436. label6 = new JLabel();
  437. comboBox2 = new JComboBox();
  438. button2 = new JButton();
  439. label10 = new JLabel();
  440. panel4 = new JPanel();
  441. label7 = new JLabel();
  442. comboBox3 = new JComboBox();
  443. button3 = new JButton();
  444. label11 = new JLabel();
  445. panel5 = new JPanel();
  446. label8 = new JLabel();
  447. comboBox4 = new JComboBox();
  448. button4 = new JButton();
  449. label12 = new JLabel();
  450.  
  451. //======== this ========
  452. setResizable(false);
  453. Container contentPane = getContentPane();
  454.  
  455. //======== tabbedPane1 ========
  456. {
  457.  
  458. //======== panel1 ========
  459. {
  460.  
  461. // JFormDesigner evaluation mark
  462. panel1.setBorder(new javax.swing.border.CompoundBorder(
  463. new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
  464. "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
  465. javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12),
  466. java.awt.Color.red), panel1.getBorder())); panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener(){public void propertyChange(java.beans.PropertyChangeEvent e){if("border".equals(e.getPropertyName()))throw new RuntimeException();}});
  467.  
  468.  
  469. //---- label1 ----
  470. label1.setText("Your choice of what you wanna do.");
  471.  
  472. //---- label3 ----
  473. label3.setText("Thx for usin NetRomFletch, instead of all the others ^^");
  474. label3.setFont(new Font("Times New Roman", Font.BOLD, 26));
  475. label3.setForeground(Color.magenta);
  476.  
  477.  
  478. GroupLayout panel1Layout = new GroupLayout(panel1);
  479. panel1.setLayout(panel1Layout);
  480. panel1Layout.setHorizontalGroup(
  481. panel1Layout.createParallelGroup()
  482. .addGroup(panel1Layout.createSequentialGroup()
  483. .addGroup(panel1Layout.createParallelGroup()
  484. .addGroup(panel1Layout.createSequentialGroup()
  485. .addGap(114, 114, 114)
  486. .addComponent(label2))
  487. .addGroup(panel1Layout.createSequentialGroup()
  488. .addGap(78, 78, 78)
  489. .addComponent(label1)))
  490. .addContainerGap(83, Short.MAX_VALUE))
  491. .addGroup(panel1Layout.createSequentialGroup()
  492. .addGap(63, 63, 63)
  493. .addComponent(label4)
  494. .addContainerGap(66, Short.MAX_VALUE))
  495. .addGroup(GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup()
  496. .addContainerGap(54, Short.MAX_VALUE)
  497. .addComponent(label3)
  498. .addGap(42, 42, 42))
  499. );
  500. panel1Layout.setVerticalGroup(
  501. panel1Layout.createParallelGroup()
  502. .addGroup(panel1Layout.createSequentialGroup()
  503. .addContainerGap()
  504. .addComponent(label1)
  505. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  506. .addComponent(label2)
  507. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
  508. .addComponent(label4)
  509. .addGap(18, 18, 18)
  510. .addComponent(label3)
  511. .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  512. );
  513. }
  514. tabbedPane1.addTab("Main", panel1);
  515.  
  516.  
  517. //======== panel2 ========
  518. {
  519.  
  520. //---- label5 ----
  521. label5.setText("Longbows to make: ");
  522. label5.setFont(label5.getFont().deriveFont(label5.getFont().getStyle() | Font.BOLD));
  523.  
  524. //---- comboBox1 ----
  525. comboBox1.setModel(new DefaultComboBoxModel(new String[] {
  526. "Oak",
  527. "Willow",
  528. "Maple",
  529. "Yew",
  530. "Magic"
  531. }));
  532.  
  533. //---- button1 ----
  534. button1.setText("Start");
  535. button1.addActionListener(new ActionListener() {
  536. @Override
  537. public void actionPerformed(ActionEvent e) {
  538. longbowsActionPerformed(e);
  539. }
  540. });
  541.  
  542. //---- label9 ----
  543. label9.setText("Start @ Varrock West with knife in inventory.");
  544.  
  545. GroupLayout panel2Layout = new GroupLayout(panel2);
  546. panel2.setLayout(panel2Layout);
  547. panel2Layout.setHorizontalGroup(
  548. panel2Layout.createParallelGroup()
  549. .addGroup(panel2Layout.createSequentialGroup()
  550. .addGroup(panel2Layout.createParallelGroup()
  551. .addGroup(panel2Layout.createSequentialGroup()
  552. .addContainerGap()
  553. .addComponent(label5)
  554. .addGap(18, 18, 18)
  555. .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  556. .addGap(123, 123, 123)
  557. .addComponent(button1))
  558. .addGroup(panel2Layout.createSequentialGroup()
  559. .addGap(63, 63, 63)
  560. .addComponent(label9)))
  561. .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  562. );
  563. panel2Layout.setVerticalGroup(
  564. panel2Layout.createParallelGroup()
  565. .addGroup(panel2Layout.createSequentialGroup()
  566. .addGap(30, 30, 30)
  567. .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  568. .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  569. .addComponent(button1)
  570. .addComponent(label5))
  571. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
  572. .addComponent(label9)
  573. .addGap(20, 20, 20))
  574. );
  575. }
  576. tabbedPane1.addTab("Longbows", panel2);
  577.  
  578.  
  579. //======== panel3 ========
  580. {
  581.  
  582. //---- label6 ----
  583. label6.setText("Shortbows to make: ");
  584. label6.setFont(label6.getFont().deriveFont(label6.getFont().getStyle() | Font.BOLD));
  585.  
  586. //---- comboBox2 ----
  587. comboBox2.setModel(new DefaultComboBoxModel(new String[] {
  588. "Oak",
  589. "Willow",
  590. "Maple",
  591. "Yew",
  592. "Magic"
  593. }));
  594.  
  595. //---- button2 ----
  596. button2.setText("Start");
  597. button2.addActionListener(new ActionListener() {
  598. @Override
  599. public void actionPerformed(ActionEvent e) {
  600. shortbowsActionPerformed(e);
  601. }
  602. });
  603.  
  604. //---- label10 ----
  605. label10.setText("Start @ Varrock West with knife in inventory.");
  606.  
  607. GroupLayout panel3Layout = new GroupLayout(panel3);
  608. panel3.setLayout(panel3Layout);
  609. panel3Layout.setHorizontalGroup(
  610. panel3Layout.createParallelGroup()
  611. .addGroup(panel3Layout.createSequentialGroup()
  612. .addGroup(panel3Layout.createParallelGroup()
  613. .addGroup(panel3Layout.createSequentialGroup()
  614. .addContainerGap()
  615. .addComponent(label6)
  616. .addGap(18, 18, 18)
  617. .addComponent(comboBox2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  618. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
  619. .addComponent(button2))
  620. .addGroup(panel3Layout.createSequentialGroup()
  621. .addGap(64, 64, 64)
  622. .addComponent(label10)))
  623. .addContainerGap())
  624. );
  625. panel3Layout.setVerticalGroup(
  626. panel3Layout.createParallelGroup()
  627. .addGroup(panel3Layout.createSequentialGroup()
  628. .addGap(30, 30, 30)
  629. .addGroup(panel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  630. .addComponent(comboBox2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  631. .addComponent(button2)
  632. .addComponent(label6))
  633. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)
  634. .addComponent(label10)
  635. .addGap(21, 21, 21))
  636. );
  637. }
  638. tabbedPane1.addTab("Shortbows", panel3);
  639.  
  640.  
  641. //======== panel4 ========
  642. {
  643.  
  644. //---- label7 ----
  645. label7.setText("Bows to string: ");
  646. label7.setFont(label7.getFont().deriveFont(label7.getFont().getStyle() | Font.BOLD));
  647.  
  648. //---- comboBox3 ----
  649. comboBox3.setModel(new DefaultComboBoxModel(new String[] {
  650. "Oak Shortbow",
  651. "Oak Longbow",
  652. "Willow Shortbow",
  653. "Willow Longbow",
  654. "Maple Shortbow",
  655. "Maple Longbow",
  656. "Yew Shortbow",
  657. "Yew Longbow",
  658. "Magic Shortbow",
  659. "Magic Longbow"
  660. }));
  661.  
  662. //---- button3 ----
  663. button3.setText("Start");
  664. button3.addActionListener(new ActionListener() {
  665. @Override
  666. public void actionPerformed(ActionEvent e) {
  667. stringingActionPerformed(e);
  668. }
  669. });
  670.  
  671. //---- label11 ----
  672. label11.setText("Start @ Varrock West with knife in inventory.");
  673.  
  674. GroupLayout panel4Layout = new GroupLayout(panel4);
  675. panel4.setLayout(panel4Layout);
  676. panel4Layout.setHorizontalGroup(
  677. panel4Layout.createParallelGroup()
  678. .addGroup(panel4Layout.createSequentialGroup()
  679. .addGroup(panel4Layout.createParallelGroup()
  680. .addGroup(panel4Layout.createSequentialGroup()
  681. .addContainerGap()
  682. .addComponent(label7)
  683. .addGap(18, 18, 18)
  684. .addComponent(comboBox3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  685. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
  686. .addComponent(button3))
  687. .addGroup(panel4Layout.createSequentialGroup()
  688. .addGap(117, 117, 117)
  689. .addComponent(label11)))
  690. .addContainerGap())
  691. );
  692. panel4Layout.setVerticalGroup(
  693. panel4Layout.createParallelGroup()
  694. .addGroup(panel4Layout.createSequentialGroup()
  695. .addGap(30, 30, 30)
  696. .addGroup(panel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  697. .addComponent(label7)
  698. .addComponent(comboBox3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  699. .addComponent(button3))
  700. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
  701. .addComponent(label11)
  702. .addGap(20, 20, 20))
  703. );
  704. }
  705. tabbedPane1.addTab("Stringing", panel4);
  706.  
  707.  
  708. //======== panel5 ========
  709. {
  710.  
  711. //---- label8 ----
  712. label8.setText("Arrows to make: ");
  713. label8.setFont(label8.getFont().deriveFont(label8.getFont().getStyle() | Font.BOLD));
  714.  
  715. //---- comboBox4 ----
  716. comboBox4.setModel(new DefaultComboBoxModel(new String[] {
  717. "Headless",
  718. "Bronze",
  719. "Iron",
  720. "Steel",
  721. "Mithril",
  722. "Adamant",
  723. "Runite",
  724. "Dragon"
  725. }));
  726.  
  727. //---- button4 ----
  728. button4.setText("Start");
  729. button4.addActionListener(new ActionListener() {
  730. @Override
  731. public void actionPerformed(ActionEvent e) {
  732. arrowsActionPerformed(e);
  733. }
  734. });
  735.  
  736. //---- label12 ----
  737. label12.setText("You can do this anywhere, varrock west would be nice tho");
  738.  
  739. GroupLayout panel5Layout = new GroupLayout(panel5);
  740. panel5.setLayout(panel5Layout);
  741. panel5Layout.setHorizontalGroup(
  742. panel5Layout.createParallelGroup()
  743. .addGroup(panel5Layout.createSequentialGroup()
  744. .addContainerGap()
  745. .addGroup(panel5Layout.createParallelGroup()
  746. .addGroup(panel5Layout.createSequentialGroup()
  747. .addComponent(label8)
  748. .addGap(18, 18, 18)
  749. .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  750. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 126, Short.MAX_VALUE)
  751. .addComponent(button4)
  752. .addContainerGap())
  753. .addGroup(GroupLayout.Alignment.TRAILING, panel5Layout.createSequentialGroup()
  754. .addComponent(label12)
  755. .addGap(76, 76, 76))))
  756. );
  757. panel5Layout.setVerticalGroup(
  758. panel5Layout.createParallelGroup()
  759. .addGroup(panel5Layout.createSequentialGroup()
  760. .addGap(30, 30, 30)
  761. .addGroup(panel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  762. .addComponent(label8)
  763. .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  764. .addComponent(button4))
  765. .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
  766. .addComponent(label12)
  767. .addGap(24, 24, 24))
  768. );
  769. }
  770. tabbedPane1.addTab("Arrows", panel5);
  771.  
  772. }
  773.  
  774. GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  775. contentPane.setLayout(contentPaneLayout);
  776. contentPaneLayout.setHorizontalGroup(
  777. contentPaneLayout.createParallelGroup()
  778. .addComponent(tabbedPane1, GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE)
  779. );
  780. contentPaneLayout.setVerticalGroup(
  781. contentPaneLayout.createParallelGroup()
  782. .addComponent(tabbedPane1, GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)
  783. );
  784. pack();
  785. setLocationRelativeTo(getOwner());
  786. // JFormDesigner - End of component initialization //GEN-END:initComponents
  787. }
  788.  
  789. // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
  790. // Generated using JFormDesigner Evaluation license - Adam Bennett
  791. private JTabbedPane tabbedPane1;
  792. private JPanel panel1;
  793. private JLabel label1;
  794. private JLabel label2;
  795. private JLabel label3;
  796. private JLabel label4;
  797. private JPanel panel2;
  798. private JLabel label5;
  799. private JComboBox comboBox1;
  800. private JButton button1;
  801. private JLabel label9;
  802. private JPanel panel3;
  803. private JLabel label6;
  804. private JComboBox comboBox2;
  805. private JButton button2;
  806. private JLabel label10;
  807. private JPanel panel4;
  808. private JLabel label7;
  809. private JComboBox comboBox3;
  810. private JButton button3;
  811. private JLabel label11;
  812. private JPanel panel5;
  813. private JLabel label8;
  814. private JComboBox comboBox4;
  815. private JButton button4;
  816. private JLabel label12;
  817. // JFormDesigner - End of variables declaration //GEN-END:variables
  818. }
  819.  
  820. //*************Paint*************\\
  821.  
  822. //START: Code generated using Enfilade's Easel
  823. private final Color color1 = new Color(0, 0, 0, 229);
  824. private final Color color2 = new Color(255, 255, 255);
  825.  
  826. private final Font font1 = new Font("Arial", 1, 13);
  827.  
  828. public void onRepaint(Graphics g1) {
  829. Graphics2D g = (Graphics2D)g1;
  830.  
  831. millis = System.currentTimeMillis() - startTime;
  832.  
  833. hours = millis / (1000 * 60 * 60);
  834.  
  835. millis -= hours * (1000 * 60 * 60);
  836.  
  837. minutes = millis / (1000 * 60);
  838.  
  839. millis -= minutes * (1000 * 60);
  840.  
  841. seconds = millis / 1000;
  842.  
  843. expGained = skills.getCurrentExp(Skills.FLETCHING) - startExp;
  844.  
  845. expHour = (int) ((expGained) * 3600000D / (System
  846.  
  847. .currentTimeMillis() - startTime));
  848.  
  849. g.setColor(color1);
  850. g.fillRect(2, 3, 515, 72);
  851. g.setFont(font1);
  852. g.setColor(color2);
  853. g.drawString("Time Ran: "+ hours + ":" + minutes + ":" + seconds, 7, 24);
  854. g.drawString("Exp Gained: "+expGained, 165, 24);
  855. g.drawString("Exp/hr: "+expHour, 165, 59);
  856. g.drawString("Levels Gained: "+lvlsGained, 7, 59);
  857. g.drawString("Exp TNL: "+skills.getExpToNextLevel(Skills.FLETCHING), 334, 24);
  858. g.drawString("Current Level: "+skills.getCurrentLevel(Skills.FLETCHING), 334, 59);
  859. }
  860. //END: Code generated using Enfilade's Easel
  861.  
  862. //************AntiBan**********\\
  863. private final void antibanM() {
  864. int r = random(0, 20);
  865. switch (r) {
  866. case 1:
  867. break;
  868. case 3:
  869. mouse.moveSlightly();
  870. sleep(300, 600);
  871. break;
  872. case 5:
  873. break;
  874. case 6:
  875. break;
  876. case 7:
  877. mouse.moveRandomly(10, 50);
  878. break;
  879. case 8:
  880. break;
  881. case 9:
  882. break;
  883. case 10:
  884. mouse.moveOffScreen();
  885. sleep (random(2000, 3000));
  886. break;
  887. case 12:
  888. break;
  889. case 15:
  890. break;
  891. case 16:
  892. mouse.moveSlightly();
  893. sleep(300, 600);
  894. break;
  895. case 17:
  896. break;
  897. }
  898. }
  899.  
  900. public final void antibanC() {
  901. int rr = random(0, 20);
  902. switch(rr) {
  903. case 1:
  904. camera.setAngle(random(0, 350));
  905. camera.setPitch(random(500, 5000));
  906. break;
  907. case 2:
  908. break;
  909. case 3:
  910. camera.setAngle(random(145,360));
  911. camera.setPitch(random(100, 4099));
  912. break;
  913. case 4:
  914. break;
  915. case 5:
  916. camera.setAngle(random(0, 145));
  917. camera.setPitch(random(4099, 8000));
  918. break;
  919. case 6:
  920. break;
  921. case 7:
  922. break;
  923. case 8:
  924. camera.setAngle(random(0, 360));
  925. camera.setPitch(random(8000, 12000));
  926. break;
  927. case 9:
  928. break;
  929. case 10:
  930. break;
  931. case 11:
  932. camera.setAngle(random(100, 300));
  933. camera.setPitch(random(12000, 16000));
  934. break;
  935. case 12:
  936. break;
  937. case 13:
  938. break;
  939. case 15:
  940. camera.moveRandomly (1200);
  941. sleep(random(300, 500));
  942. break;
  943. case 16:
  944. break;
  945. case 17:
  946. break;
  947. case 19:
  948. camera.moveRandomly(random(750, 1250));
  949. sleep(random(300, 500));
  950. break;
  951. }
  952. }
  953. }
  954.  
  955.  
  956. }45
Add Comment
Please, Sign In to add comment