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.

Timer help

Featured Replies

My timer is resetting after 5 seconds, and I'm not sure why.

private long startTime;

	public void onStart() {

		startTime = System.currentTimeMillis();

	}
public final String formatTime(final long ms) {

		long s = ms / 1000, m = s / 60, h = m / 60;
		s %= 6;
		m %= 60;
		h %= 24;
		return String.format("%02d:%02d:%02d", h, m, s);

	}
public void onPaint(Graphics2D g) {

		long runTime = System.currentTimeMillis() - startTime;
		g.drawString("Run Time :" + formatTime(runTime), 10, 290);
	}

I put all the important bits down.

 

  • Author

Never mind, I'm an idiot.

public final String formatTime(final long ms) {

		long s = ms / 1000, m = s / 60, h = m / 60;
		s %= 6;
		m %= 60;
		h %= 24;
		return String.format("%02d:%02d:%02d", h, m, s);

	}

 

Needs to be

		long s = ms / 1000, m = s / 60, h = m / 60;
		s %= 60;
		m %= 60;
		h %= 24;
		

 

  • Author
6 hours ago, Explv said:

:???:  How do you fuck up a copy and paste lel

Wasn't a coppyyy pastaa :(

I typed it out to try and understand the lines and reasonings, makes it easier for me to remember how to do things.

xD, why you roasting

1 minute ago, kingbutton said:

Wasn't a coppyyy pastaa :(

I typed it out to try and understand the lines and reasonings, makes it easier for me to remember how to do things.

xD, why you roasting

If you want to understand it, read what he did and do your own version of a timer. 

This one is somewhat unique to avg timer classes. 

Create an account or sign in to comment

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.