Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.event.events.MessageEvent;
- import org.rsbot.event.listeners.MessageListener;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.wrappers.RSObject;
- import java.awt.*;
- import javax.swing.*;
- import java.awt.Font;
- import java.awt.event.*;
- import javax.swing.GroupLayout;
- import javax.swing.LayoutStyle;
- @ScriptManifest
- (
- authors = {"NetRom"},
- version = 1.3,
- keywords = "Fletch",
- description = "Fletchs much : D",
- name = "NetRomFletch"
- )
- public class NetRomFletch extends Script implements PaintListener, MessageListener {
- int varrockID = 782;
- int knife = 946;
- int bowstring = 1777;
- int shaft = 52;
- int headless = 53;
- int feather = 314;
- private int chosen = 0;
- private int[] logID = {1521, 1519, 1517, 1515, 1513};
- private int[] unsID = {54, 56, 60, 58, 64, 62, 68, 66, 72, 70};
- private int[] arrowTip = {39, 40, 41, 42, 43, 44, 11237};
- int tipNeeded;
- int bowNeeded;
- int logNeeded;
- gooeyf g = new gooeyf();
- private boolean guiWait = true;
- public long startTime = 0;
- public long millis = 0;
- public long hours = 0;
- public long minutes = 0;
- public long seconds = 0;
- public long last = 0;
- private int startExp;
- private int expGained;
- public int expHour = 0;
- int lvlsGained = 0;
- //***********onStart**********\\
- public boolean onStart() {
- startTime = System.currentTimeMillis();
- startExp = skills.getCurrentExp(Skills.FLETCHING);
- log("My Script Started, yay!");
- {
- g.setVisible(true);
- while(guiWait)sleep(500);
- try {
- SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- gooeyf anything = new gooeyf();
- }
- });
- } catch (Throwable e) {
- }
- }
- return true;
- }
- //************Loop************\\
- public int loop() {
- antibanM();
- antibanC();
- mouse.setSpeed(6);
- switch(chosen){
- //Shortbows
- case 1:
- antibanM();
- antibanC();
- if(inventory.getCount(logNeeded) == 0) {
- if(atBank()) {
- doBank();
- }
- }
- inventory.useItem(knife, logNeeded);
- sleep(random(1500, 1800));
- log("Status: Fletching Shortbows");
- if (interfaces.get(905).getComponent(14).doClick()) {
- sleep(random(50700, 51000));
- }
- break;
- //Longbows
- case 2:
- antibanM();
- antibanC();
- if(inventory.getCount(logNeeded) == 0) {
- if(atBank()) {
- doBank();
- }
- }
- inventory.useItem(knife, logNeeded);
- sleep(random(1500, 1800));
- log("Status: Fletching Longbows");
- if (interfaces.get(905).getComponent(15).doClick()) {
- sleep(random(50700, 51000));
- }
- break;
- //Stringing
- case 3:
- antibanM();
- antibanC();
- if(inventory.getCount(bowNeeded, bowstring) == 0) {
- if(atBank()) {
- doBankString();
- }
- }
- inventory.useItem(bowstring, bowNeeded);
- sleep(random(1500, 1800));
- log("Status: Stringing Bows");
- if (interfaces.get(905).getComponent(14).doClick()) {
- sleep(random(16700, 17000));
- }
- break;
- //Headless Arrows
- case 4:
- antibanM();
- antibanC();
- inventory.useItem(feather, shaft);
- sleep(random(1500, 1800));
- log("Status: Fletching Headless Arrows");
- if (interfaces.get(905).getComponent(14).doClick()) {
- sleep(random(12000, 13000));
- }
- break;
- //Arrows
- case 5:
- antibanM();
- antibanC();
- inventory.useItem(headless, tipNeeded);
- sleep(random(1500, 1800));
- log("Status: Fletching Arrows");
- if (interfaces.get(905).getComponent(14).doClick()) {
- sleep(random(12000, 13000));
- }
- break;
- //**************End Of*************\\
- }
- return 0;
- }
- //**************Banking**************\\
- private boolean atBank() {
- RSObject bank = objects.getNearest(varrockID);
- bank.interact("Use-quickly");
- if(bank != null) {
- if(bank.isOnScreen()) {
- return true;
- }
- }
- return false;
- }
- private void doBank() {
- mouse.setSpeed(5);
- if(bank.isOpen()) {
- log("Status: Banking");
- if(bank.getCount(logNeeded) <= 27) {
- log("Out of required materials, stopping script.");
- stopScript();
- } else {
- bank.depositAllExcept(knife);
- sleep (random(800, 1000));
- bank.withdraw(logNeeded, 27);
- sleep (random(800, 1000));
- bank.close();
- }
- }
- }
- private void doBankString() {
- mouse.setSpeed(5);
- if(bank.isOpen()) {
- if(bank.getCount(bowstring) <= 14) {
- log("Out of required materials, stopping script.");
- stopScript();
- } else {
- bank.depositAll();
- sleep (random(800, 1000));
- bank.withdraw(bowstring, 14);
- sleep (random(800, 1000));
- bank.withdraw(bowNeeded, 14);
- sleep (random(800, 1000));
- bank.close();
- }
- }
- }
- //**********onFinish**********\\
- public void onFinish() {
- log("Thx 4 using my script son, you so beast");
- log("You used this script for" + + hours + ":" + minutes + ":" + seconds + " and your exp gain is + " exp in just "!");
- }
- //*******Message Events*******\\
- public void messageReceived(MessageEvent e) {
- String txt = e.getMessage().toLowerCase();
- if(txt.contains("gz")) {
- lvlsGained++;
- sleep(random(500, 1500));
- if (interfaces.canContinue()) {
- interfaces.clickContinue();
- }
- }
- }
- //**************GUI**************\\
- class gooeyf extends JFrame {
- public gooeyf() {
- initComponents();
- }
- private void longbowsActionPerformed(ActionEvent e) {
- String chosen1 = comboBox1.getSelectedItem().toString();
- if(chosen1.equals("Oak")) {
- logNeeded = logID[0];
- chosen = 2;
- } else if(chosen1.equals("Willow")) {
- logNeeded = logID[1];
- chosen = 2;
- } else if(chosen1.equals("Maple")) {
- logNeeded = logID[2];
- chosen = 2;
- } else if(chosen1.equals("Yew")) {
- logNeeded = logID[3];
- chosen = 2;
- } else if(chosen1.equals("Magic")) {
- logNeeded = logID[4];
- chosen = 2;
- }
- guiWait = false;
- g.setVisible(false);
- }
- private void shortbowsActionPerformed(ActionEvent e) {
- String chosen2 = comboBox2.getSelectedItem().toString();
- if(chosen2.equals("Oak")) {
- logNeeded = logID[0];
- chosen = 1;
- } else if(chosen2.equals("Willow")) {
- logNeeded = logID[1];
- chosen = 1;
- } else if(chosen2.equals("Maple")) {
- logNeeded = logID[2];
- chosen = 1;
- } else if(chosen2.equals("Yew")) {
- logNeeded = logID[3];
- chosen = 1;
- } else if(chosen2.equals("Magic")) {
- logNeeded = logID[4];
- chosen = 1;
- }
- guiWait = false;
- g.setVisible(false);
- }
- private void stringingActionPerformed(ActionEvent e) {
- String chosen3 = comboBox3.getSelectedItem().toString();
- if(chosen3.equals("Oak Longbow")) {
- bowNeeded = unsID[1];
- chosen = 3;
- } else if(chosen3.equals("Oak Shortbow")) {
- bowNeeded = unsID[0];
- chosen = 3;
- } else if(chosen3.equals("Willow Longbow")) {
- bowNeeded = unsID[3];
- chosen = 3;
- } else if(chosen3.equals("Willow Shortbow")) {
- bowNeeded = unsID[2];
- chosen = 3;
- } else if(chosen3.equals("Maple Longbow")) {
- bowNeeded = unsID[5];
- chosen = 3;
- } else if(chosen3.equals("Maple Shortbow")) {
- bowNeeded = unsID[4];
- chosen = 3;
- } else if(chosen3.equals("Yew Longbow")) {
- bowNeeded = unsID[7];
- chosen = 3;
- } else if(chosen3.equals("Yew Shortbow")) {
- bowNeeded = unsID[6];
- chosen = 3;
- } else if(chosen3.equals("Magic Longbow")) {
- bowNeeded = unsID[9];
- chosen = 3;
- } else if(chosen3.equals("Magic Shortbow")) {
- bowNeeded = unsID[8];
- chosen = 3;
- }
- guiWait = false;
- g.setVisible(false);
- }
- private void arrowsActionPerformed(ActionEvent e) {
- String chosen4 = comboBox4.getSelectedItem().toString();
- if(chosen4.equals("Headless")) {
- chosen = 4;
- } else if(chosen4.equals("Bronze")) {
- chosen = 5;
- tipNeeded = arrowTip[0];
- } else if(chosen4.equals("Iron")) {
- chosen = 5;
- tipNeeded = arrowTip[1];
- } else if(chosen4.equals("Steel")) {
- chosen = 5;
- tipNeeded = arrowTip[2];
- } else if(chosen4.equals("Mithril")) {
- chosen = 5;
- tipNeeded = arrowTip[3];
- } else if(chosen4.equals("Adamant")) {
- chosen = 5;
- tipNeeded = arrowTip[4];
- } else if(chosen4.equals("Runite")) {
- chosen = 5;
- tipNeeded = arrowTip[5];
- } else if(chosen4.equals("Dragon")) {
- chosen = 5;
- tipNeeded = arrowTip[6];
- }
- guiWait = false;
- g.setVisible(false);
- }
- private void initComponents() {
- // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
- // Generated using JFormDesigner Evaluation license - Adam Bennett
- tabbedPane1 = new JTabbedPane();
- panel1 = new JPanel();
- label1 = new JLabel();
- label2 = new JLabel();
- label3 = new JLabel();
- label4 = new JLabel();
- panel2 = new JPanel();
- label5 = new JLabel();
- comboBox1 = new JComboBox();
- button1 = new JButton();
- label9 = new JLabel();
- panel3 = new JPanel();
- label6 = new JLabel();
- comboBox2 = new JComboBox();
- button2 = new JButton();
- label10 = new JLabel();
- panel4 = new JPanel();
- label7 = new JLabel();
- comboBox3 = new JComboBox();
- button3 = new JButton();
- label11 = new JLabel();
- panel5 = new JPanel();
- label8 = new JLabel();
- comboBox4 = new JComboBox();
- button4 = new JButton();
- label12 = new JLabel();
- //======== this ========
- setResizable(false);
- Container contentPane = getContentPane();
- //======== tabbedPane1 ========
- {
- //======== panel1 ========
- {
- // JFormDesigner evaluation mark
- panel1.setBorder(new javax.swing.border.CompoundBorder(
- new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
- "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
- javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12),
- 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();}});
- //---- label1 ----
- label1.setText("Your choice of what you wanna do.");
- //---- label3 ----
- label3.setText("Thx for usin NetRomFletch, instead of all the others ^^");
- label3.setFont(new Font("Times New Roman", Font.BOLD, 26));
- label3.setForeground(Color.magenta);
- GroupLayout panel1Layout = new GroupLayout(panel1);
- panel1.setLayout(panel1Layout);
- panel1Layout.setHorizontalGroup(
- panel1Layout.createParallelGroup()
- .addGroup(panel1Layout.createSequentialGroup()
- .addGroup(panel1Layout.createParallelGroup()
- .addGroup(panel1Layout.createSequentialGroup()
- .addGap(114, 114, 114)
- .addComponent(label2))
- .addGroup(panel1Layout.createSequentialGroup()
- .addGap(78, 78, 78)
- .addComponent(label1)))
- .addContainerGap(83, Short.MAX_VALUE))
- .addGroup(panel1Layout.createSequentialGroup()
- .addGap(63, 63, 63)
- .addComponent(label4)
- .addContainerGap(66, Short.MAX_VALUE))
- .addGroup(GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup()
- .addContainerGap(54, Short.MAX_VALUE)
- .addComponent(label3)
- .addGap(42, 42, 42))
- );
- panel1Layout.setVerticalGroup(
- panel1Layout.createParallelGroup()
- .addGroup(panel1Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label1)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(label2)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(label4)
- .addGap(18, 18, 18)
- .addComponent(label3)
- .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- }
- tabbedPane1.addTab("Main", panel1);
- //======== panel2 ========
- {
- //---- label5 ----
- label5.setText("Longbows to make: ");
- label5.setFont(label5.getFont().deriveFont(label5.getFont().getStyle() | Font.BOLD));
- //---- comboBox1 ----
- comboBox1.setModel(new DefaultComboBoxModel(new String[] {
- "Oak",
- "Willow",
- "Maple",
- "Yew",
- "Magic"
- }));
- //---- button1 ----
- button1.setText("Start");
- button1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- longbowsActionPerformed(e);
- }
- });
- //---- label9 ----
- label9.setText("Start @ Varrock West with knife in inventory.");
- GroupLayout panel2Layout = new GroupLayout(panel2);
- panel2.setLayout(panel2Layout);
- panel2Layout.setHorizontalGroup(
- panel2Layout.createParallelGroup()
- .addGroup(panel2Layout.createSequentialGroup()
- .addGroup(panel2Layout.createParallelGroup()
- .addGroup(panel2Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label5)
- .addGap(18, 18, 18)
- .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addGap(123, 123, 123)
- .addComponent(button1))
- .addGroup(panel2Layout.createSequentialGroup()
- .addGap(63, 63, 63)
- .addComponent(label9)))
- .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- panel2Layout.setVerticalGroup(
- panel2Layout.createParallelGroup()
- .addGroup(panel2Layout.createSequentialGroup()
- .addGap(30, 30, 30)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button1)
- .addComponent(label5))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
- .addComponent(label9)
- .addGap(20, 20, 20))
- );
- }
- tabbedPane1.addTab("Longbows", panel2);
- //======== panel3 ========
- {
- //---- label6 ----
- label6.setText("Shortbows to make: ");
- label6.setFont(label6.getFont().deriveFont(label6.getFont().getStyle() | Font.BOLD));
- //---- comboBox2 ----
- comboBox2.setModel(new DefaultComboBoxModel(new String[] {
- "Oak",
- "Willow",
- "Maple",
- "Yew",
- "Magic"
- }));
- //---- button2 ----
- button2.setText("Start");
- button2.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- shortbowsActionPerformed(e);
- }
- });
- //---- label10 ----
- label10.setText("Start @ Varrock West with knife in inventory.");
- GroupLayout panel3Layout = new GroupLayout(panel3);
- panel3.setLayout(panel3Layout);
- panel3Layout.setHorizontalGroup(
- panel3Layout.createParallelGroup()
- .addGroup(panel3Layout.createSequentialGroup()
- .addGroup(panel3Layout.createParallelGroup()
- .addGroup(panel3Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label6)
- .addGap(18, 18, 18)
- .addComponent(comboBox2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
- .addComponent(button2))
- .addGroup(panel3Layout.createSequentialGroup()
- .addGap(64, 64, 64)
- .addComponent(label10)))
- .addContainerGap())
- );
- panel3Layout.setVerticalGroup(
- panel3Layout.createParallelGroup()
- .addGroup(panel3Layout.createSequentialGroup()
- .addGap(30, 30, 30)
- .addGroup(panel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(comboBox2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button2)
- .addComponent(label6))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)
- .addComponent(label10)
- .addGap(21, 21, 21))
- );
- }
- tabbedPane1.addTab("Shortbows", panel3);
- //======== panel4 ========
- {
- //---- label7 ----
- label7.setText("Bows to string: ");
- label7.setFont(label7.getFont().deriveFont(label7.getFont().getStyle() | Font.BOLD));
- //---- comboBox3 ----
- comboBox3.setModel(new DefaultComboBoxModel(new String[] {
- "Oak Shortbow",
- "Oak Longbow",
- "Willow Shortbow",
- "Willow Longbow",
- "Maple Shortbow",
- "Maple Longbow",
- "Yew Shortbow",
- "Yew Longbow",
- "Magic Shortbow",
- "Magic Longbow"
- }));
- //---- button3 ----
- button3.setText("Start");
- button3.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- stringingActionPerformed(e);
- }
- });
- //---- label11 ----
- label11.setText("Start @ Varrock West with knife in inventory.");
- GroupLayout panel4Layout = new GroupLayout(panel4);
- panel4.setLayout(panel4Layout);
- panel4Layout.setHorizontalGroup(
- panel4Layout.createParallelGroup()
- .addGroup(panel4Layout.createSequentialGroup()
- .addGroup(panel4Layout.createParallelGroup()
- .addGroup(panel4Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label7)
- .addGap(18, 18, 18)
- .addComponent(comboBox3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
- .addComponent(button3))
- .addGroup(panel4Layout.createSequentialGroup()
- .addGap(117, 117, 117)
- .addComponent(label11)))
- .addContainerGap())
- );
- panel4Layout.setVerticalGroup(
- panel4Layout.createParallelGroup()
- .addGroup(panel4Layout.createSequentialGroup()
- .addGap(30, 30, 30)
- .addGroup(panel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label7)
- .addComponent(comboBox3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button3))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
- .addComponent(label11)
- .addGap(20, 20, 20))
- );
- }
- tabbedPane1.addTab("Stringing", panel4);
- //======== panel5 ========
- {
- //---- label8 ----
- label8.setText("Arrows to make: ");
- label8.setFont(label8.getFont().deriveFont(label8.getFont().getStyle() | Font.BOLD));
- //---- comboBox4 ----
- comboBox4.setModel(new DefaultComboBoxModel(new String[] {
- "Headless",
- "Bronze",
- "Iron",
- "Steel",
- "Mithril",
- "Adamant",
- "Runite",
- "Dragon"
- }));
- //---- button4 ----
- button4.setText("Start");
- button4.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- arrowsActionPerformed(e);
- }
- });
- //---- label12 ----
- label12.setText("You can do this anywhere, varrock west would be nice tho");
- GroupLayout panel5Layout = new GroupLayout(panel5);
- panel5.setLayout(panel5Layout);
- panel5Layout.setHorizontalGroup(
- panel5Layout.createParallelGroup()
- .addGroup(panel5Layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(panel5Layout.createParallelGroup()
- .addGroup(panel5Layout.createSequentialGroup()
- .addComponent(label8)
- .addGap(18, 18, 18)
- .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 126, Short.MAX_VALUE)
- .addComponent(button4)
- .addContainerGap())
- .addGroup(GroupLayout.Alignment.TRAILING, panel5Layout.createSequentialGroup()
- .addComponent(label12)
- .addGap(76, 76, 76))))
- );
- panel5Layout.setVerticalGroup(
- panel5Layout.createParallelGroup()
- .addGroup(panel5Layout.createSequentialGroup()
- .addGap(30, 30, 30)
- .addGroup(panel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label8)
- .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button4))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
- .addComponent(label12)
- .addGap(24, 24, 24))
- );
- }
- tabbedPane1.addTab("Arrows", panel5);
- }
- GroupLayout contentPaneLayout = new GroupLayout(contentPane);
- contentPane.setLayout(contentPaneLayout);
- contentPaneLayout.setHorizontalGroup(
- contentPaneLayout.createParallelGroup()
- .addComponent(tabbedPane1, GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE)
- );
- contentPaneLayout.setVerticalGroup(
- contentPaneLayout.createParallelGroup()
- .addComponent(tabbedPane1, GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)
- );
- pack();
- setLocationRelativeTo(getOwner());
- // JFormDesigner - End of component initialization //GEN-END:initComponents
- }
- // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
- // Generated using JFormDesigner Evaluation license - Adam Bennett
- private JTabbedPane tabbedPane1;
- private JPanel panel1;
- private JLabel label1;
- private JLabel label2;
- private JLabel label3;
- private JLabel label4;
- private JPanel panel2;
- private JLabel label5;
- private JComboBox comboBox1;
- private JButton button1;
- private JLabel label9;
- private JPanel panel3;
- private JLabel label6;
- private JComboBox comboBox2;
- private JButton button2;
- private JLabel label10;
- private JPanel panel4;
- private JLabel label7;
- private JComboBox comboBox3;
- private JButton button3;
- private JLabel label11;
- private JPanel panel5;
- private JLabel label8;
- private JComboBox comboBox4;
- private JButton button4;
- private JLabel label12;
- // JFormDesigner - End of variables declaration //GEN-END:variables
- }
- //*************Paint*************\\
- //START: Code generated using Enfilade's Easel
- private final Color color1 = new Color(0, 0, 0, 229);
- private final Color color2 = new Color(255, 255, 255);
- private final Font font1 = new Font("Arial", 1, 13);
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- millis = System.currentTimeMillis() - startTime;
- hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- seconds = millis / 1000;
- expGained = skills.getCurrentExp(Skills.FLETCHING) - startExp;
- expHour = (int) ((expGained) * 3600000D / (System
- .currentTimeMillis() - startTime));
- g.setColor(color1);
- g.fillRect(2, 3, 515, 72);
- g.setFont(font1);
- g.setColor(color2);
- g.drawString("Time Ran: "+ hours + ":" + minutes + ":" + seconds, 7, 24);
- g.drawString("Exp Gained: "+expGained, 165, 24);
- g.drawString("Exp/hr: "+expHour, 165, 59);
- g.drawString("Levels Gained: "+lvlsGained, 7, 59);
- g.drawString("Exp TNL: "+skills.getExpToNextLevel(Skills.FLETCHING), 334, 24);
- g.drawString("Current Level: "+skills.getCurrentLevel(Skills.FLETCHING), 334, 59);
- }
- //END: Code generated using Enfilade's Easel
- //************AntiBan**********\\
- private final void antibanM() {
- int r = random(0, 20);
- switch (r) {
- case 1:
- break;
- case 3:
- mouse.moveSlightly();
- sleep(300, 600);
- break;
- case 5:
- break;
- case 6:
- break;
- case 7:
- mouse.moveRandomly(10, 50);
- break;
- case 8:
- break;
- case 9:
- break;
- case 10:
- mouse.moveOffScreen();
- sleep (random(2000, 3000));
- break;
- case 12:
- break;
- case 15:
- break;
- case 16:
- mouse.moveSlightly();
- sleep(300, 600);
- break;
- case 17:
- break;
- }
- }
- public final void antibanC() {
- int rr = random(0, 20);
- switch(rr) {
- case 1:
- camera.setAngle(random(0, 350));
- camera.setPitch(random(500, 5000));
- break;
- case 2:
- break;
- case 3:
- camera.setAngle(random(145,360));
- camera.setPitch(random(100, 4099));
- break;
- case 4:
- break;
- case 5:
- camera.setAngle(random(0, 145));
- camera.setPitch(random(4099, 8000));
- break;
- case 6:
- break;
- case 7:
- break;
- case 8:
- camera.setAngle(random(0, 360));
- camera.setPitch(random(8000, 12000));
- break;
- case 9:
- break;
- case 10:
- break;
- case 11:
- camera.setAngle(random(100, 300));
- camera.setPitch(random(12000, 16000));
- break;
- case 12:
- break;
- case 13:
- break;
- case 15:
- camera.moveRandomly (1200);
- sleep(random(300, 500));
- break;
- case 16:
- break;
- case 17:
- break;
- case 19:
- camera.moveRandomly(random(750, 1250));
- sleep(random(300, 500));
- break;
- }
- }
- }
- }45
Add Comment
Please, Sign In to add comment