CatnipandMilk 14 Share Posted December 5, 2023 (edited) You can create a batch file with command line arguments for a specific user and script. Now that Dreambot has a built-in scheduler, life is even easier. With the argument "-script script_name_here" we can have an account launch an instance and cycle through several tasks by running just a batch file for each account we want running. I currently have it take my freshly created account details and turn them into a trade-ready account. You can use a Python script to create bulk batch files from an account.txt file (USN:PASS format): import os # Read accounts from accounts.txt with open('accounts.txt', 'r') as file: accounts = file.read().splitlines() # Updated template for the batch file batch_template = """java -Xmx500M -jar "C:\\Users\\User\\DreamBot\\BotData\\client.jar" -schedule Fresh -proxyHost 00.000.000.000 -proxyPort 0000 -accountUser "{email}" -accountPass {password} -userhome {email} -covert """ # Create batch files for each account for i, account in enumerate(accounts, start=1): email, password = account.split(':') batch_content = batch_template.format(email=email, password=password) batch_filename = f'account{i}.bat' with open(batch_filename, 'w') as batch_file: batch_file.write(batch_content) print(f'{batch_filename} created successfully.') You should be able to add a timer to close the application after a set period, but I'm still trying to make this work: import os # Read accounts from accounts.txt accounts_file_path = 'accounts.txt' client_jar_path = 'C:\\Users\\USER\\DreamBot\\BotData\\client.jar' if not os.path.exists(accounts_file_path): print(f"Error: {accounts_file_path} not found.") exit() with open(accounts_file_path, 'r') as file: accounts = [line.strip() for line in file] # Updated template for the batch file batch_template = """start java -Xmx500M -jar "{client_jar_path}" -schedule Fresh -proxyHost 00.000.000.000 -proxyPort 0000 -accountUser "{email}" -accountPass {password} -userhome {email} -covert timeout /t 900 /nobreak REM Wait for 900 seconds (15 minutes) taskkill /F /IM java.exe exit """ # Create batch files for each account for i, account in enumerate(accounts, start=1): try: email, password = account.split(':') except ValueError: print(f"Error: Invalid account format in line {i} of {accounts_file_path}.") continue batch_content = batch_template.format(email=email, password=password, client_jar_path=client_jar_path) batch_filename = f'account{i}.bat' with open(batch_filename, 'w') as batch_file: batch_file.write(batch_content) print(f'{batch_filename} created successfully.') In theory, you could chain the batch files together and add an exit java.exe line after the timer and before the next batch file is run. This should run the schedule for x time and then close the client, and start the next account. Still working on this part, tho. Edited December 5, 2023 by CatnipandMilk find me 1 Link to comment Share on other sites More sharing options...
maxstalker67 0 Share Posted January 2 can this be ran with instructions for multiple accounts to run at the same time or is it one instance/account per schedule ? Link to comment Share on other sites More sharing options...
CatnipandMilk 14 Author Share Posted January 3 You can run as many accounts as you open. It makes a batch file for each account and you can just open all of them at once with CPU/RAM being the limiting factor. Link to comment Share on other sites More sharing options...
maxstalker67 0 Share Posted January 6 i have a fresh off tut island account. i want it to mine copper (dropping ores) to level 10 and then stop. can you show a script describing this application ? Link to comment Share on other sites More sharing options...
CatnipandMilk 14 Author Share Posted January 8 Replace this part: # Updated template for the batch file batch_template = """start java -Xmx500M -jar "{client_jar_path}" -schedule Fresh -proxyHost 00.000.000.000 -proxyPort 0000 -accountUser "{email}" -accountPass {password} -userhome {email} -covert timeout /t 900 /nobreak REM Wait for 900 seconds (15 minutes) taskkill /F /IM java.exe exit with your script and it's parameters/arguments/CLI commands # Updated template for the batch file batch_template = """start java -Xmx500M -jar C:/Users/YOURUSER/DreamBot/BotData/client.jar -schedule Fresh -proxyHost 00.000.000.000 -proxyPort 0000 -script "BarMiner" -params "Bronze - Lumbridge" -account "[email protected]" -covert -world f2p timeout /t 900 /nobreak REM Wait for 900 seconds (15 minutes) taskkill /F /IM java.exe exit If you don't have a proxy, just delete that part. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now