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

Buying Items from General Store

Featured Replies

How exactly would I buy an item from a general store...I have to sell noted essence and buy back unnoted essense, but I have no idea how this would exactly work, there are no interfaces for each individual slot in the store, I can try searchForInterface or whatever it is, but I want some input first. What would be the most effective way?

	private Rectangle getShopItemBounds(int itemId) {
		int slot = -1;

		for (int i = 0; i < client.getInterface(300).getChild(75).getInv().length; i++) {
			if (client.getInterface(300).getChild(75).getInv()[i] - 2 == itemId) {
				slot = i + 1;
				break;
			}
		}

		if (slot == -1) {
			return null;
		}

		slot = 6;

		int row = (int) Math.ceil((slot / 8.0) - 1);
		int column = slot > 8 ? slot - (row * 8) : slot;
		column--;

		int x = 80 + (column * 16) + (column * 31);
		int y = 69 + (row * 16) + (row * 31);

		return new Rectangle(x, y, 31, 31);
	}

	private void buyShopItem(Item item) throws InterruptedException {
		Rectangle itemBounds = getShopItemBounds(item.getId());
		RectangleDestination destination = new RectangleDestination(itemBounds);
		for (int i = 1; i < 100; i++) {
			selectOption(null, destination, "Buy 10", false);
			sleep(100);
		}

	}

Just modify that, I can't be bothered to

  • Author
	private Rectangle getShopItemBounds(int itemId) {
		int slot = -1;

		for (int i = 0; i < client.getInterface(300).getChild(75).getInv().length; i++) {
			if (client.getInterface(300).getChild(75).getInv()[i] - 2 == itemId) {
				slot = i + 1;
				break;
			}
		}

		if (slot == -1) {
			return null;
		}

		slot = 6;

		int row = (int) Math.ceil((slot / 8.0) - 1);
		int column = slot > 8 ? slot - (row * 8) : slot;
		column--;

		int x = 80 + (column * 16) + (column * 31);
		int y = 69 + (row * 16) + (row * 31);

		return new Rectangle(x, y, 31, 31);
	}

	private void buyShopItem(Item item) throws InterruptedException {
		Rectangle itemBounds = getShopItemBounds(item.getId());
		RectangleDestination destination = new RectangleDestination(itemBounds);
		for (int i = 1; i < 100; i++) {
			selectOption(null, destination, "Buy 10", false);
			sleep(100);
		}

	}

Just modify that, I can't be bothered to

 

Wasn't expecting that, thanks bro.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.