Jump to content

Widget tutorial request


Butters
 Share

Recommended Posts

Sorry, if it's out there somewhere, but was unable to find one. Is there/or could someone write a decent tutorial on how to use widget debugger, use widgets in code etc. with examples? For example I want to make the bot to click on GE Box1. I can see that the Action for it is "View offer" when I hover my mouse on it, but using widget debugger I'm unable to find which widget it is, that has the action.

 

Also, I've seen in multiple topics that using static widget ID's in code is like punching your grandma. As I understood you can use 

RS2Widget allWidget = getWidgets().singleFilter(getWidgets().getAll(), new ActionFilter("SOME ACTION HERE")); 

but isn't it extremely inefficient, cause as I understand it goes though all the widgets? And is it safe to filter by action alone?

 

Thanks in advance

Link to comment
Share on other sites

Sorry, if it's out there somewhere, but was unable to find one. Is there/or could someone write a decent tutorial on how to use widget debugger, use widgets in code etc. with examples? For example I want to make the bot to click on GE Box1. I can see that the Action for it is "View offer" when I hover my mouse on it, but using widget debugger I'm unable to find which widget it is, that has the action.

Also, I've seen in multiple topics that using static widget ID's in code is like punching your grandma. As I understood you can use

RS2Widget allWidget = getWidgets().singleFilter(getWidgets().getAll(), new ActionFilter("SOME ACTION HERE"));
but isn't it extremely inefficient, cause as I understand it goes though all the widgets? And is it safe to filter by action alone?

Thanks in advance

Enable widgets in options.

Hover over the widget, you will see the widget IDs in the same colour as the box surrounding your widget.

Input those IDs into the debugger

Link to comment
Share on other sites

Thanks, fiddled around a little bit and got the ID's. 

 

 

 

Also note if its not showing up as an action, it might be a tooltip (.getTooltip())

 

This is just for information gathering right? Cause I don't believe that I'll be able to interact with a widget through the info of its' tooltip.

 

Anyway thanks for the responses.

 

But how about getting the widgets without hardcoding ID's?

Link to comment
Share on other sites

Thanks, fiddled around a little bit and got the ID's. 

 

 

This is just for information gathering right? Cause I don't believe that I'll be able to interact with a widget through the info of its' tooltip.

 

Anyway thanks for the responses.

 

But how about getting the widgets without hardcoding ID's?

 

For example, the pottery interface for the "Make 1", "Make 5", "Make 10", "Make X" is all separate widgets with the "Make X" being the tooltip. Might be only on older content, but it happens (and its the action basically).

Link to comment
Share on other sites

Thanks, fiddled around a little bit and got the ID's.

This is just for information gathering right? Cause I don't believe that I'll be able to interact with a widget through the info of its' tooltip.

Anyway thanks for the responses.

But how about getting the widgets without hardcoding ID's?

You can get them using filters like in the example you posted, and then just store the result. You would only need to do it once and it wouldn't be that inefficient

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.

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.

 Share

  • Recently Browsing   0 members

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