Jump to content

Wtf why widget not working?


Recommended Posts

Posted (edited)

Hi, very strange for me why bot is not interacting with widget. Want to make script for leveling up herblore. But somehow bot doesn't find the widget. It is not the first time I write something like this and everything went great. This time I made everything identical but it cant find the widget. Any help? :) 

RS2Widget herb = getWidgets().get(270,14, 29);
sleep(1000);
if(herb!= null){
    log("Widget found");
}
else{
    log("Widget not found");
}
if(herb != null) herb.interact();

 

EDIT: Found mistake. Didn't even though it could be it. In other similar scripts I used sleep(700) and for this one I used sleep(500), so it didn't read the widget that quickly. Since I already made this so for it not to be useless maybe any tips regarding sleeps? How much sleep would you have used in my case?

 

image.png.e1df9e13efe3a2ed6dadaf71ebaa8eca.png

Edited by Kramnik

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