Added Video!
Welcome to FallinOaks - Version 8
Videos: if youtube thing wont show heres links:
• How to use fallinoaks
|+|
• Whats its like when using it
Windows Vista/7
Documents/RSBot/Scripts/Sources
Windows XP
My Documents/RSBot/Scripts/Sources
Features:
• GUI - NEW!
• More Locations (3) - NEW!
• Nest Support
• Paint
• Banking
• Supports All Hatchets (ON & OFF)
Known Bugs:
• Miss Clicks
Locations: Just Select in GUI
• Draynor
• Varrock - NEW! [FLAWLESS - PERFECT! (SO FAR)]
• Falador - NEW!
[ UPDATE LOG FROM [v6 - v8] ]
Code:New Paint [Newer then proggy below] Working GUI More Locations Better Banking Better Walking Fixed Nest Support Fixed Mass clicking Draynor clicking (semi fixed) complete fix soon New Antiban Fixed Draynor & Falador Better status updates/checks[ Progress Reports ]
Save As:FallinOaks.java
Code:/* * @Author lolpl0xme * BTOdell9751 - All GUI * mak001, bluefirecorp, ConnectQ - Mass Clicking * Electricity - Basic Antiban * Enfilade, TragiKs - Basic Paint & Tutorial * Swell, InvaderZim - Banking & And Basics */ import java.awt.BasicStroke; import java.aw*****lor; import java.aw*****mponent; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Point; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.event.WindowListener; import java.io.IOException; import java.net.URL; import java.io.*; import java.net.*; import javax.swing.JOptionPane; import javax.swing.JFileChooser; import javax.imageio.ImageIO; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import org.rsbot.event.events.ServerMessageEvent; import org.rsbot.event.listeners.PaintListener; import org.rsbot.event.listeners.ServerMessageListener; import org.rsbot.script.Script; import org.rsbot.script.ScriptManifest; import org.rsbot.script.methods.Game; import org.rsbot.script.methods.Skills; import org.rsbot.script.wrappers.RSArea; import org.rsbot.script.wrappers.RSGroundItem; import org.rsbot.script.wrappers.RSObject; import org.rsbot.script.wrappers.RSTile; @ScriptManifest(authors = { "lolpl0xme" }, keywords = { "Woodcutting" }, name = "Fallin Oaks", version = 0.8, description = "Cuts oak trees all over runescape") public class FallinOaks extends Script implements PaintListener, ServerMessageListener { /* * GUI stuff */ private String location = null; private FallinOaksGUI gui = null; /* * All RSAreas */ //Tree Path's private RSTile[] TreestoBank; final RSTile[] DTreestoBank = { new RSTile(3107, 3250), new RSTile(3093, 3244), new RSTile(3102, 3244), new RSTile(3092, 3242) };// DRAYNOR [FINISHED] //new RSTile(3102, 3244), new RSTile(3093, 3244), new RSTile(3108, 3250), new RSTile(3093, 3245)} final RSTile[] VTreestoBank = {new RSTile(3276, 3430), new RSTile(3261, 3429), new RSTile(3252, 3421)};// VARROCK [FINISHED] final RSTile[] FTreestoBank = {new RSTile(2950, 3401), new RSTile(2963, 3398), new RSTile(2959, 3381), new RSTile(2945, 3371)};// FALADOR [FINISHED] //Bank Path's private RSTile[] BanktoTrees; final RSTile[] DBanktoTrees = { new RSTile(3093, 3244), new RSTile(3101, 3247), new RSTile(3107, 3250) };// DRAYNOR [FINISHED] final RSTile[] VBanktoTrees = {new RSTile(3253, 3420), new RSTile(3265, 3428), new RSTile(3280, 3429)};// VARROCK [FINISHED] final RSTile[] FBanktoTrees = {new RSTile(2946, 3369), new RSTile(2952, 3382), new RSTile(2964, 3392), new RSTile(2953, 3404)};// FALADOR [FINISHED] //Bank Area's final RSArea DBankArea = new RSArea(new RSTile(3095, 3246), new RSTile(3092, 3241));// DRAYNOR [FINISHED] final RSArea VBankArea = new RSArea(new RSTile(3257, 3423), new RSTile(3250, 3419));// VARROCK [FINISHED] final RSArea FBankArea = new RSArea(new RSTile(2947, 3371), new RSTile(2943, 3368));// FALADOR [FINISHED] //Tree Area's final RSArea DOakArea = new RSArea(new RSTile(3109, 3253), new RSTile(3098, 3237));// DRAYNOR [FINISHED] final RSArea VOakArea = new RSArea(new RSTile(3285, 3438), new RSTile(3275, 3426));// VARROCK [FINISHED] final RSArea FOakArea = new RSArea(new RSTile(2953, 3413), new RSTile(2945, 3398));// FALADOR [FINISHED] private RSArea finalBankArea = null; private RSArea finalOakArea = null; private RSTile[] finaltoTreePath = null; private RSTile[] finaltoBankPath = null; private final int[] hatchetIDs = { 349, 1351, 1353, 1355, 1357, 1359, 1361, 6739 }; public final int[] nestIDs = {5070, 5071, 5072, 5073, 5074, 5075, 5076, 7413, 11966}; private int bankboothID[] = {2213, 11402, 11758}; private final int[] oTree = { 1281 }; private int oLog = (1521); private int xpHour; private int startXp; private int levelsGained = 0; private int logsCut = 0; private int xpGained; private int currentXp; private int nestsCollected = 0; double version = 0.8; private String status = "Starting FallinOaks..."; public long startTime = System.currentTimeMillis(); long runTime = 0; long seconds = 0; long minutes = 0; long hours = 0; private void nest() { RSGroundItem nest = groundItems.getNearest(nestIDs); int initialCount = inventory.getCount(); if (nest != null && initialCount < 28) { if (!nest.isOnScreen()) camera.turnToTile(nest.getLocation()); if (nest.doAction("Take")) { status = "Taking nest"; for (int i = 0; i < 15; ++i) { sleep(100); if (getMyPlayer().isMoving()) { i = 0; } } } } } public void serverMessageRecieved(ServerMessageEvent e) { if (e.getMessage().contains("Woodcutting level")) { levelsGained++; } if (e.getMessage().contains("get some")) { logsCut++; } if (e.getMessage().contains("nest falls")) { nestsCollected++; } } private void useBank(){ RSObject bankBooth = objects.getNearest(bankboothID); if(bankBooth != null && inventory.contains(oLog)){ bankBooth.doAction("Use-quickly"); status = "Opening bank"; sleep(800, 1000); } } private void depositOakLogs(){ if(bank.isOpen()){ bank.depositAllExcept(hatchetIDs); status = "Depositing items"; sleep(300, 600); } } private void closeBank(){ if(bank.isOpen()){ mouse.move(490, 36, 3, 3); sleep(300, 600); mouse.click(true); status = "Bank closed"; } } private void Bank(){ useBank(); depositOakLogs(); closeBank(); } public void antiban() { switch (random(1, 200)) { case 5: game.openTab(Game.TAB_STATS); skills.doHover(Skills.INTERFACE_WOODCUTTING); status = "ANTIBAN"; sleep(random(1000, 2100)); game.openTab(Game.TAB_INVENTORY); status = "Waiting..."; break; case 6: game.openTab(Game.TAB_FRIENDS); status = "ANTIBAN"; sleep(random(1000, 1700)); game.openTab(Game.TAB_INVENTORY); status = "Waiting..."; break; case 7: game.openTab(Game.TAB_CLAN); status = "ANTIBAN"; sleep(random(1000, 1800)); game.openTab(Game.TAB_INVENTORY); status = "Waiting..."; case 8: if (random(1, 20) != 1) return; status = "ANTIBAN"; int angle = camera.getAngle() + random(-90, 90); if (angle < 0) { angle = random(0, 10); } if (angle > 359) { angle = random(0, 10); } camera.setAngle(angle); break; case 9: if (random(1, 5) == 1) status = "ANTIBAN"; mouse.moveSlightly(); case 10: if (random (0, 12) == 7) { status = "ANTIBAN"; mouse.moveOffScreen(); sleep(random(5600, random(7200, 9000))); } break; } } public boolean onStart() { gui = new FallinOaksGUI(); gui.setVisible(true); gui.addWindowListener(new WindowListener() { public void windowClosing(java.awt.event.WindowEvent e) { log("GUI was closed, stopping FallinOaks."); stopScript(); } public void windowOpened(java.awt.event.WindowEvent e) {} public void windowClosed(java.awt.event.WindowEvent e) {} public void windowIconified(java.awt.event.WindowEvent e) {} public void windowDeiconified(java.awt.event.WindowEvent e) {} public void windowActivated(java.awt.event.WindowEvent e) {} public void windowDeactivated(java.awt.event.WindowEvent e) {} }); while (gui.isVisible()) { sleep(200,300); } if (location.equals("Draynor")) { finaltoTreePath = DBanktoTrees; finaltoBankPath = DTreestoBank; finalOakArea = DOakArea; finalBankArea = DBankArea; } else if (location.equals("Varrock")) { finaltoTreePath = VBanktoTrees; finaltoBankPath = VTreestoBank; finalOakArea = VOakArea; finalBankArea = VBankArea; } else if (location.equals("Falador")) { finaltoTreePath = FBanktoTrees; finaltoBankPath = FTreestoBank; finalOakArea = FOakArea; finalBankArea = FBankArea; } log("Start at trees or bank!"); startXp = skills.getCurrentExp(8); mouse.setSpeed(10); return true; } private final RenderingHints antialiasing = new RenderingHints( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); private Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch(IOException e) { return null; } } private final Color color1 = new Color(0, 0, 0); private final Color color2 = new Color(255, 255, 51); private final Color color3 = new Color(255, 255, 255); private final BasicStroke stroke1 = new BasicStroke(2); private final Font font1 = new Font("Comic Sans MS", 0, 14); private final Image img1 = getImage("https://img52.imageshack.us/img52/4858/fallinoaks.png"); private final Image img2 = getImage("https://img12.imageshack.us/img12/4882/barol.png"); public void onRepaint(Graphics g1) { nestsCollected = 0; if (game.isLoggedIn()) { runTime = System.currentTimeMillis() - startTime; seconds = runTime / 1000; if (seconds >= 60) { minutes = seconds / 60; seconds -= (minutes * 60); } if (minutes >= 60) { hours = minutes / 60; minutes -= (hours * 60); } xpHour = (int) ((3600000.0 / (double) runTime) * xpGained); } Graphics2D g = (Graphics2D)g1; g.setRenderingHints(antialiasing); currentXp = skills.getCurrentExp(8); xpGained = currentXp - startXp; g.setColor(color1); g.setColor(color2); g.setStroke(stroke1); g.drawImage(img1, 550, 204, null); g.drawImage(img2, 7, 459, null); g.setFont(font1); g.setColor(color3); g.drawString("Logs Cut: "+ logsCut +".", 554, 280); g.drawString("EXP Gained: " + xpGained, 554, 325); g.drawString("Version: " + version, 554, 355); g.drawString("Status: " + status + ".", 554, 265); g.drawString("Levels gained: " + levelsGained, 554, 310); g.drawString("EXP Per Hour: " + xpHour + ".", 554, 340); g.drawString("Time: " + hours + " Hrs " + minutes + " Mins " + seconds + " Secs ", 554, 250); g.drawString("Nests: " + nestsCollected +".", 554, 295); g.drawLine(mouse.getLocation().x - 5, mouse.getLocation().y, mouse.getLocation().x + 5, mouse.getLocation().y); g.drawLine(mouse.getLocation().x, mouse.getLocation().y - 5, mouse.getLocation().x, mouse.getLocation().y + 5); } public int loop(){ antiban(); nest(); if(inventory.isFull()){ if(finalBankAre*****ntains(getMyPlayer().getLocatio n())){ if(!bank.isOpen()){ bank.open(); return random(500, 700); } bank.depositAllExcept(hatchetIDs); if(bank.isOpen()){ bank.close(); return random(500, 700); } }else{ if(walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < random(4, 6)){ status = "Walking..."; walking.walkPathMM(finaltoBankPath); return random(300, 600); } } }else{ if(finalOakAre*****ntains(getMyPlayer().getLocation ())){ status = "Waiting at oak trees"; if(getMyPlayer().getAnimation() != 2846){ RSObject tree = objects.getNearest(oTree); while (getMyPlayer().getAnimation() != -1) if (!tree.isOnScreen()) camera.turnToTile(tree.getLocation()); if(tree != null){ tree.doAction("Chop"); status = "Cutting oaks"; sleep(1200, 1500); } } }else{ if(walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < random(4, 6)){ status = "Walking..."; walking.walkPathMM(finaltoTreePath); return random(300, 600); } } } return random(100, 200); } public void onFinish() { log("Smile: Screenshot taken!"); env.saveScreenshot(true); } private class FallinOaksGUI extends JFrame { private static final long serialVersionUID = 1L; private JPanel jContentPane = null; private JLabel jLabel = null; private JLabel TitleLabel = null; private JComboBox LocationBox = null; private JButton StartScript = null; /** * This is the default constructor */ public FallinOaksGUI() { super(); initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setSize(203, 150); this.setLocation(getCenteredCorner(this)); this.setContentPane(getJContentPane()); this.setTitle("Fallin Oaks"); } private Point getCenteredCorner(Component c) { Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); return new Point( (int)((dim.getWidth() - c.getWidth()) / 2), (int)((dim.getHeight() - c.getHeight()) / 2) ); } /** * This method initializes jContentPane * * @return javax.swing.JPanel */ private JPanel getJContentPane() { if (jContentPane == null) { TitleLabel = new JLabel("", JLabel.CENTER); TitleLabel.setBounds(new Rectangle(0, 15, 187, 16)); TitleLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); TitleLabel.setText("Fallin Oaks GUI"); jLabel = new JLabel(); jLabel.setBounds(new Rectangle(15, 45, 64, 23)); jLabel.setText("Locations:"); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(jLabel, null); jContentPane.add(TitleLabel, null); jContentPane.add(getLocationBox(), null); jContentPane.add(getStartScript(), null); } return jContentPane; } /** * This method initializes LocationBox * * @return javax.swing.JComboBox */ private JComboBox getLocationBox() { if (LocationBox == null) { LocationBox = new JComboBox(new String[] {"Select", "Draynor", "Varrock", "Falador"}); LocationBo*****tBounds(new Rectangle(85, 45, 91, 22)); LocationBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { location = (String) LocationBox.getSelectedItem(); } }); } return LocationBox; } /** * This method initializes StartScript * * @return javax.swing.JButton */ private JButton getStartScript() { if (StartScript == null) { StartScript = new JButton(); StartScript.setBounds(new Rectangle(23, 77, 144, 24)); StartScript.setText("Start FallinOaks"); StartScript.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (((String) LocationBox.getSelectedItem()).equals("Select")) { JOptionPane.showMessageDialog(FallinOaksGUI.this, "Please select a location.", "Location Error", JOptionPane.ERROR_MESSAGE); return; } dispose(); } }); } return StartScript; } } }
Last edited by Dead 4 Real; 11-24-2010 at 04:40 PM.
Added Video!
You don't have to put the video between BB-code. The link itself will form a video. Like u can see.
Alright fixed that =p
Alright thank you. also guys i updated the script added 2 new locations and fixed some bugs.. version 9 is below.
Code:import java.awt.BasicStroke; import java.aw*****lor; import java.aw*****mponent; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Point; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.event.WindowListener; import java.io.IOException; import java.net.URL; import javax.imageio.ImageIO; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import org.rsbot.event.events.ServerMessageEvent; import org.rsbot.event.listeners.PaintListener; import org.rsbot.event.listeners.ServerMessageListener; import org.rsbot.script.Script; import org.rsbot.script.ScriptManifest; import org.rsbot.script.methods.Game; import org.rsbot.script.methods.Skills; import org.rsbot.script.wrappers.RSArea; import org.rsbot.script.wrappers.RSGroundItem; import org.rsbot.script.wrappers.RSObject; import org.rsbot.script.wrappers.RSTile; /* * @Author lolpl0xme, Dead 4 Real * BTOdell9751 - Complete GUI * mak001, bluefirecorp, ConnectQ - Mass Clicking * Electricity - Stat Look (ANTIBAN) * Enfilade, TragiKs - Paint tutorial/First Paint * Swell, InvaderZim - Banking/Walking */ @ScriptManifest(authors = { "lolpl0xme" }, keywords = { "Woodcutting" }, name = "Fallin Oaks", version = 0.9, description = "Cuts Oaks in places you wouldnt think of!") public class FallinOaks extends Script implements PaintListener, ServerMessageListener { /* * GUI stuff */ private String location = null; private FallinOaksGUI gui = null; /* * All RSAreas */ //Tree Path's final RSTile[] DTreestoBank = { new RSTile(3107, 3250), new RSTile(3093, 3244), new RSTile(3102, 3244), new RSTile(3092, 3242) };// DRAYNOR [FINISHED] final RSTile[] VTreestoBank = {new RSTile(3276, 3430), new RSTile(3261, 3429), new RSTile(3252, 3421)};// VARROCK [FINISHED] final RSTile[] FTreestoBank = {new RSTile(2963, 3399), new RSTile(2963, 3385), new RSTile(2949, 3377), new RSTile(2945, 3369)};// FALADOR [FINISHED] final RSTile[] STreestoBank = {new RSTile(2725, 3485), new RSTile(2725, 3492)};// SEERS [FINISHED] final RSTile[] CTreestoBank = {new RSTile(2804, 3436), new RSTile(2808, 3441)};// CATHERBY [FINISHED] //Bank Path's final RSTile[] DBanktoTrees = { new RSTile(3093, 3244), new RSTile(3101, 3247), new RSTile(3107, 3250) };// DRAYNOR [FINISHED] final RSTile[] VBanktoTrees = {new RSTile(3253, 3420), new RSTile(3265, 3428), new RSTile(3280, 3429)};// VARROCK [FINISHED] final RSTile[] FBanktoTrees = {new RSTile(2951, 3381), new RSTile(2963, 3390), new RSTile(2950, 3402)};// FALADOR [FINISHED] final RSTile[] SBanktoTrees = {new RSTile(2722, 3483)};// SEERS [FINISHED] final RSTile[] CBanktoTrees = {new RSTile(2803, 3441), new RSTile(2801, 3446)};// CATHERBY [FINISHED] //Bank Area's final RSArea DBankArea = new RSArea(new RSTile(3095, 3246), new RSTile(3092, 3240));// DRAYNOR [FINISHED] final RSArea VBankArea = new RSArea(new RSTile(3257, 3423), new RSTile(3250, 3419));// VARROCK [FINISHED] final RSArea FBankArea = new RSArea(new RSTile(2947, 3371), new RSTile(2943, 3368));// FALADOR [FINISHED] final RSArea SBankArea = new RSArea(new RSTile(2730, 3493), new RSTile(2722, 3490));// SEERS [FINISHED] final RSArea CBankArea = new RSArea(new RSTile(2812, 3441), new RSTile(2807, 3438));// CATHERBY [FINISHED] //Tree Area's final RSArea DOakArea = new RSArea(new RSTile(3109, 3253), new RSTile(3098, 3237));// DRAYNOR [FINISHED] final RSArea VOakArea = new RSArea(new RSTile(3285, 3438), new RSTile(3275, 3426));// VARROCK [FINISHED] final RSArea FOakArea = new RSArea(new RSTile(2953, 3413), new RSTile(2945, 3398));// FALADOR [FINISHED] final RSArea SOakArea = new RSArea(new RSTile(2724, 3484), new RSTile(2718, 3477));// SEERS [FINISHED] final RSArea COakArea = new RSArea(new RSTile(2802, 3451), new RSTile(2792, 3443));// CATHERBY [FINISHED] private RSArea finalBankArea = null; private RSArea finalOakArea = null; private RSTile[] finaltoTreePath = null; private RSTile[] finaltoBankPath = null; private final int[] hatchetIDs = { 349, 1351, 1353, 1355, 1357, 1359, 1361, 6739 }; public final int[] nestIDs = {5070, 5071, 5072, 5073, 5074, 5075, 5076, 7413, 11966}; private int bankboothID[] = {2213, 11402, 11758, 25808}; private final int[] oakTree = { 1281 }; private int oakLog = (1521); private int xpHour; private int startXp; private int levelsGained = 0; private int logsCut = 0; private int xpGained; private int currentXp; private int nestsCollected = 0; double version = 0.9; private String status = "Selecting Location"; public long startTime = System.currentTimeMillis(); long runTime = 0; long seconds = 0; long minutes = 0; long hours = 0; private void nest() { RSGroundItem nest = groundItems.getNearest(nestIDs); int initialCount = inventory.getCount(); if (nest != null && initialCount < 28) { if (!nest.isOnScreen()) camera.turnToTile(nest.getLocation()); if (nest.doAction("Take")) { status = "Taking nest"; for (int i = 0; i < 15; ++i) { sleep(100); if (getMyPlayer().isMoving()) { i = 0; } } } } } public void serverMessageRecieved(ServerMessageEvent e) { if (e.getMessage().contains("A bird's")) { nestsCollected++; } if (e.getMessage().contains("get some")) { logsCut++; } if (e.getMessage().contains("Woodcutting level")) { levelsGained++; } } public void doRun() {//Turn run on! if (!walking.isRunEnabled()) { walking.setRun(true); sleep(750, 1000); } } public void antiban() { switch (random(1, 200)) { case 5: game.openTab(Game.TAB_STATS); skills.doHover(Skills.INTERFACE_WOODCUTTING); status = "ANTIBAN"; sleep(random(1000, 2100)); status = "Waiting..."; break; case 6: game.openTab(Game.TAB_FRIENDS); status = "ANTIBAN"; sleep(random(1000, 1700)); status = "Waiting..."; break; case 7: game.openTab(Game.TAB_CLAN); status = "ANTIBAN"; sleep(random(1000, 1800)); status = "Waiting..."; case 8: if (random(1, 20) != 1) return; status = "ANTIBAN"; int angle = camera.getAngle() + random(-90, 90); if (angle < 0) { angle = random(0, 10); } if (angle > 359) { angle = random(0, 10); } camera.setAngle(angle); break; case 9: if (random(1, 5) == 1) status = "ANTIBAN"; mouse.moveSlightly(); case 10: if (random (0, 12) == 7) { status = "ANTIBAN"; mouse.moveOffScreen(); sleep(random(5600, random(7200, 9000))); } break; } } public boolean onStart() { gui = new FallinOaksGUI(); gui.setVisible(true); gui.addWindowListener(new WindowListener() { public void windowClosing(java.awt.event.WindowEvent e) { log("GUI was closed, stopping FallinOaks."); stopScript(); } public void windowOpened(java.awt.event.WindowEvent e) {} public void windowClosed(java.awt.event.WindowEvent e) {} public void windowIconified(java.awt.event.WindowEvent e) {} public void windowDeiconified(java.awt.event.WindowEvent e) {} public void windowActivated(java.awt.event.WindowEvent e) {} public void windowDeactivated(java.awt.event.WindowEvent e) {} }); while (gui.isVisible()) { sleep(200,300); } if (location.equals("Draynor")) { finaltoTreePath = DBanktoTrees; finaltoBankPath = DTreestoBank; finalOakArea = DOakArea; finalBankArea = DBankArea; } else if (location.equals("Varrock")) { finaltoTreePath = VBanktoTrees; finaltoBankPath = VTreestoBank; finalOakArea = VOakArea; finalBankArea = VBankArea; } else if (location.equals("Falador")) { finaltoTreePath = FBanktoTrees; finaltoBankPath = FTreestoBank; finalOakArea = FOakArea; finalBankArea = FBankArea; } else if (location.equals("Seers")) { finaltoTreePath = SBanktoTrees; finaltoBankPath = STreestoBank; finalOakArea = SOakArea; finalBankArea = SBankArea; } else if (location.equals("Catherby")) { finaltoTreePath = CBanktoTrees; finaltoBankPath = CTreestoBank; finalOakArea = COakArea; finalBankArea = CBankArea; } log("Start at trees or bank!"); startXp = skills.getCurrentExp(8); mouse.setSpeed(10); return true; } private final RenderingHints antialiasing = new RenderingHints( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); private Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch(IOException e) { return null; } } private final Color color1 = new Color(0, 0, 0); private final Color color2 = new Color(255, 255, 51); private final Color color3 = new Color(255, 255, 255); private final BasicStroke stroke1 = new BasicStroke(2); private final Font font1 = new Font("Comic Sans MS", 0, 14); private final Image img1 = getImage("https://img52.imageshack.us/img52/4858/fallinoaks.png"); private final Image img2 = getImage("https://img12.imageshack.us/img12/4882/barol.png"); public void onRepaint(Graphics g1) { nestsCollected = 0; if (game.isLoggedIn()) { runTime = System.currentTimeMillis() - startTime; seconds = runTime / 1000; if (seconds >= 60) { minutes = seconds / 60; seconds -= (minutes * 60); } if (minutes >= 60) { hours = minutes / 60; minutes -= (hours * 60); } xpHour = (int) ((3600000.0 / (double) runTime) * xpGained); } Graphics2D g = (Graphics2D)g1; g.setRenderingHints(antialiasing); currentXp = skills.getCurrentExp(8); xpGained = currentXp - startXp; g.setColor(color1); g.setColor(color2); g.setStroke(stroke1); g.drawImage(img1, 550, 204, null); g.drawImage(img2, 7, 459, null); g.setFont(font1); g.setColor(color3); g.drawString("Logs Cut:"+ logsCut +".", 554, 280); g.drawString("EXP Gained: " + xpGained, 554, 325); g.drawString("Version: " + version, 554, 355); g.drawString("Status: " + status + ".", 554, 265); g.drawString("Levels Gained: " + levelsGained, 554, 310); g.drawString("EXP Per Hour: " + xpHour + ".", 554, 340); g.drawString("Time: " + hours + " Hrs " + minutes + " Mins " + seconds + " Secs ", 554, 250); g.drawString("Nests Gained: " + nestsCollected +".", 554, 295); g.drawLine(mouse.getLocation().x - 5, mouse.getLocation().y, mouse.getLocation().x + 5, mouse.getLocation().y); g.drawLine(mouse.getLocation().x, mouse.getLocation().y - 5, mouse.getLocation().x, mouse.getLocation().y + 5); } public int loop(){ antiban(); nest(); if(inventory.isFull()){ if(finalBankAre*****ntains(getMyPlayer().getLocation())){ if(!bank.isOpen()){ bank.open(); sleep(random(456, 654)); } bank.depositAllExcept(hatchetIDs); if(bank.isOpen()){ bank.close(); return random(500, 700); } }else{ if(walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < random(4, 6)){ status = "Walking..."; walking.walkPathMM(finaltoBankPath); return random(300, 600); } } }else{ if(finalOakAre*****ntains(getMyPlayer().getLocation())){ status = "Waiting at oak trees"; if(getMyPlayer().getAnimation() != 2846){ RSObject tree = objects.getNearest(oakTree); while (getMyPlayer().getAnimation() != -1) if (!tree.isOnScreen()) camera.turnToTile(tree.getLocation()); if(tree != null){ tree.doAction("Chop"); status = "Cutting oaks"; sleep(1200, 1500); } } }else{ if(walking.getDestination() == null || calc.distanceTo(walking.getDestination()) < random(4, 6)){ status = "Walking..."; walking.walkPathMM(finaltoTreePath); return random(300, 600); } } } return random(100, 200); } public void onFinish() { log("Smile: Screenshot taken!"); env.saveScreenshot(true); } private class FallinOaksGUI extends JFrame { private static final long serialVersionUID = 1L; private JPanel jContentPane = null; private JLabel jLabel = null; private JLabel TitleLabel = null; private JComboBox LocationBox = null; private JButton StartScript = null; /** * This is the default constructor */ public FallinOaksGUI() { super(); initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setSize(203, 150); this.setLocation(getCenteredCorner(this)); this.setContentPane(getJContentPane()); this.setTitle("Fallin Oaks"); } private Point getCenteredCorner(Component c) { Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); return new Point( (int)((dim.getWidth() - c.getWidth()) / 2), (int)((dim.getHeight() - c.getHeight()) / 2) ); } /** * This method initializes jContentPane * * @return javax.swing.JPanel */ private JPanel getJContentPane() { if (jContentPane == null) { TitleLabel = new JLabel("", JLabel.CENTER); TitleLabel.setBounds(new Rectangle(0, 15, 187, 16)); TitleLabel.setFont(new Font("Tahoma", Font.PLAIN, 18)); TitleLabel.setText("Fallin Oaks GUI"); jLabel = new JLabel(); jLabel.setBounds(new Rectangle(15, 45, 64, 23)); jLabel.setText("Locations:"); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(jLabel, null); jContentPane.add(TitleLabel, null); jContentPane.add(getLocationBox(), null); jContentPane.add(getStartScript(), null); } return jContentPane; } /** * This method initializes LocationBox * * @return javax.swing.JComboBox */ private JComboBox getLocationBox() { if (LocationBox == null) { LocationBox = new JComboBox(new String[] {"Select", "Draynor", "Varrock", "Falador", "Seers", "Catherby"}); LocationBo*****tBounds(new Rectangle(85, 45, 91, 22)); LocationBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { location = (String) LocationBox.getSelectedItem(); } }); } return LocationBox; } /** * This method initializes StartScript * * @return javax.swing.JButton */ private JButton getStartScript() { if (StartScript == null) { StartScript = new JButton(); StartScript.setBounds(new Rectangle(23, 77, 144, 24)); StartScript.setText("Start FallinOaks"); StartScript.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (((String) LocationBox.getSelectedItem()).equals("Select")) { JOptionPane.showMessageDialog(FallinOaksGUI.this, "Please select a location.", "Location Error", JOptionPane.ERROR_MESSAGE); return; } dispose(); } }); } return StartScript; } } }
Testing it now.
Edit: Seems that my compiler is bugged.
Last edited by Superpunt; 11-28-2010 at 12:57 PM.
you copy the code and yea also guys its currently version 13 and this is version 0.9 so yea
Will add later,
Don't use my script i am making a new script with 25+ more locations and much more stable.
Nice little piece of code, I am going to register a runescape account just to see how it goes haha!
Lol, kk well working on it will add soon i will most likely make a new thread for it seeing as i cannot update my first post
UseD ThiS oN My noob and got it to 90 WC and sold it, thanks
Nice, =p wish u posted a proggy lol.