Jump to content

getMenu().getDefaultToolTip();


Recommended Posts

Posted
37 minutes ago, Ayylmao420 said:

When pressing shift, getMenu().getDefaultToolTip() still returns for example; "Use Iron ore".

Is there any ways of getting the actual toolTip or if this is the correct way of getting it, might be clients bug ?

@Alek

 

Because i think when u use shift and try to right click the first option still appears as "Use" not sure maybe.

  • Like 1
Posted (edited)
On 3/23/2017 at 8:04 AM, Ayylmao420 said:

When pressing shift, getMenu().getDefaultToolTip() still returns for example; "Use Iron ore".

Is there any ways of getting the actual toolTip or if this is the correct way of getting it, might be clients bug ?

@Alek

If all you're trying to do is interact with an item while holding shift, determining the item's tool tip isn't necessary. Calling an item's interact() method without passing in any strings will simply left click the item, and if you're holding shift while doing this, the item will drop.

	//Shift dropping
	List<Item> logList = getInventory().filter(new NameFilter<>("Logs"));
        if (logList.size() > 0) {
            getKeyboard().pressKey(KeyEvent.VK_SHIFT);
            for (Item log : logList) {
                log.interact();
            }
            getKeyboard().releaseKey(KeyEvent.VK_SHIFT);
        }

 

Edited by Easy
Posted
53 minutes ago, Easy said:

If all you're trying to do is interact with an item while holding shift, determining the item's tool tip isn't necessary. Calling an item's interact() method without passing in any strings will simply left click the item, and if you're holding shift while doing this, the item will drop.


	//Shift dropping
	List<Item> logList = getInventory().filter(new NameFilter<>("Logs"));
        if (logList.size() > 0) {
            getKeyboard().pressKey(KeyEvent.VK_SHIFT);
            for (Item log : logList) {
                log.interact();
            }
            getKeyboard().releaseKey(KeyEvent.VK_SHIFT);
        }

 

If all he is trying to do is shift drop, he should just enable shift dropping in the rs settings and then the OSBot drop method will automatically use shift dropping.

I have a snippet in the snippets section to enable shift dropping

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...