Jump to content

Break Handler


Recommended Posts

Posted

A game message is sent when attempting to log out whilst in combat, right? Go from there. In the loop method:

 

BreakManager is checked, and there is a boolean shouldActivate(). You might be able to do something with that.

I'm pretty sure he's not a scripter, hence he's posting in the General Help section. But even if you were to implement that in a script, BreakManager is a RandomSolver which means it's executed by the RandomExecutor which stops the script threads (threads used by the EventExecutor probably) so whatever you do in onLoop will not execute after the BreakManager kicked in. What you can do though, is get the time until the next break and act accordingly in your script code.

 

As a user you can ask the scripter to implement support for taking breaks if their script is performing activities which involve combat. This, however may be a bit more difficult to implement and not many scripters will be willing to do it. It is not a problem on OSBot's end as the client cannot figure itself how to leave combat in any situation without damaging the script context, therefore it should be handled in script code.

Posted

I'm pretty sure he's not a scripter, hence he's posting in the General Help section. But even if you were to implement that in a script, BreakManager is a RandomSolver which means it's executed by the RandomExecutor which stops the script threads (threads used by the EventExecutor probably) so whatever you do in onLoop will not execute after the BreakManager kicked in. What you can do though, is get the time until the next break and act accordingly in your script code.

 

As a user you can ask the scripter to implement support for taking breaks if their script is performing activities which involve combat. This, however may be a bit more difficult to implement and not many scripters will be willing to do it. It is not a problem on OSBot's end as the client cannot figure itself how to leave combat in any situation without damaging the script context, therefore it should be handled in script code.

 

My apologies, didn't even realize what section this was. If that's the case, a "fix" to this, as you have mentioned, is only applied if the scripter supports it. This section, then, would be useless to the nature of this question.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...