Top players and API


So sat here most the day trying to figure out what I wanted to code. I wanted to code but no clue what to code. Finally got the idea of an info channel.

So after reading and trying to make multiple ports make sense and work in a test environment, I came up with why not use the same port and use a certain string to trigger an api setup to just send back info and drop the connection. So a web browser or whatever can just connect and get back info. Right now only have it give back players and top players. Players and player count is return if you send info: after connecting. And info:top with return top 10 players.

And to get the top 10 players I had to write a method to do it. And since I did that I decided to add top to the commands. And get a list of the top players, with class and exp back in a simple text line. So now you can see how you rank compared to the top 10. Which isn’t a lot.

I plan to write a simple php page to return the api info if you hit it with a url. So if you do say “realmsoffallenheroes.com/api.php?info” in your browser you would get: {users:BearFather:1}{port:42024} or “realmsoffallenheroes.com/api.php?top” you get: {1:aa:warrior:31850,2:Helix:priest:9213,…}. So in a few days that will be possiable and be able to make a plugin for the site to show that info. So watch for that.

Till next time…

 

Share