protected int getHopZoneVotes()
{
int votes = -1;
try
{
final WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setPrintContentOnFailingStatusCode(false);
final HtmlPage page = webClient.getPage(PowerPakConfig.VOTES_SITE_HOPZONE_URL);
final String fullPage = page.asXml();
final int constrainA = fullPage.indexOf("rank anonymous tooltip") + 24;
String voteSection = fullPage.substring(constrainA);
final int constrainB = voteSection.indexOf("span") - 2;
voteSection = voteSection.substring(0, constrainB).trim();
votes = Integer.parseInt(voteSection);
// Try to free all the freaking resources
page.cleanUp();
webClient.getJavaScriptEngine().shutdown();
webClient.closeAllWindows();
}
catch (final Exception e)
{
LOGGER.warn("[AutoVoteReward] Server HOPZONE is offline or something is wrong in link", e);
Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] HOPZONE is offline. We will check reward as it will be online again");
}
return votes;
}
Maybe anyone have fixed that auto vote reward script? This is from frozen, Hopzone.
Discord :
utchiha_market
Telegram :
https://t.me/utchiha_market
Auto Buy Store :
https://utchihamkt.mysellauth.com/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Discord :
utchiha_market
Telegram :
https://t.me/utchiha_market
Auto Buy Store :
https://utchihamkt.mysellauth.com/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Discord :
utchiha_market
Telegram :
https://t.me/utchiha_market
Auto Buy Store :
https://utchihamkt.mysellauth.com/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Question
Kuzuv
Maybe anyone have fixed that auto vote reward script? This is from frozen, Hopzone.
2 answers to this question
Recommended Posts