Jump to content

World widgets


Kramnik

Recommended Posts

Hi! Havent worked with widgets too much so ran it to some problems. My main goal is to make a snippet which solves world hopping's first time dialogue. But it crashes when I try to sellect a specific worlds widget to get that dialogue. Maybe I dont know what exact widget to select, but I tried them all.

RS2Widget world = getWidgets().get(69,17,4);

getLogoutTab().open();
sleep(1000,2000);
getWidgets().get(182, 4).interact("World Switcher");
sleep(2000,3000);
world.interact();

image.png.3d0ba11cd42e05c405f02c6970864b96.png

Edited by kramnik
Link to comment
Share on other sites

Few things,

First of all, you can look at the widgets by the color of the frame, looks like the specific one you use is the amount of people in the world.

Secondly, you aren't doing any checks, make sure your widget is visable and is not null.

Lastly, i would recommand declaring your world variable at the start but setting it only after you preformed all of your other actions. Might help.

Link to comment
Share on other sites

I just looked in game and you should be using the white highlighted numbers. An easy way to check is to open the widget debugger, query the suspect widget, and if it has the action you want you found it. In this case the white widget has the action "Switch." Also the subchild is the world number

Use world.interact("Switch") because it has 2 actions, add favorite being the second

Edited by NoFloob
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...