- Joined
- Nov 6, 2015
- Messages
- 583
- Thread Author
- #1
I've been browsing around the forums looking for an answer but nothing did really help, it's about this code:
I made a combat bot and it sometimes missclicks on a furnance, I want a way to let him find the interface, and if it's active it should close it, and return to combat.
Thanks in advance!
Code:
final InterfaceComponent smithInterface = Interfaces.newQuery().containers(1371).actions("Close").results().first();
if (smithInterface != null) {
System.out.println(smithInterface.getName());
System.out.println("Test: " + smithInterface);
smithInterface.click();
return State.closeSmithing;
}
I made a combat bot and it sometimes missclicks on a furnance, I want a way to let him find the interface, and if it's active it should close it, and return to combat.
Thanks in advance!