Jump to content

getMenu().getDefaultToolTip();


Ayylmao420

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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