-
Posts
278 -
Joined
-
Last visited
-
Feedback
0%
Everything posted by Imthabawse
-
Code is a hell of a lot cleaner now and been running for awhile now looking good. *Edited above code Still want to add: Random camera movement(although not necessary just anti ban type feature), random checking of EXP gained widget that pops up when you build a larder, informative paint lvls gained, exp gained etc... Been a fun project so far and have come a long way since I started dicking around with it. Looking for feedback from other scripters or anyone that actually takes this code and uses it. LOG: [INFO][Bot #1][02/24 05:16:57 PM]: Talking to butler.. [INFO][Bot #1][02/24 05:16:59 PM]: Un-noting planks.. please wait... [INFO][Bot #1][02/24 05:17:09 PM]: Interacting with larder.. [INFO][Bot #1][02/24 05:17:10 PM]: Removing larder... [INFO][Bot #1][02/24 05:17:12 PM]: Interacting with larder space.. [INFO][Bot #1][02/24 05:17:13 PM]: Building larder... [INFO][Bot #1][02/24 05:17:17 PM]: Interacting with larder..
-
@Juggles @Eagle Scripts sorry bout that y'all ... gonna re-edit above code one last time.. tell me what you think.
-
Been playing around with the code and came up with this... Been running it no problems so far. Improvements: - Don't need planks to get script going will call butler at start if no planks in inventory - Will interact if butlers next to you instead of going through widgets every time - Script will stop n logout if no planks in bank Things to improve: - Would like to add random movement of camera at random times - Informative paint exp gained, lvls gained, time ran etc - Better sleeps - Script will break sometimes and just exit most likely due to my fucked up sleeps and improper use of shit ? Still learning just having fun messing around with the whole thing... pointers and bashing welcome. Scripters when they see this: *CODE: public class Autolarders extends Script { private void onstartCheck() throws InterruptedException { RS2Widget settings = getWidgets().get(548, 35); if (settings != null) { settings.interact(); sleep(random(1000, 1500)); RS2Widget house = getWidgets().get(261, 99); if (house != null) { house.interact(); sleep(random(1000, 1500)); RS2Widget servant = getWidgets().get(370, 19, 0); if (servant != null) { servant.interact(); log("Calling servant..."); sleep(random(1000, 1500)); RS2Widget fetch = getWidgets().get(219, 1, 1); if (fetch != null) { fetch.interact(); log("Un-noting planks.. please wait..."); sleep(random(1500, 2000)); RS2Widget inven = getWidgets().get(548, 51); if (inven != null) { inven.interact(); sleep(random(800,1000)); getMouse().moveOutsideScreen(); log("Returning to inventory..."); sleep(random(7300, 7500)); } } } } } } private void build() throws InterruptedException { RS2Object larderspace = getObjects().closest("Larder space"); if (larderspace != null) { larderspace.interact("Build"); sleep(random(800, 1000)); RS2Widget buildlarder = getWidgets().get(458, 5, 4); if (buildlarder != null) { buildlarder.interact(); log("Building larder.."); new ConditionalSleep(800) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); } } } private void remove() throws InterruptedException { RS2Object larder = getObjects().closest("Larder"); if (larder != null) { larder.interact("Remove"); sleep(random(800, 1000)); RS2Widget removelarder = getWidgets().getWidgetContainingText("Yes"); if (removelarder != null) { removelarder.interact(); log("Removing larder.."); new ConditionalSleep(800) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); } } } private void butler() throws InterruptedException { NPC demonbutler = getNpcs().closest("Demon butler"); if (demonbutler.isVisible()) { demonbutler.interact("Talk-to"); log("Interacting with butler.."); sleep(random(800, 1000)); RS2Widget un_note = getWidgets().get(219, 1, 1); if (un_note != null) { un_note.interact(); log("Un-noting planks.. please wait..."); sleep(random(800, 1000)); getMouse().moveOutsideScreen(); sleep(random(7300, 7500)); } } else { RS2Widget settings = getWidgets().get(548, 35); if (settings != null) { settings.interact(); sleep(random(1000, 1500)); RS2Widget house = getWidgets().get(261, 99); if (house != null) { house.interact(); sleep(random(1000, 1500)); RS2Widget servant = getWidgets().get(370, 19, 0); if (servant != null) { servant.interact(); log("Calling servant..."); sleep(random(1000, 1500)); RS2Widget fetch = getWidgets().get(219, 1, 1); if (fetch != null) { fetch.interact(); log("Un-noting planks.. please wait..."); sleep(random(1500, 2000)); RS2Widget inven = getWidgets().get(548, 51); if (inven != null) { inven.interact(); sleep(random(800,1000)); getMouse().moveOutsideScreen(); log("Returning to inventory..."); sleep(random(7300, 7500)); } } } } } } } private void hoverlarderspace() { if (getInventory().getAmount("Oak plank") >= 8) { RS2Object hoverlarderspace = getObjects().closest("Larder space"); if (hoverlarderspace != null) { hoverlarderspace.hover(); } } } @Override public void onStart() throws InterruptedException { log("Welcome to Last Larders.. let's get started."); if(!getInventory().contains("Oak plank")) { log("No Oak Planks found.. calling butler..."); onstartCheck(); } } @Override public void onExit(){ log("Thanks for using Last Larders.. enjoy the EXP!"); } @Override public int onLoop() throws InterruptedException { if(getInventory().getAmount("Oak plank") >= 8) { build(); remove(); hoverlarderspace(); } else if(getInventory().getAmount("Oak plank") < 8) { butler(); } return 2000; } }
-
Works pretty good in mining guild on iron ores next to bank, noticed though that after banking clicks right behind bank everytime then click mini map to walk to rocks.
-
deleted more clutter..
-
deleted clutter...
-
Been working on creating a free Oak larder script for the community to use but time and time again I run into a problem with getting the "Servant" to successfully un-note planks and have the bot continue building. So I'm going to take a break from this adventure and further my knowledge on Java to better structure my scripts in the future. For now I will post the code that works so someone in the community can get use/learn from it. import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(name = "LardersV2", logo = "", version = 1, author = "Imthabawse", info = "Builds Oak Larders") public class Oaklarders extends Script { @Override public int onLoop() throws InterruptedException { if (getInventory().getAmount(8778) <= 8) { // If inventory contains 8 or equal to 8 oak planks } Entity larderspace = getObjects().closest("Larder space"); // Get closest Larder space if (larderspace != null && larderspace.interact("Build")) { // If Larder space exists then Build } new ConditionalSleep(4000) { @Override public boolean condition() { return !larderspace.exists(); } }.sleep(); RS2Widget buildlarder = getWidgets().get(458, 5, 4); // Oak larder widget if (buildlarder != null && buildlarder.interact("Build")) { // If exists then build larder } new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); Entity larder = getObjects().closest("Larder"); // Get closest larder if (larder != null && larder.interact("Remove")) { // If exists remove it } new ConditionalSleep(4000) { @Override public boolean condition() { return !larder.exists(); } }.sleep(); RS2Widget remove = getWidgets().getWidgetContainingText("Yes"); if (remove != null && remove.interact()) { } new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); return 1000; } }
-
So in my couple day journey I've managed to get my bot to successfully "Build" and "Remove" oak larders thanks to many users advice, tutorials, snippets, etc. Now I've ran into the problem of trying to get the bot to check inventory if I have enough planks to build larders or not. If not then call servant and un-note planks, keep building. If anyone would like to look over the script and point out how retarded I am that'd be great! ? package simpleLarders; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(name = "Simple Larders", author = "Imthabawse", version = 1.0, info = "Makes Oak Larders", logo = "") //Helps the client understand and find the script we compile public class SimpleLarders extends Script { @Override public void onStart() { log ("Welcome to Simple Larders, Let's start building!"); //Code here will execute before the loop is started } @Override public void onExit() { log ("Thanks for using Simple Larders."); //Code here will execute after the script ends } // Should code for checking planks and calling servant be outside onLoop? @Override public int onLoop() { Entity larder_space = getObjects().closest("Larder space"); if (larder_space != null && larder_space.interact("Build")) { new ConditionalSleep(4000) { @Override public boolean condition() { return !larder_space.exists(); } }.sleep(); } RS2Widget buildlarder = getWidgets().get(458, 5, 4); if (buildlarder != null && buildlarder.interact("Build")) { new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); } Entity larder = getObjects().closest("Larder"); if (larder != null && larder.interact("Remove")) { new ConditionalSleep(4000) { @Override public boolean condition() { return !larder.exists(); } }.sleep(); } RS2Widget removelarder = getWidgets().getWidgetContainingText("Yes"); if (removelarder != null && removelarder.interact()) { new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); } //Script runs great till this point with a return underneath // But I tried to implement checking for planks and calling servant below if (getInventory().getAmount("Oak plank") > 5); RS2Widget settings = getWidgets().get(548, 35); if(settings != null && settings.interact()) { new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); // *Sure this is wrong } // Because players not animating? }.sleep(); } RS2Widget house = getWidgets().get(261, 99); if (house != null && house.interact()) { new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); //* Same as above } }.sleep(); } RS2Widget servant = getWidgets().get(370, 19, 0); if (servant != null && servant.interact()) { new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); //* Same as above } }.sleep(); } RS2Widget unnote = getWidgets().get(219, 1, 1); if (unnote != null && unnote.interact()) { new ConditionalSleep(4000) { @Override public boolean condition() { return myPlayer().isAnimating(); //* Same as above } }.sleep(); } RS2Widget inven = getWidgets().get(548, 51); if (inven != null && inven.interact()) { new ConditionalSleep(8000) { @Override public boolean condition() { return myPlayer().isAnimating(); //* Same as above } }.sleep(); } return 5000; //The amount of time in milliseconds before the loop starts over } }
-
Getting ERROR about adding "Else" statement
Imthabawse replied to Imthabawse's topic in Scripting Help
So when I add a } in all indicated spots my script lit up red @Override public int onLoop() throws InterruptedException { Entity larder_space = getObjects().closest("Larder space"); if (larder_space != null && larder_space.interact("Build")) { new ConditionalSleep(5000) { @Override public boolean condition() { return !larder_space.exists(); // Not sure I'm using this right either } }.sleep(); } RS2Widget buildlarder = getWidgets().get(458, 5, 4); if (buildlarder != null && buildlarder.interact("Build")) { new ConditionalSleep(5000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); } Entity larder = getObjects().closest("Larder"); // error here now if (larder != null && larder.interact("Remove")) { // error here now new ConditionalSleep(5000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); // error here now } @Override public void onExit() { // error here now log("Thanks for using Simple larders!"); } } // error here now Could you elaborate a little more on this? Just trying to learn if not I understand. -
Getting ERROR about adding "Else" statement
Imthabawse replied to Imthabawse's topic in Scripting Help
Started over completely with this project now so far I have: @Override public void onStart() { log("Welcome to Simple larders! Let's get started."); } @Override public int onLoop() throws InterruptedException { Entity larder_space = getObjects().closest("Larder space"); if (larder_space != null && larder_space.interact("Build")) { new ConditionalSleep(5000) { @Override public boolean condition() { return !larder_space.exists(); // Not sure I'm using this right either } }.sleep(); RS2Widget buildlarder = getWidgets().get(458, 5, 4); if (buildlarder != null && buildlarder.interact("Build")) { new ConditionalSleep(5000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); Entity larder = getObjects().closest("Larder"); if (larder != null && larder.interact("Remove")) { new ConditionalSleep(5000) { @Override public boolean condition() { return !larder.exists(); } }.sleep(); // ERROR HERE @Override public void onExit() { log("Thanks for using Simple larders!"); } } So I'm getting this ERROR so far: - Syntax error, insert "}" to complete Statement - Syntax error, insert "else Statement" to complete IfStatement - Syntax error, insert "}" to complete MethodBody My plan was to add a check to see if I had "Oak planks" in my inventory. If not then call servant via widgets maybe widgets containing text and un-note planks and wait if not enough "Oak planks" to build or continue to build till he gets back. Then if he's still holding planks for me grab them when inventory space is available. I guess the big question here is if I add a conditional sleep at the end of every interaction like I'm doing is that gonna keep leading to problems like this? I feel like I'm so close to getting this script up and running but 1 or 2 stupid errors are keeping it from happening ? But nonetheless not giving up on this project as there isn't anything on the SDN other than 2 "AIO" builders that you have to pay for and I believe the community would greatly benefit from this as a FREE script. With that being said any suggestions, snippets, bashing, etc are welcome lol. -
So I've been working on this Oak larder project for a bit now and I'm wondering where I would go from here: @Override public void onStart() { log("Welcome to Simple larders! Let's get started."); } @Override public int onLoop() throws InterruptedException { Entity larder_space = getObjects().closest("Larder space"); if (larder_space != null && larder_space.interact("Build")) { new ConditionalSleep(5000) { @Override public boolean condition() { return !larder_space.exists(); // Not sure I'm using this right either } }.sleep(); } return 1000; } @Override public void onExit() { log("Thanks for using Simple larders!"); } } Now that I got the bot interacting with the "Larder space" and clicking "Build" I'm trying to get it to interact with the widget: RS2Widget widget = widgets.get(458, 5, 4); Which is the "Oak larder" icon but I'm having trouble on implementing this so it flows step by step. My plans for the bot are too: // 0. Make sure your in front of "Larder space" in build mode before starting. // 1.Make bot check inventory to see if "Oak planks" exist. // 2.If true, "Build" the "Larder space" // 3."Remove" the "Larder" and repeat till > 5 "Oak planks" // 4.If > 5 then call butler to un-note "Oak planks" // 5.Wait for butler to get back with "Oak planks" // 6.Repeat You're tutorials helping a lot but some tips or a push in the right direction from someone that knows what they're talking about would be great!
-
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
Gonna give this a shot. In my head this makes sense and would shorten the script down to a lot less lines and BS. The hardest one to figure out for me would be how to call butler with settings<house<call servant. Will give it a go though! -
Getting ERROR about adding "Else" statement
Imthabawse replied to Imthabawse's topic in Scripting Help
@Apaec Thanks for the reply so if I'm understanding you correctly the code should read: unote.interact(); { // <--- if (unote == null) { return 0; } } So whats the difference of moving the "{" here: unote.interact(); { // <---- if(unote == null) return 0; } Also just trying to make a simple Oak larder maker that will, "Build", "Remove", "Call Butler to un-note planks, repeat. Had it working in my first project that used a simple "sleep(time)" but it would continuously build, remove, maybe call butler couple times, then eventually loop on trying to "Build". Example code of v1 here: RS2Widget house = widgets.get(261, 99); if(house != null) { house.interact(); { sleep(1000); Was working on adding ConditionalSleeps example: if (!objects.closest("Larder").interact("Remove")) { return 0; } else { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget removeMenu = widgets.get(219, 1, 1); return removeMenu.isVisible(); } }.sleep(); if (removeMenu == null || !removeMenu.interact()) { // This line here would not work return 0; // Kept getting: - removeMenu cannot be resolved to a variable - removeMenu cannot be resolved So with that being said I've still got a lot of learning and tinkering around to do lol.. appreciate all the feedback though! -
Getting ERROR about adding "Else" statement
Imthabawse replied to Imthabawse's topic in Scripting Help
So it's not asking me to add "else" statements? I've added another "}" at the indicated error line and I still get: - Syntax error, insert "}" to complete Block - Syntax error, insert "}" to complete Statement - Syntax error, insert "else Statement" to complete IfStatement Error occurs here: unote.interact(); { if(unote == null) { return 0; } } // This gives off the error asking for "}" to complete block } // But adding another "}" just adds error some where else I'm lost L Keep in mind I'm very new to scripting don't h8 to much lol. -
package larders; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "ImthaBawse", info = "Makes Larders", logo = "", name = "Larders", version = 0) public class Larders extends Script { @Override public void onStart() { log("Let's make some Larders!"); } @Override public int onLoop() throws InterruptedException { if (!objects.closest("Larder Space").interact("Build")) { return 0; } else { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(458, 5, 4); return widget.isVisible(); } }.sleep(); if (widgets != null) { widgets.interact(458, 5, 4, "Build"); { return 0; } } if (!objects.closest("Larder").interact("Remove")) { return 0; } else { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget removeMenu = widgets.get(219, 1, 1); return removeMenu.isVisible(); } }.sleep(); if (widgets != null) { widgets.interact(219, 1, 1, "Remove"); { return 0; } } if (getInventory().getAmount("Oak plank") > 5) { RS2Widget settings = widgets.get(548, 35); if(settings == null) { return 0; } settings.interact(); { if(settings == null) { return 0; } RS2Widget house = widgets.get(261, 99); if(house == null) { return 0; } house.interact(); { if(house == null) { return 0; } RS2Widget servant = widgets.get(370, 19, 0); if(servant == null) { return 0; } servant.interact(); { if(servant == null) { return 0; } RS2Widget unote = widgets.get(219, 1, 1); if(unote == null) { return 0; } unote.interact(); { if(unote == null) { return 0; // Error is here says: Multiple markers at this line // - Syntax error, insert "}" to complete Block // - Syntax error, insert "else Statement" to complete // IfStatement // - Syntax error, insert "}" to complete Statement // - Syntax error, insert "else Statement" to complete // BlockStatements } @Override public void onExit() { log("Phew..Let's take a break."); } } I'm sure it's something stupid like to many "IF" statements and "returns".. any help would be appreciated! ?
-
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
Using Eclipse -
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
[ERROR][Bot #1][02/02 10:27:58 PM]: Error in bot executor or from Error class (and not Exception)! java.lang.Error: Unresolved compilation problems: widget cannot be resolved to a variable widget cannot be resolved removeMenu cannot be resolved to a variable removeMenu cannot be resolved The method interact() is undefined for the type Settings at oaklarders.Oaklarders.onLoop(Oaklarders.java:36) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sh:238) at java.lang.Thread.run(Unknown Source) -
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
I've back tracked and started going back through cleaning things up was just wondering why I get "Multiple markers at this line - widget cannot be resolved to a variable" When I add: if (widget == null || !widget.interact()) { Like I said I'm really new to this so if this is a stupid question I apologize in advanced lol just eager to learn and appreciate you taking the time to look at this. -
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
if (widget == null || !widget.interact()) { ^This was one of my first errors any ideas? Also with return; I get error: "This method must return a result of type int" ? So could I just make "return 0;" ? -
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
So I added @ItPoke's suggestion and now I'm getting multiple errors ? If anyone has any ideas where I went wrong (I'm sure most of you do you're all very knowledgeable) Any help would be greatly appreciated! It's a long stretched out mess of a code and I'm sure it could be shortened significantly but I R Nub so don't h8 package oaklarders; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; // Start script lvl 33 Construction @ScriptManifest(author = "Imthabawse", info = "Oaklarder Builder", logo = "", name = "Oaklarders", version = 0) public class Oaklarders extends Script { @Override public void onStart() { log("Sit back and relax"); } @Override public int onLoop() throws InterruptedException { if (!objects.closest("Larder space").interact("Build")) { return; } else { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(458, 5, 4); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } } if (!objects.closest("Larder").interact("Remove")) { return; } else { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(219, 1, 1); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } if(getInventory().getAmount("Oak plank") > 4) { RS2Widget settings = widgets.get(548, 35); if(settings == null) { return; } settings.interact(); { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(548, 35); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } RS2Widget house = widgets.get(261, 99); if(house != null) { house.interact(); { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(261, 99); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } RS2Widget servant = widgets.get(370, 19, 0); if(servant != null) { servant.interact(); { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(370, 19, 0); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } RS2Widget unote = widgets.get(219, 1, 1); if(unote != null) { unote.interact(); { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(219, 1, 1); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } RS2Widget inventory = widgets.get(548, 51); if(inventory != null) { inventory.interact(); { new ConditionalSleep(3000) { @Override public boolean condition() { RS2Widget widget = widgets.get(548, 51); return widget.isVisible(); } }.sleep(); if (widget == null || !widget.interact()) { return; } } } } } } } } } } return(500); @Override public void onExit() { log("Thank's for using Oaklardersv1"); } } // Make bot build and remove larders // Make bot interact with butler to unote planks // Make bot call servant if needed // Add humanlike behavior sleeps etc -
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
Thanks you all for fast replies appreciate it! ? -
[HELP] Making script go task to task instead of looping over first two
Imthabawse replied to Imthabawse's topic in Tutorials
Well for example ill have 20 planks in inv at start of script. Then it builds two larders (16x planks) and i still have 4 left. Then it continuously try's to build over and over. -
package oaklarders; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; // Start script lvl 33 Construction @ScriptManifest(author = "Imthabawse", info = "Oaklarder Builder", logo = "", name = "Oaklarders", version = 0) public class Oaklarders extends Script { @Override public void onStart() { log("Sit back and relax"); } @Override public int onLoop() throws InterruptedException { objects.closest("Larder space").interact("Build"); { sleep(1000); } RS2Widget widget = widgets.get(458, 5, 4); if(widget != null) { widget.interact(); { sleep(2000); } objects.closest("Larder").interact("Remove"); sleep(1000); } RS2Widget removeMenu = widgets.get(219, 1, 1); if(removeMenu != null) { removeMenu.interact(); { sleep(1000); } if(!inventory.contains("Oak plank")) { RS2Widget settings = widgets.get(548, 35); if(settings != null) { settings.interact(); { sleep(200); } RS2Widget house = widgets.get(261, 99); if(house != null) { house.interact(); { sleep(200); } RS2Widget servant = widgets.get(370, 19, 0); if(servant != null) { servant.interact(); { sleep(200); } RS2Widget unote = widgets.get(219, 1, 1); if(unote != null) { unote.interact(); { sleep(10000); } } } } } } } return(200); } @Override public void onExit() { log("Thank's for using Oaklardersv1"); } } // Make bot build and remove larders // Make bot interact with butler to unote planks // Make bot call servant if needed // Add humanlike behavior sleeps etc So everything's good untill I run out of planks and it trys to build larders over and over again. I know sleeps arnt the best method and should be using ConditionalSleeps but still a noob to this shit lol. If anyone can help give me an idea on how to break each task up id greatly appreciate it.