Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. import java.util.Map;
  2.  
  3. import org.rsbot.script.Script;
  4.  
  5. import org.rsbot.script.ScriptManifest;
  6.  
  7. import org.rsbot.script.wrappers.RSObject;
  8.  
  9. @ScriptManifest(authors = "Cheesie", name = "CSIMiner", version = 1.0, description = "Rimmington miner.")
  10.  
  11. public class CSIMiner extends Script {
  12.  
  13.  
  14. int[] ironRockID = { 9723, 9717, 9724, 2725 };
  15. int[] pickID = { 1265, 1267, 1271, 1273, 1275 };
  16.  
  17.  
  18. public boolean onStart() {
  19.  
  20. log("Welcome to Cheesie's powerminer.");
  21.  
  22. return true;
  23.  
  24.  
  25.  
  26. }
  27.  
  28.  
  29. private void mineOre() {
  30.  
  31. RSObject iron = objects.getNearest(ironRockID);
  32.  
  33. if (iron != null && getMyPlayer().getAnimation() == -1) {
  34.  
  35. boolean doAction = iron.doAction("Mine");
  36.  
  37.  
  38. }
  39.  
  40. }
  41.  
  42.  
  43. private void dropOre() {
  44.  
  45. inventory.dropAllExcept(pickID);
  46.  
  47.  
  48. }
  49.  
  50.  
  51. public void onFinish() {
  52.  
  53. log("Goodbye.");
  54.  
  55.  
  56. }
  57.  
  58. @Override
  59.  
  60. public int loop() {
  61.  
  62. if (inventory.isFull()) {
  63.  
  64. dropOre();
  65.  
  66. } else if (!inventory.isFull()) {
  67.  
  68. mineOre();
  69.  
  70.  
  71. }
  72.  
  73. return 1000;
  74.  
  75.  
  76. }
  77.  
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement