• Welcome to Valhalla Legends Archive.
 

[MCP] Master Control Program Sequence

Started by Archangel, April 24, 2005, 11:09 PM

Previous topic - Next topic

Archangel

Master Control Program (MCP) Sequence By ArchAngel
----------------------------------------------------

BNCS:
   [C->S] 0x40 SID_QUERYREALMS2
   [S->C] 0x40 SID_QUERYREALMS2
   [C->S] 0x3E SID_LOGONREALMEX
   [S->C] 0x3E SID_LOGONREALMEX

Connect the MCP Socket to the realm with the SID_LOGONREALMEX information.
When connected, you need to send the protocol byte (0x01).

Code:

Socket.SendData Chr(1)


MCP:
   [C->S] 0x01 MCP_STARTUP
   [S->C] 0x01 MCP_STARTUP
   [C->S] 0x19 MCP_CHARLIST2
   [S->C] 0x19 MCP_CHARLIST2
   [C->S] 0x07 MCP_CHARLOGON
   [S->C] 0x07 MCP_CHARLOGON

[Enter Chat]
BNCS:
   [C->S] 0x0A SID_ENTERCHAT

Packet Header:
   (WORD)      Message length, including this header
   (BYTE)      Message ID
   (VOID)      Message Data

Code:

Public Function sendRealmPacket(PacketID As Byte, Index As Integer)
    If Socket.State <> sckConnected Then: ClearBuffer: Exit Function
        Socket.SendData MakeWORD(Len(Buffer) + 3) & Chr(PacketID) & Buffer
        ClearBuffer
End Function


*Edit: Added BNETDOCS links for packets.
I'm not an Addict.