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
  • Programmatically controlling Dreambot Interface and Scripts?


    Lancelot

    Recommended Posts

    Posted

    Hi all,
     

    Does Dreambot have a high-level API for controlling the starting and stopping of scripts? Ideally, it'd be great to run a script with arguments so that I could achieve the following:

    Start ScriptX as user [username].

    Note that 'ScriptX' would always be a custom script that interfaces with the 'control script' - and thus would expect to be passed an argument with the account's username and password. 

    I've had a look through the Javadocs but can't really find anything above the client. I've also searched the forums - though couldn't really figure out how to put my query into a search term. 

    Alternatively, is there a plainly obvious solution to this problem that I am not seeing? Perhaps a different approach?

     

    Cheers all,
    H

     

    Posted

    Perfect. This is exactly what I was looking for. Does the script just receive args from the -params flag in the usual way? From the Main function of the script? 

     

    Posted

    You will have to accept the parameters by overriding the onstart method

    @Override
    public void onStart(String... args) {
    
    }

     

    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.