Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private BotMouseListener listener = new BotMouseListener() {
- @Override
- public void mouseReleased(MouseEvent e) {}
- @Override
- public void mousePressed(MouseEvent e) {}
- @Override
- public void mouseExited(MouseEvent e) {}
- @Override
- public void mouseEntered(MouseEvent e) {}
- @Override
- public void mouseClicked(MouseEvent e) {
- if (e.getPoint().equals(getMouse().getPosition()))
- return; // The bot generated this click, ignore it
- if (getClient().isHumanInputEnabled())
- return; // Ignore incase they have human input enabled
- // Queue human interaction or w/e
- }
- }
- // Then add this line to script startup
- getBot().getCanvas().addMouseListener(listener);
- // Then add this line to script stop
- getBot().getCanvas().removeMouseListener(listener);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement