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.

Detecting when the house loading screen has closed

Featured Replies

The behaviour of the house loading screen appears to be different than regular loading screens. Even though you cannot see or interact with anything, everything has already been loaded into the game so checks like myPlayer.exists, UI widget checks (I tried inventory), and in-game object checks all return true, even though the game cannot be interfaced with.

 

Anyone got a solution? 

 

Current workaround are the normal checks, then when all the background objects have loaded I wait until run can be toggled on and off.

 

feels.png

make a long enough sleep so that its not a problem :doge:

I don't have a member account ATM so can't try test anything, I assume you have, but if you haven't you should find what widget is the text saying "House loading" or whatever and just do .isVisible() on it? That should work providing osbot still shows widget id's when your loading houses (I don't see why it wouldn't).
 

I'd also use a conditonal sleep just because they are a nice failsafe if something odd happens.

Example code would I guess be

 

LSWR being LoadingScreenWidgetRoot

LSWC being LoadingScreenWidgetChild

LSWCC beign LoadingScreenWidgetChildChild (if applicable)
 

new ConditionalSleep(5000)
{
	@--Override // Remove --, forum was tagging a user lol
	public boolean condition() throws InterruptedException 
	{
			if(getWidgets().get(LSWR, LSWC, LSWCC).isVisible())
				return true;
			return false;
	}
					
}.sleep();

This is my best guess since you said that you have checked inventory and objects existing etc, and that it behaves different to other loading screens. But I can't think of a reason why OSBot would determine any widget in the loading screen is visible if it wasnt or vice versa. Let me know if it works!

Edited by venetox

  • Author

...

Without checking to see if the widget has been initialized, you are gonna get a shit load of NPEs. In any case, the house loading screen has no widgets.

 

 

Returns true when you are in the house (according to the map), but things cannot be interacted with yet.

ask eagle he has con script :frog2:

If you are still looking for a solution, this seems to work:

private boolean isInHouse() {
    return getMap().isInHouse() && widgets.getWidgetContainingText("There's no place like home...") == null;
}

Without checking to see if the widget has been initialized, you are gonna get a shit load of NPEs. In any case, the house loading screen has no widgets.

 

 

Returns true when you are in the house (according to the map), but things cannot be interacted with yet.

 

Oh yeah, silly me, wrote that up whilst I wasn't home. Odd that it has no widgets. Hmmmm, perhaps you may have to resort to something like reading pixels or something which at least is better than having a long sleep or constantly checking if run can be toggled etc. Surely there has to be a nice way of doing it though.

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.