Imthabawse Posted April 18, 2019 Share Posted April 18, 2019 (edited) So made a Yew chopping script that chops and banks yew logs. For some odd reason the bot logged out twice now that I've been running it. The first time I got this error in the Logger: Spoiler [INFO][Bot #1][04/18 11:28:46 AM]: Script WillowChopper has exited! [ERROR][Bot #1][04/18 11:28:46 AM]: Error on random solver onLoop() : Auto Login java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at org.osbot.rs07.event.RandomExecutor.run(pg:178) at java.lang.Thread.run(Unknown Source) The second time the Logger didn't produce an error. Anyone know why this would happen? Currently running script to see if problem reoccurs. Code: Spoiler 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.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "Imthabawse", info = "Chops N Drops willow logs for gains", logo = "", name = "WillowChopper", version = 1) public class WillowChopper extends Script { private Area yewArea = new Area(2751, 3436, 2769, 3425); private void chop() throws InterruptedException { Entity yew = getObjects().closest(yewArea,"Yew"); Entity nest = getGroundItems().closest("Bird nest"); if(!myPlayer().isAnimating() && !myPlayer().isMoving() && !getInventory().isFull() && yew != null && nest == null) { log("Chopping tree..."); sleep(random(200,400)); yew.interact("Chop down"); new ConditionalSleep(5500) { @Override public boolean condition() { return myPlayer().isAnimating() || !yew.exists() ; } }.sleep(); sleep(random(500,800)); log("Moving mouse off-screen..."); getMouse().moveOutsideScreen(); } } private void bank() throws InterruptedException { if(getInventory().isFull() && !myPlayer().isAnimating() && !myPlayer().isMoving()) { sleep(random(400,800)); log("Walking to bank..."); getWalking().webWalk(Banks.CATHERBY); sleep(random(400,800)); log("Opening bank.."); getBank().open(); log("Depositing logs..."); getBank().depositAll("Yew logs","Bird nest"); sleep(random(400,800)); log("Closing bank.."); getBank().close(); } } private void nest() throws InterruptedException { Entity nest = getGroundItems().closest("Bird nest"); if(nest != null && !getInventory().isFull()) { sleep(random(600,900)); log("Picking up Birds nest.."); nest.interact("Take"); } } @Override public void onStart() { getCamera().toTop(); log("Welcome to YewChopper! Enjoy the EXP!"); } @Override public void onExit() { log("Thanks for using YewChopper :)"); } @Override public int onLoop() throws InterruptedException { if(yewArea.contains(myPlayer()) && !getInventory().isFull()) { chop(); nest(); }else if(!yewArea.contains(myPlayer()) && !getInventory().isFull()) { log("Let's get back to chopping!"); getWalking().webWalk(yewArea); }else{ bank(); } return 500; } } Edit: Bot logged out in the middle of chopping.. nothing in logger script still running. Edited April 18, 2019 by Imthabawse Quote Link to comment Share on other sites More sharing options...
dazeldo Posted April 18, 2019 Share Posted April 18, 2019 The bot has been cutting trees (no input = idle) for 5? minutes causing it to get logged out for being idle. 1 Quote Link to comment Share on other sites More sharing options...
Imthabawse Posted April 18, 2019 Author Share Posted April 18, 2019 (edited) On 4/18/2019 at 3:59 PM, dazeldo said: The bot has been cutting trees (no input = idle) for 5? minutes causing it to get logged out for being idle. Removed my dumb comment haha Edited April 21, 2019 by Imthabawse Im dumb Quote Link to comment Share on other sites More sharing options...
FuryShark Posted April 18, 2019 Share Posted April 18, 2019 12 minutes ago, Imthabawse said: So you're saying because I haven't manually interacted with the bot within 5 minutes it's logging out? Not really sure what you're saying here but the bot will run fine for awhile chopping yew's and banking then randomly log's out. Haven't tinkered with it yet but I'll get to the bottom of it :] Edit: Where'd you get 5 minutes from anyhow? If your not in combat you have to click before 5 minute timer kicks you out, if you are in combat i think its 20 minutes, but it could be 15. 1 Quote Link to comment Share on other sites More sharing options...
Imthabawse Posted April 18, 2019 Author Share Posted April 18, 2019 (edited) 6 minutes ago, FuryShark said: If your not in combat you have to click before 5 minute timer kicks you out, if you are in combat i think its 20 minutes, but it could be 15. Ah I see. Haven't ran into this problem before. Thanks @dazeldo sorry for confusion lol and @FuryShark for clearing that up. Edited April 18, 2019 by Imthabawse Quote Link to comment Share on other sites More sharing options...
Imthabawse Posted April 18, 2019 Author Share Posted April 18, 2019 Currently testing this Spoiler private void idleTest() throws InterruptedException { Entity yewTree = getObjects().closest("Yew"); if (!getMouse().isOnScreen()) { log("Idle to long.. Interacting with tree."); sleep(random(240000,245000)); yewTree.interact("Chop down"); } } Gonna let it run for awhile see if it works or not. Quote Link to comment Share on other sites More sharing options...