falloutr 20 Share Posted August 26, 2018 Hi guys, So my first post here and first post really getting back into the community. I came from TopBot which is an old defunct client so have some experience from the past. Anyway on with the thread.. I went a bit overboard with this one but its fairly simple in design, it will take a file formatted like below located in the same directory as it 308:script name:param0 param1 318:script name0:param0 331:script name1:params... And launch the script it is configured to launch on all those accounts with the world selected, once done it will output their PIDs and you can press enter to kill them all at once. Its pretty straight forward that I'm sure most of you can figure out how to convert it to your favorite scripts if they require more or less parameters Here is the beast: #!/bin/bash file='accounts.txt' db_username='YOUR_DB_USERNAME' db_pass='YOUR_DB_PASS' pids_calc="pgrep java" pids=$(eval $pids_calc) while IFS=: read -r world script params do sh -c 'java -jar ~/DreamBot/BotData/client.jar -world "$0" -username "$1" -password "$2" -script "$3" -params "$4"' "$world" "$db_username" "$db_pass" "$script" "$param0"& sleep .5 newpids_calc="pgrep java" newpids=$(eval $newpids_calc) newpid=($(comm --nocheck-order -3 <(printf "%s\n" "${pids[@]}") <(printf "%s\n" "${newpids[@]}"))) printf "*****\n" printf "*\n" printf "NEW PID IS: %s\n" $newpid printf "*\n" printf "*****\n" newpid=" "$newpid finalpids+=$newpid sleep 3 pids=$newpids let "launch_count++" done < "$file" let "sleep_time=4*$launch_count" #change out the number here for faster/slower finish time #set conservatively to 4 by default because slow VPS, 2 is optimal on my desktop sleep $sleep_time printf "*****\n" printf "*\n" printf "Client launched with pid: %s\n" $finalpids printf "All clients launched, press enter to kill all\n" printf "*\n" printf "*****\n" read -s kill -9 $finalpids P.S. any feedback is welcome, if you have a masslauncher yourself share it :^D Would love to get a powershell and awk version too! P.P.S. I'll be adding any good recommendations and separate versions to the OP, giving credit ofc Also special thanks to Nezz for doing most of the work! :^) EDIT0: Made it a bit more generic to make it a little bit easier for other scripts Link to comment Share on other sites More sharing options...
sadgonzer 46 Share Posted August 27, 2018 glade to see your first post realy useful thanks for sharing this with us keep up Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted August 27, 2018 Good job on the contribution dude. You may want to correct the title though . How to Ruin Any Script Quickly Link to comment Share on other sites More sharing options...
Articron 738 Share Posted August 27, 2018 This is that good stuff bud Glad to have you here Fallout Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.