Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.22 KB | None | 0 0
  1.     public void mineRock(GameObject rock){
  2.         if(rock != null){
  3.             if(rock.isOnScreen()){
  4.                 rock.interact("Mine");
  5.                 sleep(2000);
  6.             } else {
  7.                
  8.                 if(Calculations.isTileOnMap(rock.getLocation())){
  9.                     rock.getLocation().randomize(1, 1).clickOnMap();
  10.                     sleep(2000);
  11.                 } else {
  12.                     Walking.stepTowards(rock.getLocation());
  13.                     sleep(2000);
  14.                 }
  15.                
  16.             }
  17.         }
  18.     }
  19.  
  20.     public void mine() {
  21.  
  22.         GameObject addyRocks = Objects.getNearest(AddyRockIDs);
  23.         GameObject mithRocks = Objects.getNearest(MithRockIDs);
  24.         GameObject goldRocks = Objects.getNearest(GoldRockIDs);
  25.         GameObject silvRocks = Objects.getNearest(SilvRockIDs);
  26.         GameObject coalRocks = Objects.getNearest(CoalRockIDs);
  27.         GameObject ironRocks = Objects.getNearest(IronRockIDs);
  28.        
  29.         if(addyRocks != null && mineAddy && miningLevel >= 70){
  30.             status = "Mining adamant";
  31.             mineRock(addyRocks);
  32.         } else {
  33.             if(mithRocks != null && mineMith && miningLevel >= 55){
  34.                 status = "Mining mithril";
  35.                 mineRock(mithRocks);
  36.             } else {
  37.                 if(goldRocks != null && mineGold && miningLevel >= 40){
  38.                     status = "Mining gold";
  39.                     mineRock(goldRocks);
  40.                 } else {
  41.                     if(silvRocks != null && mineSilv && miningLevel >= 20){
  42.                         status = "Mining silver";
  43.                         mineRock(silvRocks);
  44.                     } else {
  45.                         if(coalRocks != null && mineCoal && miningLevel >= 30){
  46.                             status = "Mining coal";
  47.                             mineRock(coalRocks);
  48.                         } else {
  49.                             if(ironRocks != null && mineIron && miningLevel >= 10){
  50.                                 status = "Mining iron";
  51.                                 mineRock(ironRocks);
  52.                             }
  53.                         }
  54.                     }
  55.                 }
  56.             }
  57.         }
  58.  
  59.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement