Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Start doing other tasks after x amount of time?

Featured Replies

Hey, I'm currently writing a progressive script that I want to do 3-4 different kinds of tasks, such as digging salts, woodcutting, firemaking, all in one script.

 

Currently it's digging salts, and it's working pretty good, but I'm wondering if their is a way to detect how long the script has ran, and make it change up the tasks after x amount of time.

 

thanks for reading, ;)

 

- ZenomH

Store the start time on the script,

 

long startTime = System.currentTimeMillis();

Then you can use it to see how much time has passed.

long timeElapsed = System.curretTimeMillis() - startTime;

The value will be in milliseconds however you can convert it to seconds by dividing by 1000 or convert it further.

Edited by House

  • Author

 

Thanks for the reply man, i'll test it now smile.png Will keep you updated on the progress and how it went smile.png

long startTime = System.currentTimeMillis();

	long timeElapsed = System.currentTimeMillis() - startTime / (1000 * 60) % 60;
		

Update, How do I use the int, aka 40, is 40 minutes.

if (timeElapsed == 10) {

?

 

edit: figured it out, thanks <3

 

Edited by zenomh

 

Update, How do I use the int, aka 40, is 40 minutes.

if (timeElapsed == 10) {

?

 

edit: figured it out, thanks QwPha8E.png

 

I mentioned it above, it is in milliseconds so 5 * 1000 * 60 = 5 minutes.

 

timeElapsed / 1000 = Seconds since start.

timeElapsed / 1000 / 60 = Minutes passed and so on.. 

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.