The world is currently online!


Welcome to Emps-World!

Register now to gain access to all of our forum features. Once registered and logged in, you will be able to create topics, post replies, send private messages, manage your profile, chat with other players in the shoutbox and much more. Once you sign in, this message will disappear.



Pages: 1
0 Members and 1 Guest are viewing this topic.

Offline Iron Whip

  • *
  • 3
  • Liked: 4 times
  • +0/-0
    • View Profile
Highscores
« on: August 24, 2016, 07:39:09 am »
This is a question to the game staff.

At the moment the highscores are compiled with javascript. Are the text-based databases available to browse for everyone? I am asking this because I am compiling a script which could automatically update the clan page with new data. Extracting data from javascript is very complicated. Much more simpler would be .csv or .xml file for example. ;)

Offline Kaarel 123

  • *
  • 661
  • Liked: 377 times
  • +0/-0
  • mak merica grate agen Ȃ̴̍͐͆̓̌̀̓̈̋̈̌̇̀͛̈́̉̈̒͒͘̕̚͝͝͠
    • View Profile
Re: Highscores
« Reply #1 on: August 24, 2016, 03:30:35 pm »
I'm not sure how you're planning to get this to work, but why is it difficult to parse json data? Anyways I think all the data is in json and there arent any xml or csv databases, but I'm not a dev so i can't say anything sure.

Ȃ̴̛̛̰̤̘͉̍͐͆̓̌̀̓̈̋̈̌̇̀͛̈́̉̈̒͒̋̂́̍̽̈̔̉̑̐͋̐̾͛̎̄͛́̈́̅͐͋̃͋̿͂͂͛̋͛̆͊̐̋͗͒͊͋̈́͛͑͑̉̉͒͌͆̾̂̈́̋̆̍̓̊̄̑̈͒̒͆͑̋̿̄͌͒͛́̑̿̑͗̇͋̈́̅̎̍͘̕̚̚͘͘͘̚̚̚̕͝͝͠͝͝͝͝͝
̶̡̡̨̢̨̨̨̢̢̡̢̛̛̛̙̟̗͎͍̞̪̖͙͓͖̥̗̲̬̫̬̝͉͔͍̻̹̙͕̱̮̲̺̭͉͔̹̖̮̖͖̳͉̩͙̲͚̝̲̺̥̬̰̝͙̤̭͕̝̯̺͔͎̜̳͙̖̫͉͉̗͉̱̭̗̱̦̭̹̗͓̤̟̻̞͂͌̌́̀̌̾͊̅̾̊̅̈́̈́͂̆̔̊̑̂̽̔̌̀͗̈́̃͆͗̌́̀͋̈̌͗̐͌̃̌͒̏̆̊͆̓̊̀͒̑̈̀̈́͑̏̋͆̇̈́̽̍̽̃̾̔̈́̀̾̈́͂̌̈́̐̃̊̀̌̇̾͛̽̽́̌̓̅̉̓̎̊̄̇̓̈́̎́̿̍͂̑̌̂̀̔̏͛̆͒͛̃̌̋͘̕̚̚͘͘͜͜͝͝͝͝ͅͅ
The following users liked this post: Iron Whip

Online Thomy

  • *
  • 3556
  • Liked: 3328 times
  • +5/-0
    • View Profile
Re: Highscores
« Reply #2 on: August 26, 2016, 06:27:12 pm »
Head over to https://emps-world.net/hiscores#skill,Overall and hit F12 (assuming you're using chrome or firefox). Head over to the network tab and take a look at the requests. It's all done with POSTs. You can see the request data (form data) and the response data (json interpreted by the hiscores javascript).

I recommend to use the jquery library to request the json data from the emps homepage: https://api.jquery.com/jquery.post/

Example on how to request the total level highscores:
Code: [Select]
$.ajax({
  type: "POST",
  url: "https://emps-world.net/scripts/hiscores_get.php",
  data: {
    cmd: 'skill'
    skill_id: 100
    page: 0
    rpp: 30
    opt: 0
  },
  success: function(json) {
    alert("it worked! "+JSON.stringify(json));
  },
  dataType: 'json',
});

Let me know if that works for you. :)
The following users liked this post: Iron Whip

Offline Iron Whip

  • *
  • 3
  • Liked: 4 times
  • +0/-0
    • View Profile
Re: Highscores
« Reply #3 on: August 29, 2016, 08:23:34 am »
Head over to https://emps-world.net/hiscores#skill,Overall and hit F12 (assuming you're using chrome or firefox). Head over to the network tab and take a look at the requests. It's all done with POSTs. You can see the request data (form data) and the response data (json interpreted by the hiscores javascript).

I recommend to use the jquery library to request the json data from the emps homepage: https://api.jquery.com/jquery.post/

Example on how to request the total level highscores:
Code: [Select]
$.ajax({
  type: "POST",
  url: "https://emps-world.net/scripts/hiscores_get.php",
  data: {
    cmd: 'skill'
    skill_id: 100
    page: 0
    rpp: 30
    opt: 0
  },
  success: function(json) {
    alert("it worked! "+JSON.stringify(json));
  },
  dataType: 'json',
});

Let me know if that works for you. :)

Thank You very much! I'll try to make it work ;)

Online Thomy

  • *
  • 3556
  • Liked: 3328 times
  • +5/-0
    • View Profile
Re: Highscores
« Reply #4 on: September 17, 2016, 08:03:19 pm »
Has it worked? Would love to see the fan site or project. :)

Offline Iron Whip

  • *
  • 3
  • Liked: 4 times
  • +0/-0
    • View Profile
Re: Highscores
« Reply #5 on: September 29, 2016, 01:26:51 pm »
Has it worked? Would love to see the fan site or project. :)

Sorry I've been very busy with work. Still don't have a working solution :P
The following users liked this post: Thomy
Pages: 1