Guest User

Untitled

a guest
Jul 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. import java.awt.*;
  2. import java.util.*;
  3.  
  4. import org.rsbot.bot.Bot;
  5. import org.rsbot.script.*;
  6. import org.rsbot.script.wrappers.*;
  7. import org.rsbot.event.listeners.PaintListener;
  8. import org.rsbot.event.listeners.ServerMessageListener;
  9. import org.rsbot.event.events.ServerMessageEvent;
  10. import java.util.logging.*;
  11. import java.io.*;
  12.  
  13. @ScriptManifest(authors = { "IDominateAll", "XScripting Inc" }, category = "Money Making", name = "ClaySoftener", version = 1.0, description = "Start in Varrock east bank with buckets and clay visible in bank.")
  14. public class ClaySoftener extends Script implements PaintListener {
  15.  
  16. //---------------------------------------------------//
  17. public int bankID = 11402;
  18. //---------------------------------------------------//
  19. public int SoftClayID = 1761;
  20. //---------------------------------------------------//
  21. public int ClayID = 434;
  22. //---------------------------------------------------//
  23. public int EmptyBucketID = 1925;
  24. //---------------------------------------------------//
  25. public int bucketWaterID = 1929;
  26. //---------------------------------------------------//
  27. public long startTime = System.currentTimeMillis();
  28. //---------------------------------------------------//
  29.  
  30. public boolean onStart() {
  31. startTime = System.currentTimeMillis();
  32. }
  33.  
  34. public void onRepaint(Graphics g) {
  35. if (isLoggedIn()) {
  36. long millis = System.currentTimeMillis() - startTime;
  37. long hours = millis / (1000 * 60 * 60);
  38. millis -= hours * (1000 * 60 * 60);
  39. long minutes = millis / (1000 * 60);
  40. millis -= minutes * (1000 * 60);
  41. long seconds = millis / 1000;
  42. long minutes2 = minutes + (hours * 60);
  43. g.setColor(Color.red);
  44. g.drawString("Time running: " + hours + ":" + minutes + ":"
  45. + seconds + "." , 9, 315);
  46. g.drawString("Status : " + status , 9, 299);
  47. g.drawString(" " , 9, 327);
  48. }
  49. }
  50.  
  51.  
  52. public void Bank() {
  53. status = "Banking";
  54. getNearestObjectByID(bankID);
  55. atObject(bankID, "use-quickly");
  56. wait(random(700, 900));
  57. if (bank.isOpen()) {
  58. bank.depostAll;
  59. if (getInventoryCount(ClayID, bucketWaterID) == 0) {
  60. WithDraw();
  61. }
  62. wait(random(500, 700));
  63. }
  64. }
  65.  
  66. public void Withdraw() {
  67. status = "Withdrawing";
  68. if (getInventoryCount(ClayID, bucketWaterID) == 0) {
  69. if (bank.isOpen()) {
  70. getNearestObjectByID(bankID);
  71. atObject(bankID, "use-quickly");
  72. bank.withdraw(bucketWaterID, 14);
  73. && bank.withdraw(ClayID, 14);
  74. wait(1000);
  75. bank.close();
  76. }
  77. }
  78. }
  79.  
  80. public void Soften() {
  81. status = "Softening Clay";
  82. if(getInventoryCount(ClayID) == 14) {
  83. && if(getInventoryCount(bucketWaterID) == 14);
  84. atInventoryItem(bucketWaterID, "Use");
  85. atInventoryItem(ClayID, "Use");
  86. if(getMenuActions().contains("Make All")) {
  87. atMenu("Make All");
  88. wait(random(5000,6000));
  89. }
  90. }
  91. }
  92.  
  93. public int loop() {
  94. if(getInventoryCount(SoftClayID) == 14) {
  95. && if(getInventoryCount(EmptyBucketID) == 14);
  96. return Bank;
  97. }
  98. if (getInventoryCount(ClayID, bucketWaterID) == 0) {
  99. return Withdraw;
  100. }
  101. }
  102. if(getInventoryCount(ClayID) == 14) {
  103. && if(getInventoryCount(bucketWaterID) == 14);
  104. return Soften;
  105. }
  106. }
Add Comment
Please, Sign In to add comment