Jump to content

CLI optimization help


Kangabr

Recommended Posts

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 

Link to comment
Share on other sites

@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
  • Heart 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

20 minutes ago, Gunman said:

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

Alright friend thanks for the advice I guess I’ll continue With my batch method and see if I use the snippet you linked to help. I really didn’t want to have to rewrite a huge script but oh well 

Link to comment
Share on other sites

21 minutes ago, Gunman said:

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

Alright friend thanks for the advice I guess I’ll continue With my batch method and see if I use the snippet you linked to help. I really didn’t want to have to rewrite a huge script but oh well 

  • Heart 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...