Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CLI optimization help

Featured Replies

Hello all, my bot farm is finally almost ready to run full time but I am having a few issues that I need some help with.

i am currently running 50 accounts launching CLI. The problem I am having is I launch with a bat file, And I I need to run three scripts: tut island -> 7qp -> myscript.   But batch files only let me launch one script. Basically how do I launch multiple scripts from a .bat in almost a queue style?

my next question is editing the account info in 50-150 batch files easily. Currently since I can only launch one script per .bat I am editing 150 .bat daily. 50 accounts 3 .bats per account one for each script. Also after I launch my tut files I am having to wait 10ish minutes (time for tut island to complete) then close all my consoles and relaunch the 50 accounts again for the second script and so on so forth. 
 

I know this was a bit spastic but and hard to follow but any help is greatly appreciate for my quality of life. I’m about to blow my brains out editing all these files daily. Thanks! 

summary:

launch a script queue with CLI

edit these .bat files efficiently 

@Kangabr 2 things.
1. Make it one big script.
2. Use text files and make the .bat read and set values based on that txt file.

 

set "P1="

set "A1="
set "A2="
set "A3="
set "A4="

for /F "delims=" %%i in (proxy.txt) do if not defined P1 set "P1=%%i"

for /F "delims=" %%i in (accountList.txt) do if not defined A1 set "A1=%%i"
for /F "skip=1 delims=" %%i in (accountList.txt) do if not defined A2 set "A2=%%i"
for /F "skip=2 delims=" %%i in (accountList.txt) do if not defined A3 set "A3=%%i"
for /F "skip=3 delims=" %%i in (accountList.txt) do if not defined A4 set "A4=%%i"

java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A1%:0000 -world 500 -script myscript:paramsifneeded
java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A2%:0000 -world 501 -script myscript:paramsifneeded
java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A3%:0000 -world 502 -script myscript:paramsifneeded
java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A4%:0000 -world 503 -script myscript:paramsifneeded

Like above^ accountList.txt is the text file with the accounts which line 1 of that file will be set to A1. line 2 would be A2 etc. same was done with proxy. So all you gotta do is change out the accounts and proxies in the text file and not redo a bunch of lines. You could probably do the samething with -scripts and a text file.

Could always you know get a database or server and shit too you know.

Edited by Gunman

  • Author
2 hours ago, Gunman said:

@Kangabr 2 things.
1. Make it one big script.
2. Use text files and make the .bat read and set values based on that txt file.

 


set "P1="

set "A1="
set "A2="
set "A3="
set "A4="

for /F "delims=" %%i in (proxy.txt) do if not defined P1 set "P1=%%i"

for /F "delims=" %%i in (accountList.txt) do if not defined A1 set "A1=%%i"
for /F "skip=1 delims=" %%i in (accountList.txt) do if not defined A2 set "A2=%%i"
for /F "skip=2 delims=" %%i in (accountList.txt) do if not defined A3 set "A3=%%i"
for /F "skip=3 delims=" %%i in (accountList.txt) do if not defined A4 set "A4=%%i"

java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A1%:0000 -world 500 -script myscript:paramsifneeded
java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A2%:0000 -world 501 -script myscript:paramsifneeded
java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A3%:0000 -world 502 -script myscript:paramsifneeded
java -jar "osbot.jar" -login user:pass -proxy %P1% -bot %A4%:0000 -world 503 -script myscript:paramsifneeded

Like above^ accountList.txt is the text file with the accounts which line 1 of that file will be set to A1. line 2 would be A2 etc. same was done with proxy. So all you gotta do is change out the accounts and proxies in the text file and not redo a bunch of lines. You could probably do the samething with -scripts and a text file.

Could always you know get a database or server and shit too you know.

Hey gunman thanks, I’ll definitely look into this. I have an r710 server but I have windows on it and just run my scripts from the cmd. I really would love to get a database but I am clueless as to setting one up. Have any tutorials in mind? Or would you be interested in helping me set one up for compensation?

12 minutes ago, Kangabr said:

Hey gunman thanks, I’ll definitely look into this. I have an r710 server but I have windows on it and just run my scripts from the cmd. I really would love to get a database but I am clueless as to setting one up. Have any tutorials in mind? Or would you be interested in helping me set one up for compensation?

Naw. But I know Dream made this and it should server as a base
https://osbot.org/forum/topic/156505-dream-server/?tab=comments#comment-1991960

