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

    Members
    • Posts

      5
    • Joined

    • Last visited

    Recent Profile Visitors

    The recent visitors block is disabled and is not being shown to other users.

    send_splits's Achievements

    1. If anyone is curious I actually got this working. Instead of trying to run the launcher in the Dockerfile I moved that part of the environment setup to runtime. Dockerfile: FROM ubuntu:18.04 #installing jdk, xvfb, and curl RUN apt-get update -y && apt-get upgrade -y && apt-get install -y openjdk-8-jdk xvfb curl #Pulling down DBLauncher jar RUN mkdir /usr/src/bot/ RUN curl -L https://dreambot.org/DBLauncher.jar --output /usr/src/bot/launcher.jar #Copying necessary jars COPY /target/botnet-1.0-SNAPSHOT.jar /usr/src/bot/app.jar COPY /lib/chicken-killer.jar /root/DreamBot/Scripts/chickenkiller.jar CMD ["java", "-jar", "/usr/src/bot/app.jar"] Main Class: import java.io.IOException; import java.util.concurrent.TimeUnit; public class Main { public static void main(String[] args) throws IOException, InterruptedException { // First, run the launcher jar to pull down the client jar into $home/DreamBot/BotData Runtime rt = Runtime.getRuntime(); Process firstInstall = rt.exec("xvfb-run java -jar /usr/src/bot/launcher.jar"); //Kill after 15 seconds TimeUnit.SECONDS.sleep(15); firstInstall.destroy(); firstInstall.waitFor(); //Run your script using quickstart //Can pipe logs into a file, etc... //We are using xvfb-run as it handles X11 forwarding and we want to run the client headless execCmd("xvfb-run -a java -jar /root/DreamBot/BotData/client.jar -username yourUsername -password yourPassword " + "-covert -accountUsername yourAccountUsername -accountPassword yourAccountPassword -render none -script ChickenKiller -world f2p"); } public static void execCmd(String cmd) throws java.io.IOException { java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(cmd).getInputStream()).useDelimiter("\\A"); System.out.println(s.hasNext() ? s.next() : ""); } } This achieves the basic functionality of running the dreambot client in a linux container. Once I have a multi container cluster configured with bots doing different tasks I will make a tutorial :).
    2. @yeeter01 awesome tutorial on automating the install/setup! I used that as a base for the above. You mentioned you're using docker - can you share which base image you use for your containers?
    3. I'm trying to build a Docker image with CLI access using Quickstart. There is a tutorial out there for doing this in Windows, but I would like to use a Linux image. I would love to have a cluster with multiple images running different accounts. Trouble is, I cannot get the DBLauncher jar to run well in my Dockerfile. FROM ubuntu:18.04 #installing jdk and xvfb RUN apt-get update -y && apt-get upgrade -y && apt-get install -y openjdk-8-jdk xvfb #copying DBLauncher jar to image COPY /lib/DBLauncher.jar /usr/src/bot/DBLauncher.jar #copying script jars for client jar to reference COPY /lib/chickenkiller.jar /usr/src/bot/scripts/chickenkiller.jar COPY /lib/mining-skiller.jar /usr/src/bot/scripts/mining-skiller.jar #Running using xvfb so that X11 forwarding exceptions don't occur #Following same method as Windows tutorial, let launcher do its thing, terminate RUN xvfb-run java -jar /usr/src/bot/DBLauncher.jar & RUN sleep 5 && pkill -f "xvfb-run" #At this point I would like the java process to call the CLI commands to start the scripts #using quickstart ... CMD ["java", "-jar", "/usr/src/bot/app.jar"] This Dockerfile hangs in the image build stage because the launcher never progresses past "Downloaded latest client version! Checking integrity." I realize using xvfb-run is somewhat of a pain but otherwise running the launcher results in X11 forwarding exceptions since the Docker container doesn't have GUI capability. I have tried forgetting about the DBLauncher setup and instead copying the /DreamBot installation directory onto my container. After that I start my script by calling the client jar and passing my credentials in via command line. The problem here is that the client doesn't recognize my local scripts even if they are in the /DreamBot/Scripts/ directory. The script manifests are correct because my script jars get picked up on my local machine, but in the container only the scripts I have downloaded on the Dreambot site show. I have been stuck on this for a bit and would love if someone could chime in on the below questions. I promise to make a tutorial on Docker containers if I get this working! Questions: -Does anybody have experience running the DBLauncher jar in a headless environment (ie without GUI access)? Did you have to mess around with X11 forwarding to get it to work? -Are there environment variables that I can set to point the client jar to my script directory containing the script jars?
    4. I am seeing the same - getLocalPlayer().isAnimating() is always returning true.
    ×
    ×
    • 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.