Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved RS3 Visibility

Joined
Nov 17, 2013
Messages
63
So when I do in rs3 spectre:

JavaScript:
final static public int INTERFACE_FIRST_TRADE = 335;
final static public int INTERFACE_SECOND_TRADE = 334;
InterfaceComponentQueryResults trade1 = Interfaces.newQuery().containers(INTERFACE_FIRST_TRADE).actions("Accept").visible().results();
InterfaceComponentQueryResults trade2 = Interfaces.newQuery().containers(INTERFACE_SECOND_TRADE).actions("Accept").visible().results();
System.out.println("IS TRADING: first screen length: "+trade1.size()+" second screen length: "+trade2.size());

Its prints out 0 for both when no screen is up and as soon as the first screen goes up it prints 1. However, when you exit out of any trade screen it it keeps printing 1 even though none of them are visible.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Okay so do me a favor and take that component that's returning after it shouldn't be visible and call getLayer() on it until it returns null. Print out the toString method of the last non-null value.
 
Joined
Feb 26, 2015
Messages
822
This also happened to me, the bot is detecting that the Divination conversion UI is visible. It happened about a hour into botting. I already closed RS, so I can't recreate it at the moment.

VY2VxRZ.png
 
Joined
Nov 17, 2013
Messages
63
@Cloud

Code:
 InterfaceComponentQueryResults trade1 = Interfaces.newQuery().containers(INTERFACE_FIRST_TRADE).actions("Accept").visible().results();
        InterfaceComponentQueryResults trade2 = Interfaces.newQuery().containers(INTERFACE_SECOND_TRADE).actions("Accept").visible().results();
        System.out.println("IS TRADING: first trade screen: "+(trade1.first() == null ? "null" : trade1.first().getLayer().toString())+" second trade screen: "+(trade2.first() == null ? "null" : trade2.first().getLayer().toString()));

print out when they have never been up:
Z519YWA.png

print out when they are up:
A5BJzel.png

YBIdMsR.png


print out when none of them are up:
y1tfpGZ.png
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
hmm some speculation and facts. There are 100 possible root slots that can be used to build off of to calculate an interfaces position. When getLayer() returns null, that's when we know it's time to check the root slot. We determine which one to use based on an index that the component will have. If this is -1, then we know that it's simply not visible. But if the index is resolves to is within the valid range, but the root slot contains either a null value or an invalid rectangle, it could result in getBounds() returning null while isVisible() would return true since isVisible() only checked the index's value.
 
Joined
Nov 17, 2013
Messages
63
hmm some speculation and facts. There are 100 possible root slots that can be used to build off of to calculate an interfaces position. When getLayer() returns null, that's when we know it's time to check the root slot. We determine which one to use based on an index that the component will have. If this is -1, then we know that it's simply not visible. But if the index is resolves to is within the valid range, but the root slot contains either a null value or an invalid rectangle, it could result in getBounds() returning null while isVisible() would return true since isVisible() only checked the index's value.

So are you saying I should use getBounds null checked instead of isVisible?
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Cant get past v2.0.4 for some reason. Wont download the new one, even tried doing it off site.

sV6k76Y.png
The last number typically isn't displayed, if you're running runemate through our exe file then it'll ensure you're on the latest. The last number is used for "silent" updates.
 
Joined
Nov 17, 2013
Messages
63
The last number typically isn't displayed, if you're running runemate through our exe file then it'll ensure you're on the latest. The last number is used for "silent" updates.

Nope, looks like isVisible still returns true even if its not visible.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Nope, looks like isVisible still returns true even if its not visible.
Alright so I'm investigating a few theories at the moment. I'd like you to find a situation where isVisible is returning true when getBounds() is returning null. Then, starting with that component, print the component.toString(), component.getWidth(), component.getHeight(), component.getBounds(), and component.getLayer(). Then, if getLayer() != null, repeat the process of printing those values out.
 
@countvidal Fixed it ;)
 
Top