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
  • Metallicblank

    Members
    • Posts

      15
    • Joined

    • Last visited

    Metallicblank's Achievements

    1. I've been trying to follow this guide. I've gotten to the sleep timer. I put it into the code just as you have. Then once I compile the script still spam clicks the tree and doesn't wait. I'm not sure what I am getting wrong? package BasicWoodcutter; import org.dreambot.api.methods.filter.Filter; 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 java.awt.*; /** * Created by metal on 9/21/2015. */ @ScriptManifest(category = Category.WOODCUTTING, name = "Basic WoodCutter", author = "Metal", version = 1.0) public class MainClass extends AbstractScript{ @Override public void onStart (){ log("Hi"); } @Override public int onLoop() { GameObject tree = getGameObjects().closest(gameObject -> gameObject != null && gameObject.getName().equals("Tree")); if(tree.interact("Chop down")){ int countLog = getInventory().count("Logs"); sleepUntil(() -> getInventory().count("Logs") > countLog, 8000); } return 600; } @Override public void onExit () { } @Override public void onPaint(Graphics graphics) { } } Any help would be appreciated. Also thank you for making these!
    ×
    ×
    • 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.