Jump to content

Enter Amount boolean snippet

Recommended Posts

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


Edited by josedpay
  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...