September 17, 20169 yr 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.
September 17, 20169 yr 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 September 17, 20169 yr by venetox
September 17, 20169 yr have you tried getMap().isInHouse() http://osbot.org/api/org/osbot/rs07/api/Map.html#isInHouse--
September 17, 20169 yr 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. have you tried getMap().isInHouse() http://osbot.org/api/org/osbot/rs07/api/Map.html#isInHouse-- Returns true when you are in the house (according to the map), but things cannot be interacted with yet.
September 17, 20169 yr not sure what you're asking for specifically. but have you checked config changes?
September 17, 20169 yr 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; }
September 18, 20169 yr 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