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
  • Search the Community

    Showing results for tags 'tutorials'.

    • Search By Tags

      Type tags separated by commas.
    • Search By Author

    Content Type


    Forums

    • Requests
    • DreamBot
      • Announcements
      • Client Support
      • Site Support
    • Community
      • General Discussion
      • Runescape
      • Spam
      • Applications
    • Scripts
      • SDN Scripts
      • Local Scripts
      • Private Scripting Shops
      • Script Requests
      • Script Management
    • Development
      • Scripting
      • Programming
    • Market
      • Vouchers / Store Credit
      • Middleman Services
      • Gold Exchange
      • Membership Sales
      • Account Sales
      • Item Exchange
      • Services
      • Graphics
      • Other
    • Management
      • Disputes
      • Appeals
      • Archive

    Product Groups

    • Donator
    • VIP
    • Sponsor
    • Scripts
      • Agility
      • Combat
      • Construction
      • Cooking
      • Crafting
      • Fletching
      • Firemaking
      • Fishing
      • Herblore
      • Hunter
      • Magic
      • Mining
      • Farming
      • Prayer
      • Ranged
      • Runecrafting
      • Slayer
      • Smithing
      • Thieving
      • Woodcutting
      • Money Making
      • Mini-Games
      • Quests
      • Other

    Find results in...

    Find results that contain...


    Date Created

    • Start

      End


    Last Updated

    • Start

      End


    Filter by number of...

    Joined

    • Start

      End


    Group


    Website URL


    Discord


    Skype


    Location


    Interests

    Found 1 result

    1. Welcome everyone! This is a short guide to mostly show the script/code I created to allow for ease of use of the Quickstart feature. Quickstart is the use of the command line to open up your DreamBot clients with code. To start, you need the template to load a client (for example: java -jar C:\Users\YOURNAME\DreamBot\BotData\client.jar -script "Test Script" -account "Account 1" -covert) **more help at https://dreambot.org/guides/user-guide/quickstart/ I have created a python script which will utilize this method of loading and create a template (which you can change!) for your account, script, and other client settings. This script will use each row you paste into the CSV file (using the format username:password:proxynickname) and plug it into the template I created or you adjusted. The script will then create a single batch file which will use that template for all of the accounts. Running the batch file will check for an existing client with the username from CSV and create a client if it did not already exist. Otherwise it will skip, wait a few seconds, then attempt the next account. Below is the how to text file I created within the folder in case you don't want to download the package. Now let's get into the code. Python main script: import os import random import csv import subprocess def read_account_details(file_path): accounts = [] # Check if the file exists before attempting to open it if not os.path.exists(file_path): print(f"CSV file '{file_path}' not found.") return accounts # Return an empty list if the file does not exist # Create the CSV file if it doesn't exist if not os.path.exists(file_path): try: with open(file_path, 'w') as file: file.write('username:password:proxy\n') # Write the header row print(f"CSV file '{file_path}' created successfully.") except Exception as e: print(f"Error creating CSV file: {e}") try: with open(file_path, 'r') as file: reader = csv.reader(file, delimiter=':') # Assuming delimiter is ':' for i, row in enumerate(reader): account_dict = { "account_number": i + 1, "username": None, "password": None, "proxy": None } if len(row) == 3: username, password, proxy = row account_dict.update({ "username": username if username else None, "password": password if password else None, "proxy": proxy if proxy else None }) accounts.append(account_dict) else: print(f"Invalid account details at line {i + 1}. Skipping...") except Exception as e: print(f"Error reading from CSV file: {e}") return accounts def shuffle_accounts(accounts): try: random.shuffle(accounts) print("Accounts shuffled successfully.") for account in accounts: print(f"Account number {account['account_number']} shuffled.") except Exception as e: print("Error shuffling accounts:", e) raise return accounts def generate_check_existing_clients_command(username): """ Constructs a PowerShell command string to check if a DreamBot client window with the specified username in its title exists. Args: username (str): The username to check for in window titles. Returns: str: PowerShell command string. """ # PowerShell command to list all processes and filter by window titles containing the username ps_command = f'powershell "Get-Process | Where-Object {{$_.MainWindowTitle -match \'{username}\'}} | Select-Object -ExpandProperty MainWindowTitle"' return ps_command # Define the template for launching the DreamBot client with pre-launch check template = """ @echo off rem Set the path to your DreamBot client JAR file set "DREAMBOT_JAR=%USERPROFILE%\\DreamBot\\BotData\\client.jar" rem Account details for Account {account_number} set "USERNAME={username}" set "PASSWORD={password}" set "PROXY={proxy}" set "BREAKS=//example_breaks_here//" set "WORLD=//example_world_here//" set "FPS=//example_fps_here//" set "FRESH=true" set "LAYOUT=no_preference" set "SCRIPT_NAME=//example_script_name_here//" rem Set the delay in seconds between clients set /a "delay=%RANDOM% %% (240 - 50 + 1) + 50" rem Check for existing DreamBot client for the same username set "existingClient=" for /f "delims=" %%a in ('{check_cmd} 2^>^&1') do set existingClient=%%a if "%existingClient%"=="Get-Process : The term 'Get-Process' is not recognized" ( echo PowerShell command execution failed. PowerShell might not be available or enabled on this system. Attempting to launch client... ) else if not "%existingClient%"=="" ( echo DreamBot client for %USERNAME% is already running. Skipping... timeout /t 2 /nobreak >nul ) else ( echo Launching DreamBot client for %USERNAME%, %PROXY% ... rem Launch the DreamBot client and redirect output to null start "" /b javaw -Xmx512M -jar "%DREAMBOT_JAR%" -accountUsername "%USERNAME%" -accountPassword "%PASSWORD%" -proxy "%PROXY%" -world "%WORLD%" -covert -layout "%LAYOUT%" -breaks "%BREAKS%" -fps %FPS% -fresh %FRESH% -script "%SCRIPT_NAME%" >nul 2>&1 echo Waiting %delay% seconds before starting the next client... timeout /t %delay% /nobreak >nul ) """ file_path = 'account_details.csv' accounts = read_account_details(file_path) if not accounts: print("No valid account details found or file is missing. Exiting...") exit(1) # Exit the script if no accounts were found or file is missing accounts = shuffle_accounts(accounts) batch_script_content = "" for account in accounts: check_cmd = generate_check_existing_clients_command(account["username"]) batch_script_content += template.format(account_number=account["account_number"], username=account["username"], password=account["password"], proxy=account["proxy"], check_cmd=check_cmd) + "\n" try: with open("launch_accounts.bat", "w") as f: f.write(batch_script_content) print("Batch script generated successfully.") except Exception as e: print("Error saving batch script:", e) This will create the CSV file for you if it doesn't exist. You must copy paste your accounts with the proper format (make sure you use ':' between user:pass:proxy). There is ~mostly~ proper error catching so if you should see errors in cmd or VScode/other workstations. After pasting info into the CSV, run the script again and it will update the batch file with all of your accounts. Next just run the batch file! That's all for the quickstart and batching sections. I personally wanted to have a way to cleanly sort all of my clients, and have a good method of quickly identifying problems with a button. I currently use "Dexpot" application for setting up multiple desktops. I use a keybind to swap between desktops and I keep all my p2p/f2p clients on separated desktops. You can also set up Dexpot to send all DB clients to a specific desktop (but only works if all clients go to the same location, so just p2p or f2p etc). Within Dexpot there is a convenient settings called windows catalogging. What this does is with a keybind you can instantly dynamically see all of your programs within a grid view to check for any visual problems with your bots, or find the name for the client easily. This is good, but not quite enough for me as I would have all the clients in a single stacked spot on the screen. Enter AutoHotKey. AHK allows you to use code to sort all of your clients to a specified monitor using whatever layout you prefer. NOTE: I have a large 4k monitor and I am not proficient with C++ and I am positive the code can be improved to be more dynamic across all screen sizes. If you have any suggestions please let me know so I can make it more universal. This function is more intended for those familiar with coding to adjust to their monitor size and other needs. But that doesn't mean you can't try it and tweak it how you wish. It's pretty straightforward. Here is the code: ; Define the width and height of the DreamBot client window WindowWidth := 765 WindowHeight := 503 ; Define the overlapping width and height OverlapWidth := 410 OverlapHeight := 150 ; Calculate the number of rows and columns NumRows := 5 NumColumns := 6 ; Calculate the total width and height of each row and column TotalRowWidth := (WindowWidth - OverlapWidth) * NumColumns + OverlapWidth TotalColumnHeight := (WindowHeight - OverlapHeight) * NumRows + OverlapHeight ; Get all windows with the title "DreamBot" WinGet, DreamBotWindows, List, DreamBot ; Sort the windows alphabetically Sort, DreamBotWindows, R ; Calculate the starting position for the grid StartX := 0 StartY := 0 ; Get the screen width and height SysGet, ScreenWidth, 0 SysGet, ScreenHeight, 1 ; Loop through each window and position them in the grid formation Row := 1 Column := 1 Counter := 0 Loop, %DreamBotWindows% { X := StartX + (Column - 1) * (WindowWidth - OverlapWidth) Y := StartY + (Row - 1) * (WindowHeight - OverlapHeight) ; Adjust the window position if it goes off-screen if (X + WindowWidth > ScreenWidth) { X := StartX Y := Y + (WindowHeight - OverlapHeight) Row++ } if (Y + WindowHeight > ScreenHeight) { ; Handle the case when the screen height is not enough for all windows MsgBox, Not enough screen height to position all windows. break } WinMove, % "ahk_id " DreamBotWindows%A_Index%, , X, Y Counter++ if (Counter >= NumColumns) { Counter := 0 Column := 1 Row++ } else { Column++ } } ; Focus on the first DreamBot window WinActivate, % "ahk_id " DreamBotWindows1 you can adjust the columns/rows, and the overlapping. Save this as a .ahk file and you can just double click it to start the sorting. If you want to you can use the AHK program to compile it into an EXE. Below are the files and folders needed for those who don't want to copy paste the code and ensure proper file/folder structure (this is important) NOTE: I removed the downloads for now unless there are requests for it. I always preach safe browsing and I wouldn't trust a random download myself. Only if a moderator or verifiable source is willing to verify the folders/files will I put them up for download. Happy scaping! Please leave suggestions. I am willing to improve upon this as it would help everyone!
    ×
    ×
    • 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.