Player List
Is there, or could there be, an XML/PHP resource or in-game command where we can pull all the different player names and their stats from? Programatically it helps with tracking if what you are targeting is a player or an NPC, so you can adjust your key-bindings appropriately. (If I target "Ryno" for instance, when I do an HONOURS RYNO nothing comes back, so I assume it's an NPC and not the partial name of "Rynok").
With the old website there was a page that had the information on it but you had to do a screen scrape, but when this new site was made we lost that functionality. While it's possible to pull the data by other means (like checking who's online and who's died recently and compiling a list over time) it'd be much easier and less intensive to just check a file once in a while or enter a command at login or such.
If anyone has any other way they pull that data though, let me know, I'd be interested in it.
0
Comments
There's also the GMCP message Comm.Channel.Players which you can send to the server. The server will respond with a Comm.Channel.Players message that looks like this:
EDIT: This post edited to change the CMUD dictionary back into the json that's actually sent.
[ { "name": "Seria" }, { "name": "Adelena" }, { "name": "Apoloc", "channels": [ "The Clan of Honorary Council of Manliness" ] }, { "name": "Alexys" }, { "name": "Iluv", "channels": [ "The Council of Khandava", "The Clan of Honorary Council of Manliness", "The Clan of Demonic Legion", "The Clan of Khandava Guard", "The Clan of Deadwood Council" ] }, { "name": "Ryax" }, { "name": "Tikal" }, { "name": "Seraphyne" }, { "name": "Estcer" }, { "name": "Cerex" }, { "name": "Giselle", "channels": [ "The Council of Khandava", "The Tzolkin", "The Clan of The Corinthian Order", "The Clan of Demonic Legion", "The Clan of Khandava Guard", "The Clan of Corgi Cavalcade" ] }, { "name": "Keeran" }, { "name": "Drakar" }, { "name": "Azefel", "channels": [ "The Council of Khandava", "The Tzolkin", "The Clan of The Corinthian Order", "The Clan of Honorary Council of Manliness", "The Clan of Demonic Legion", "The Clan of Khandava Guard" ] }, { "name": "Doshar", "channels": [ "The Clan of The Corinthian Order", "The Clan of Honorary Council of Manliness" ] }, { "name": "Ria" }, { "name": "Blyth" }, { "name": "Shou" }, { "name": "Merack" }, { "name": "Sigard" }, { "name": "Braidan" }, { "name": "Kanthari", "channels": [ "The Council of Khandava", "The Tzolkin", "The Clan of The Corinthian Order", "The Clan of Honorary Council of Manliness", "The Clan of Demonic Legion", "The Clan of The Reapers", "The Clan of Corgi Cavalcade", "The Clan of Deadwood Council" ] }, { "name": "Celestine", "channels": [ "The Clan of The Corinthian Order" ] }, { "name": "Airamaya" }, { "name": "Vox" }, { "name": "Glijije" }, { "name": "Iyrandar" }, { "name": "Camaris" }, { "name": "Kolgrimm" }, { "name": "Draven", "channels": [ "The Clan of Honorary Council of Manliness" ] }, { "name": "Vaughn" }, { "name": "Lytharose" }, { "name": "Ferriter" }, { "name": "Iobelia" }, { "name": "Jarrhn" }, { "name": "Mercer" }, { "name": "Ambrose" } ]
I use it thusly:
#local $message, $sendstr
$message = %json(%0)
$sendstr = "unenemy all" + @{separator}
#forall $message {#if (not %ismember(%i.name, @ignorelist)) {$sendstr = $sendstr + "enemy " + %i.name + @{separator}}}
#send $sendstr
the claims are stated - it's the world I've created
EDIT: So it is identical to the list on the site. Gems don't hide players anymore, and the site doesn't bypass hidden people or chameleon et al.
the claims are stated - it's the world I've created
Full name: Shou Agarwaen
Level: 124
Doc is at http://www.ironrealms.com/IREAPIdocumentation.pdf
This is in Python3:
>>> import urllib.request
>>> urllib.request.urlopen("http://api.imperian.com/characters.json").read()
b'{"count":"25","characters":[{"uri":"http:\\/\\/api.imperian.com\\/characters\\/airamaya.json","name":"Airamaya"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/alyce.json","name":"Alyce"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/azefel.json","name":"Azefel"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/blyth.json","name":"Blyth"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/braidan.json","name":"Braidan"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/canavas.json","name":"Canavas"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/cas.json","name":"Cas"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/cerex.json","name":"Cerex"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/eathi.json","name":"Eathi"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/ixi.json","name":"Ixi"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/jarrhn.json","name":"Jarrhn"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/kryss.json","name":"Kryss"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/lytharose.json","name":"Lytharose"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/maglust.json","name":"Maglust"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/merelii.json","name":"Merelii"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/michiko.json","name":"Michiko"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/namir.json","name":"Namir"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/raykel.json","name":"Raykel"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/sarciossis.json","name":"Sarciossis"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/shaheen.json","name":"Shaheen"},{"uri":"http:\\/\\/api.imperian.com\\/characters\\/tek.json","name":"Tek"}]}'
EDIT 2: Since your browser just does a GET anyway, you can also navigate to http://api.imperian.com/characters.json if you just want to see it.
EDIT 3:
In case you prefer the socket API
requeststr = b"GET /characters.json HTTP/1.1Host: api.imperian.comConnection: close"
s=socket.socket()
s.connect(("api.imperian.com", 80)) #just "imperian.com" also works
s.send(requeststr)
s.recv(1000)
the claims are stated - it's the world I've created
the claims are stated - it's the world I've created
This is for Python 3 (I'm still training myself to use 3 instead of 2.7, and I'm rusty, so I'm doing everything in Python 3. This will be more or less the same for python 2, except that the print call will change)
import urllib.request
import json
playerlist = json.loads(urllib.request.urlopen("http://api.imperian.com/characters.json").read().decode("utf-8"))
print(playerlist["count"] + " players online:")
for i in playerlist['characters']:
print(i["name"], end=" ")
the claims are stated - it's the world I've created