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
  • Scripting Explained. (Basic Woodcutter) Open Source


    Nex

    Recommended Posts

    completely uninstalled java and reinstalled the freshest JDK 64 bit, installed eclipse 64 (my windows 10 is 64 bit), still getting the same problem.

     

    https://gyazo.com/acba4a9d8123f2c9dcb9a12f9a9c2a14

     

    also getting a new problem??

     

    https://gyazo.com/3da86da04e125ae1e196ae94504fdb53

     

    very frustrating as you can imagine


    ok i think i solved most of the issue by installing eclipse oxygen rather the download what was linked


    this is the only problem i have now https://gyazo.com/01abfd351a2ea967956d1d24c3a423b7

    Link to comment
    Share on other sites

    completely uninstalled java and reinstalled the freshest JDK 64 bit, installed eclipse 64 (my windows 10 is 64 bit), still getting the same problem.

     

    https://gyazo.com/acba4a9d8123f2c9dcb9a12f9a9c2a14

     

    also getting a new problem??

     

    https://gyazo.com/3da86da04e125ae1e196ae94504fdb53

     

    very frustrating as you can imagine

    ok i think i solved most of the issue by installing eclipse oxygen rather the download what was linked

    this is the only problem i have now https://gyazo.com/01abfd351a2ea967956d1d24c3a423b7

    ic what you did do wrong :)

     

     

     

    package "your package here";          without the quotes a package is  where your class is located 

     

    https://gyazo.com/b368e88d05e1e7f8cfd4f454f5bcf8b2

     

    in my case it would be package noobcwalker;

     

    it has to be on the top of your script https://gyazo.com/0081e3f917ffaf52ac9e8518713eed89

     

     

    take a look at this:

     

     

    package noobcwalker;
     
    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.methods.map.Tile;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.utilities.Timer;
     
     
     
     
     
     
     
     
    import java.awt.*;
    import java.text.DecimalFormat;
    import java.util.concurrent.TimeUnit;
     
     
    @ScriptManifest(author = "ProBotterIamN", name = "Example Script", version = 0.0, description = "Just To Show how packaging wors!", category = Category.MISC)
    public class main extends AbstractScript {
     
        public void onStart() {
     
     
        }
     
        private enum State {
        };
     
        private State getState() {
     
        }
     
        public void onExit() {
     
        }
     
     
        @Override
        public int onLoop() {
        }
    }

     

     

    Link to comment
    Share on other sites

    • 1 year later...

    Hi, I'm totally new to coding and I'm getting an error on the import section:
        - The import org cannot be resolved
        - Must declare a named package because this compilation unit is associated to the named module
         'simpleTeaThief'

    Do you know what I could have done wrong?

    import org.dreambot.api.script.AbstractScript;  // All these imports are from the dreambot API
    import org.dreambot.api.script.ScriptManifest;  // API can be found here: https://dreambot.org/javadocs/
    import org.dreambot.api.script.Category;
    import org.dreambot.api.wrappers.interactive.GameObject;
    
    
    
    Link to comment
    Share on other sites

    16 minutes ago, G_G said:

    Hi, I'm totally new to coding and I'm getting an error on the import section:
        - The import org cannot be resolved
        - Must declare a named package because this compilation unit is associated to the named module
         'simpleTeaThief'

    Do you know what I could have done wrong?

    
    import org.dreambot.api.script.AbstractScript;  // All these imports are from the dreambot API
    import org.dreambot.api.script.ScriptManifest;  // API can be found here: https://dreambot.org/javadocs/
    import org.dreambot.api.script.Category;
    import org.dreambot.api.wrappers.interactive.GameObject;
    
    
    

    You need to import the dreambot "client.jar", path: "C:\Users\PC_NAME\DreamBot\BotData\client.jar"
    Add it here:
    82f837cf87dae0787c48774a226680c9.png

    Link to comment
    Share on other sites

    • 2 months later...

    I noticed you put

    sleepUntil(() -> !getLocalPlayer().isAnimating() , 15000);

    could me instead put 

    sleepUntil(tree = null, 5000);

    This way the bot will keep cutting until the tree is gone or after 15 seconds? I ask because I attempted to do just that and it made me cast tree=null as a condition such as below.

    sleepUntil((Condition) (tree = null), 5000);

    Do you think this is fine or do you think problems could arise. Thank you though for the guide.

    Link to comment
    Share on other sites

    12 hours ago, SyarTheTitan said:

    I noticed you put

    
    sleepUntil(() -> !getLocalPlayer().isAnimating() , 15000);

    could me instead put 

    sleepUntil(tree = null, 5000);

    This way the bot will keep cutting until the tree is gone or after 15 seconds? I ask because I attempted to do just that and it made me cast tree=null as a condition such as below.

    sleepUntil((Condition) (tree = null), 5000);

    Do you think this is fine or do you think problems could arise. Thank you though for the guide.

    " sleepUntil(() -> !getLocalPlayer().isAnimating() , 15000); "
    means it will keep cutting till the player is no longer animating, or if 15 seconds passes it will also stop.
    But yea you can add the tree in this condition aswell:
    " sleepWhile(() -> tree != null, 15000); "

    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.