Guest User

Untitled

a guest
Jun 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. import java.awt.Color;
  2. import java.awt.Point;
  3. import java.util.LinkedList;
  4. import java.util.List;
  5. import java.awt.Rectangle;
  6. import org.runedream.api.Script;
  7. import org.runedream.api.ScriptManifest;
  8. import org.runedream.api.methods.Bank;
  9. import org.runedream.api.methods.Camera;
  10. import org.runedream.api.methods.Game;
  11. import org.runedream.api.methods.Mouse;
  12. import org.runedream.api.util.Log;
  13. import org.runedream.api.util.Random;
  14. import org.runedream.api.methods.ImageUtil;
  15.  
  16. @ScriptManifest(authors = {"Scott"}, name = "Stanner", version = 0.1, description = "Tans Stuff.", keywords = {"Tanning"})
  17. public class Stan extends Script {
  18.  
  19.  
  20. private List<Point> tannerPoints = new LinkedList<Point>();
  21. private static final Color tanner = new Color(234, 225, 235);
  22. private static final Rectangle VIEWPORT = new Rectangle(4, 4, 690, 334);
  23.  
  24. private void bank() {
  25. Game.clickCompass();
  26. Camera.pitchUp(1200);
  27. Mouse.move(221, 159);
  28. Mouse.click();
  29. Script.sleep(1420, 1750);
  30. Mouse.moveSlightly();
  31. Bank.depositAll();
  32. Mouse.moveSlightly();
  33. Mouse.move(55, 108);
  34. Mouse.click(55, 108, false);
  35. Mouse.move(83, 215);
  36. Mouse.click();
  37. Mouse.moveSlightly();
  38. Mouse.move(490, 35);
  39. Mouse.click();
  40. toTanner();
  41.  
  42. }
  43.  
  44. private void toTanner() {
  45. Mouse.setSpeed(Random.random(8, 12));
  46. Log.log("Heading to the Tanner");
  47. Mouse.moveSlightly();
  48. Mouse.move(662, 29);
  49. Script.sleep(250, 600);
  50. Mouse.click();
  51. Mouse.moveSlightly();
  52. Script.sleep(7420, 7650);
  53. Mouse.move(616, 48);
  54. Mouse.click();
  55. Script.sleep(8000, 8500);
  56.  
  57. tanning();
  58. }
  59.  
  60.  
  61.  
  62.  
  63.  
  64. private void tanning() {
  65. Mouse.setSpeed(Random.random(8, 12));
  66. Mouse.moveSlightly();
  67. tannerPoints = ImageUtil.getPointsWithColor(Game.getImage(), tanner, 0.01);
  68.  
  69. if (tannerPoints.size() > 0) {
  70. Point tanner = tannerPoints.get(Random.random(0, tannerPoints.size()));
  71. Log.log("Getting tanner points");
  72.  
  73. if (VIEWPORT.contains(tanner)) {
  74. Mouse.move(tanner);
  75. Mouse.click(false);
  76. Log.log("Clicking tanner");
  77. Mouse.click(Mouse.getLocation().x, Mouse.getLocation().y + 40 , 2 , 3 );
  78. Script.sleep(1400, 1600);
  79. Mouse.move(92, 226);
  80. Mouse.click(Mouse.getLocation().x, Mouse.getLocation().y + 1 , 2 , 4, false);
  81. Mouse.click(Mouse.getLocation().x, Mouse.getLocation().y + 88 , 1 , 2);
  82. Script.sleep(900, 1100);
  83. toBank();
  84. }
  85. }
  86. }
  87.  
  88. private void toBank() {
  89. Mouse.setSpeed(Random.random(8, 12));
  90. Mouse.move(625, 155);
  91. Mouse.click();
  92. Script.sleep(7000, 7150);
  93. Mouse.click(600, 121);
  94. Script.sleep(6200, 7000);
  95. }
  96.  
  97.  
  98.  
  99.  
  100. @Override
  101. public int loop() {
  102. Mouse.setSpeed(Random.random(8, 12));
  103. bank();
  104. return 0;
  105. }
  106.  
  107. }
Add Comment
Please, Sign In to add comment