iJodix Posted February 29, 2016 Share Posted February 29, 2016 Alright, so, if we do this; NPC twat = getNpcs().closest(getNpcs().filter(n -> n.getName().contains("Twat") && n.hasAction("Attack") && n.isInteracting(myPlayer()) && getMap().canReach(n) && n.getHealthPercent() > 0 && n.isAttackable())); And for custom interaction; if (!getMouse().isOnCursor(entity)) { MoveMouseEvent moveMouseEvent = new MoveMouseEvent(entity); execute(moveMouseEvent).hasFinished(); If 2 entities are in the same distance to my player it'll try to hover both and eventually click on one. So, is there any way of locking it to one target ? Quote Link to comment Share on other sites More sharing options...
Psvxe Posted February 29, 2016 Share Posted February 29, 2016 get the npc index. I believe they are different. 1 Quote Link to comment Share on other sites More sharing options...
itzDot Posted February 29, 2016 Share Posted February 29, 2016 hashCode Quote Link to comment Share on other sites More sharing options...
FrostBug Posted February 29, 2016 Share Posted February 29, 2016 NPC Index 1 Quote Link to comment Share on other sites More sharing options...