Zee Best Posted August 19, 2015 Posted August 19, 2015 Basically, the API has become so noob-friendly that methods such as entity#interact will attempt to rotate the camera/walk to the entity. I've tried using hover() followed by menu.selectAction however that seems to fail unless the menu is actually open. Anyone else got any ideas?
Extreme Scripts Posted August 19, 2015 Posted August 19, 2015 InteractionEvent, have a look into that.
Czar Posted August 19, 2015 Posted August 19, 2015 (edited) EntityDestination targetDest = new EntityDestination(getBot(), RS2OBJECTHERE); if (getMouse().click(targetDest)) { // opens menu, then use menu api } is the emergency back-up Edited August 19, 2015 by Czar
Zee Best Posted August 19, 2015 Author Posted August 19, 2015 (edited) InteractionEvent, have a look into that. Yeah, I've seen the events but are they executed on a different thread? EntityDestination targetDest = new EntityDestination(getBot(), RS2OBJECTHERE); if (getMouse().click(targetDest)) { // opens menu, then use menu api } is the emergency back-up Yeah, although that's a very hacky way. EDIT: I created a simple method that firsts hovers the entity, then checks the menu's tooltip to see if it's left click. If not it will right click and open the menu then try and select the action. Edited August 19, 2015 by Zee Best
FrostBug Posted August 20, 2015 Posted August 20, 2015 (edited) Yeah, I've seen the events but are they executed on a different thread? By default no; but if you call Event#setAsync on it before executing it, it will be executed on a different thread in a non-blocking way Edited August 20, 2015 by FrostBug