From The Mana World
(Modified to specify automatic character list sending and without the index byte)
(No character list right after registering, and no need for a separate message)
Line 6: Line 6:
1a. PAMSG_REGISTER { L version, "username", "password", "email" }
1a. PAMSG_REGISTER { L version, "username", "password", "email" }
     APMSG_REGISTER_RESPONSE { 0 }
     APMSG_REGISTER_RESPONSE { 0 }
    APMSG_CHAR_LIST { B number, [ S name, B gender, B hair style, B hair color, B level,
                                  W money, W*6 stats, S mapname, W*2 position ] }


1b. PAMSG_LOGIN { L version, "username", "password" }
1b. PAMSG_LOGIN { L version, "username", "password" }
     APMSG_LOGIN_RESPONSE { 0 }
     APMSG_LOGIN_RESPONSE { 0 (, B number, [ S name, B gender, B hair style, B hair color, B level,
    APMSG_CHAR_LIST { B number, [ S name, B gender, B hair style, B hair color, B level,
                                            W money, W*6 stats, S mapname, W*2 position ] ) }
                                  W money, W*6 stats, S mapname, W*2 position ] }


2a. PAMSG_UNREGISTER { }
2a. PAMSG_UNREGISTER { }

Revision as of 21:27, 1 August 2006

Here be documented our own communication protocol. For the latest list of all messages and their contents, see defines.h.

Login sequence

1a. PAMSG_REGISTER { L version, "username", "password", "email" }
    APMSG_REGISTER_RESPONSE { 0 }

1b. PAMSG_LOGIN { L version, "username", "password" }
    APMSG_LOGIN_RESPONSE { 0 (, B number, [ S name, B gender, B hair style, B hair color, B level,
                                            W money, W*6 stats, S mapname, W*2 position ] ) }

2a. PAMSG_UNREGISTER { }
    APMSG_UNREGISTER_RESPONSE { 0 }

2b. PAMSG_LOGOUT { }
    APMSG_LOGOUT_RESPONSE { 0 }
...

Movement and combat

Protocol in development, see article about the being movement system.

Chatting

1a. PCMSG_CHAT { "message", channel }
1b. PCMSG_ANNOUNCE { "annoucement" }
1c. PCMSG_PRIVMSG { "username", "message" }
2a. CPMSG_ERROR { error }
2b. CPMSG_ANNOUNCEMENT { "annoucement" }
2c. CPMSG_PRIVMSG { "username", "message" }
2d. CPMSG_PUBMSG { channel, "username", "message" }

Notes

Maybe it would be nicer to have the annoucements simply occur on a special dedicated channel. This would make implementation easier. Also, I think it's fine to also send a username for these messages. --Bjørn 12:44, 26 July 2006 (CEST)