iJodix Posted February 29, 2016 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 ?
Psvxe Posted February 29, 2016 Posted February 29, 2016 get the npc index. I believe they are different. 1