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
  • Is there a way to get a run energy analysis?


    Xephy

    Recommended Posts

    Posted

    Is there a way to get a run energy analysis / get a return of run energy %?

    Posted

    Do you also happen to have a fix to this problem I'm facing? I'll be running a script, not using states, and whenever I click the stop button it'll continue to run for the remainder of the loop. I'd like it to be able to stop instantly.

    that's why you should do 1 action a loop

    Posted

    Do you also happen to have a fix to this problem I'm facing? I'll be running a script, not using states, and whenever I click the stop button it'll continue to run for the remainder of the loop. I'd like it to be able to stop instantly.

    Instance.getInstance().isRunning() I believe. Have checks for that(if you have any internal loops) otherwise you should really be looping instead of going straight through .

    Posted

    that's why you should do 1 action a loop

     

     

    Instance.getInstance().isRunning() I believe. Have checks for that(if you have any internal loops) otherwise you should really be looping instead of going straight through .

     

    Would either of you care to briefly explain what you mean when you say to do looping instead of going straight through? I'm not sure if I'm understanding the concept fully, much less understanding how to go about implementing that. I'm sure if I see an example, I'd understand.

    Posted

    Would either of you care to briefly explain what you mean when you say to do looping instead of going straight through? I'm not sure if I'm understanding the concept fully, much less understanding how to go about implementing that. I'm sure if I see an example, I'd understand.

    There's lots of basic script tutorials... try this: http://dreambot.org/forums/index.php/topic/2555-video-tutorial-series-dreambot-scripting-request-scripting-tutorials-here/

    Posted

    Would either of you care to briefly explain what you mean when you say to do looping instead of going straight through? I'm not sure if I'm understanding the concept fully, much less understanding how to go about implementing that. I'm sure if I see an example, I'd understand.

    One very simple and easy answer to your question is to check if the script is still running within the loop:

    @Override
    public int onLoop(){
       while(getClient().getInstance().getScriptManager().isRunning()){
          //DO YOUR RUNNING STUFF
       }
    }
    

    You can change the "while" to "if", if you want it to execute only once each loop (if you got other stuff in the loop you want to have executed besides your running part). Beware that you can not stop the running code right away if you use an if-check. The while loop does stuff while the boolean returns true, and stops looping the while-loop until it returns false. In this case, the while loop returns false once you stop the script (not sure if it also returns false if you PAUSE the script). 

     

    I don't know exactly what you want to do, but only work with while-loops if you understand what they do, or else you'll end up with your script looping only the while loop.

     

    Hope this helped. Ask me anything if you need help!

    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.