Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • DBMiner [Varrock West Iron Miner]


    RangaLord243
     Share

    Recommended Posts

    b6SoHNn.png

     

    ~8 Hours Worth uSLKZFr.png

    This Is My 2nd Script!

    It's An Efficient Iron Ore Miner Which Banks At Varrock West.

     

    YG3gx7z.png

    1. Start Script Near Varrock West Bank

    2. $ Profit $

     I Would Highly Recommend Enabling Breaks 

     

    tyZ8G3y.png

    ● Ultra Sexy Paint/Crosshair Mouse

    ● Ore/GP Per Hour

    ● Human-Like Mouse/Camera Movement

    ● Random Conditional Sleeps Implemented

    ● Automatically Banks

     

    i9acBds.png

    ► 1.0 - Initial Release - 19/01/2019

     

    hBBPmKY.png

    https://mega.nz/#!jnxHHKwZ!_xeLAlQHgZnk74oxBP-aNNAjH9wfVyKgXs28P42Hjvw

    DfucM07.png

    BBLPrtF.png

     

    Source Code: 

    Quote
    package DBMiner;
    
    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.methods.skills.Skill;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.wrappers.interactive.GameObject;
    import org.dreambot.api.wrappers.interactive.NPC;
    import org.dreambot.api.wrappers.widgets.message.Message;
    
    import java.awt.*;
    
    @ScriptManifest(category = Category.MINING, name = "DBMiner", author = "RangaLord243", version = 1.0)
    public class DBMiner extends AbstractScript {
    
        private long startTime;
    
        private int oreMined;
    
        Area bankArea = new Area(3185, 3444, 3180, 3443, 0);
        Area treeArea = new Area(3176, 3368, 3174, 3366, 0);
    
        @Override
        public void onStart() {
            startTime = System.currentTimeMillis();
            log("Report Any Bugs On The Forum Thread.");
            getSkillTracker().start();
        }
    
        public final String formatTime(final long ms) {
            long s = ms / 1000, m = s / 60, h = m / 60;
            s %= 60;
            m %= 60;
            h %= 24;
            return String.format("%02d:%02d:%02d", h, m, s);
        }
    
        @Override
        public void onMessage(Message message) {
            if (message.getMessage().contains("You manage to mine some iron")) {
                oreMined++;
            }
        }
    
        @Override
        public int onLoop() {
            if (!getInventory().isFull()) {
                if (treeArea.contains(getLocalPlayer())) {
                    chopTree();
                } else {
                    if (getWalking().walk(treeArea.getRandomTile())) {
                        sleep(Calculations.random(3000, 5500));
                    }
                }
            }
    
            if (getInventory().isFull()) {
                if (bankArea.contains(getLocalPlayer())) {
                    bank();
                } else {
                    if (getWalking().walk(bankArea.getRandomTile())) {
                        sleep(Calculations.random(3000, 6000));
                    }
                }
            }
            return 600;
        }
    
        @Override
        public void onExit() {
            log("Thankyou For Using DBMiner");
        }
    
        @Override
        public void onPaint(Graphics2D g) {
            long runTime = System.currentTimeMillis() - startTime;
            g.setColor(Color.WHITE);
            g.drawString("Total Time: " + formatTime(runTime), 10, 30);
            g.drawString("Current level: " + getSkills().getRealLevel(Skill.MINING), 10, 45);
            g.drawString("Exp Gained: " + getSkillTracker().getGainedExperience(Skill.MINING), 10, 60);
            g.drawString("Exp Gained Per Hour: " + getSkillTracker().getGainedExperiencePerHour(Skill.MINING), 10, 75);
            g.drawString("Levels Gained: " + getSkillTracker().getGainedLevels(Skill.MINING), 10, 90);
            g.drawString("XP To Level: " + getSkills().getExperienceToLevel(Skill.MINING), 10, 105);
            g.drawString("Ores Mined: " + (oreMined), 10, 120);
            g.drawString("Ores To Level: " + getSkills().getExperienceToLevel(Skill.MINING) / 35, 10, 135);
            g.drawString("GP Earned: " + (oreMined) * 154, 10, 150);
            Point mP = getMouse().getPosition();
            g.drawLine(mP.x, 0, mP.x, 1080);
            g.drawLine(0, mP.y, 1920, mP.y);
        }
    
        private void chopTree() {
            GameObject tree = getGameObjects().closest(n -> n.getID() == 7488);
            if (tree != null && tree.interact("Mine")) {
                int countLog = getInventory().count("Iron ore");
                sleepUntil(() -> getInventory().count("Iron ore") > countLog, 12000);
            }
        }
    
        private void bank() {
            NPC banker = getNpcs().closest(npc -> npc != null && npc.hasAction("Bank"));
            if (banker != null && banker.interact("Bank")) {
                if (sleepUntil(() -> getBank().isOpen(), 9000)) {
                    if (getBank().depositAllExcept(item -> item != null && item.getName().contains("pickaxe"))) {
                        if (sleepUntil(() -> !getInventory().isFull(), 8000)) {
                            if (getBank().close()) {
                                sleepUntil(() -> !getBank().isOpen(), 8000);
                            }
                        }
                    }
                }
            }
        }
    }

     

     

    Link to comment
    Share on other sites

    • 1 year later...

    how does it work? when I activate it, it takes him to the mining area, but then he does nothing, he just stays there

    Link to comment
    Share on other sites

    • 2 weeks later...

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.