Hi everyone,
Firstly I'd like to say I'm learning on the fly and this is quite a big challenge for me so go easy on me xD..I'm trying to set up a Comet 5187 server and running into issues with the game server handshake. Would love some guidance.
Setup:
- Comet 5187 branch from GitLab
- MySQL databases (comet.account, comet.game)
-I started with the loader from this thread as it worked when I got client 4330 COPS v6 emulator running but have no reverted to https://conquerloader.com/
What works:
Account server starts and accepts connections
Login succeeds (correct username/password)
Client receives MsgConnectEx redirect to game server
Client connects to game server on port 5816
What doesn't work:
Handshake fails - client shows "OnShakeHand failed" error and crashes
Things I've tried:
1. Fixed LoaderSet.ini - changed IP and ports
2. Fixed config.json LoginPort (9958 → 9960)
3. Fixed database realm table - GameIPAddress set correctly
4. Fixed account StatusID to 2 (activated)
5. Added AuthCode=2 to MsgConnectEx packet
6. Tried different handshake formats in MsgHandshake.cs
7. Tried sending handshake unencrypted vs encrypted
8. Fixed Diffie-Hellman implementation (was computing g^m mod p incorrectly)
Client debug log shows:
ERROR: CGameSocket::ReceiveMsg() OnShakeHand failed at ..\3DRole/Network/socket.h, 564
Has anyone gotten 5187 working successfully? Is there something specific about the Diffie-Hellman implementation or handshake packet format for 5187?
Thanks!