Jump to content

Xyssto

Members
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Xyssto

  1. Personally, I don't like the current client theme and since substance has a wide variety of themes to choose from, I think it would be a good idea to let the user choose a theme which looks the best for him.

  2. RS2Interface parentInterface = client.getInterface(interface_id);		if (parentInterface.isValid()) {	parentInterface.getChild(close_button_component_id).interact();}

    Don't forget to handle the exception, that the interact() method throws.

  3. Here's how you do it:

    	/**	 * Gets the specified item bounds.	 * @param itemId the item id.	 * @return the item bounds.	 */	private Rectangle getShopItemBounds(int itemId) {		int slot = -1;				for (int i = 0; i < client.getInterface(300).getChild(75).getInv().length; i++) {			if (client.getInterface(300).getChild(75).getInv()[i] - 2 == itemId) {				slot = i + 1;				break;			}		}				if (slot == -1) {			return null;		}				int row = (int) Math.ceil((slot / 8.0) - 1);		int column = slot > 8 ? slot - (row * 8) : slot;		column--;				int x = 80 + (column * 16) + (column * 31);		int y = 69 + (row * 16) + (row * 31);		return new Rectangle(x, y, 31, 31);	}		/**	 * Buys an item from the shop.	 * @param Item the item.	 * @throws InterruptedException if another thread has interrupted the current thread.	 */	private void buyShopItem(Item item) throws InterruptedException {		Rectangle itemBounds = getShopItemBounds(item.getId());		RectangleDestination destination = new RectangleDestination(itemBounds);				selectOption(null, destination, "Buy " + item.getAmount(), false);	}
  4. While making a script, I have noticed that a couple of methods in the skills API return wrong values.

     

    The methods that return wrong values are:

    • getExperience(Skill skill)
    • getCurrentLevel(Skill skill)

     

    Also, the getLevelExperience array also returns an incorrect experience value for the specified level.

    • Like 1
  5. This might be easier for you to work with:

    	/**	 * Clicks the specified interface child component.	 * @param interfaceId the interface id.	 * @param childId the child component id.	 * @throws InterruptedException if another thread has interrupted the current thread.	 */	private void clickInterfaceComponent(int interfaceId, int childId) throws InterruptedException {		Rectangle childRectangle = client.getInterface(interfaceId).getChild(childId).getRectangle();		RectangleDestination destination = new RectangleDestination(childRectangle);				client.moveMouseTo(destination, false, true, false);	}
×
×
  • Create New...