Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to close a widget ? [Need Help]

Featured Replies

Dear scripters,

I've been working on my first quest and it's finally done ! 

But now it has to close the 'quest complete' widget.

RuoUkna.png

Anyone has an idea how this works ?

 

Thanks,

Edited by Takes A Nap

firstly, determine the current widget you want to interact with. This being your Close button.

 

do this like this --> 

RS2Widget closebutton = getWidgets().get(firstchild, secondchild);

to get your firstchild and secondchild, use the widgetdebugger in the client and hover over the close button

 

then, once you've determined your widget, check if your widget is there/is visible.

do this like this -->

if (closebutton != null && closebutton.isVisible()){

}

now, you need to tell it to interact with that widget and its current available actions

 

This would be like this i guess, i'm not if its exactly "Close" so please check it yourself -->

closebutton.interact("Close");

Your final piece of code would be -->

RS2Widget closebutton = getWidgets().get(firstchild, secondchild);

if (closebutton != null && closebutton.isVisible()){
    closebutton.interact("Close");
}






Edited by Eagle Scripts

  • Author

 

firstly, determine the current widget you want to interact with. This being your Close button.

 

do this like this --> 

RS2Widget closebutton = getWidgets().get(firstchild, secondchild);

to get your firstchild and secondchild, use the widgetdebugger in the client and hover over the close button

 

then, once you've determined your widget, check if your widget is there/is visible.

do this like this -->

if (closebutton != null && closebutton.isVisible()){

}

now, you need to tell it to interact with that widget and its current available actions

 

This would be like this i guess, i'm not if its exactly "Close" so please check it yourself -->

closebutton.interact("Close");

Your final piece of code would be -->

RS2Widget closebutton = getWidgets().get(firstchild, secondchild);

if (closebutton != null && closebutton.isVisible()){
    closebutton.interact("Close");
}






Thanks alot bro ! 

I'm not quite sure if a Quest script is the kind of script you should be working on. Assuming from the 5 threads you have asking for scripting help, I would suggest you to get used to the API first, and Java if your knowledge isn't enough to cover most simple issues you could walk into. (which would happen anyway)

Now to your issue since I'm working on a quest script to:

There is no good reason why you would actually close a interface like that. Most players simply click somewhere on the minimap to follow their path to a bank or whatever. It's not human-like at all. Rather just do whatever is next for the script to do or just logout after some random short time. (not instantly because that's not really human-like either.)

Good luck.

getWidgets().closeOpenInterface();


I'm not quite sure if a Quest script is the kind of script you should be working on. Assuming from the 5 threads you have asking for scripting help, I would suggest you to get used to the API first, and Java if your knowledge isn't enough to cover most simple issues you could walk into. (which would happen anyway)

Now to your issue since I'm working on a quest script to:
There is no good reason why you would actually close a interface like that. Most players simply click somewhere on the minimap to follow their path to a bank or whatever. It's not human-like at all. Rather just do whatever is next for the script to do or just logout after some random short time. (not instantly because that's not really human-like either.)

Good luck.

 

imo any script is a good place to start. questing scripts are fine to start with if the person understands how to use configs.

 

as for your theory on the bot actions, below are what some bot devs think jagex looks at, not what you're talking about. jagex could probably care less if you click the x to close or not. they're more worried about where you're clicking, how fast you're clicking/reacting, etc. see examples below

 

botlike:

675593585222768e2fd310d0da535641.png

 

humanlike:

526c51cd98bbce33ada8c47e0d3be858.png
 

Edited by Shiny

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.