Trust and Honesty
We don’t need to brag - what matters is that you actually feel the service works the way it should.
No surprises, no stress.
With Vibe SMS, you can focus on your tasks knowing everything runs smoothly.
Like having a friend by your side calm, reliable, and without unnecessary words.
Website link — https://vibe-sms.net/
Our Telegram channel — https://t.me/vibe_sms
Experience L2Gold like never before – available ONLY on Saturdays & Sundays!
Custom Armors: Dynasty, Apella
Custom Weapons: L2Gold Weapons
Custom Jewelry: L2Gold Jewelry
Custom Teleport System & AIO Buffer
Custom Zones, NPCs & Raidbosses
This is not just another private server – it’s a limited-time battleground for the ultimate L2 experience!
Play only on weekends
Website: https://l2kandra.online/
Info & Contact: https://www.facebook.com/profile.php?id=61578869175323
Question
l2viserion
There are new changes in hopzone but I'm unable to fix it, not sure what I do wrong, can anybody help with below code to read the current votes?
protected static int getVotes()
{
InputStreamReader isr = null;
BufferedReader br = null;
try
{
if(!hopzoneUrl.endsWith(".html"))
hopzoneUrl+=".html";
URLConnection con = new URL(hopzoneUrl).openConnection();
con.addRequestProperty("User-Agent", "Mozilla/5.0");
isr = new InputStreamReader(con.getInputStream());
br = new BufferedReader(isr);
String line;
while ((line = br.readLine()) != null)
{
if (line.contains(":server-votes")||line.contains(":server-votes=")||line.contains("server-votes")||line.contains("server-votes=")||line.contains(":server-votes=\""))
{
int votes = Integer.valueOf(line.split("\"")[1].split("\"")[0].split("\"")[2]);
//Hopzone line source code:
// :server-votes="228"
return votes;
}
}
br.close();
Edited by l2viserionisr.close();
}
catch (Exception e)
{
System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage());
}
return -1;
}
help tag
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now