Author Topic: Individual Vote Reward.Individual Vote Reward.  (Read 84 times)

0 Members and 1 Guest are viewing this topic.

Offlinemarciox25

  • Newbie
  • *
  • Posts: 3
  • L2topzone Votes: 2
  • Servers reviews: 0
  • Country: Belgium.
  • Reputation: +0/-0
  • L2topzone.com
    Individual Vote Reward.
    « on: November 20, 2016, 05:26:16 AM »

    Hello, I'm having some problems, or I think Im. Last time when I had the server running, it was working perfectly.
    and on the config it should be like this
    TopzoneUrl = https://l2topzone.com/lineage/server-info/IDSERVER/L2NAMESERVER
    (Name and ID censored soon avaible for public). and now I went and test it again and it simply didnt worked.
    I saw a thing on the my home space, and saw a API related part. Do I need to put the API link in the URL now?

    Any Help? Thank you!
    Code: [Select]
    protected static int getTopZoneVotes()
    {
    int votes = -1;
    URL url = null;
    URLConnection con = null;
    InputStream is = null;
    InputStreamReader isr = null;
    BufferedReader in = null;
    try
    {
    url = new URL(Config.VOTE_LINK_TOPZONE);
    con = url.openConnection();
    con.addRequestProperty("User-Agent", "L2TopZone");
    is = con.getInputStream();
    isr = new InputStreamReader(is);
    in = new BufferedReader(isr);

    String inputLine;
    while ((inputLine = in.readLine()) != null)
    {

    if (inputLine.contains("</span></small>"))
    {
    votes = Integer.valueOf(inputLine.split(">")[9].replace("</span", ""));
    return votes;
    }
    }


    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    return votes;
    }



    Linkback: https://l2topzone.com/forum/l2-server-support-and-problems/9/individual-vote-reward/26739/
    « Last Edit: November 20, 2016, 05:26:53 AM by marciox25 »


    Offlinexzone

    • Read our rules
    • Administrator
    • Hero Member
    • *****
    • Posts: 597
    • L2topzone Votes: 11
    • Servers reviews: 4
    • Country: Romania.
    • Reputation: +10480/-0
    • Gender: Male
      • l2topzone
    Read our rules

    Offlinemarciox25

    • Newbie
    • *
    • Posts: 3
    • L2topzone Votes: 2
    • Servers reviews: 0
    • Country: Belgium.
    • Reputation: +0/-0
    • L2topzone.com
      Re: Individual Vote Reward.
      « Reply #2 on: November 20, 2016, 08:43:02 AM »
      Hey, thank you for your answer. Ive read them but I havent seen any instructions of how to properly put the API in the code...

      //edit

      Found it , will take a look and if needed will addapt the code, thx
      « Last Edit: November 20, 2016, 08:47:06 AM by marciox25 »


      Share via diggShare via facebookShare via linkedinShare via myspaceShare via redditShare via twitter

      xx
      [help] vote manager / vote reward

      Started by raydenxp

      1 Replies
      2364 Views
      Last post December 24, 2012, 06:06:14 AM
      by thund3r
      xx
      vote/reward

      Started by GrosninNetwork

      26 Replies
      1736 Views
      Last post March 24, 2016, 06:50:16 AM
      by Markus
      xx
      Question about Vote Reward

      Started by Sekai

      1 Replies
      1252 Views
      Last post May 06, 2014, 12:05:26 PM
      by GraetMaestro
      xx
      [Help] Vote reward system

      Started by l2mushroom

      0 Replies
      1417 Views
      Last post November 07, 2011, 09:38:04 AM
      by l2mushroom
      xx
      [HELP]Vote Reward Problem

      Started by disorder25

      2 Replies
      1322 Views
      Last post March 18, 2014, 11:58:15 AM
      by GraetMaestro
       


      Sitemap