Xephy 237 Posted July 16, 2016 Is there a way to get a run energy analysis / get a return of run energy %?
Calculus 30 Posted July 16, 2016 Is there a way to get a run energy analysis / get a return of run energy %? getWalking().getRunEnergy() http://dreambot.org/javadocs/org/dreambot/api/methods/walking/impl/Walking.html#getRunEnergy--
Xephy 237 Author Posted July 16, 2016 getWalking().getRunEnergy() http://dreambot.org/javadocs/org/dreambot/api/methods/walking/impl/Walking.html#getRunEnergy-- 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.
Diddy 265 Posted July 16, 2016 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
Hopewelljnj 46 Posted July 16, 2016 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 .
Xephy 237 Author Posted July 17, 2016 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.
Calculus 30 Posted July 17, 2016 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/
Cardozz 46 Posted July 17, 2016 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.