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
  • (Dicer related) Command queuing?


    Banker
     Share

    Recommended Posts

    Okay so with my current script, i have come across an issue where if 2 commands are send at once (or very little time apart), the bot will simply ignore them. Is there a way i can queue the commands?

     

    I was thinking that maybe add the command to an array then remove it after it has been completed and then move on, wondering if there is any more efficient way to do this.

     

    Any help/suggestions is appreciated.

     

    Thanks. :)

    Link to comment
    Share on other sites

    It will ignore them? As is not hit the onMessage() for either message?

    Nope, it just doesnt type anything, then if i send another command on its own, it will do it as normal.

     

    It acts as though there wasnt even a command send if 2 are sent at same time :/

    Link to comment
    Share on other sites

    Nope, it just doesnt type anything, then if i send another command on its own, it will do it as normal.

     

    It acts as though there wasnt even a command send if 2 are sent at same time :/

    Are you using the AdvancedMessageListener

    Link to comment
    Share on other sites

    Yep, and its all in the onClanMessage(Message msg) {}

    It probably doesn't poll fast enough to see both messages, you may have to implement your own.

    Link to comment
    Share on other sites

    It probably doesn't poll fast enough to see both messages, you may have to implement your own.

     

    I was thinking of using ArrayList then just adding each message thats a command, then removing it as it is completed/executed.

    Link to comment
    Share on other sites

    I was thinking of using ArrayList then just adding each message thats a command, then removing it as it is completed/executed.

    You can, a map would be better though so you can identify the message by the key to prevent duplicates

    Link to comment
    Share on other sites

    You can, a map would be better though so you can identify the message by the key to prevent duplicates

     

    Ah okay thanks, ill look into it when i get working on it again :)

    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
     Share

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