Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • What is wrong with my banking/walking?


    Recommended Posts

    I noticed one way that you could refactor your code in many locations. If you are using java 1.8(8), wherever you have a sleepUntil() method you can use a lambda expression instead of verify.

    Here is a sample of your code: line 30-35



    MethodProvider.sleepUntil(new Condition() {
               public boolean verify() {
                   return script.getWalking().walkExact(finalDestination);
           }, 1000);

    And here is code that does the exact same thing:

    MethodProvider.sleepUntil(() -> script.getWalking().walkExact(finalDestination),1000);
    you could also encase it in an if statement where it will be true if the condition is met or false if the sleepUntil ends due to the time being reached
    if(MethodProvider.sleepUntil(() -> script.getWalking().walkExact(finalDestination),1000)) {
    //code for when condition is met here aka when (script.getWalking().walkExact(finalDestination))
    You have 5 of these verify() blocks which means you can refactor out 20 lines of code to make that class 51 line long

    As for why your code isn't running, could you post the AbstractScript class you are trying to use with it and the Strategy class it extends. I don't see anything here that would be causing a problem
    A general problem with the api banking method is it sometimes struggles to open the bank at certain camera angles. It looks botlike, but you could do getCamera().rotateToEntity(getBank()); before attempting to open the bank
    Edited by randalthor
    Link to comment
    Share on other sites


    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.