December 12, 20178 yr The client is able to highlight the bounds of interaction for items in the inventory. What class/methods would I use to obtain these bounds?
December 12, 20178 yr Yeah, not sure! I didn't look too far into the API, I may have missed something... but from what I can see, the only way to do this is via the MouseDestination associated with the slot. You can get the rectangle like this: Rectangle rectangle = getInventory().getMouseDestination(getInventory().getSlot(item)).getBoundingBox(); Gl! Apa
December 12, 20178 yr Author Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this. Edited December 12, 20178 yr by PayPalMeRSGP
December 13, 20178 yr 15 hours ago, PayPalMeRSGP said: Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this. Are you clicking on the same pixel every time, or within a set bounds?
December 13, 20178 yr 18 hours ago, PayPalMeRSGP said: Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this. Hmm? What exactly are you trying to achieve by the way? Hopefully I/we can help! Apa
December 14, 20178 yr Author A random mouse move within the bounds of the the high alch icon. My solution was to hardcode the 2 points on opposite corners of the icon (bounds) as at the time I did not know the method to obtain them. private static final Point LOWER_BOTTOM_LEFT_BOUND = new Point(709,336); private static final Point UPPER_TOP_RIGHT_BOUND = new Point(720,321); private boolean randomMouseMove(){ this.randomMouseMoveCountdown--; if(this.randomMouseMoveCountdown <= 0){ this.randomMouseMoveCountdown = ThreadLocalRandom.current().nextInt(750, 1001); int randX = ThreadLocalRandom.current().nextInt(LOWER_BOTTOM_LEFT_BOUND.x, UPPER_TOP_RIGHT_BOUND.x); int randY = ThreadLocalRandom.current().nextInt(LOWER_BOTTOM_LEFT_BOUND.y, UPPER_TOP_RIGHT_BOUND.y); getMouse().move(randX, randY); return true; } return false; } 18 hours ago, Team Cape said: Are you clicking on the same pixel every time, or within a set bounds? Within a set bounds. Edited December 14, 20178 yr by PayPalMeRSGP
Create an account or sign in to comment