Jump to content

Interacting (clicking) with widget w/o any interactActions


todamach

Recommended Posts

If you want to buy something at GE take a look at the GrandExchange class in the OSBot API.

 

Oh, I did. There's nothing in there for selecting an item from the widget that I've mentioned higher. Also, api for button to confirm offer (sell or buy) doesn't work too. setQuantity and getQuantity isn't working either. I made custom methods for all of that. Still, GE API is pretty decent. Can't complain.

Link to comment
Share on other sites

Oh, I did. There's nothing in there for selecting an item from the widget that I've mentioned higher. Also, api for button to confirm offer (sell or buy) doesn't work too. setQuantity and getQuantity isn't working either. I made custom methods for all of that. Still, GE API is pretty decent. Can't complain.

So, you just want to click where the mouse is hovering? That would be very simple:

mouse.click(false);
Link to comment
Share on other sites

RS2Widget widget = widgets.get(parentId, childId);

if(widget != null) {

        widget.interact();

}

 

or

 

if(widget != null) {

        mouse.click(new RectangleDestination(bot, widget.getRectangle());

}

 

 

Going off this, he would have to check the mini widget for every item that pops up, which might be a pain in the ass to store as it could change depending on how many items are filtered out using the search bar.

 

E.g.

User searches Feather

Results: [Feather]   [blue Feather]   [Red Feather]

Blue feathers widget might be 399, 11 for example, but if the user searches Blue Feather

The result would just be: [blue Feather] and the widget could change to 399, 10

Link to comment
Share on other sites

Going off this, he would have to check the mini widget for every item that pops up, which might be a pain in the ass to store as it could change depending on how many items are filtered out using the search bar.

 

E.g.

User searches Feather

Results: [Feather]   [blue Feather]   [Red Feather]

Blue feathers widget might be 399, 11 for example, but if the user searches Blue Feather

The result would just be: [blue Feather] and the widget could change to 399, 10

 

It assumes that 'widget' is the correct widget (the correct item in the list).

I'm not going to get into how you'll get that widget. You can use parentId, childId & gchildId; or you could use something like widgets.containingText

 

How to interact with the widget is not changed by this

 

Link to comment
Share on other sites

It assumes that 'widget' is the correct widget (the correct item in the list).

I'm not going to get into how you'll get that widget. You can use parentId, childId & gchildId; or you could use something like widgets.containingText

 

How to interact with the widget is not changed by this

 

 

Ahh yes, forgot about containingText.

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