- Joined
- Jul 13, 2014
- Messages
- 8
- Thread Author
- #1
Making the mouse hop, e.g. 40 px down, is useful in cases such as replicating mouse key support - a feature endorsed by both RS3 and OSRS developers.
I know mouse hopping used to be in the API, but now it seems unnecessarily difficult to implement. The following code shows the only way that I found that it was possible to achieve a mouse hop 40 px down:
This then requires wizardry to efficiently incorporate into a bot, by constantly changing the cached mouse path generator.
The end product is pretty much the same as what the older API offered, but it was more messy to get there. This is an example of what I managed to cook up in a few minutes (not finalised):
(Note: the bottom row of items cannot be dropped by mouse keys.)
What I ask for is, either a suggestion to make my mouse hopping code more efficient, or an addition to the API such as Mouse#hop(Point).
Peace, Liquid.
I know mouse hopping used to be in the API, but now it seems unnecessarily difficult to implement. The following code shows the only way that I found that it was possible to achieve a mouse hop 40 px down:
Code:
Mouse.setPathGenerator(new Mouse.PathGenerator() {
@Override
public boolean move(Interactable interactable, Filter<Point> filter, double v) {
return hop(new Point(Mouse.getPosition().x, Mouse.getPosition().y + 40));
}
});
This then requires wizardry to efficiently incorporate into a bot, by constantly changing the cached mouse path generator.
The end product is pretty much the same as what the older API offered, but it was more messy to get there. This is an example of what I managed to cook up in a few minutes (not finalised):

(Note: the bottom row of items cannot be dropped by mouse keys.)
What I ask for is, either a suggestion to make my mouse hopping code more efficient, or an addition to the API such as Mouse#hop(Point).
Peace, Liquid.