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
  • Local scripts not appearing


    peanutbutterp

    Recommended Posts

    Posted

    Hello,

    So I've setup my IntelliJ IDEA to work with Dreambot, everything seems to work fine in IDEA, I did add the client.jar as the dependancy and gotten myself access to the DreamBot API, I've complied my test script and I made sure that script is in

    %username%\DreamBot\Scripts\%scriptname%.jar

    However, I cannot see the script in local scripts, I tried refreshing, tried rebooting both IDEA and recompiling and the Dreambot client. Any idea what could be wrong?
     

    This is the test code

    package main;
    
    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.script.Category;
    
    @ScriptManifest(author = "PBP", description = "Cannon ball maker + Druid killer", name = "Mixed Monkey Maker", version = 1.1, category = Category.MONEYMAKING)
    
    public class Main extends AbstractScript {
    
        private int state = 0;
    
        @Override
        public int onLoop() {
            if(state == 0)
                bank_everything();
    
            return Calculations.random(500, 1000);
        }
    
        public void walk_EdgeBank(){
    
        }
        public void bank_everything(){
            if(!isBanking()){
                getBank().open();
            }
    
        }
        public boolean isBanking(){
         return getBank().isOpen();
        }
    }
    
    
    Posted

     

    Hello,

    So I've setup my IntelliJ IDEA to work with Dreambot, everything seems to work fine in IDEA, I did add the client.jar as the dependancy and gotten myself access to the DreamBot API, I've complied my test script and I made sure that script is in

    %username%\DreamBot\Scripts\%scriptname%.jar

    However, I cannot see the script in local scripts, I tried refreshing, tried rebooting both IDEA and recompiling and the Dreambot client. Any idea what could be wrong?

     

    This is the test code

    package main;
    
    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.script.Category;
    
    @ScriptManifest(author = "PBP", description = "Cannon ball maker + Druid killer", name = "Mixed Monkey Maker", version = 1.1, category = Category.MONEYMAKING)
    
    public class Main extends AbstractScript {
    
        private int state = 0;
    
        @Override
        public int onLoop() {
            if(state == 0)
                bank_everything();
    
            return Calculations.random(500, 1000);
        }
    
        public void walk_EdgeBank(){
    
        }
        public void bank_everything(){
            if(!isBanking()){
                getBank().open();
            }
    
        }
        public boolean isBanking(){
         return getBank().isOpen();
        }
    }
    
    

     

    Dont make client.jar build into your script jar.

    Posted

    Dont make client.jar build into your script jar.

    It doesn't, I just added it as a dependency so that I could get the access to the API of dreambot. 

     

    Update:

    Okay, so I've checked my .jar file, it just has the package name as the directory, inside of it single .class file called Main.class, after decompiling it I see that it's 100% what I have shown before. So I'm not including client.jar the second time anywhere.

    In addition I've noticed that I cannot even add free scripts to my account, they don't seem to appear either, I go to Dreambot's repository, add a free script and nothing appears in my game client's script section (tried restarting too)

    Any ideas?

    Posted

    It doesn't, I just added it as a dependency so that I could get the access to the API of dreambot. 

     

    Update:

    Okay, so I've checked my .jar file, it just has the package name as the directory, inside of it single .class file called Main.class, after decompiling it I see that it's 100% what I have shown before. So I'm not including client.jar the second time anywhere.

    In addition I've noticed that I cannot even add free scripts to my account, they don't seem to appear either, I go to Dreambot's repository, add a free script and nothing appears in my game client's script section (tried restarting too)

    Any ideas?

    The second issue is probably related to the first; If dreambot successfully load the local script I don't think it'll pull the repo one(s). What export settings do you have for making the jar?

    Posted

    The second issue is probably related to the first; If dreambot successfully load the local script I don't think it'll pull the repo one(s). What export settings do you have for making the jar?

    Figured it out, turns out I was using JDK 9 instead of 8. Lol

    Posted

    Figured it out, turns out I was using JDK 9 instead of 8. Lol

    Lol rip. Good job on figuring it out :).

    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.