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
  • Script doesn't run when started


    ReVity
     Share

    Recommended Posts

    ive been working on cowhide picker in lumbridge, but after some changes (which i cant revert) script just doesnt start, tried all solutions on existing topics, would love your help.

    
    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.wrappers.interactive.GameObject;
    import org.dreambot.api.wrappers.items.GroundItem;
    
    @ScriptManifest(author = "ReVity", name = "Cowhide Picker", version = 1.0, description = "Bot that picks cowhides and banks them", category = Category.MONEYMAKING)
    public class main extends AbstractScript {
    
        public void onStart() {
    
        }
    
        public void onExit() {
    
        }
    
    
    
        @Override
        public int onLoop() {
            GroundItem cowhide = getGroundItems().closest("Bones");
            Area cowzone = new Area(3253, 3256, 3265, 3296);
            Area bankarea = new Area(3207, 3220, 3210, 3216, 2);
            Area lumbridgestair = new Area(3206, 3209, 3207, 3211, 0);
            GameObject stairs = getGameObjects().closest("Staircase");
    
            if (!getInventory().isFull()) {
    
                if(getLocalPlayer().getTile().getZ() == 0){
                    if (cowzone.contains(getLocalPlayer())) {
                        if (cowhide != null) {
                            cowhide.interact("Take");
                        }
                    } else {
                        getWalking().walk(cowzone.getRandomTile());
                    }
                }
                else if(getLocalPlayer().getTile().getZ() == 1){
                    if (stairs != null) {
                        stairs.interact("Climb-down");
                    }
                }
                else if(getLocalPlayer().getTile().getZ() == 2){
                    if (stairs != null) {
                        stairs.interact("Climb-down");
                    }
                }
    
            }
            else {
    
                if (bankarea.contains(getLocalPlayer())) {
    
                    if (getBank().isOpen()) {
                        getBank().depositAllItems();
                    } else {
                        getBank().open();
                    }
    
                }
                else {
                    if (getLocalPlayer().getTile().getZ() == 2) {
                        getWalking().walk(bankarea.getRandomTile());
                    }
                    else if (getLocalPlayer().getTile().getZ() == 1) {
                        if (stairs != null) {
                            stairs.interact("Climb-up");
                        }
                    }
                    else {
                        if (!lumbridgestair.contains(getLocalPlayer())) {
                            getWalking().walk(lumbridgestair.getRandomTile());
                        }
                        else{
                            if (stairs != null) {
                                stairs.interact("Climb-up");
                            }
                        }
                    }
    
    
                }
    
            }
            return 1000;
        }

     

    Link to comment
    Share on other sites

    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.