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
  • Looking for feedback on script


    CosmicOverrid
     Share

    Recommended Posts

    Hi there, I am CosmicOverride and fairly new to the Runescape botting community, I just started scripting today and made this woodcutting script. I am looking for any advice, suggestions from the community but also using this as an opportunity to share the script to you guys. Feel free to use, and modify at your own risk. I tried implementing some Anti-Ban stuff but as I said I just started scripting today.

     

    import org.dreambot.api.input.Mouse;
    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.container.impl.bank.BankLocation;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.wrappers.interactive.GameObject;
    
    @ScriptManifest(category = Category.WOODCUTTING, name = "Cosmic's Woodcutter", author = "Cosmic", version = 3.1)
    public class main extends AbstractScript{
    	int[] worlds = {301, 326, 393};
    	public static final String TREE = "Tree";
    	public static final String AXE = " axe";
    	Area cutArea = new Area(3280,3442, 3274, 3457);
    	
    
    	@Override
    	public void onStart() {
    		log("Welcome to Cosmic's Wootcutter");
    	}
    	
    	@Override
    	public int onLoop() {
    		
    		if(!getLocalPlayer().isAnimating()) {
    			if(getInventory().isFull()) {
    				if(getBank().isOpen()) {
    					getBank().depositAllExcept(item -> item != null && item.getName().contains(AXE));
    					sleep(Calculations.random(10000, 60000));
    				}else {
    					getBank().open(BankLocation.VARROCK_EAST);
    				}
    				}else if(cutArea.contains(getLocalPlayer())){
    					GameObject tree = getGameObjects().closest(TREE);
    					if(tree != null) {
    						tree.interact("Chop Down");
    						int ran = Calculations.random(0,10);
    						if (ran == 0) {
    							getSkills().open();
    						}else if(ran == 1) {
    							getWorldHopper().openWorldHopper();
    							sleep(Calculations.random(1000,5000));
    							int ranr = Calculations.random(0,25);
    							if(ranr == 22) {
    								getWorldHopper().hopWorld(worlds[Calculations.random(0,2)]);
    							}else {
    								getWorldHopper().closeWorldHopper();
    							}
    						}
    						sleep(Calculations.random(1500,2000));
    					}
    				}else {
    					getWalking().walk(cutArea.getRandomTile());
    				}
    		}
    		return Calculations.random(1000, 5000);
    	}
    	
    	@Override
    	public void onExit() {
    		super.onExit();
    	}
    	
    	
    	
    }
    

     

    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.