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
  • DBTreeChopper [Varrock West Tree Chopper]


    RangaLord243

    Recommended Posts

    Posted

    2aUy76u.png

    This Is My 1st Script! It's A Simple But Efficient Woodcutting Script That Chops Trees At Varrock West. I've Moved Over From OSBot To DreamBot So You Can Expect Me To Port Over Some Amazing Scripts For You Guys!

     

    YG3gx7z.png

    1. Start Script Near Varrock West Bank

    2. $ Profit $

     I Would Highly Recommend Enabling Breaks  

     

    tyZ8G3y.png

    ● Ultra Sexy Paint/Rainbow Mouse

    ● Log/GP Per Hour

    ● Human-Like Mouse/Camera Movement

    ● Random Conditional Sleeps Implemented

    ● Automatically Banks

    i9acBds.png

    ► 1.0 - Initial Release - 18/01/2019

     

    hBBPmKY.png

    https://mega.nz/#!Km5jCQBb!C078cwbLgOpil2FAghQ0UbzCTxflWvUbIxrDGrV2MWM

     

    DfucM07.png

    efKRjvQ.png

    Posted

    if it's local, why not show the source code? IF you want to keep the code private, why not just submit to the SDN? 

    Posted

    yes i'm sure i can download it and decompile it in a sandbox ..  however why.. when you can just post it here.. https://github.com/   weird i know.  anyways goodluck

    Posted

    @sr24

    <3

    package DBOakChopper;
    
    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.WOODCUTTING, name = "DBOakChopper", author = "RangaLord243", version = 1.0)
    public class Main extends AbstractScript {
    
        private long startTime;
    
        private int logsCut;
    
        private MouseTrail trail = new MouseTrail(0, 255, 255, 1000, this);
        private MouseCursor cursor = new MouseCursor(52, 2, Color.WHITE, this);
    
        Area bankArea = new Area(3185, 3444, 3180, 3443, 0);
        Area treeArea = new Area(3170, 3422, 3162, 3412, 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 get some oak logs")) {
                logsCut++;
            }
        }
    
        @Override
        public int onLoop() {
            if (!getInventory().isFull()) {
                if (treeArea.contains(getLocalPlayer())) {
                    chopTree("Oak");
                } 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 DBOakChopper");
        }
    
        @Override
        public void onPaint(Graphics2D g) {
            g.setColor(Color.WHITE);
            trail.paint(g);
            cursor.paint(g);
            long runTime = System.currentTimeMillis() - startTime;
            g.drawString("Runtime: " + formatTime(runTime), 10, 30);
            g.drawString("Current level: " + getSkills().getRealLevel(Skill.WOODCUTTING), 10, 50);
            g.drawString("XP To Level: " + getSkills().getExperienceToLevel(Skill.WOODCUTTING), 10, 65);
            g.drawString("Logs Cut: " + (logsCut), 10, 85);
            g.drawString("Logs To Level: " + getSkills().getExperienceToLevel(Skill.WOODCUTTING) / 38, 10, 100);
            g.drawString("GP Earned: " + (logsCut) * 34, 10, 115);
        }
    
        private void chopTree(String nameOfTree) {
            GameObject tree = getGameObjects().closest(gameObject -> gameObject != null && gameObject.getName().equals(nameOfTree));
            if (tree != null && tree.interact("Chop down")) {
                int countLog = getInventory().count("Oak logs");
                sleepUntil(() -> getInventory().count("Oak logs") > 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("axe"))) {
                        if (sleepUntil(() -> !getInventory().isFull(), 8000)) {
                            if (getBank().close()) {
                                sleepUntil(() -> !getBank().isOpen(), 8000);
                            }
                        }
                    }
                }
            }
        }
    }

     

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.