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
  • Pretty simple - Checking if script is currently running?


    deathizpro

    Recommended Posts

    Posted

    Couldn't find it for the life of me in the API or any of the classes. Maybe I'm overlooking how it's labeled or something, but how do you check if the current script is running/paused/stopped?

    Posted

    That literally didnt answer his question at all.

     

    You can use the ScriptManager class, just pass in the instance of your instance by calling Client.getInstance() or something like that

    Posted

    That literally didnt answer his question at all.

     

    You can use the ScriptManager class, just pass in the instance of your instance by calling Client.getInstance() or something like that

     

    Thanks! Not sure why I couldn't find that earlier.

     

    If I call Client.getInstance() that's returning the current clicked instance loaded in the client, and not the current script instance correct? Seems like it. Then I'd be looking for something along the lines of Client.getInstance().getScriptManager().isRunning() right?

    Posted

    Thanks! Not sure why I couldn't find that earlier.

     

    If I call Client.getInstance() that's returning the current clicked instance loaded in the client, and not the current script instance correct? Seems like it. Then I'd be looking for something along the lines of Client.getInstance().getScriptManager().isRunning() right?

     

    Yessir 

    Posted

    for the current script I'd just use script.getCurrentState() you will be returned one of the following:
    PAUSED RUNNING SKIP START STOP


    However If you are running more than one client you would need to use the Client.getInstance method.

    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.