Here's something that might help you (Attached)
My source to a gameserver I was writing in php (yes, you heard me right)
Its obviously incomplete, but allows you to log in using telnet, pick a character belonging to you, then connect to the map server and move around the walkable areas of the map (coords specified in .map files) and talk to other people logged in.
I can't guarentee it will work because its old, but it may help you.
Hardly any comments though 😃