hi man, login packets for p-server is?
LOGIN|UID|SID|CV is old and not work :(
thx for help :D
LOGIN|UID|SID|CV is old and not work :(
thx for help :D
public void handleGameServerConnect()
{
List<string> loginDetails = new List<string>() { Main.Hero.userID.ToString(), Main.Hero.sessionID, Main.version };
if (!(Main.Hero.factionID == 0) && Settings.mapID == 255)
{
loginDetails.Add(Main.Hero.factionID.ToString());
}
Packet LoginPacket = new Packet(ClientCommands.LOGIN, loginDetails.ToArray());
this.sendCommand(LoginPacket);
}
m_pyGlobal["Client"] = bp::object(bp::ptr(m_pSendWrapper)); m_pyGlobal["Initialize"](userId, m_sessionId, "4.1"); std::string login = "LOGIN|" + std::to_string(m_userId) + "|" + m_sessionId + "|4.1"; pClient->Send(login);
var packet = new Packet(New PacketFactory(ClientCommands.LOGIN,Hero.UserID,Hero.SessionID,ClientVersion)); _socket.Send(packet.Serialize().ToByteArray());
if(packet[0] == ServerCommands.LOGIN)
{
if(Server.GetClientVersion() != packet[3])
return;
UserId = int.Parse(packet[1]);
SessionId = packet[2];
...
}
static void Start()
{
m_gameProxy = new GameProxy<DarkorbitProtocol, DarkorbitPacket, NoEncryption>();
GlobalObjects.RegisterClassInstance(m_gameProxy);
m_gameProxy.SetEncoding(Encoding.UTF8);
m_gameProxy.ServerNotFound += m_gameProxy_ServerNotFound;
m_gameProxy.ServerError += m_gameProxy_ServerError;
m_gameProxy.ClientError += m_gameProxy_ClientError;
m_gameProxy.DispatchClientPacket += m_gameProxy_DispatchClientPacket;
m_gameProxy.DispatchServerPacket += m_gameProxy_DispatchServerPacket;
m_gameProxy.Start(IPAddress.Parse("37.187.179.147"), 8080);
IPacket loginPacket = new DarkorbitPacket(new Buffer("LOGIN|" + m_userId + "|" + m_sessionId + "|4.1", Encoding.UTF8));
m_gameProxy.SendPacket(loginPacket, ESendDirection.ClientToServer);
}
if (substr($packet, 0, 5) == "LOGIN") {
self::uLogin($packet);
}
private function uLogin($packet) {
$s = explode("|", $packet);
$w = self::SQLexe('SELECT * FROM server_1_players INNER JOIN users ON users.ID=server_1_players.userID WHERE server_1_players.tokenId=' . $s[2] . ' && server_1_players.playerID=' . $s[1] . '');
if (!empty($w)) {