Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

Tool Wynncraft Servers Checker

Discussion in 'Your Work' started by __Excel, May 12, 2019.

?

Did i waste my time

  1. yes

    6.3%
  2. no

    93.8%
Thread Status:
Not open for further replies.
  1. __Excel

    __Excel i like cats VIP+

    Messages:
    596
    Likes Received:
    672
    Trophy Points:
    125
    Minecraft:
    ok now that the wynncraft API is back up i decided to make a quick wix website (plz dont kill me for using wix) This website lets you see which servers are older, and have better loot. It also lists the amount of players in each server. Here ya go:

    https://wynncraft-servers.wixsite.com/site


    for those of you that want the html/js code to themselves well here is a compressed version
    <body><p><font size=3 color="white"><center>The top servers are older (better loot) and the servers at the bottom are newer (less loot)</center></font></p><font color="white" id="output">Loading...</font><script type="text/javascript">var xmlHttp=new XMLHttpRequest;xmlHttp.open("GET","https://api.wynncraft.com/public_api.php?action=onlinePlayers",!1),xmlHttp.send(null);var serverList={},JSONObject=JSON.parse(xmlHttp.responseText),keys=Object.getOwnPropertyNames(JSONObject);for(i=0;i<keys.length;i++)0==keys.includes("lobby")&&0==keys.includes("GM")&&0==keys.includes("request")&&(serverList[keys]=JSONObject[keys].length);var outputString="<center>";for(i=0;i<Object.keys(serverList).length;i++)outputString=48<=serverList[Object.keys(serverList)]?outputString+'<font color="red">'+(i+1)+") <b>"+Object.keys(serverList)+": "+serverList[Object.keys(serverList)]+" players</b></font><br>":outputString+'<font color="white">'+(i+1)+") <b>"+Object.keys(serverList)+": "+serverList[Object.keys(serverList)]+" players</b></font><br>";outputString+="</center>";window.onload=function(){document.getElementById("output").innerHTML=outputString};</script></body>
     
  2. Druser

    Druser ele defs don't matter HERO Featured Wynncraftian

    Messages:
    5,887
    Likes Received:
    11,469
    Trophy Points:
    217
    Guild:
    Minecraft:
    How often do you query the API? (since there's a query limit per time - although I don't know exactly where the limit checks).
     
  3. __Excel

    __Excel i like cats VIP+

    Messages:
    596
    Likes Received:
    672
    Trophy Points:
    125
    Minecraft:
    I am making the POST request using client side javascript - when you load the page your browser is making the request to the API.
     
    Druser likes this.
  4. NotFunny

    NotFunny Well-Known Adventurer VIP

    Messages:
    566
    Likes Received:
    1,194
    Trophy Points:
    89
    Guild:
    Minecraft:
    I don't really loot run but it's useful so I can get to the newer servers so that *ahem see my profile post* the server won't reset for a while...
     
    Druser likes this.
  5. Gustaf

    Gustaf Veteran or something HERO

    Messages:
    878
    Likes Received:
    771
    Trophy Points:
    130
    Minecraft:
    Y'know, since your page is static and all client side, you can use GitHub pages to host things like these. I use it for my tools all the time, and only limitation is that the website can't run any server-side applications, like node.js.
     
  6. __Excel

    __Excel i like cats VIP+

    Messages:
    596
    Likes Received:
    672
    Trophy Points:
    125
    Minecraft:
    Huh ok maybe I'll move it there
     
  7. DrBracewell

    DrBracewell Famous Adventurer CT Manager QA Modeler GM CMD CHAMPION

    Messages:
    1,086
    Likes Received:
    1,905
    Trophy Points:
    153
    Creator Karma:
    Guild:
    Minecraft:
    *Annoyed at use of obselete HTML tags*
    *Annoyed at var instead of let*
    *Annoyed at Wix instead of GitHub/Gitlab.*
    nah jk pretty cool
     
  8. colin350

    colin350 The Best Admin (duh) HERO CHAMPION

    Messages:
    473
    Likes Received:
    3,998
    Trophy Points:
    279
    Minecraft:
    var is perfectly fine in this case :>
     
    YoshisWorld and Locky1110 like this.
  9. __Excel

    __Excel i like cats VIP+

    Messages:
    596
    Likes Received:
    672
    Trophy Points:
    125
    Minecraft:
    oof Bump 10char
     
Thread Status:
Not open for further replies.