I changed source code of Volibot now it's close Volibot after end of game. And I wrote little java application to rerun volibot when Windows see that volibot closed. It works perfectly for 1 account boting (not worse than before 4.20).
I have idea how make it possible with multi bot I'll try it later.
How to set up:
You need do 4 things:
1) Have JVM (Java Virtual Machine I use 1.8 version) it needs to run my executable jar file (or you can use my .class or compile my source to your .class if you know Java).
2) Set update VoliBot - RitoBot.exe in folder with your configs (it's all the same VoliBot I just add one line - Environment.Exit(1) to close Voli after match.) Unfortunately I'm not good in C# to do more there. But I'll try it later.
3) Set VolibotRunner.jar to RitoBot.exe folder and run VolibotRunner.jar (you need JVM) you will see one button StartVoliBot/StopVoliBot pretty easy.
4) And don't forget use it only with 1 account (MaxBots=1) or you can get LeaverBuster ban.
You can see my code below:
Code:
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class VolibotRunner {
private JButton btnStart;
private JPanel pnlMain;
private JLabel status;
private boolean isRun;
private ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
private static final String VOLIBOT_NAME = "RitoBot.exe";
private final static VolibotRunner VOLIBOT_RUNNER = new VolibotRunner();
private final static ProcessBuilder VOLI_BOT_BUILDER = new ProcessBuilder("cmd", "/c", "start", VOLIBOT_NAME);
private static Process voliBotProc;
private static final String KILL = "taskkill /F /IM ";
public VolibotRunner() {
btnStart.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
isRun = !isRun;
if (!isRun) {
if (voliBotProc != null) {
voliBotProc.destroy();
voliBotProc = null;
try {
if (getProcesses().contains(VOLIBOT_NAME)) {
killProcess(VOLIBOT_NAME);
}
if (getProcesses().contains("cmd.exe")) {
killProcess("cmd.exe");
}
} catch (Exception exc) {
VOLIBOT_RUNNER.status.setText(exc.getMessage());
}
VOLIBOT_RUNNER.status.setText("Volibot closed");
btnStart.setText("Start Volibot");
}
}
}
});
}
public static void main(String[] args) {
VOLIBOT_RUNNER.service.scheduleAtFixedRate(VOLIBOT_RUNNER.createTimerThread(), 0, 5, TimeUnit.SECONDS);
JFrame frame = new JFrame("Volibot Runner");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(VOLIBOT_RUNNER.pnlMain);
frame.pack();
frame.setSize(300, 100);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
private static Runnable createTimerThread() {
return new Runnable() {
public void run() {
try {
if (VOLIBOT_RUNNER.isRun) {
if (!getProcesses().contains(VOLIBOT_NAME)) {
File f = new File(VOLIBOT_NAME);
if(f.exists() && !f.isDirectory()) {
voliBotProc = VOLI_BOT_BUILDER.start();
VOLIBOT_RUNNER.btnStart.setText("Stop Volibot");
VOLIBOT_RUNNER.status.setText("Volibot working");
} else {
VOLIBOT_RUNNER.status.setText(VOLIBOT_NAME + " does not exist, check that VolibotRunner is in the same folder with " + VOLIBOT_NAME);
}
}
}
} catch (Exception e) {
VOLIBOT_RUNNER.status.setText(e.getMessage());
}
}
};
}
private static ArrayList<String> getProcesses() throws IOException {
ArrayList<String> tasksList = new ArrayList<String>();
Process p = Runtime.getRuntime().exec(System.getenv("windir") + "\\system32\\" + "tasklist.exe /fo csv /nh");
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while (( line = input.readLine()) != null) {
tasksList.add(line.substring(1,line.indexOf(',') - 1));
}
return tasksList;
}
private static void killProcess(String serviceName) throws IOException {
Runtime.getRuntime().exec(KILL + serviceName);
}
}
Virus Check
Download
Source
Java Virtual Machine last version
Video how to use
Version for multi boting:
to use this version you should copy your files like this:
VolibotRunner1.jar RitoBot_VolibotRunner1.exe
VolibotRunner2.jar RitoBot_VolibotRunner2.exe
VolibotRunner3.jar RitoBot_VolibotRunner3.exe
etc.
and each pair in a separate folder with config.ini and accounts.txt with 1 account
then run all VolibotRunners
Thanks to the author of VoliBot - Maufeat for A LOT of free IP