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.

inventory interacting

Featured Replies

2d9f27d6a8eded7e7e74fcd7428462a6.png\

 

why is this trying to reinteract with the same item? it should be looping through the slots, but instead it keeps trying to drop the item until it haas left the inventory.  I have a feeling it has to do with the interact

 

on top of that the regular dropAllExcept takes longer than my 90 year old grandma to drop the inventory and then sleeps for like 10 seconds after it has finished dropping the items.  It also drops items one at a time(all of one item, then all of another item)

Edited by Novak

The only thing that has changed with inventory interaction in InteractionEvent is interacting with items that are already selected. If an item is already selected in your inventory and you attempt to interact with it again, the event will return true. Apart from that, there is nothing else as it pertains to the inventory in InteractionEvent.

  • Author

The only thing that has changed with inventory interaction in InteractionEvent is interacting with items that are already selected. If an item is already selected in your inventory and you attempt to interact with it again, the event will return true. Apart from that, there is nothing else as it pertains to the inventory in InteractionEvent.

it doesn't make sense

that code snippet is supposed to loop through the slots and interact with each slot.  why on earth would it try to keep reinteracting until the item is gone? this snippet works for every client I have ever used except for osbot.  and why does the api method for dropping all except suck?  

Edited by Novak

I didn't write the dropAllExcept method, but just because your snippet works on every single bot except ours doesn't mean that inventory interacting is not working. If you can demonstrate that there is an issue with a specific component of the API, then I'll look into it. 

  • Author

im not saying its broken, I'm saying it has obviously has some unnecessary checks otherwise it wouldn't be interacting with the same item over and over until its gone.  Checks that should be done script side, not API side

Edited by Novak

  • Author

I originally had it as a boolean but w/e 

private void dropAllExcept(String...names) throws InterruptedException{
		for(int i = 0; i < 28; i++) {
			Item item = inventory.getItemInSlot(i);
			if(item != null) {
				boolean drop = true;
				for(String name : names) {
					if(item.getName().equals(name)) {
						drop = false;
						break;
					}
				}
				if(drop) {
					inventory.getItemInSlot(i).interact("Drop");
					sleep(gRandom(50, 25));
				}
			}
		}
	}

Edited by Novak

I've narrowed down the issue to ClickMouseEvent.

Amg seriously? I thought it was something with the mouse but I didn't say anything because I'm like, no way is it possible that is messed up lol.

    private void dropAllExcept(String... names) throws InterruptedException {
        for (int i = 0; i < 28; i++) {
            Item item = inventory.getItemInSlot(i);
            if (item != null) {
                boolean drop = true;
                for (String name : names) {
                    if (item.getName().equals(name)) {
                        drop = false;
                        break;
                    }
                }
                if (drop) {
                    getInventory().interact(i, "Drop");
                    sleep(gRandom(50, 25));
                }
            }
        }
    }

Use my above edit in the meantime.

  • Author
    private void dropAllExcept(String... names) throws InterruptedException {
        for (int i = 0; i < 28; i++) {
            Item item = inventory.getItemInSlot(i);
            if (item != null) {
                boolean drop = true;
                for (String name : names) {
                    if (item.getName().equals(name)) {
                        drop = false;
                        break;
                    }
                }
                if (drop) {
                    getInventory().interact(i, "Drop");
                    sleep(gRandom(50, 25));
                }
            }
        }
    }

Use my above edit in the meantime.

 

ty bb

I still can't pinpoint the problem with the item interaction, it's driving me insane. In the meantime I re-wrote all the drop methods for inventory (2.3.21). This will still be investigated, but until then it will be put on the back burner. Thanks for this report.

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.