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.

Less-bugged bank.scrollToSlot(slot)

Featured Replies

Writed simple version of scrollToSlot(int slot) that does not become stupid on first/last partially visible rows. It works maximally depending on existing scrolling functions.

public void bankScrollToSlot(int slot) throws InterruptedException{
        bank = client.getBank();
        
        int yTop = bank.getVirtualSlotPosition(0).y;
        int yBottom = bank.getVirtualSlotPosition(40).y;
        
        Rectangle rect = bank.getAbsoluteSlotPosition(slot);
        int y = rect.y;
        if(y < yTop)
            bank.scrollToSlot(slot - 8 >= 0 ? slot - 8 : slot); //scroll up
        if(y > yBottom)
            bank.scrollToSlot(slot + 8 < 400 ? slot + 8 : slot); //scroll down
    }

P.S. Did'nt test it much enough, so can contain some bugs.

When even bother scrolling? This is a re-post of my submitted code on the Withdraw without scrolling bug thread:

public static RectangleDestination getScrollerDes(Script script, int id) {

		if (!script.client.getBank().isOpen()
				|| !script.client.getBank().contains(id))
			return null;

		int i = 0;

		for (Item next : script.client.getBank().getItems())
			if (next != null && next.getId() == id)
				break;
			else
				i++;

		i /= 2;

		return new RectangleDestination(new Rectangle(480, 68 + i, 15, 4));
	}
  • Author

I tested my function on bot farm and it is working flawless for me.

Maybe yours also, but they are different.

And this is not re-post in any ways.

Guest
This topic is now closed to further replies.

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.