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
  • Woad leaf buyer [Source code] f2p money making


    Abysm

    Recommended Posts

    Any suggestions regarding my coding?

     

    This is simple money making method in f2p, dont know the exact rates but used to be 40-60k/hr

     

    c4c7ffd35b386861dd03a6f99e285333.png

     

    Download link: http://www.mediafire.com/file/n55u2tx6b558vhs/WoadLeaf.jar

     

     

    Source:

    package org.dreambot.abysm;
    
    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.utilities.Timer;
    import org.dreambot.api.wrappers.interactive.NPC;
    
    import java.awt.*;
    
    @ScriptManifest(author = "Abysm", category = Category.MONEYMAKING, description = "Buys woad leaf for profit", name = "Abysm's woad leaf", version = 1.0)
    
    public class Main extends AbstractScript{
    
        private Area WOAD_AREA = new Area(3031, 3383, 3022, 3375);
        private Timer timer = new Timer();
        private String status;
    
        public enum State {
            BUY, STOP, WALK
        }
    
        private State getState() {
            if (getInventory().contains("Coins") && WOAD_AREA.contains(getLocalPlayer())) {
                status = "Buying woad leaves";
                return State.BUY;
            } else if (!WOAD_AREA.contains(getLocalPlayer())) {
                status = "Walking to the area";
                return State.WALK;
            }
            status = "Stopping script";
            log("No coins in inventory, logging off...");
            return State.STOP;
        }
    
        @Override
        public void onPaint(Graphics g) {
            g.drawString("Time ran: " + timer.formatTime(), 30, 285);
            g.drawString("Status: " + status, 30, 310);
        }
    
        @Override
        public int onLoop() {
            switch (getState()) {
                case BUY:
                    NPC woadseller = getNpcs().closest("Wyson the gardener");
                    if (!getDialogues().inDialogue()) {
                        woadseller.interact("Talk-to");
                    } else if (getDialogues().inDialogue()) {
                        if (getDialogues().chooseOption("Yes please, I need woad leaves.")) {
                            sleep(200, 300);
                        } else if (getDialogues().chooseOption("How about 20 coins?")) {
                            sleep(200, 300);
                        } else {
                            getDialogues().continueDialogue();
                        }
                    }
                    break;
                case STOP:
                    getTabs().logout();
                    stop();
                    break;
                case WALK:
                    getWalking().walk(WOAD_AREA.getRandomTile());
                    break;
            }
            return Calculations.random(500, 900);
        }
    }
    
    
    Link to comment
    Share on other sites

    40-50k/h in theory but theres close to 0 demand

    yeah, I guess you can use them only to make blue dye. Just trying to learn scripting  :P

    Link to comment
    Share on other sites

    • 8 months later...
    • 1 month later...
    • 2 years later...

    Doesn't work with DreamBot 3, could you recompile it please? Tnx!

    Quote

    [ERROR] This script needs to be compiled against the latest DreamBot 3 build::
        java.lang.IncompatibleClassChangeError: Expecting non-static method org.dreambot.api.methods.container.impl.Inventory.contains(Ljava/lang/String;)Z
        at org.dreambot.abysm.Main.getState(Main.java:26)
        at org.dreambot.abysm.Main.onLoop(Main.java:46)
        at org.dreambot.api.script.AbstractScript.run(AbstractScript.java)
        at java.lang.Thread.run(Unknown Source)
     

     

    Link to comment
    Share on other sites

    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.