February 26, 20178 yr Hello all, hope your day is going great. I am wondering if it is possible to get the coordinates inside of a position. For example, you have Position pos = new Position (x,y,z); Now I do pos.hover(bot); This will hover randomly within the position. I was wondering if there is a way to hover a specific point or range within the position. Thanks for your help
February 26, 20178 yr Something around this I would say. You can either use the Poly or the Rectangle, I would suggest the Poly but your call. Position pos = new Position (1,2,3); if(pos.isVisible(bot)){ Polygon p = pos.getPolygon(bot); Rectangle bounds = p.getBoundingBox(); } Edited February 26, 20178 yr by k9thebeast
February 26, 20178 yr adding on to what k9thebeast suggested black is Rectangle, white is Polygon (more accurate) if you choose to use the Rectangle, clicking inside it will not always take you to the original position (could be adjacent positions). https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#npoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#xpoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#ypoints if you want to mess around with the points Edited February 26, 20178 yr by Stimpack
February 26, 20178 yr Author 6 hours ago, k9thebeast said: Something around this I would say. You can either use the Poly or the Rectangle, I would suggest the Poly but your call. Position pos = new Position (1,2,3); if(pos.isVisible(bot)){ Polygon p = pos.getPolygon(bot); Rectangle bounds = p.getBoundingBox(); } 5 hours ago, Stimpack said: adding on to what k9thebeast suggested black is Rectangle, white is Polygon (more accurate) if you choose to use the Rectangle, clicking inside it will not always take you to the original position (could be adjacent positions). https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#npoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#xpoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#ypoints if you want to mess around with the points Thank you both!
Create an account or sign in to comment