makileke Posted March 9, 2015 Share Posted March 9, 2015 (edited) THE SOURCE IS CURRENTLY BROKEN (DL jar still working)! So i recently made my first script, and i am quite happy with how it turned out. What the script does The script simply picks cadava berries and redberries just southvest of varrock How to use it Its really simple, start out with a empty inventory in Varrocks east bank or just vest of varrocks south east mining site and the bot will start to pick berries and bank them Why use it? I dont really know, maybe for money, i really just made it for fun as my first script. Download link: http://www.mediafire.com/download/i6rdskwfv6qoglz/BerryPicker.jar Here's the source: import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.util.concurrent.TimeUnit; import java.awt.*; @ScriptManifest(author = "Makileke", info = "This is my first script, It will simply pick berries outside varrock for profit!", name = "BerryPicker", version = 0.1, logo = "") public class main extends Script { @Override public void onStart() { log("Started script!"); log("Hope you like it, if you find a bug, please report it on the forum!"); timeBegan = System.currentTimeMillis(); } private enum State { USE, BANK, WAIT, BUSH }; // Here is the paint shit private long timeBegan; private long timeRan; Position[] pathToBerries = { new Position(3254, 3421, 0), new Position(3254, 3424, 0), new Position(3255, 3429, 0), new Position(3260, 3429, 0), new Position(3266, 3429, 0), new Position(3271, 3428, 0), new Position(3276, 3428, 0), new Position(3280, 3426, 0), new Position(3284, 3423, 0), new Position(3286, 3418, 0), new Position(3288, 3413, 0), new Position(3289, 3408, 0), new Position(3290, 3397, 0), new Position(3290, 3392, 0), new Position(3291, 3386, 0), new Position(3291, 3381, 0), new Position(3292, 3376, 0), new Position(3288, 3373, 0), new Position(3283, 3373, 0), new Position(3278, 3371, 0), new Position(3273, 3369, 0), new Position(3268, 3368, 0) }; Position[] pathToBank = { new Position(3265, 3368, 0), new Position(3269, 3369, 0), new Position(3274, 3371, 0), new Position(3279, 3372, 0), new Position(3284, 3374, 0), new Position(3289, 3374, 0), new Position(3293, 3377, 0), new Position(3294, 3382, 0), new Position(3290, 3394, 0), new Position(3291, 3399, 0), new Position(3291, 3402, 0), new Position(3292, 3407, 0), new Position(3290, 3411, 0), new Position(3287, 3416, 0), new Position(3284, 3420, 0), new Position(3282, 3425, 0), new Position(3278, 3428, 0), new Position(3273, 3429, 0), new Position(3268, 3429, 0), new Position(3263, 3429, 0), new Position(3258, 3429, 0), new Position(3254, 3426, 0), new Position(3254, 3420, 0) }; private State getState() { Entity bush = objects.closest("Cadava Bush", "Redberry bush"); if (inventory.isFull()) return State.BANK; if (bush != null) return State.USE; if (!inventory.isFull()) return State.BUSH; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case USE: Entity bush = objects.closest("Cadava Bush", "Redberry bush"); if (bush != null) { bush.interact("Pick-from"); sleep(random(200, 300)); log("Picking Them Berries"); } break; case BANK: localWalker.walkPath(pathToBank); log("Trying to walk"); RS2Object bankBooth = objects.closest("Bank booth"); if (bankBooth != null) { if (bankBooth.interact("Bank")) { while (!bank.isOpen()) sleep(250); bank.depositAll(); } } break; case BUSH: localWalker.walkPath(pathToBerries); break; case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } @Override public void onExit() { log("Script stopped!"); } @Override public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 50, 50); } // How long the script has been running! private String ft(long duration) { String res = "Time ran:"; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } } Edited March 10, 2015 by makileke 1 Quote Link to comment Share on other sites More sharing options...
Basic Posted March 9, 2015 Share Posted March 9, 2015 swiggity swooty i'm coming for those berries Quote Link to comment Share on other sites More sharing options...
makileke Posted March 9, 2015 Author Share Posted March 9, 2015 swiggity swooty i'm coming for those berries Lol i should make that the logo 1 Quote Link to comment Share on other sites More sharing options...
Botre Posted March 9, 2015 Share Posted March 9, 2015 Good job 1 Quote Link to comment Share on other sites More sharing options...
makileke Posted March 9, 2015 Author Share Posted March 9, 2015 Good job Thx Quote Link to comment Share on other sites More sharing options...
nmhbuu Posted October 25, 2015 Share Posted October 25, 2015 how do i put it on osbot plz help me i start it and nothng happens.. i start it and nothng happens.. Quote Link to comment Share on other sites More sharing options...
nmhbuu Posted October 29, 2015 Share Posted October 29, 2015 hey dude is their anyway u can fix it so it dosnt missclik the bank stairs to go upstairs and also start up the bot in the bank :DDD ty i love the bot btw Quote Link to comment Share on other sites More sharing options...
amkate2 Posted November 12, 2015 Share Posted November 12, 2015 make it redberrys only the other ones are harder to sell Quote Link to comment Share on other sites More sharing options...
Good4RsVid Posted February 2, 2016 Share Posted February 2, 2016 localWalker.walkPath can not be used how fix Quote Link to comment Share on other sites More sharing options...
Shudsy Posted February 2, 2016 Share Posted February 2, 2016 localWalker.walkPath can not be used how fix Are you serious Quote Link to comment Share on other sites More sharing options...
Good4RsVid Posted February 3, 2016 Share Posted February 3, 2016 你是认真的吗 Beginner, you need to complete example, Quote Link to comment Share on other sites More sharing options...
woepieg01 Posted February 11, 2016 Share Posted February 11, 2016 cool, will maybe try in the future, anyone knows if working? Quote Link to comment Share on other sites More sharing options...
eevus Posted March 5, 2016 Share Posted March 5, 2016 Interesting idea for money making! A GUI with an option to pick redberries only would be nice, the pink berries are used in romeo and juliet so most questers get them while doing the quest. Other than that script seems to work well! Quote Link to comment Share on other sites More sharing options...
dutchxxje Posted March 6, 2016 Share Posted March 6, 2016 you should make a white berrie picker :P Quote Link to comment Share on other sites More sharing options...