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
  • Can you add 3rd party Jars to your scripts?


    iggkrajc

    Recommended Posts

    Hey Dreambot Support,

     

    I am a huge fan of your bot, and recently started developing my own scripts using your api.

    I have had some success, as I am a full time software engineer with professional experience at Java I feel right at home.

     

     

    I ran into a problem last night, as I started to add some more complexity to my script however.

     

    I added an additional library, Apache Commons, and linked the jar in my build path. Eclipse gave now errors and I was able to compile the script into a jar just fine.

     

     

    But when I ran this new script in dreambot, I was greated with "No Class Definition" errors about Apache Commons.

     

    Is there a specific way that I need to include 3rd party jars into my scripts?

     

     

    I desperately need the ability to include these 3rd jars, as my next steps will be database integration. 

     

     

     

    Any ideas??

     

    Thanks,

    Iggy

    Link to comment
    Share on other sites

    External jars can not be added in scripts.

    why is this actually and is there a way around this to still add something like a sql connection to a database?

    Link to comment
    Share on other sites

    why is this actually and is there a way around this to still add something like a sql connection to a database?

    You can connect to a php site to update/retrieve data from your database.

    Link to comment
    Share on other sites

    You can connect to a php site to update/retrieve data from your database.

    do you heppen to have a example on how to do this? woud really appriciate it i sorta know how to use php but im still learning it   + im not sure how to do it from script 

    Link to comment
    Share on other sites

    Why is this a limitation? I don't understand from a technical side.

     

    Dreambot is just written in java. If you let the script's internal jars also exist on the runtime path everything should work fine. 

     

    I understand that I can use the  Java standard library to call another language, but that is just insane.

     

     

    The ENTIRE point of Java, is the reusability of its libraries and the communities that release them for free.

     

    Why would you limit scripts from being able to use these resources??

     

    There are incredible libraries that do such amazing things....

     

     

    I will be looking at alternative bots that do support this tonight. I won't let Dreambot limit what I can do.

    Link to comment
    Share on other sites

    do you heppen to have a example on how to do this? woud really appriciate it i sorta know how to use php but im still learning it   + im not sure how to do it from script 

    1. https://gist.github.com/hitenpratap/8e1f28d60c0bb11a5bca
    2. https://www.w3schools.com/php/php_mysql_select.asp
    3. https://www.w3schools.com/php/php_mysql_insert.asp

    I guess those links have the things that are required. Someone correct me if I am wrong.

    Link to comment
    Share on other sites

     

     

    I know you aren't responding to my post directly, but do you know any technical reasons why we can't include 3rd party libraries?

     

    I feel like this should be possible, with a tiny amount of work.

    Link to comment
    Share on other sites

    I know you aren't responding to my post directly, but do you know any technical reasons why we can't include 3rd party libraries?

     

    I feel like this should be possible, with a tiny amount of work.

    I'm not sure but it might have to do something with scripts with external jars taking up too much space in the SDN. A developer/Dreamlicker would have better answers than me.

    Link to comment
    Share on other sites

    I'm not sure but it might have to do something with scripts with external jars taking up too much space in the SDN. A developer/Dreamlicker would have better answers than me.

    Just sent a message to DreamLicker

     

    *Fingers Crossed*

     

    I have a background in Genetic Algorithms and Artificial Life programming. I have some libraries in Java that I am desperate to leverage in my GE 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.