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


    Banker

    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

    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.