Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void mineRock(GameObject rock){
- if(rock != null){
- if(rock.isOnScreen()){
- rock.interact("Mine");
- sleep(2000);
- } else {
- if(Calculations.isTileOnMap(rock.getLocation())){
- rock.getLocation().randomize(1, 1).clickOnMap();
- sleep(2000);
- } else {
- Walking.stepTowards(rock.getLocation());
- sleep(2000);
- }
- }
- }
- }
- public void mine() {
- GameObject addyRocks = Objects.getNearest(AddyRockIDs);
- GameObject mithRocks = Objects.getNearest(MithRockIDs);
- GameObject goldRocks = Objects.getNearest(GoldRockIDs);
- GameObject silvRocks = Objects.getNearest(SilvRockIDs);
- GameObject coalRocks = Objects.getNearest(CoalRockIDs);
- GameObject ironRocks = Objects.getNearest(IronRockIDs);
- if(addyRocks != null && mineAddy && miningLevel >= 70){
- status = "Mining adamant";
- mineRock(addyRocks);
- } else {
- if(mithRocks != null && mineMith && miningLevel >= 55){
- status = "Mining mithril";
- mineRock(mithRocks);
- } else {
- if(goldRocks != null && mineGold && miningLevel >= 40){
- status = "Mining gold";
- mineRock(goldRocks);
- } else {
- if(silvRocks != null && mineSilv && miningLevel >= 20){
- status = "Mining silver";
- mineRock(silvRocks);
- } else {
- if(coalRocks != null && mineCoal && miningLevel >= 30){
- status = "Mining coal";
- mineRock(coalRocks);
- } else {
- if(ironRocks != null && mineIron && miningLevel >= 10){
- status = "Mining iron";
- mineRock(ironRocks);
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement