Jump to content

Method Request - Gets Time Until Next Break


Recommended Posts

Posted (edited)

Method: 

If time until next break > or <

(I don't think we need all the operators since the timer is always running when not breaking)

int	getTimeUntilNextBreak()
Gets the time (in seconds) until the next break will occur.

 

Why is this useful?

As of right now, there is no way to make the bots do a particular action when the breaking timer is a certain value without using custom breaks. The problem with custom SF breaks is that you have to turn off OSBot breaks for it to work properly. Not every SF script and/or SDN script supports custom breaks, making the turning on/off of OSBot breaks a bit dangerous/tedious (especially when using cli) since you might forget to turn them back on when using another script and the bot will go YOLO for 12 hrs.

How can it be used?

It's all about dangerous activities that can result in the death of the bot. For example, say you're doing Undead Druids. One could tell the bot to walk to a safe area if the timer until next break is, say, less than 10 seconds. The applications are many and it would give scripters more flexibility when writing scripts, especially on activities where the bot can die or any other inconvenient situation caused by breaking on the spot.

Edited by FushigiBot

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...