Guest User

Untitled

a guest
Oct 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import net.xotiksys.api.ActiveScript;
  2. import net.xotiksys.api.Manifest;
  3. import net.xotiksys.api.methods.input.Mouse;
  4. import java.awt.Color;
  5. import java.awt.Point;
  6.  
  7. @Manifest(author = "Magic", description = "Auto buys an item specified", name = "Auto Buyer", version = 0.1)
  8. public class AutoBuyer extends ActiveScript {
  9.  
  10. private static final Point ITEM = new Point(238, 225);
  11. /** Coordinates of the item you wish to buy */
  12. private static final Color MOUSE_COLOR = new Color(165, 55, 0, 100);
  13.  
  14.  
  15. @Override
  16. public int script() {
  17. Mouse.setSpeed(1);
  18. Mouse.hop(ITEM);
  19. Mouse.click(ITEM, false);
  20. ITEM.translate(0, 71);
  21. Mouse.hop(ITEM);
  22. Mouse.click(ITEM, true);
  23. ITEM.translate(0, -71);
  24. return 0;
  25. }
  26. }
Add Comment
Please, Sign In to add comment