Originally Posted by
AmberLynn
Btw: You can see what (and IF) you got in the PokeSniper2.log in the same directory as the startdiscord...bat file is located
ok, i checked,
the log is empty. the bot is not launching the pokesniper2.exe
EDIT:
i think i found your problem.
in the file PokemonChatHandler.java
you write to vbs file and than run it,
the file is not running well
you can skip the vbs file writing
at this file change the snipePokemon() function to:
Code:
public void snipePokemon(PokeLocation pokeLocation) {
if (SnipeCache.isCached(pokeLocation))
return;
// Set the snipe.bat file data
double latitude = pokeLocation.getLatitude();
double longitude = pokeLocation.getLongitude();
String pokemonName = pokeLocation.getPokemonType().toString();
/*BufferedWriter writer = null;
try {
writer = new BufferedWriter(
new FileWriter(new File(Main.getCurrentDirectory().getAbsolutePath() + "\\snipe.vbs")));
writer.write("PokeSniper2.exe " + pokemonName + " " + latitude + " " + longitude + " exit");
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}*/
// Snipe
DPSUtils.log("Sniping " + pokemonName + " @ " + latitude + ", " + longitude + ".");
try {
final Process process = Runtime.getRuntime()
.exec(Main.getCurrentDirectory().getAbsolutePath()+"\\PokeSniper2.exe " + pokemonName + " " + latitude + " " + longitude + " exit");
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
process.destroyForcibly();
}
}, 15000);
} catch (IOException e) {
e.printStackTrace();
}
SnipeCache.addToCache(pokeLocation);
}
explain:
i skipped the snipe.vbs writing and put the the snipping code to run in CMD
i think it should work but i could not run the code, to many libs are needed here. :confused:
please change it and check if it's working.
if so - please upload new jar.
thank you