ČυяŞŀŅğ Posted September 17, 2015 Posted September 17, 2015 (edited) private int getVotes() { URL url = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(http); URLConnection con = url.openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { // for top-zone if (inputLine.contains("Votes:")) { return Integer.parseInt(inputLine.split(">")[3].replace("</div", "")); } } } catch (IOException e) { _log.warning("AutoVoteRewardHandler: "+e); } finally { try { in.close(); } catch (IOException e) {} try { isr.close(); } catch (IOException e) {} } return 0; } private int getVotes() { URL url = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(http); URLConnection con = url.openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { // for top-zone //if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) //{ //return Integer.valueOf(inputLine.split(">")[5].replace("</font", "")); //} //for hopzone if (inputLine.contains("rank anonymous tooltip")) return Integer.valueOf(inputLine.split(">")[2].replace("</span", "")); } } catch (IOException e) { _log.warning("AutoVoteRewardHandler: "+e); } finally { try { in.close(); } catch (IOException e) {} try { isr.close(); } catch (IOException e) {} } return 0; } OR adapt this one for freya l2jserver http://www.maxcheaters.com/topic/190422-voting-rewardhopzonetopzone/ Pm me with price or add me on skype Cursingqq ! Edited September 17, 2015 by ČυяŞŀŅğ
ČυяŞŀŅğ Posted September 18, 2015 Author Posted September 18, 2015 ALREADY found one system ! Please lock it !
Vision Posted September 18, 2015 Posted September 18, 2015 ALREADY found one system ! Please lock it ! kay
Recommended Posts