Ayylmao420 Posted July 2, 2016 Posted July 2, 2016 (edited) This particular one is for npc interaction, you need to modify it for objects, position, item, sprites, any criticism welcome. if (getMenuAPI().isOpen()) { Stream<Option> ourOptionStreamFilter = getMenuAPI().getMenu().stream().filter(o -> stripFormatting(o.name).equals(npc.getName()) && stripFormatting(o.action).equals(option) && o.var1 == npc.getIndex()); Option ourOption = ourOptionStreamFilter.findFirst().orElse(null); if (ourOption == null) { getMouse().moveRandomly(); } else { if (getMenuAPI().getOptionRectangle(getMenuAPI().getMenu().indexOf(ourOption)).contains(getMouse().getPosition())) { if (getMouse().click(false)) { if (getMouse().getCrossHairColor().equals(CrossHairColor.RED)) { setFinished(); } } } else { if (getMouse().move(new RectangleDestination(getBot(), getMenuAPI().getOptionRectangle(getMenuAPI().getMenu().indexOf(ourOption))))) { } } } } else { if (getMouse().isOnCursor(npc)) { if (getMouse().getOnCursorCount() > 1) { if (getMouse().click(true)) { } } else { if (getMenuAPI().getTooltip().equals(option + " " +npc.getName())) { if (getMouse().click(false)) { if (getMouse().getCrossHairColor().equals(CrossHairColor.RED)) { setFinished(); } } } } } else { if (npc.isVisible()) { if (getMouse().move(new EntityDestination(getBot(), npc))) { } } else { getCamera().toEntity(npc); } } } Edited July 2, 2016 by Ayylmao420 3