hi all
im having a bit of trouble here. I have a minecraft game server. I want to write a tcp client which will send a packet of data. it should then respond back with a string which should contain the server information i.e: motd(message of the day), max player capacity and current player count.
according to a documentation it says i need to send a packet with an id of: 0xFE
It also give an example in php, ruby and python. But i am having difficulty doing this in vb
Here is a snippet of the documentation
do have a look at the examples. You can try pinging this server:Server List Ping (0xFE)
Client to Server
To load server info in the multiplayer menu, the notchian client connects to each known server and sends an 0xFE.
In return, the server sends a kick (0xFF), with its string containing data (server description, number of users, number of slots), delimited by a UCS-2 '§' (0xA7).
Note that as this is the last packet you'll see, you can get away with just chopping off the first three bytes (the ident and the string length) and decoding the remainder as a UCS-2 string.
If the number of available slots sent is equal to or less than 0, the client should display it as "???".
Example server pinger:
https://gist.github.com/1209061 (Python)
https://gist.github.com/1235274 (PHP)
http://pastebin.com/q5zFPcXV (Ruby)
Packet ID
0xFE
host name: vidhu.game-server.cc
Port: 25565
I have copied the php script. you can view it in action here:
http://vidhucraft.co.uk/bukkitping.php
thanks a lot,
Vidhu


Reply With Quote