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
  • Error importing client.jar


    ilumoif

    Recommended Posts

    Getting the same problem as this guy did that went unanswered:

    I followed the tutorial 100% but it still says

    E:\IdeaProjects\Dreambot\Flechette\src\Script.java
    java: package org.dreambot.api.methods does not exist

    My client.jar in the libraries is dated today, and I have been using DreamBot for other bots, and no errors in IntelliJ code so not sure what's up.

    import org.dreambot.api.methods.MethodProvider;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    
    @ScriptManifest(name = "Script Name", description = "My script description!", author = "RIDAI",
            version = 1.0, category = Category.WOODCUTTING, image = "")
    public class Script extends AbstractScript {
    
        @Override
        public int onLoop() {
            MethodProvider.log("My first script!");
    
            return 1000;
        }
    
    }

    image.png.6ec4d368ccfaf008951ebb087c7d73f1.png

    image.png.b567304caf076c89a706289a0cbc5b70.png

    image.png.7e667845aa13f2a7fc8cf8ac6c0c3717.png

    image.png.ca77dd7fbc303ece569eb133aa7f6df1.png

    Link to comment
    Share on other sites

    If your script is contained within its own module, be sure to add the client.jar as a JAR dependency to that module as well (making sure to not export it). An example can be found below.

    image.png.682132f491f49c447311fc1a8a7233bc.png

    Link to comment
    Share on other sites

    1 hour ago, Bonfire said:

    If your script is contained within its own module, be sure to add the client.jar as a JAR dependency to that module as well (making sure to not export it). An example can be found below.

    image.png.682132f491f49c447311fc1a8a7233bc.png

    Thanks for the fast reply. This is what I currently have:

    image.png.4813e74b317801ab770f4ee5523dc9e3.png

    image.png.c3e87aef708425422b3140d7e88203f7.png

    Should be OK right?

     

    Link to comment
    Share on other sites

    Just now, ilumoif said:

    Maybe I need AdoptOpenJDK instead of Oracle like you have

    Worth a shot, though I don't think it should change much. Have you tried invalidating your IntelliJ IDEA cache and restarting? You can find the feature under the File menu.

    Link to comment
    Share on other sites

    6 minutes ago, Bonfire said:

    Worth a shot, though I don't think it should change much. Have you tried invalidating your IntelliJ IDEA cache and restarting? You can find the feature under the File menu.

    It didn't work, however I altered my project java version to another one I had installed and this one works instead of "Project SDK 1.8"

    image.png.46f5af2948627de9704f3cb787120803.png

    Strange, not quite sure what the other java 1.8 I had selected was referring to but looks like that was the issue! Thanks a lot for the help, now onto writing a script!

    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.