For those wondering how to find out if the enter amount is up for people to handle it correctly and not miss up. Here the snippet.
Best fail safe so a character doesnt type an amount in the chatbox.
/**
* the interface is usually never null, but changes location when visible or not
*
* @return true if the 'enter amount' interface is visible
*/
public boolean canEnterAmount() {
RS2Widget warning = getWidgets().get(548, 119);
return warning != null && !warning.getPosition().equals(new Point(-1,-1));
}
have fun and happy scripting