6 hours ago, Kangabr said:

Hello all, my bot farm is finally almost ready to run full time but I am having a few issues that I need some help with.

i am currently running 50 accounts launching CLI. The problem I am having is I launch with a bat file, And I I need to run three scripts: tut island -> 7qp -> myscript.   But batch files only let me launch one script. Basically how do I launch multiple scripts from a .bat in almost a queue style?

my next question is editing the account info in 50-150 batch files easily. Currently since I can only launch one script per .bat I am editing 150 .bat daily. 50 accounts 3 .bats per account one for each script. Also after I launch my tut files I am having to wait 10ish minutes (time for tut island to complete) then close all my consoles and relaunch the 50 accounts again for the second script and so on so forth. 
 

I know this was a bit spastic but and hard to follow but any help is greatly appreciate for my quality of life. I’m about to blow my brains out editing all these files daily. Thanks! 

summary:

launch a script queue with CLI

edit these .bat files efficiently 

Here's what you could do:

- Get rid of all the bat files

- Create a program that reads a folder often and checks for files:

Here's the flow of it:

1. Start a separate program to populate the folder with 50 files all under the format of "AccountName_Tut"

2. The initial program (file reader) will read in all the files and process them accordingly:

2.1 When it sees "AccountName_Tut" it will take the account name and launch a process to start the client with the right args (in this case, tut island)

(after each read, it should delete the files)

 

At this point, you should have 50 tut island accounts running.

 

Whenever each tut island is done, it writes another file to the folder, "AccountName_7qp" and logs out and closes the client.

3. The same program from before will do the same thing, read in the account name and knows that it has to now launch the process to start for 7qp.

4. When 7qp is done, it writes more files, "AccountName_yourScript"

5.  Program again reads the file and launches a new set of scripts.

 

This avoids any database or issues of using a single file for storing state.

Edit: you could even do this as one batch file on its own as below. 

 

(appropriate 50 CLI lines for tutorial bot)

timeout 900 

taskkill /IM java.exe

timeout 5

(appropriate 50 CLI lines for 7qp bot) 

timeout  5000?? ( value here needs to be longer than how long bots take to gain 7qp)

taskkill /IM java.exe

timeout 5

(Appropriate 50 CLI lines for your method) 

(your method should then be started)

 

 

 

 

 

 

 

 

 

 

 

 

Edited by noobman997

  • Author
17 hours ago, dreameo said:

Here's what you could do:

- Get rid of all the bat files

- Create a program that reads a folder often and checks for files:

Here's the flow of it:

1. Start a separate program to populate the folder with 50 files all under the format of "AccountName_Tut"

2. The initial program (file reader) will read in all the files and process them accordingly:

2.1 When it sees "AccountName_Tut" it will take the account name and launch a process to start the client with the right args (in this case, tut island)

(after each read, it should delete the files)

 

At this point, you should have 50 tut island accounts running.

 

Whenever each tut island is done, it writes another file to the folder, "AccountName_7qp" and logs out and closes the client.

3. The same program from before will do the same thing, read in the account name and knows that it has to now launch the process to start for 7qp.

4. When 7qp is done, it writes more files, "AccountName_yourScript"

5.  Program again reads the file and launches a new set of scripts.

 

This avoids any database or issues of using a single file for storing state.

Thanks for the great post. What language would I be creating the reader in and what language for populating 

  • Author
1 hour ago, dreameo said:

any language really

Do you have any resources or forums to help me get started, I’m fairly new to writing code, even an an app I should use would help, thanks man 

  • Author
23 hours ago, noobman997 said:

Edit: you could even do this as one batch file on its own as below. 

 

(appropriate 50 CLI lines for tutorial bot)

timeout 900 

taskkill /IM java.exe

timeout 5

(appropriate 50 CLI lines for 7qp bot) 

timeout  5000?? ( value here needs to be longer than how long bots take to gain 7qp)

taskkill /IM java.exe

timeout 5

(Appropriate 50 CLI lines for your method) 

(your method should then be started)

 

 

 

 

 

 

 

 

 

 

 

 

tried your method really simple and works. but taskkill /IM java.exe doesn't close my bots sadly any fix? is it because I am running under c:\ desktop?

EDIT: fix for me is: taskkill.exe /f /im java.exe

 

Edited by Kangabr

Very very simple method but does the job consistently. 

 

Glad to hear you got it working 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.