mousbros Posted February 28, 2020 Share Posted February 28, 2020 package begin; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Mousbros", info = "", logo = "", name = "EZBEGIN", version = 0) public class Begin extends Script { final Area BEGIN_AREA = new Area (3233,3218,3237,3226); final Area BANK_AREA = new Area(3092,3240,3095,3246); public void onExit() { } public void onStart() { } @Override public int onLoop() throws InterruptedException { if(!getInventory().isEmpty()) { if (BEGIN_AREA.contains(myPlayer())) { log("not empty"); getWalking().webWalk(BANK_AREA); } }else { if(!getInventory().isEmpty()) { if (BANK_AREA.contains(myPlayer())) { RS2Object banker = getObjects().closest(10355); if (bank.getBank().isOpen()) { bank.depositAll(); } else { if (banker != null) { if (banker.isVisible()) { banker.interact("Bank"); sleep(random(998, 7896)); } } } }else { getWalking().webWalk(BANK_AREA); } } } return 50; } } Quote Link to comment Share on other sites More sharing options...
Gunman Posted February 28, 2020 Share Posted February 28, 2020 @mousbros Don't use id's if you can use the String name for starters as ids change more often than Strings. Also just use the bank API method to open it. getBank().open Also look into conditional sleep so you can sleep until the bank is open. Quote Link to comment Share on other sites More sharing options...
mousbros Posted February 28, 2020 Author Share Posted February 28, 2020 (edited) how do I remove a topic?? 2 minutes ago, Gunman said: @mousbros Don't use id's if you can use the String name for starters as ids change more often than Strings. Also just use the bank API method to open it. getBank().open Also look into conditional sleep so you can sleep until the bank is open. i found the problem tho yaaay it was a syntax error.... thank you for the answer much love! Edited February 28, 2020 by mousbros Quote Link to comment Share on other sites More sharing options...
Gunman Posted February 28, 2020 Share Posted February 28, 2020 2 minutes ago, mousbros said: how do I remove a topic?? i found the problem tho yaaay it was a syntax error.... thank you for the answer much love! Idk if you can. You might be able to hide the thread in moderation actions at the top of the thread. Also put that shit in here https://pastebin.com/ so it's easier to read please Quote Link to comment Share on other sites More sharing options...
botelias Posted February 28, 2020 Share Posted February 28, 2020 1. Use the API 2. Why the random af sleeps? It's already random, no reason to put (998, 7896). Quote Link to comment Share on other sites More sharing options...