Spidey* Posted October 11, 2013 Share Posted October 11, 2013 Keep waiting :troll: needs fix : private static int getFirstPageRankVotes() { InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(page1Url).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { if (line.contains("<td><div align=\"center\">"+firstPageRankNeeded+"</div></td>")) { for (int i=0;i<=3;i++) { line = br.readLine(); } int votes = Integer.valueOf(line.split(">")[2].replace("</div", "")); return votes; } } br.close(); isr.close(); } catch (Exception e) { System.out.println(e); System.out.println("Error while getting server vote count."); } return -1; } Link to comment Share on other sites More sharing options...
Roronoa Posted October 11, 2013 Share Posted October 11, 2013 the quote is fixed code? Link to comment Share on other sites More sharing options...
humancode Posted October 13, 2013 Share Posted October 13, 2013 Hey guys! i'm a niewbe here and i would like a bit of help in this one! the code looks nice but how do i put it in the server and make it work? anyone who knows can pm me please with instructions! and how i do all these and where do i put this code? pleaseeeeee? I would realy appreciate that! Link to comment Share on other sites More sharing options...
^Wyatt Posted October 13, 2013 Share Posted October 13, 2013 Hey guys! i'm a niewbe here and i would like a bit of help in this one! the code looks nice but how do i put it in the server and make it work? anyone who knows can pm me please with instructions! and how i do all these and where do i put this code? pleaseeeeee? I would realy appreciate that! HopzoneServerLink= TopzoneServerLink= Use your server url's... reading last replies seems that the code is outdated btw. Link to comment Share on other sites More sharing options...
SweeTs Posted October 13, 2013 Share Posted October 13, 2013 HopzoneServerLink= TopzoneServerLink= Use your server url's... reading last replies seems that the code is outdated btw. It's not an instruction.. :troll: He's asking 'how to add the code' and not 'how to configure links' :D And I am lazy to write all this.. But if you revert some pages back, you will find how since when I wasnt lazy, I did :D Link to comment Share on other sites More sharing options...
^Wyatt Posted October 13, 2013 Share Posted October 13, 2013 It's not an instruction.. :troll: He's asking 'how to add the code' and not 'how to configure links' :D And I am lazy to write all this.. But if you revert some pages back, you will find how since when I wasnt lazy, I did :D :rage: lol then read a guide about applying patches :rage: Link to comment Share on other sites More sharing options...
SweeTs Posted October 13, 2013 Share Posted October 13, 2013 :rage: lol then read a guide about applying patches :rage: Could you give me a link to any guide, please? :troll: Link to comment Share on other sites More sharing options...
humancode Posted October 13, 2013 Share Posted October 13, 2013 HopzoneServerLink= TopzoneServerLink= Use your server url's... reading last replies seems that the code is outdated btw. It's not an instruction.. :troll: He's asking 'how to add the code' and not 'how to configure links' :D And I am lazy to write all this.. But if you revert some pages back, you will find how since when I wasnt lazy, I did :D Can you give me a link please? how do i import the codes and all about this vote reward system? i would really appreciate it! :( Link to comment Share on other sites More sharing options...
Spidey* Posted October 13, 2013 Share Posted October 13, 2013 the quote is fixed code? replace this method with the old one, and topzone gonna work correctly Link to comment Share on other sites More sharing options...
SweeTs Posted October 13, 2013 Share Posted October 13, 2013 Can you give me a link please? how do i import the codes and all about this vote reward system? i would really appreciate it! :( But if you revert some pages back, you will find how :D Link to comment Share on other sites More sharing options...
SayHoOo Posted October 18, 2013 Share Posted October 18, 2013 replace this method with the old one, and topzone gonna work correctly dont think so bro Link to comment Share on other sites More sharing options...
heopas Posted October 21, 2013 Share Posted October 21, 2013 Adapted and Fixed for acis rev 300.http://pastebin.com/gy0Tk91W Link to comment Share on other sites More sharing options...
DNG3R Posted October 23, 2013 Share Posted October 23, 2013 Adapted and Fixed for acis rev 300. http://pastebin.com/gy0Tk91W still not working with topzone: There was a problem on getting Topzone votes from server with rank 15. Link to comment Share on other sites More sharing options...
heopas Posted October 23, 2013 Share Posted October 23, 2013 It works for me. I have it at my test server. Post your configuration for topzone here. Link to comment Share on other sites More sharing options...
DNG3R Posted October 23, 2013 Share Posted October 23, 2013 # Topzone AllowTopzoneVoteReward = True # Vote reward server link. TopzoneServerLink = http://l2topzone.com/lineage2/server-info/7737/L2SpiritCustom.html # First page of servers list link. TopzoneFirstPageLink = http://l2topzone.com/lineage2/server-list/top.html/ # Votes for next reward needed. TopzoneVotesDifference = 5 # Rank needed for server to be on first page. TopzoneFirstPageRankNeeded = 10 # Minutes between rewards. # Eg. You put 5 it checks every 5 minutes for reward. TopzoneRewardCheckTime = 1 # Small reward(s). TopzoneSmallReward = 57,100000000; # Big reward(s). TopzoneBigReward = 3470,1; # Hopzone reward max dual boxes reward. # For example if you put 2 and someone has 3 boxes open, 2 will be rewarded. TopzoneDuaboxesAllowed = 1 # Game server console report. # If set to true, game server console will get a report of # current vote count, votes needed for next reward and votes needed for first page. AllowTopzoneGameServerReport = True Link to comment Share on other sites More sharing options...
Recommended Posts