my first snippet
i was messing around trying to write a method to interact with an interface, i came up with this. It seems to work good
updated, Thanks Swizzbeat & Pseudo for the updated methods !
public boolean interactWithInterface(int parent, int child, String action) throws InterruptedException {
RS2InterfaceChild ic = this.client.getInterface(parent).getChild(child);
return ic != null && ic.isVisible() && ic.interact(action);
}
the way you use it:
interactWithInterface(parentId, ChildId, Action);
example of use:
interactWithInterface(304, 3, "Make X");
this would click the make x option on the fletching interface.
Hope it comes in handy