or he could do:
RS2Interface Parent;
int[] ParentIDs = 1,2,3,4;
RS2InterfaceChild;
int[] ChildIDs = 5,6,7,8;
public boolean parentIsValid(){
for(int i = 0; i < parent.length(); i++){
if(client.getInterface(ParentIDs[i]).isVisible && client.getInterface(ParentIDs[i]). isValid){
return true;
}
}
return false;
}
Loop(){
if(parentIsValid){
handleChildren();
}else{
//talk to that bitch;
}
}
public void handleChildren(){
//similar to handle children
}