Malcolm Posted October 19, 2018 Share Posted October 19, 2018 (edited) Be gentle. This is the very very VERY first thing I ever wrote. It's super simple but it works. Makes about 20k an hour. If anyone wants it they can use it. It picks cabbages at the Edgeville Monastery and banks at Edgeville bank. NOTE: There are two walking instances line by line because for what ever reason walk() wanted to walk south of the Monastery towards Barb and go up to Edgeville that way so I just put another location in so it would walk the other way. Updated: On a suggestion I added in a conditional sleep to this. Updated: Added more conditional sleeps were required. Added a new logo for this bad boy package cabbage_picker; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.ui.Message; @ScriptManifest(author = "Malcolm", info = "Pick Cabbage", name = "Cabbage Picker", version = 0.2, logo = "https://imgur.com/kDRjP7M.png") public class Main extends Script { int cabbagesBefore = 0; private final Area BANKS[] = { Banks.EDGEVILLE }; private Area cabbagePatch = new Area(3057, 3508, 3046, 3501); public void onStart() { log("Cabbage Picker"); } public void onExit() { log("Enjoy your Cabbages!"); } public int onLoop() throws InterruptedException { if (getInventory().isFull()) { if (!Banks.EDGEVILLE.contains(myPlayer())) { getWalking().walk(new Area(3070, 3520, 3066, 3520).getRandomPosition()); getWalking().walk(new Area(3087, 3518, 3078, 3515).getRandomPosition()); walkToClosestBank(); } else if (!getBank().isOpen()) { getBank().open(); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return bank.isOpen(); } }.sleep(); getBank().depositAll(); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return getInventory().isEmpty(); } }.sleep(); getBank().close(); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return !bank.isOpen(); } }.sleep(); getWalking().walk(new Area(3087, 3518, 3078, 3515).getRandomPosition()); getWalking().walk(cabbagePatch); } else { getBank().depositAll(); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return getInventory().isEmpty(); } }.sleep(); getBank().close(); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return !bank.isOpen(); } }.sleep(); getWalking().walk(new Area(3087, 3518, 3078, 3515).getRandomPosition()); getWalking().walk(cabbagePatch); } } else { if (!cabbagePatch.contains(myPlayer())) { getWalking().walk(cabbagePatch); } else { Entity Cabbage = objects.closest("Cabbage"); cabbagesBefore = (int) getInventory().getAmount("Cabbage"); if (Cabbage != null) { if (!myPlayer().isAnimating()) { if (!myPlayer().isMoving()) { Cabbage.interact("Pick"); new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return getInventory().getAmount("Cabbage") > cabbagesBefore; } }.sleep(); } } } } } return random(600, 900); } public void walkToClosestBank() { getWalking().webWalk(BANKS); } public void onMessage(Message message) { if (message.getMessage().contains("You pick a cabbage")) cabbagesBefore++; } } Edited October 20, 2018 by Malcolm_OS 1 1 Quote Link to comment Share on other sites More sharing options...
Hope Posted October 19, 2018 Share Posted October 19, 2018 Thank you for this script, I will look into expanding my farm with this Quote Link to comment Share on other sites More sharing options...
Malcolm Posted October 19, 2018 Author Share Posted October 19, 2018 4 minutes ago, Hope said: Thank you for this script, I will look into expanding my farm with this No problem man. I just switched the webWalk to just walk to see if that eliminates it walking south of the Monastery. Seems to work so far. If you want to use it and there is an issue I'll fix it up for you. Quote Link to comment Share on other sites More sharing options...
PKDealer Posted October 19, 2018 Share Posted October 19, 2018 xp per hour ? can i get 99 cabbage cape with this with no ban ? Quote Link to comment Share on other sites More sharing options...
Malcolm Posted October 19, 2018 Author Share Posted October 19, 2018 1 minute ago, Axldeth said: xp per hour ? can i get 99 cabbage cape with this with no ban ? I know how badly we all want that 99 cabbage cape. That's why I released it open source If you all want I can add a feature to passively trains checking WC exp. Quote Link to comment Share on other sites More sharing options...
Runnwith Posted October 19, 2018 Share Posted October 19, 2018 Thanks for the contribution. you're making big waves already. 20k may not seem like a lot but expanded over 100 accounts makes a penny. Thanks dad. Quote Link to comment Share on other sites More sharing options...
Malcolm Posted October 19, 2018 Author Share Posted October 19, 2018 18 minutes ago, Runnwith said: Thanks for the contribution. you're making big waves already. 20k may not seem like a lot but expanded over 100 accounts makes a penny. Thanks dad. 16 non member accounts you mean I do what I can. Quote Link to comment Share on other sites More sharing options...
gekkebakker Posted October 19, 2018 Share Posted October 19, 2018 how can people even run 100 accounts my pc would crash heavily XD nice script Quote Link to comment Share on other sites More sharing options...
Ragnar Lothbrok Posted October 19, 2018 Share Posted October 19, 2018 (edited) I refactored this for you - should give you an idea of how and when to use conditional sleeps Good job for your first script however! I was unsure on the distances as I didn't test this so used web walking - if the distances are short enough that can be changed back to: getWalking.walk(); import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.Entity; @ScriptManifest(author = "Malcolm", info = "Pick Cabbage", name = "Cabbage Picker", version = 0.1, logo = "") public class Main extends Script { private Area cabbagePatch = new Area(3057, 3508, 3046, 3501); public void onStart() { log("Cabbage Picker"); } public void onExit() { log("Enjoy your Cabbages!"); } public int onLoop() throws InterruptedException { if (getInventory().isFull()) { if (!Banks.EDGEVILLE.contains(myPosition())) { getWalking().webWalk(Banks.EDGEVILLE); } else { if (!getBank().isOpen()) { if (getBank().open()) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } } else { if (getBank().depositAll()) { new ConditionalSleep(10_000) { @Override public boolean condition() throws InterruptedException { return getInventory().isEmpty(); } }.sleep(); } } } } else { if (!cabbagePatch.contains(myPosition())) { getWalking().webWalk(cabbagePatch); } else { Entity cabbage = objects.closest("Cabbage"); long cabbagesBefore = getInventory().getAmount("Cabbage"); if (cabbage != null) { if (cabbage.interact("Pick")) { new ConditionalSleep(10_000) { @Override public boolean condition() throws InterruptedException { return getInventory().getAmount("Cabbage") > cabbagesBefore; } }.sleep(); } } } } return 500; } } Edited October 19, 2018 by Ragnar Lothbrok Quote Link to comment Share on other sites More sharing options...
Malcolm Posted October 19, 2018 Author Share Posted October 19, 2018 37 minutes ago, Ragnar Lothbrok said: I refactored this for you - should give you an idea of how and when to use conditional sleeps Good job for your first script however! I was unsure on the distances as I didn't test this so used web walking - if the distances are short enough that can be changed back to: getWalking.walk(); import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.Entity; @ScriptManifest(author = "Malcolm", info = "Pick Cabbage", name = "Cabbage Picker", version = 0.1, logo = "") public class Main extends Script { private Area cabbagePatch = new Area(3057, 3508, 3046, 3501); public void onStart() { log("Cabbage Picker"); } public void onExit() { log("Enjoy your Cabbages!"); } public int onLoop() throws InterruptedException { if (getInventory().isFull()) { if (!Banks.EDGEVILLE.contains(myPosition())) { getWalking().webWalk(Banks.EDGEVILLE); } else { if (!getBank().isOpen()) { if (getBank().open()) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } } else { if (getBank().depositAll()) { new ConditionalSleep(10_000) { @Override public boolean condition() throws InterruptedException { return getInventory().isEmpty(); } }.sleep(); } } } } else { if (!cabbagePatch.contains(myPosition())) { getWalking().webWalk(cabbagePatch); } else { Entity cabbage = objects.closest("Cabbage"); long cabbagesBefore = getInventory().getAmount("Cabbage"); if (cabbage != null) { if (cabbage.interact("Pick")) { new ConditionalSleep(10_000) { @Override public boolean condition() throws InterruptedException { return getInventory().getAmount("Cabbage") > cabbagesBefore; } }.sleep(); } } } } return 500; } } I must admit. I probably write some of the messiest code around Good thing I still know whats going on within that mess. 1 hour ago, gekkebakker said: how can people even run 100 accounts my pc would crash heavily XD nice script Mine too man. Thanks Quote Link to comment Share on other sites More sharing options...
Arunce Posted February 5, 2021 Share Posted February 5, 2021 how do i add this script to my osbot ? Quote Link to comment Share on other sites More sharing options...
FuryShark Posted February 6, 2021 Share Posted February 6, 2021 (edited) 5 hours ago, Arunce said: how do i add this script to my osbot ? https://osbot.org/mvc/sdn2/scripts/15 Fury Veggy Thief does this on the sdn Edited February 6, 2021 by FuryShark Quote Link to comment Share on other sites More sharing options...