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
  • Dialouge Handling stops script from functioning properly


    Dockid

    Recommended Posts

    4 minutes ago, Dockid said:
    
    if (c.getLocalPlayer().getAnimation() == -1 && !c.getInventory().isFull()) {
        fishingSpot.interact("Cage");
        walkSleep();
    }else if (c.getDialogues().inDialogue()) {
        c.getDialogues().spaceToContinue();
    
    }

    When i remove the else if for handling the dialogue box the script will run perfectly, is there something wrong with how I am dealing with the "Inventory is full" dialogue?

    What structure are you using? You're extending the AbstractScript class so it's not a Task System. If you have a ton of nested if statements I suggest you look into a basic state structure.  Here's a writeup I have given in the past:

     

    Link to comment
    Share on other sites

    3 minutes ago, NovaGTX said:

    What structure are you using? You're extending the AbstractScript class so it's not a Task System. If you have a ton of nested if statements I suggest you look into a basic state structure.  Here's a writeup I have given in the past:

     

    Okay I will rewrite my code based on your advice,thanks

    Link to comment
    Share on other sites

    4 hours ago, NovaGTX said:

    What structure are you using? You're extending the AbstractScript class so it's not a Task System. If you have a ton of nested if statements I suggest you look into a basic state structure.  Here's a writeup I have given in the past:

     

    Hi, I rewrote my code following your advice and now it all works fine,appreciate the help

    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.