Guest User

Untitled

a guest
Apr 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. package scripts;
  2.  
  3. import java.awt.Color;
  4. import java.awt.Graphics;
  5. import java.awt.Point;
  6. import java.util.Random;
  7.  
  8. import bot.RuneScapeLoader;
  9. import color.Methods;
  10.  
  11. public class PowerMiner extends Script {
  12. Methods color = null;
  13.  
  14. public PowerMiner(RuneScapeLoader bot) {
  15. super(bot);
  16. color = new Methods(bot);
  17. }
  18.  
  19. public boolean onStart() {
  20. return true;
  21. }
  22.  
  23. public int loop() {
  24. try {
  25. Color invrock = new Color(98, 78, 55);
  26. Color rockcolor = new Color(238, 137, 73);
  27. if (color.inventoryIsFull(invrock)) {
  28. while (color.invGetSize(invrock) != 0) {
  29. color.dropItem(invrock);
  30. }
  31. }
  32. Point[] points = color.getPointsFromColor(rockcolor);
  33. if (!(points.length > 0)) {
  34. System.out.println("return");
  35. return 20;
  36. }
  37. int q = new Random().nextInt(points.length);
  38. color.clickMouse(points[q].x, points[q].y, true);
  39. int invcount = color.invGetSize(invrock);
  40. while(invcount == color.invGetSize(invrock)) {
  41. Thread.sleep(200);
  42. }
  43. } catch (Exception e) {
  44. e.printStackTrace();
  45. }
  46. return 100;
  47. }
  48.  
  49. public void onRepaint(Graphics g) {
  50.  
  51. }
  52.  
  53. public void onFinish() {
  54.  
  55. }
  56. }
Add Comment
Please, Sign In to add comment