Hello, I haven't been scripting for OSBot in a while and recently started out experimenting with the mirror client.
I have a question though, when I interact anything that asks for user input (Make X, Deposit X, Withdraw X) The interface for input stays visible for some reason. This happens only after the first time which makes me assume that it's cashed even though I am using widgets and therefore shouldn't be cashed anymore.
Here's my code, please tell me what I am missing:
public boolean waitingForInput(){
RS2Widget[] ws = widgets.getWidgets(548);
RS2Widget widget = null;
if(ws != null && ws.length > 0){
for(RS2Widget w : ws){
if(w != null && w.getMessage() != null && (w.getMessage().equals("Enter amount:"))){
widget = w;
break;
}
}
}
if(widget != null && widget.isVisible() ){
System.out.println("Found valid input widget: " + widget.getSecondLevelId());
return true;
}
return false;
}