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.

How to drag item in inventory

Featured Replies

I want to drag around items in inventory, to arrange them for easier clicking.

 

But i cant figure out how to actually drag them to change the place of one item.

 

Inventory does not have any calls for that (or at least i did not find any) and i also tried this:

execute(new ContinualClickMouseEvent(inventory.getMouseDestination(from),new Condition(){
            @Override
            public boolean evaluate() {
                return InventorySlotDestination.getSlot(to).contains(mouse.getPosition());
            }
        }));
        execute(new MoveMouseEvent(inventory.getMouseDestination(to),true));

but all that does is it clicks the item i want to drag and stays there until i force quit the script.

This is what I use to swap items in inventory spaces.

	public boolean swapItems(int slot1, int slot2) throws InterruptedException {
		if (getInventory().isItemSelected()) {
			getInventory().deselectItem();
		}
		return getMouse().continualClick(getInventory().getMouseDestination(slot1), new Condition() {
			@Override
			public boolean evaluate() {
				getMouse().move(getInventory().getMouseDestination(slot2), true);
				return getInventory().getMouseDestination(slot2).getBoundingBox().contains(getMouse().getPosition());
			}
		});
	}

Kinda messy, but it works.

Edited by Incus Valley

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.