PDA

View Full Version : MySEQ and Delphi ?



Cordan
05-09-2003, 03:08 AM
Hi,

i am a total noob with C (besides i dont own that language at all). But since several years i love to code with Delphi.

So my question is:

Would it be possible (allowed) to try a delphi based client that connects to your server ?

domesticbeer
05-09-2003, 06:58 AM
As caveman would probably say sure if you want to code it. Not sure of his skill set but if you are planning on building off of what the server sends you then it shouldnt be that difficult if you know how to program with delphi.

cavemanbob
05-09-2003, 11:24 AM
What domesticbeer said. :)

I personally hate coding in pascal and don't have a copy of delphi, but there's no reason it can't be done.

Cordan
05-11-2003, 12:46 PM
Well i love coding in delphi ;) hehehe Coding in pascal since 4.0 till now delphi 7.0.

I will start to look into how you communicate to the server and start to "reanimate" my "mad"-delphi skills to see what i can make or not ;)

cavemanbob
05-11-2003, 03:49 PM
I can post a full desciption about the communication protocol later tonight if you like. It's not particularily complicated.

Cordan
05-12-2003, 03:53 AM
Would really appreciate it if you could post that =)

cavemanbob
05-13-2003, 12:50 AM
OK, here goes...

Communication protocol is as follows:
TCP/IP, blocking sockets

After connection when the client wants an update from the server, it sends a 1 byte message to the server, the actual value is unimportant (The c# client uses 0x23, but it means nothing)
After it receives the 1 byte packet it sends a big packet containing a number of smaller update packets representing the current snapshot of the bits of the eq memory. This packet can be up to 100000 bytes long.

The first thing in any update packet is a 32bit integer containing the number of subpackets in this update.
The rest of the update packet is a bunch of SPAWNINFO_SEND structures packed back to back. The layout of this structure is in the server source, but the order and size of the variables is critical so make sure delphi is using the correct sizes for the types or it will not work.

The flags variable in the SPAWNINFO_SEND structure indicates what exactly this structure represents. They are:
flags == 0: MOB Info, the members do what they appear to.
flags == 1: Current Target (This is currently broken, but will be fixed at some point), The name member holds the name of the current target.
flags == 4: Short zone name, The name member holds the short name of the current zone.
flags == 253: Basic player info packet, the members do what they appear to.
flags == 5: Item on the ground, Name, X, Y, Z and SpawnID hold the expected values, all others are unused and will probably contain invalid data.

Other than that, remember that EQ X and Y coordinates are reversed for some reason that I've never fully understood.

If you need any other info let me know and I'll see what I can do.

Cordan
05-13-2003, 08:15 AM
http://www.prodes.org/chaos/cmc-ultra-alpha.gif

Had some time today to code and did some stuff as you can see on the above image.

The tool can connect/disconnect to the server (the server at least says it is connected).

Now working out how to get data from the server ;)