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
  • loop seems to be skipping


    Jagg3d

    Recommended Posts

    lmfao that's worse than mine. You're returning true after talking to the dude...? That's not the purpose of this loop. "BlessSymbols" is. Yours is more like "continueDialogueOrInteractDoorOrInteractBrother".....crap

    Feel the love generation! C'mon,C'mon, C'mon, C'mon, YEA!

    Link to comment
    Share on other sites

    -placeholder- gonna write a function up when I get home :P

    I think this would work :

     

     

     

    public boolean BlessSymbols() {
        if(getDialogues().inDialogue()) {
            if(sleepUntil(() -> talk() , 5000)) {
                if(sleepUntil(() -> talk() , 5000)) {
                    return true;
                }
            }
        } else {
            talkToTheGuy();
        }
        return false;
    }
     
    public boolean talk() {
    int counter = 0;
    while(getDialogues().isContinue() && counter < 5) {
    getDialogues().continueDialogue();
    counter ++;
    }
    if(getDialogues().inDialogue()) {
    getDialogues().clickOption(1);
    return true;
    }
    return false;
    }
    

     

     

     

    Although what would be better is for you to check for the option that you need to click existing. That way if it bugs in the middle of working it can possibly correct itself by looking for that string in the option.

    Link to comment
    Share on other sites

    lmfao that's worse than mine. You're returning true after talking to the dude...? That's not the purpose of this loop. "BlessSymbols" is. Yours is more like "continueDialogueOrInteractDoorOrInteractBrother".....crap

    what? it will re-loop and complete the next best action, i dont get what ur saying

    Link to comment
    Share on other sites

    what? it will re-loop and complete the next best action, i dont get what ur saying

    He's saying your code will not complete the process in one call of blessSymbols()

    Link to comment
    Share on other sites

    what? it will re-loop and complete the next best action, i dont get what ur saying

    I don't know how you don't understand. Your method returns true if it opens the door, talks to him, or is in a dialogue. Those are 3 separate methods. This particular method should ONLY return true if it successfully blesses the symbols. That's the point of the method...

     

    He's saying your code will not complete the process in one call of blessSymbols()

    Pretty much this^

    Link to comment
    Share on other sites

    I don't know how you don't understand. Your method returns true if it opens the door, talks to him, or is in a dialogue. Those are 3 separate methods. This particular method should ONLY return true if it successfully blesses the symbols. That's the point of the method...

     

    Pretty much this^

    not really depends what you consider succesfull

     

    and it isn't advices to do more actions a loop

    Link to comment
    Share on other sites

    Why would there ever be one call of it? It should be in a loop


    Why would there ever be one call of it? It should be in a loop

     

    You don't run it based on if it was successful or not, you run it based on your logic. If your logic is setup properly, it would reloop and enter that method

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.