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
  • Using Tabs commands


    RSMasterGuard

    Recommended Posts

    I am writing a script and when I attempt to open tabs I am able to open them with this command 

    Tabs.openWithMouse(OPTIONS);

    However this doesn't seem to run successfully after any other command and just hangs. Is there something I should wrap this statement in or is this statement? What am I missing?

    Link to comment
    Share on other sites

    17 hours ago, RSMasterGuard said:

    However this doesn't seem to run successfully after any other command and just hangs. Is there something I should wrap this statement in or is this statement? What am I missing?

    youll have to post code. that method works fine your issue is most likely the logic of your script

    Link to comment
    Share on other sites

    5 hours ago, camalCase said:

    youll have to post code. that method works fine your issue is most likely the logic of your script

    case BROTHER_BRACE:
                    status = "Walk to Church";
                    while (!TUTORIAL_ISLAND_CHURCH_AREA.contains(getLocalPlayer()))
                    {
                        getWalking().walk(TUTORIAL_ISLAND_CHURCH_AREA);
                        sleep(Calculations.random(3000, 6000));
                    }
                    NPC BroBrace = getNpcs().closest("Brother Brace");
                    BroBrace.interact("Talk-to");
                    sleep(Calculations.random(2000, 3000));
                    while (getDialogues().inDialogue()) {
                        getDialogues().continueDialogue();
                        sleep(Calculations.random(500, 1000));
                    }
                    if (!getTabs().isOpen(PRAYER)) {
                        getTabs().openWithMouse(PRAYER);
                        sleep(200, 600);
                    }
                    BroBrace.interact("Talk-to");
                    sleep(Calculations.random(2000, 3000));
                    while (getDialogues().inDialogue()) {
                        getDialogues().continueDialogue();
                        sleep(Calculations.random(500, 1000));
                    }
                    while(!Tabs.isOpen(FRIENDS)) {
                        Tabs.open(FRIENDS);
                    }
                    BroBrace.interact("Talk-to");
                    while (getDialogues().inDialogue()) {
                        getDialogues().continueDialogue();
                        sleep(Calculations.random(500, 1000));
                    }

    Here ya go!

    Link to comment
    Share on other sites

    1. you are using DB2 methods to get an instance of different classes, the api is static now so you dont need to do that (getTabs().open() should just be Tabs.open() same getDialogues should just be Dialogues etc)

     

    2. using while loops is discouraged and is generally a good way to get your script stuck.

     

    i think on tutorial island you are almost always in a dialogue because the chatbox always is covered telling you what to do / who to talk to, your script is probably stuck in the while loop above your open the prayer tab step

    Link to comment
    Share on other sites

    23 minutes ago, camalCase said:

    1. you are using DB2 methods to get an instance of different classes, the api is static now so you dont need to do that (getTabs().open() should just be Tabs.open() same getDialogues should just be Dialogues etc)

     

    2. using while loops is discouraged and is generally a good way to get your script stuck.

     

    i think on tutorial island you are almost always in a dialogue because the chatbox always is covered telling you what to do / who to talk to, your script is probably stuck in the while loop above your open the prayer tab step

    For the loop about dialogue I thought that was the case too but it works for navigation and testing shows its out of the loop it seems to be mostly your first point. and if you look at the code above I have tested both the old DB2 and DB3 and both don't appear to be working, Do you know if there is a weird state that exist for those tabs the first time you open on tut island and as a result you need to use the widget function instead?

    Link to comment
    Share on other sites

    4 minutes ago, RSMasterGuard said:

    For the loop about dialogue I thought that was the case too but it works for navigation and testing shows its out of the loop

    what testing? the code you posted has no logging. you said it hangs if i did get out of that loop it wouldnt hang it would start interacting with the priest 

    5 minutes ago, RSMasterGuard said:

    Do you know if there is a weird state that exist for those tabs the first time you open on tut island and as a result you need to use the widget function instead?

    maybe

    Link to comment
    Share on other sites

    I didnt post all the code as that would be north of 1,000 lines. I'll play with the widget functions and see if that works as I tested switching tabs outside of tut island and also after that first click of the tab and it appears to work fine with both DB2 and DB3 functions so there might be a one unique case for the first time interacting with the tabs on tut.

    Link to comment
    Share on other sites

    4 hours ago, RSMasterGuard said:

    I didnt post all the code as that would be north of 1,000 lines. I'll play with the widget functions and see if that works as I tested switching tabs outside of tut island and also after that first click of the tab and it appears to work fine with both DB2 and DB3 functions so there might be a one unique case for the first time interacting with the tabs on tut.

    If you're talking about opening tabs when they are flashing during the tutorial, I'm pretty sure you have to handle that yourself with widgets (unless something changed and dreambot supports those now).

    Link to comment
    Share on other sites

    3 hours ago, SubCZ said:

    If you're talking about opening tabs when they are flashing during the tutorial, I'm pretty sure you have to handle that yourself with widgets (unless something changed and dreambot supports those now).

    That is what I was referring to, thanks for the confirmation!

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • 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.