Guest User

Untitled

a guest
Oct 30th, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.rsbot.script.Script;
  2.  
  3. import org.rsbot.script.ScriptManifest;
  4.  
  5. import org.rsbot.script.wrappers.RSObject;
  6.  
  7. @ScriptManifest(authors = "thisoneguyhere", name = "This1Pminer", version = 1.0, description = "Power mining at its greatest. Start at mine near ores.")
  8.  
  9. public class This1Pminer extends Script {
  10.    
  11.      int[] ironRockID = { 11956, 9718, 5763, 5764, 5775, 5773, 11596, 11954, 11955, 11956 };
  12.    
  13.      int[] pickID = { 1265, 1267, 1269, 1271, 1273, 1275, };
  14.      
  15.      public boolean onStart() {
  16.          log("Have a nap");
  17.          
  18.          return true;
  19.          
  20.      }
  21.      
  22.      private void mineOre() {
  23.          RSObject iron = objects.getNearest(ironRockID);
  24.          
  25.          if (iron != null && getMyPlayer().getAnimation() == -1) {
  26.            
  27.              iron.doAction("Mine");
  28.          }
  29.      }
  30.      
  31.      private void dropOre() {
  32.          inventory.dropAllExcept(pickID);
  33.          
  34.      }
  35.      
  36.      public void onFinish() {
  37.          
  38.          log("Tell me how it works. Paint coming.");
  39.      }
  40.      
  41.      public int loop() {
  42.        
  43.          if (inventory.isFull()) {
  44.            
  45.              dropOre();
  46.        
  47.          } else if (!inventory.isFull()) {
  48.        
  49.              mineOre();
  50.              
  51.          }
  52.          
  53.          return (random(650, 950));
  54.          
  55.      }
  56. }
Add Comment
Please, Sign In to add comment