Differences

This shows you the differences between two versions of the page.

manaserv_protocol [2010/06/10 12:32]
Yohann Ferreira Started to inline the return values and some layout redone.
manaserv_protocol [2010/06/22 10:45] (current)
Yohann Ferreira
Line 28: Line 28:
to ease their understanding: to ease their understanding:
-  * Components: **B** byte, **W** word, **D** double word, **S** variable-size string, **C** tile-based coordinates (B*3) +  * Components: **B** Byte, **W** Word, **D** Double word, **S** Variable-size string, **C** Tile-based coordinates (B*3) 
-  * Hosts:      **P** (player's client), **A** (account server), **C** (char server), **G** (game server)+  * Hosts:      **P** (Player's client), **A** (Account server), **C** (Char server), **G** (Game server)
Hence, here are how we prefix the messages: Hence, here are how we prefix the messages:
-  * PAMSG_*: from client to account server +  * **PA**MSG_*: from client to account server 
-  * APMSG_*: from account server to client +  * **AP**MSG_*: from account server to client 
-  * PCMSG_*: from client to chat server +  * **PC**MSG_*: from client to chat server 
-  * CPMSG_*: from chat server to client +  * **CP**MSG_*: from chat server to client 
-  * PGMSG_*: from client to game server +  * **PG**MSG_*: from client to game server 
-  * GPMSG_*: from game server to client +  * **GP**MSG_*: from game server to client 
-  * GAMSG_*: from game server to account server+  * **GA**MSG_*: from game server to account server
and here is an example: and here is an example:
Line 55: Line 55:
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
|  **PAMSG_REGISTER**                |  0x0000  | **D** version, **S** username, **S** password, **S** email, **S** captcha response  | |  **PAMSG_REGISTER**                |  0x0000  | **D** version, **S** username, **S** password, **S** email, **S** captcha response  |
-|  **APMSG_REGISTER_RESPONSE**       |  0x0002  | **B** error, [**S** updatehost]  |+|  **APMSG_REGISTER_RESPONSE**       |  0x0002  | **B** error, [**S** updatehost] \\ __Error return values:__ \\ **REGISTER_INVALID_VERSION** (0x40): The user is using an incompatible protocol version. \\ **REGISTER_EXISTS_USERNAME** (0x41): There is already a registered account with this username. \\ **REGISTER_EXISTS_EMAIL** (0x42): There is already an account with this email address. \\ **REGISTER_CAPTCHA_WRONG** (0x43): The user didn't solve the captcha correctly. |
|  **GAMSG_REGISTER**                |  0x0500  | **S** address, **W** port, **S** password, **D** items db revision, { **W** map id }*  | |  **GAMSG_REGISTER**                |  0x0500  | **S** address, **W** port, **S** password, **D** items db revision, { **W** map id }*  |
-|  **AGMSG_REGISTER_RESPONSE**       |  0x0501  | **C** item version, **C** password response \\ \\ __Item version return values:__ \\ **DATA_VERSION_OK** (0x00): Item DB version is ok. \\ **DATA_VERSION_OUTDATED** (0x01): Item DB version is outdated. \\ __Password return values:__ \\ **PASSWORD_OK** (0x00): Password accepted. \\ **PASSWORD_BAD** (0x01): Invalid password. Registering failed.  |+|  **AGMSG_REGISTER_RESPONSE**       |  0x0501  | **C** item version, **C** password response \\ __Item version return values:__ \\ **DATA_VERSION_OK** (0x00): Item DB version is ok. \\ **DATA_VERSION_OUTDATED** (0x01): Item DB version is outdated. \\ __Password return values:__ \\ **PASSWORD_OK** (0x00): Password accepted. \\ **PASSWORD_BAD** (0x01): Invalid password. Registering failed.  |
|  **PAMSG_UNREGISTER**              |  0x0003  | **S** username, **S** password  | |  **PAMSG_UNREGISTER**              |  0x0003  | **S** username, **S** password  |
|  **APMSG_UNREGISTER_RESPONSE**     |  0x0004  | **B** error  | |  **APMSG_UNREGISTER_RESPONSE**     |  0x0004  | **B** error  |
|  **PAMSG_REQUEST_REGISTER_INFO**   |  0x0005  | None  | |  **PAMSG_REQUEST_REGISTER_INFO**   |  0x0005  | None  |
-|  **APMSG_REGISTER_INFO_RESPONSE**  |  0x0006  | **B** byte registration Allowed, **B** minNameLength, **B** maxNameLength, **S** captchaURL, **S** captchaInstructions +|  **APMSG_REGISTER_INFO_RESPONSE**  |  0x0006  | **B** registration Allowed, **B** min name Length, **B** max name length, **S** captcha URL, **S** captcha instructions
-|  PAMSG_LOGIN                   |  0x0010  | D version, S username, S password  | +|  **PAMSG_LOGIN**                  |  0x0010  | **D** version, **S** username, **S** password  | 
-|  APMSG_LOGIN_RESPONSE          |  0x0012  | B error, [S updatehost]  | +|  **APMSG_LOGIN_RESPONSE**         |  0x0012  | B error, [S updatehost] \\ __Error return values:__ \\ **LOGIN_INVALID_VERSION** (0x40): The user is using a incompatible protocol version. \\ **LOGIN_INVALID_TIME** (0x50): The user tried logging in too fast. \\ **LOGIN_BANNED** (0x51) : The user is currently banned.
-|  PAMSG_LOGOUT                  |  0x0013  | None  | +|  **PAMSG_LOGOUT**                 |  0x0013  | None  | 
-|  APMSG_LOGOUT_RESPONSE         |  0x0014  | B error  | +|  **APMSG_LOGOUT_RESPONSE**        |  0x0014  | **B** error  | 
-|  PAMSG_CHAR_CREATE             |  0x0020  | S name, B hair style, B hair color, B gender, Wx6 stats +|  **PAMSG_CHAR_CREATE**            |  0x0020  | **S** name, **B** hair style, **B** hair color, **B** gender, **W**x6 statistics
-|  APMSG_CHAR_CREATE_RESPONSE    |  0x0021  | B error  | +|  **APMSG_CHAR_CREATE_RESPONSE**   |  0x0021  | **B** error \\ __Error return values:__ \\ **CREATE_INVALID_HAIRSTYLE** (0x40): Invalid Hairstyle value. \\ **CREATE_INVALID_HAIRCOLOR** (0x41): Invalid hair color value. \\ **CREATE_INVALID_GENDER** (0x42): Invalid Gender value. \\ **CREATE_ATTRIBUTES_TOO_HIGH** (0x43): Some attributes are too high. \\ **CREATE_ATTRIBUTES_TOO_LOW** (0x44): Some attributes are too low. \\ **CREATE_ATTRIBUTES_EQUAL_TO_ZERO** (0x45): Some attribute are equal to 0. \\ **CREATE_EXISTS_NAME** (0x46): Character name already exists. \\ **CREATE_TOO_MUCH_CHARACTERS** (0x47): The maximum of characters has already been created. Cannot create a new one.
-|  PAMSG_CHAR_DELETE             |  0x0022  | B index  | +|  **PAMSG_CHAR_DELETE**            |  0x0022  | **B** index  | 
-|  APMSG_CHAR_DELETE_RESPONSE    |  0x0023  | B error  | +|  **APMSG_CHAR_DELETE_RESPONSE**   |  0x0023  | **B** error  | 
-|  APMSG_CHAR_INFO               |  0x0024  | B index, S name, B gender, B hair style, B hair color, W level, W character points, W correction points, D money, Wx6 stats +|  **APMSG_CHAR_INFO**              |  0x0024  | **B** index, **S** name, **B** gender, **B** hair style, **B** hair color, **W** level, **W** character points, **W** correction points, **D** money, **W**x6 statistics
-|  PAMSG_CHAR_SELECT               |  0x0026  | B index  | +|  **PAMSG_CHAR_SELECT**              |  0x0026  | **B** index  | 
-|  APMSG_CHAR_SELECT_RESPONSE      |  0x0027  | B error, Bx32 token, S game address, W game port, S chat address, W chat port  | +|  **APMSG_CHAR_SELECT_RESPONSE**     |  0x0027  | **B** error, **B**x32 token, **S** game address, **W** game port, **S** chat address, **W** chat port  | 
-|  PAMSG_EMAIL_CHANGE              |  0x0030  | S email  | +|  **PAMSG_EMAIL_CHANGE**             |  0x0030  | **S** email  | 
-|  APMSG_EMAIL_CHANGE_RESPONSE     |  0x0031  | B error  | +|  **APMSG_EMAIL_CHANGE_RESPONSE**    |  0x0031  | **B** error \\ __Error return values:__ \\ **ERRMSG_OK** (0): Modification done. \\ **EMAILCHG_EXISTS_EMAIL** (0x40): New email already exists for another account. Cannot change.
-|  PAMSG_PASSWORD_CHANGE           |  0x0034  | S old password, S new password  | +|  **PAMSG_PASSWORD_CHANGE**          |  0x0034  | **S** old password, **S** new password  | 
-|  APMSG_PASSWORD_CHANGE_RESPONSE  |  0x0035  | B error  | +|  **APMSG_PASSWORD_CHANGE_RESPONSE** |  0x0035  | **B** error  | 
-|  PGMSG_CONNECT                   |  0x0050  | Bx32 token  | +|  **PGMSG_CONNECT**                  |  0x0050  | **B**x32 token  | 
-|  GPMSG_CONNECT_RESPONSE          |  0x0051  | B error  | +|  **GPMSG_CONNECT_RESPONSE**         |  0x0051  | **B** error  | 
-|  PCMSG_CONNECT                   |  0x0053  | Bx32 token  | +|  **PCMSG_CONNECT**                  |  0x0053  | **B**x32 token  | 
-|  CPMSG_CONNECT_RESPONSE          |  0x0054  | B error  | +|  **CPMSG_CONNECT_RESPONSE**         |  0x0054  | **B** error  | 
-|  PGMSG_DISCONNECT                |  0x0060  | B reconnect account  | +|  **PGMSG_DISCONNECT**               |  0x0060  | **B** reconnect account  | 
-|  GPMSG_DISCONNECT_RESPONSE       |  0x0061  | B error, Bx32 token  | +|  **GPMSG_DISCONNECT_RESPONSE**      |  0x0061  | **B** error, **B**x32 token  | 
-|  PCMSG_DISCONNECT                |  0x0063  | None  | +|  **PCMSG_DISCONNECT**               |  0x0063  | None  | 
-|  CPMSG_DISCONNECT_RESPONSE       |  0x0064  | B error  | +|  **CPMSG_DISCONNECT_RESPONSE**      |  0x0064  | **B** error  | 
-|  PAMSG_RECONNECT                 |  0x0065  | Bx32 token  | +|  **PAMSG_RECONNECT**                |  0x0065  | **B**x32 token  | 
-|  APMSG_RECONNECT_RESPONSE        |  0x0066  | B error  |+|  **APMSG_RECONNECT_RESPONSE**       |  0x0066  | **B** error  |
==== Player related messages ==== ==== Player related messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  GPMSG_PLAYER_MAP_CHANGE        |  0x0100  | S filename, W x, W y  | +|  **GPMSG_PLAYER_MAP_CHANGE**       |  0x0100  | **S** filename, **W** x, **W** y  | 
-|  GPMSG_PLAYER_SERVER_CHANGE     |  0x0101  | B*32 token, S game address, W game port  | +|  **GPMSG_PLAYER_SERVER_CHANGE**    |  0x0101  | **B**x32 token, **S** game address, **W** game port  | 
-|  GPMSG_PLAYER_ATTRIBUTE_CHANGE  |  0x0130  | W attribute, W base value, W modified value }*  | +|  **GPMSG_PLAYER_ATTRIBUTE_CHANGE** |  0x0130  | **W** attribute, **W** base value, **W** modified value }*  | 
-|  GPMSG_PLAYER_EXP_CHANGE        |  0x0140  | { W skill, D exp got, D exp needed }*  | +|  **GPMSG_PLAYER_EXP_CHANGE**       |  0x0140  | { **W** skill, **D** exp got, **D** exp needed }*  | 
-|  GPMSG_LEVELUP                  |  0x0150  | W new level, W character points, W correction points  | +|  **GPMSG_LEVELUP**                 |  0x0150  | **W** new level, **W** character points, **W** correction points  | 
-|  GPMSG_LEVEL_PROGRESS           |  0x0151  | B percent completed to next levelup +|  **GPMSG_LEVEL_PROGRESS**          |  0x0151  | **B** percent completed to next level up
-|  PGMSG_RAISE_ATTRIBUTE          |  0x0160  | B attribute  | +|  **PGMSG_RAISE_ATTRIBUTE**         |  0x0160  | **B** attribute  | 
-|  GPMSG_RAISE_ATTRIBUTE_RESPONSE |  0x0161  | B error, B attribute  | +|  **GPMSG_RAISE_ATTRIBUTE_RESPONSE** |  0x0161  | **B** error, **B** attribute \\ __Error return values:__ \\ **ATTRIBMOD_OK** (ERRMSG_OK [0]): Modification done without errors. \\ **ATTRIBMOD_INVALID_ATTRIBUTE** (0x40): Invalid attribute ID. \\ **ATTRIBMOD_NO_POINTS_LEFT** (0x41): No point left permitting modification. \\ **ATTRIBMOD_DENIED** (0x42): Modification not permitted.
-|  PGMSG_LOWER_ATTRIBUTE          |  0x0170  | B attribute  | +|  **PGMSG_LOWER_ATTRIBUTE**         |  0x0170  | **B** attribute  | 
-|  GPMSG_LOWER_ATTRIBUTE_RESPONSE |  0x0171  | B error, B attribute  | +|  **GPMSG_LOWER_ATTRIBUTE_RESPONSE** |  0x0171  | **B** error, **B** attribute \\ **See __GPMSG_RAISE_ATTRIBUTE_RESPONSE__.**
-|  PGMSG_RESPAWN                  |  0x0180  | None  | +|  **PGMSG_RESPAWN**                 |  0x0180  | None  | 
-|  AGMSG_PLAYER_ENTER          | 0x0510 | B*32 token, D id, S name, serialised character data  | +|  **AGMSG_PLAYER_ENTER**         | 0x0510 | **B**x32 token, **D** id, **S** name, serialised character data. FIXME: Explain what is contained into the character's serialized data.
-|  GAMSG_PLAYER_DATA           | 0x0520 | D id, serialised character data  | +|  **GAMSG_PLAYER_DATA**          | 0x0520 | **D** id, serialised character data  | 
-|  GAMSG_REDIRECT              | 0x0530 | D id  | +|  **GAMSG_REDIRECT**             | 0x0530 | **D** id  | 
-|  AGMSG_REDIRECT_RESPONSE     | 0x0531 | D id, B*32 token, S game address, W game port  | +|  **AGMSG_REDIRECT_RESPONSE**    | 0x0531 | **D** id, **B**x32 token, **S** game address, **W** game port  | 
-|  GAMSG_PLAYER_RECONNECT      | 0x0532 | D id, B*32 token  | +|  **GAMSG_PLAYER_RECONNECT**     | 0x0532 | **D** id, **B**x32 token  | 
-|  GAMSG_PLAYER_SYNC           | 0x0533 | serialised sync data  |+|  **GAMSG_PLAYER_SYNC**          | 0x0533 | serialised sync data \\ __Return values:__ \\ **SYNC_CHARACTER_POINTS** (0x01), **D** Character ID, **D** Character Points, **D** Correction Points, **B** Attribute ID, **D** Attribute value. \\ **SYNC_CHARACTER_SKILL** (0x02), **D** Character ID, **B** Skill ID, **D** Skill value. \\ **SYNC_ONLINE_STATUS** (0x03), **D** Character ID, **B** {0x00 = offline, 0x01 = online}. \\ **SYNC_END_OF_BUFFER** (0xFF) shows, that the buffer ends here. |
==== Inventory related messages ==== ==== Inventory related messages ====
-|  PGMSG_PICKUP                   |  0x0110  | W*2 position  | +^  Message name  ^  Hex value  ^  Values sent  ^ 
-|  PGMSG_DROP                     |  0x0111  | B slot, B amount  | +|  **PGMSG_PICKUP**                  |  0x0110  | **W**x2 position  | 
-|  PGMSG_EQUIP                    |  0x0112  | B slot  | +|  **PGMSG_DROP**                    |  0x0111  | **B** slot, **B** amount  | 
-|  PGMSG_UNEQUIP                  |  0x0113  | B slot  | +|  **PGMSG_EQUIP**                   |  0x0112  | **B** slot  | 
-|  PGMSG_MOVE_ITEM                |  0x0114  | B slot1, B slot2, B amount  | +|  **PGMSG_UNEQUIP**                 |  0x0113  | **B** slot  | 
-|  GPMSG_INVENTORY                |  0x0120  | { B slot, W item id [, B amount] }*  | +|  **PGMSG_MOVE_ITEM**               |  0x0114  | **B** slot1, **B** slot2, **B** amount  | 
-|  GPMSG_INVENTORY_FULL           |  0x0121  | { B slot, W item id [, B amount] }*  |+|  **GPMSG_INVENTORY**               |  0x0120  | { **B** slot, **W** item id [, **B** amount] }*  | 
 +|  **GPMSG_INVENTORY_FULL**          |  0x0121  | { **B** slot, **W** item id [, **B** amount] }*  |
==== Items messages ==== ==== Items messages ====
-|  GPMSG_ITEMS                    |  0x0281  | { W item id, W*2 position }*  | +^  Message name  ^  Hex value  ^  Values sent  ^ 
-|  GPMSG_ITEM_APPEAR              |  0x0202  | W item id, W*2 position  | +|  **GPMSG_ITEMS**                   |  0x0281  | { **W** item id, **W**x2 position }*  | 
-|  PGMSG_USE_ITEM                 |  0x0300  | B slot  | +|  **GPMSG_ITEM_APPEAR**             |  0x0202  | **W** item id, **W**x2 position  | 
-|  GPMSG_USE_RESPONSE             |  0x0301  | B error  |+|  **PGMSG_USE_ITEM**                |  0x0300  | **B** slot  | 
 +|  **GPMSG_USE_RESPONSE**            |  0x0301  | **B** error  |
==== Beings messages ==== ==== Beings messages ====
-|  GPMSG_BEING_ENTER              |  0x0200  | B type, W being id, B action, W*2 position, \\ **Characters:** S name, B hair style, B hair color, B gender, B item bitmask, { W item id }* \\ **Monsters:** W type id  \\ **Npcs:** W type id   +^  Message name  ^  Hex value  ^  Values sent  ^ 
-|  GPMSG_BEING_LEAVE              |  0x0201  | W being id  | +|  **GPMSG_BEING_ENTER**             |  0x0200  | **B** type, **W** being id, **B** action, **W**x2 position, \\ **Characters:** **S** name, **B** hair style, **B** hair color, **B** gender, **B** item bitmask, { **W** item id }* \\ **Monsters:** **W** type id  \\ **Npcs:** **W** type id \\ __Being type values:__ \\ **OBJECT_ITEM** (0): A simple item. \\ **OBJECT_ACTOR** (1): An item that toggle map/quest actions (doors, switchs, ...) and can speak (map panels). \\ **OBJECT_NPC** (2): Non-Playable-Character is an actor capable of movement and maybe actions. \\ **OBJECT_MONSTER** (3): A monster (moving actor with AI. Should be able to toggle map/quest actions, too). \\ **OBJECT_CHARACTER** (4): A normal being. \\ **OBJECT_EFFECT** (5): A effect to be shown. \\ **OBJECT_OTHER** (6): Server-only object.  
-|  GPMSG_BEING_LOOKS_CHANGE       |  0x0210  | W weapon, W hat, W top clothes, W bottom clothes  | +|  **GPMSG_BEING_LEAVE**             |  0x0201  | **W** being id  | 
-|  PGMSG_WALK                     |  0x0260  | W*2 destination  | +|  **GPMSG_BEING_LOOKS_CHANGE**      |  0x0210  | **W** weapon, **W** hat, **W** top clothes, **W** bottom clothes  | 
-|  PGMSG_ACTION_CHANGE            |  0x0270  | B Action  | +|  **PGMSG_WALK**                    |  0x0260  | **W**x2 destination  | 
-|  GPMSG_BEING_ACTION_CHANGE      |  0x0271  | W being id, B action  | +|  **PGMSG_ACTION_CHANGE**           |  0x0270  | **B** Action  | 
-|  PGMSG_DIRECTION_CHANGE         |  0x0272  | B Direction  | +|  **GPMSG_BEING_ACTION_CHANGE**     |  0x0271  | **W** being id, **B** action  | 
-|  GPMSG_BEING_DIR_CHANGE         |  0x0273  | W being id, B direction  | +|  **PGMSG_DIRECTION_CHANGE**        |  0x0272  | **B** Direction  | 
-|  GPMSG_BEING_HEALTH_CHANGE      |  0x0274  | W being id, W health  | +|  **GPMSG_BEING_DIR_CHANGE**        |  0x0273  | **W** being id, **B** direction  | 
-|  GPMSG_BEINGS_MOVE              |  0x0280  | { W being id, B flags [, W*2 position, B speed] }*  | +|  **GPMSG_BEING_HEALTH_CHANGE**     |  0x0274  | **W** being id, **W** health  | 
-|  GPMSG_BEINGS_DAMAGE            |  0x0310  | { W being id, W amount }*  | +|  **GPMSG_BEINGS_MOVE**             |  0x0280  | { **W** being id, **B** flags [, **W**x2 position, **B** speed] }* \\ __Flag values:__ \\ **MOVING_POSITION** (1): The next Wx2 values will contain the current being position. \\ **MOVING_DESTINATION** (2): The next Wx2 values will contain the being destination.
-|  PGMSG_ATTACK                   |  0x0290  | W being id  | +|  **GPMSG_BEINGS_DAMAGE**           |  0x0310  | { **W** being id, **W** amount }*  | 
-|  GPMSG_BEING_ATTACK             |  0x0291  | W being id, B direction, B attacktype +|  **PGMSG_ATTACK**                  |  0x0290  | **W** being id  | 
-|  PGMSG_USE_SPECIAL              |  0x0292  | B specialID +|  **GPMSG_BEING_ATTACK**            |  0x0291  | **W** being id, **B** direction, **B** attack type
-|  GPMSG_SPECIAL_STATUS           |  0x0293  | { B specialID, D current, D max, D recharge }  |+|  **PGMSG_USE_SPECIAL**             |  0x0292  | **B** special ID
 +|  **GPMSG_SPECIAL_STATUS**          |  0x0293  | { **B** special ID, **D** current, **D** max, **D** recharge }  |
==== Effects spawning messages ==== ==== Effects spawning messages ====
-|  GPMSG_CREATE_EFFECT_POS        |  0x0320  | W effect id, W*2 position  | +^  Message name  ^  Hex value  ^  Values sent  ^ 
-|  GPMSG_CREATE_EFFECT_BEING      |  0x0321  | W effect id, W BeingID  |+|  **GPMSG_CREATE_EFFECT_POS**       |  0x0320  | **W** effect id, **W**x2 position  | 
 +|  **GPMSG_CREATE_EFFECT_BEING**     |  0x0321  | **W** effect id, **W** BeingID  |
==== Npc messages ==== ==== Npc messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  GPMSG_NPC_CHOICE               |  0x02B0  | W being id, { S text }*  | +|  **GPMSG_NPC_CHOICE**              |  0x02B0  | **W** being id, { **S** text }*  | 
-|  GPMSG_NPC_MESSAGE              |  0x02B1  | W being id, B* text  | +|  **GPMSG_NPC_MESSAGE**             |  0x02B1  | **W** being id, **B** * text  | 
-|  PGMSG_NPC_TALK                 |  0x02B2  | W being id  | +|  **PGMSG_NPC_TALK**                |  0x02B2  | **W** being id  | 
-|  PGMSG_NPC_TALK_NEXT            |  0x02B3  | W being id  | +|  **PGMSG_NPC_TALK_NEXT**           |  0x02B3  | **W** being id  | 
-|  PGMSG_NPC_SELECT               |  0x02B4  | W being id, B choice  | +|  **PGMSG_NPC_SELECT**              |  0x02B4  | **W** being id, **B** choice  | 
-|  GPMSG_NPC_BUY                  |  0x02B5  | W being id, { W item id, W amount, W cost }*  | +|  **GPMSG_NPC_BUY**                 |  0x02B5  | **W** being id, { **W** item id, **W** amount, **W** cost }*  | 
-|  GPMSG_NPC_SELL                 |  0x02B6  | W being id, { W item id, W amount, W cost }*  | +|  **GPMSG_NPC_SELL**                |  0x02B6  | **W** being id, { **W** item id, **W** amount, **W** cost }*  | 
-|  PGMSG_NPC_BUYSELL              |  0x02B7  | W item id, W amount  | +|  **PGMSG_NPC_BUYSELL**             |  0x02B7  | **W** item id, **W** amount  | 
-|  GPMSG_NPC_ERROR                |  0x02B8  | B error  | +|  **GPMSG_NPC_ERROR**               |  0x02B8  | **B** error  | 
-|  GPMSG_NPC_CLOSE                |  0x02B9  | W being id  | +|  **GPMSG_NPC_CLOSE**               |  0x02B9  | **W** being id  | 
-|  GPMSG_NPC_POST                 |  0x02D0  | W being id  | +|  **GPMSG_NPC_POST**                |  0x02D0  | **W** being id  | 
-|  PGMSG_NPC_POST_SEND            |  0x02D1  | W being id, { S name, S text, W item id }  | +|  **PGMSG_NPC_POST_SEND**           |  0x02D1  | **W** being id, { **S** name, **S** text, **W** item id }  | 
-|  GPMSG_NPC_POST_GET             |  0x02D2  | W being id, { S name, S text, W item id }  | +|  **GPMSG_NPC_POST_GET**            |  0x02D2  | **W** being id, { **S** name, **S** text, **W** item id }  | 
-|  PGMSG_NPC_NUMBER               |  0x02D3  | W being id, D number  | +|  **PGMSG_NPC_NUMBER**              |  0x02D3  | **W** being id, **D** number  | 
-|  PGMSG_NPC_STRING               |  0x02D4  | W being id, S string  | +|  **PGMSG_NPC_STRING**              |  0x02D4  | **W** being id, **S** string  | 
-|  GPMSG_NPC_NUMBER               |  0x02D5  | W being id, D max, D min, D default  | +|  **GPMSG_NPC_NUMBER**              |  0x02D5  | **W** being id, **D** max, **D** min, **D** default  | 
-|  GPMSG_NPC_STRING               |  0x02D6  | W being id  |+|  **GPMSG_NPC_STRING**              |  0x02D6  | **W** being id  |
==== Chat messages ==== ==== Chat messages ====
Line 168: Line 172:
=== General chat messages === === General chat messages ===
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  PGMSG_SAY                      |  0x02A0  | S text  | +|  **PGMSG_SAY**                     |  0x02A0  | S text  | 
-|  GPMSG_SAY                      |  0x02A1  | W being id, S text  | +|  **GPMSG_SAY**                     |  0x02A1  | W being id, S text  | 
-|  CPMSG_ERROR                    | 0x0401 | B error  | +|  **CPMSG_ERROR**                   | 0x0401 | B error \\ __Error return values:__ \\ **CHAT_USING_BAD_WORDS** (0x40): Detected pre-configured slangs in the chat sentence. \\ **CHAT_UNHANDLED_COMMAND** (0x41): Not handled command entered in chat prompt.
-|  CPMSG_ANNOUNCEMENT             | 0x0402 | S text  | +|  **CPMSG_ANNOUNCEMENT**            | 0x0402 | S text  | 
-|  CPMSG_PRIVMSG                  | 0x0403 | S user, S text  | +|  **CPMSG_PRIVMSG**                 | 0x0403 | S user, S text  | 
-|  CPMSG_PUBMSG                   | 0x0404 | W channel, S user, S text  | +|  **CPMSG_PUBMSG**                  | 0x0404 | W channel, S user, S text  | 
-|  PCMSG_CHAT                     | 0x0410 | S text, W channel  | +|  **PCMSG_CHAT**                    | 0x0410 | S text, W channel  | 
-|  PCMSG_ANNOUNCE                 | 0x0411 | S text  | +|  **PCMSG_ANNOUNCE**                | 0x0411 | S text  | 
-|  PCMSG_PRIVMSG                  | 0x0412 | S user, S text  | +|  **PCMSG_PRIVMSG**                 | 0x0412 | S user, S text  | 
-|  PCMSG_WHO                      | 0x0415 | None  | +|  **PCMSG_WHO**                     | 0x0415 | None  | 
-|  CPMSG_WHO_RESPONSE             | 0x0416 | { S user }  |+|  **CPMSG_WHO_RESPONSE**            | 0x0416 | { S user }  |
=== Chat channeling messages === === Chat channeling messages ===
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  CPMSG_CHANNEL_EVENT               | 0x0430 | W channel, B event, S info  | +|  **CPMSG_CHANNEL_EVENT**              | 0x0430 | W channel, B event, S info \\ __Event values:__ \\ **CHAT_EVENT_NEW_PLAYER** (0): A new player entered the channel. \\ **CHAT_EVENT_LEAVING_PLAYER** (1): A player left the channel. \\ **CHAT_EVENT_TOPIC_CHANGE** (2): Channel topic changed. \\ **CHAT_EVENT_MODE_CHANGE** (3): Channel mode changed. \\ **CHAT_EVENT_KICKED_PLAYER** (4): A player was kicked from the channel. \\ FIXME: Document info values.
-|  PCMSG_ENTER_CHANNEL               | 0x0440 | S channel, S password  | +|  **PCMSG_ENTER_CHANNEL**              | 0x0440 | S channel, S password  | 
-|  CPMSG_ENTER_CHANNEL_RESPONSE      | 0x0441 | B error, W id, S name, S topic, S userlist  | +|  **CPMSG_ENTER_CHANNEL_RESPONSE**     | 0x0441 | B error, W id, S name, S topic, S userlist  | 
-|  PCMSG_QUIT_CHANNEL                | 0x0443 | W channel id  | +|  **PCMSG_QUIT_CHANNEL**               | 0x0443 | W channel id  | 
-|  CPMSG_QUIT_CHANNEL_RESPONSE       | 0x0444 | B error, W channel id  | +|  **CPMSG_QUIT_CHANNEL_RESPONSE**      | 0x0444 | B error, W channel id  | 
-|  PCMSG_LIST_CHANNELS               | 0x0445 | None  | +|  **PCMSG_LIST_CHANNELS**              | 0x0445 | None  | 
-|  CPMSG_LIST_CHANNELS_RESPONSE      | 0x0446 | S names, W number of users  | +|  **CPMSG_LIST_CHANNELS_RESPONSE**     | 0x0446 | S names, W number of users  | 
-|  PCMSG_LIST_CHANNELUSERS           | 0x0460 | S channel  | +|  **PCMSG_LIST_CHANNELUSERS**          | 0x0460 | S channel  | 
-|  CPMSG_LIST_CHANNELUSERS_RESPONSE  | 0x0461 | S channel, { S user, B mode }  | +|  **CPMSG_LIST_CHANNELUSERS_RESPONSE** | 0x0461 | S channel, { S user, B mode }  | 
-|  PCMSG_TOPIC_CHANGE                | 0x0462 | W channel id, S topic  |+|  **PCMSG_TOPIC_CHANGE**               | 0x0462 | W channel id, S topic  |
==== Trade protocol messages ==== ==== Trade protocol messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  PGMSG_TRADE_REQUEST            |  0x02C0  | W being id  | +|  **PGMSG_TRADE_REQUEST**           |  0x02C0  | W being id  | 
-|  GPMSG_TRADE_REQUEST            |  0x02C1  | W being id  | +|  **GPMSG_TRADE_REQUEST**           |  0x02C1  | W being id  | 
-|  GPMSG_TRADE_START              |  0x02C2  | None  | +|  **GPMSG_TRADE_START**             |  0x02C2  | None  | 
-|  GPMSG_TRADE_COMPLETE           |  0x02C3  | None  | +|  **GPMSG_TRADE_COMPLETE**          |  0x02C3  | None  | 
-|  PGMSG_TRADE_CANCEL             |  0x02C4  | None  | +|  **PGMSG_TRADE_CANCEL**            |  0x02C4  | None  | 
-|  GPMSG_TRADE_CANCEL             |  0x02C5  | None  | +|  **GPMSG_TRADE_CANCEL**            |  0x02C5  | None  | 
-|  PGMSG_TRADE_AGREED             |  0x02C6  | None  | +|  **PGMSG_TRADE_AGREED**            |  0x02C6  | None  | 
-|  GPMSG_TRADE_AGREED             |  0x02C7  | None  | +|  **GPMSG_TRADE_AGREED**            |  0x02C7  | None  | 
-|  PGMSG_TRADE_CONFIRM            |  0x02C8  | None  | +|  **PGMSG_TRADE_CONFIRM**           |  0x02C8  | None  | 
-|  GPMSG_TRADE_CONFIRM            |  0x02C9  | None  | +|  **GPMSG_TRADE_CONFIRM**           |  0x02C9  | None  | 
-|  PGMSG_TRADE_ADD_ITEM           |  0x02CA  | B slot, B amount  | +|  **PGMSG_TRADE_ADD_ITEM**          |  0x02CA  | B slot, B amount  | 
-|  GPMSG_TRADE_ADD_ITEM           |  0x02CB  | W item id, B amount  | +|  **GPMSG_TRADE_ADD_ITEM**          |  0x02CB  | W item id, B amount  | 
-|  PGMSG_TRADE_SET_MONEY          |  0x02CC  | D amount  | +|  **PGMSG_TRADE_SET_MONEY**         |  0x02CC  | D amount  | 
-|  GPMSG_TRADE_SET_MONEY          |  0x02CD  | D amount  | +|  **GPMSG_TRADE_SET_MONEY**         |  0x02CD  | D amount  | 
-|  GPMSG_TRADE_BOTH_CONFIRM       |  0x02CE  | None  |+|  **GPMSG_TRADE_BOTH_CONFIRM**      |  0x02CE  | None  |
==== Party messages ==== ==== Party messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  PCMSG_PARTY_INVITE                  | 0x03A0 | S name  | +|  **PCMSG_PARTY_INVITE**                 | 0x03A0 | S name  | 
-|  CPMSG_PARTY_INVITE_RESPONSE         | 0x03A1 | B error, S name  | +|  **CPMSG_PARTY_INVITE_RESPONSE**        | 0x03A1 | B error, S name  | 
-|  CPMSG_PARTY_INVITED                 | 0x03A2 | S name  | +|  **CPMSG_PARTY_INVITED**                | 0x03A2 | S name  | 
-|  PCMSG_PARTY_ACCEPT_INVITE           | 0x03A5 | S name  | +|  **PCMSG_PARTY_ACCEPT_INVITE**          | 0x03A5 | S name  | 
-|  CPMSG_PARTY_ACCEPT_INVITE_RESPONSE  | 0x03A6 | B error, { S name }  | +|  **CPMSG_PARTY_ACCEPT_INVITE_RESPONSE** | 0x03A6 | B error, { S name }  | 
-|  PCMSG_PARTY_REJECT_INVITE           | 0x03A7 | S name  | +|  **PCMSG_PARTY_REJECT_INVITE**          | 0x03A7 | S name  | 
-|  CPMSG_PARTY_REJECTED                | 0x03A8 | S name  | +|  **CPMSG_PARTY_REJECTED**               | 0x03A8 | S name  | 
-|  PCMSG_PARTY_QUIT                    | 0x03AA | None  | +|  **PCMSG_PARTY_QUIT**                   | 0x03AA | None  | 
-|  CPMSG_PARTY_QUIT_RESPONSE           | 0x03AB | B error  | +|  **CPMSG_PARTY_QUIT_RESPONSE**          | 0x03AB | B error  | 
-|  CPMSG_PARTY_NEW_MEMBER              | 0x03B0 | W being id, S name  | +|  **CPMSG_PARTY_NEW_MEMBER**             | 0x03B0 | W being id, S name  | 
-|  CPMSG_PARTY_MEMBER_LEFT             | 0x03B1 | W being id  | +|  **CPMSG_PARTY_MEMBER_LEFT**            | 0x03B1 | W being id  | 
-|  CGMSG_CHANGED_PARTY         | 0x0590 | D character id, D party id  |+|  **CGMSG_CHANGED_PARTY**        | 0x0590 | D character id, D party id  |
==== Guild messages ==== ==== Guild messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  PCMSG_GUILD_CREATE                  | 0x0350 | S name  | +|  **PCMSG_GUILD_CREATE**                 | 0x0350 | S name  | 
-|  CPMSG_GUILD_CREATE_RESPONSE         | 0x0351 | B error, W guild, B rights, W channel  | +|  **CPMSG_GUILD_CREATE_RESPONSE**        | 0x0351 | B error, W guild, B rights, W channel  | 
-|  PCMSG_GUILD_INVITE                  | 0x0352 | W id, S name  | +|  **PCMSG_GUILD_INVITE**                 | 0x0352 | W id, S name  | 
-|  CPMSG_GUILD_INVITE_RESPONSE         | 0x0353 | B error  | +|  **CPMSG_GUILD_INVITE_RESPONSE**        | 0x0353 | B error  | 
-|  PCMSG_GUILD_ACCEPT                  | 0x0354 | W id  | +|  **PCMSG_GUILD_ACCEPT**                 | 0x0354 | W id  | 
-|  CPMSG_GUILD_ACCEPT_RESPONSE         | 0x0355 | B error, W guild, B rights, W channel  | +|  **CPMSG_GUILD_ACCEPT_RESPONSE**        | 0x0355 | B error, W guild, B rights, W channel  | 
-|  PCMSG_GUILD_GET_MEMBERS             | 0x0356 | W id  | +|  **PCMSG_GUILD_GET_MEMBERS**            | 0x0356 | W id  | 
-|  CPMSG_GUILD_GET_MEMBERS_RESPONSE    | 0x0357 | S names, B online  | +|  **CPMSG_GUILD_GET_MEMBERS_RESPONSE**   | 0x0357 | S names, B online  | 
-|  CPMSG_GUILD_UPDATE_LIST             | 0x0358 | W id, S name, B event  | +|  **CPMSG_GUILD_UPDATE_LIST**            | 0x0358 | W id, S name, B event \\ __Events values:__ \\ **GUILD_EVENT_NEW_PLAYER** (0): A new player joinded the guild. \\ **GUILD_EVENT_LEAVING_PLAYER** (1): A player left the guild. \\ **GUILD_EVENT_ONLINE_PLAYER** (2): A guild member has joined the game. \\ **GUILD_EVENT_OFFLINE_PLAYER** (3): A guild member left the game.
-|  PCMSG_GUILD_QUIT                    | 0x0360 | W id  | +|  **PCMSG_GUILD_QUIT**                   | 0x0360 | W id  | 
-|  CPMSG_GUILD_QUIT_RESPONSE           | 0x0361 | B error  | +|  **CPMSG_GUILD_QUIT_RESPONSE**          | 0x0361 | B error  | 
-|  PCMSG_GUILD_PROMOTE_MEMBER          | 0x0365 | W guild, S name, B rights  | +|  **PCMSG_GUILD_PROMOTE_MEMBER**         | 0x0365 | W guild, S name, B rights  | 
-|  CPMSG_GUILD_PROMOTE_MEMBER_RESPONSE | 0x0366 | B error  | +|  **CPMSG_GUILD_PROMOTE_MEMBER_RESPONSE** | 0x0366 | B error  | 
-|  PCMSG_GUILD_KICK_MEMBER             | 0x0370 | W guild, S name  | +|  **PCMSG_GUILD_KICK_MEMBER**            | 0x0370 | W guild, S name  | 
-|  CPMSG_GUILD_KICK_MEMBER_RESPONSE    | 0x0371 | B error  | +|  **CPMSG_GUILD_KICK_MEMBER_RESPONSE**   | 0x0371 | B error  | 
-|  CPMSG_GUILD_INVITED                 | 0x0388 | S char name, S  guild name, W id  | +|  **CPMSG_GUILD_INVITED**                | 0x0388 | S char name, S  guild name, W id  | 
-|  CPMSG_GUILD_REJOIN                  | 0x0389 | S name, W guild, W rights, W channel, S announce  |+|  **CPMSG_GUILD_REJOIN**                 | 0x0389 | S name, W guild, W rights, W channel, S announce  |
==== User mode messages ==== ==== User mode messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  PCMSG_USER_MODE                   | 0x0465 | W channel id, S name, B mode  | +|  **PCMSG_USER_MODE**                  | 0x0465 | W channel id, S name, B mode  | 
-|  PCMSG_KICK_USER                   | 0x0466 | W channel id, S name  | +|  **PCMSG_KICK_USER**                  | 0x0466 | W channel id, S name  | 
-|  GAMSG_BAN_PLAYER            | 0x0550 | D id, W duration  | +|  **GAMSG_BAN_PLAYER**           | 0x0550 | D id, W duration  | 
-|  GAMSG_CHANGE_PLAYER_LEVEL   | 0x0555 | D id, W level  | +|  **GAMSG_CHANGE_PLAYER_LEVEL**  | 0x0555 | D id, W level  | 
-|  GAMSG_CHANGE_ACCOUNT_LEVEL  | 0x0556 | D id, W level  |+|  **GAMSG_CHANGE_ACCOUNT_LEVEL** | 0x0556 | D id, W level  |
==== Quests messages ==== ==== Quests messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  GAMSG_SET_QUEST             | 0x0540 | D id, S name, S value  | +|  **GAMSG_SET_QUEST**            | 0x0540 | D id, S name, S value  | 
-|  GAMSG_GET_QUEST             | 0x0541 | D id, S name  | +|  **GAMSG_GET_QUEST**            | 0x0541 | D id, S name  | 
-|  AGMSG_GET_QUEST_RESPONSE    | 0x0542 | D id, S name, S value  |+|  **AGMSG_GET_QUEST_RESPONSE**   | 0x0542 | D id, S name, S value  |
==== Postal system messages ==== ==== Postal system messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  GCMSG_REQUEST_POST          | 0x05A0 | D character id  | +|  **GCMSG_REQUEST_POST**         | 0x05A0 | D character id  | 
-|  CGMSG_POST_RESPONSE         | 0x05A1 | D receiver id, { S sender name, S letter, W num attachments { W attachment item id, W quantity } }  | +|  **CGMSG_POST_RESPONSE**        | 0x05A1 | D receiver id, { S sender name, S letter, W num attachments { W attachment item id, W quantity } }  | 
-|  GCMSG_STORE_POST            | 0x05A5 | D sender id, S receiver name, S letter, { W attachment item id, W quantity }  | +|  **GCMSG_STORE_POST**           | 0x05A5 | D sender id, S receiver name, S letter, { W attachment item id, W quantity }  | 
-|  CGMSG_STORE_POST_RESPONSE   | 0x05A6 | D id, B error  |+|  **CGMSG_STORE_POST_RESPONSE**  | 0x05A6 | D id, B error  |
==== Inter-server messages ==== ==== Inter-server messages ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  AGMSG_ACTIVE_MAP            | 0x0502 | W map id  | +|  **AGMSG_ACTIVE_MAP**           | 0x0502 | W map id  | 
-|  GAMSG_STATISTICS            | 0x0560 | { W map id, W thing nb, W monster nb, W player nb, { D character id }* }*  | +|  **GAMSG_STATISTICS**           | 0x0560 | { W map id, W thing nb, W monster nb, W player nb, { D character id }* }*  | 
-|  GAMSG_TRANSACTION           | 0x0600 | D character id, D action, S message  |+|  **GAMSG_TRANSACTION**          | 0x0600 | D character id, D action, S message  |
==== Maximum message value limit (Do not use) ==== ==== Maximum message value limit (Do not use) ====
^  Message name  ^  Hex value  ^  Values sent  ^ ^  Message name  ^  Hex value  ^  Values sent  ^
-|  XXMSG_INVALID  |  0x7FFF  | None  |+|  **XXMSG_INVALID** |  0x7FFF  | None  |
==== Return values ==== ==== Return values ====
Line 284: Line 288:
^  Return value  ^  Description  ^ ^  Return value  ^  Description  ^
-|  ERRMSG_OK = 0  | Everything is fine.  | +|  **ERRMSG_OK** (0) | Everything is fine.  | 
-|  ERRMSG_FAILURE  | The action failed.  | +|  **ERRMSG_FAILURE** (1) | The action failed.  | 
-|  ERRMSG_NO_LOGIN  | The user is not yet logged.  | +|  **ERRMSG_NO_LOGIN** (2) | The user is not yet logged.  | 
-|  ERRMSG_NO_CHARACTER_SELECTED  | The user needs a character first. | +|  **ERRMSG_NO_CHARACTER_SELECTED** (3) | The user needs a character first. | 
-|  ERRMSG_INSUFFICIENT_RIGHTS  | The user is not privileged enough to do so.  | +|  **ERRMSG_INSUFFICIENT_RIGHTS** (4) | The user is not privileged enough to do so.  | 
-|  ERRMSG_INVALID_ARGUMENT  | Part of the received message was invalid.  | +|  **ERRMSG_INVALID_ARGUMENT** (5) | Part of the received message was invalid.  | 
-|  ERRMSG_EMAIL_ALREADY_EXISTS  | The Email Address already exists.  | +|  **ERRMSG_EMAIL_ALREADY_EXISTS** (6) | The Email Address already exists.  | 
-|  ERRMSG_ALREADY_TAKEN  | Character or account name used was already taken.  | +|  **ERRMSG_ALREADY_TAKEN** (7) | Character or account name used was already taken.  | 
-|  ERRMSG_SERVER_FULL  | The server is overloaded.  | +|  **ERRMSG_SERVER_FULL** (8) | The server is overloaded.  | 
-|  ERRMSG_TIME_OUT  | Data failed to arrive in due time.  | +|  **ERRMSG_TIME_OUT** (9) | Data failed to arrive in due time.  | 
-|  ERRMSG_LIMIT_REACHED  | Server limit reached.  | +|  **ERRMSG_LIMIT_REACHED** (10) | Server limit reached.  |
- +
-// used to identify part of sync message +
-enum { +
-    SYNC_CHARACTER_POINTS = 0x01,       // D charId, D charPoints, D corrPoints, B attribute id, D attribute value +
-    SYNC_CHARACTER_SKILL  = 0x02,       // D charId, B skillId, D skill value +
-    SYNC_ONLINE_STATUS    = 0x03,       // D charId, B 0x00 = offline, 0x01 = online +
-    SYNC_END_OF_BUFFER    = 0xFF        // shows, that the buffer ends here. +
-}; +
- +
-// Login specific return values +
-enum { +
-    LOGIN_INVALID_VERSION = 0x40,       // the user is using an incompatible protocol +
-    LOGIN_INVALID_TIME    = 0x50,       // the user tried logging in too fast +
-    LOGIN_BANNED                        // the user is currently banned +
-}; +
- +
-// Account register specific return values +
-enum { +
-    REGISTER_INVALID_VERSION = 0x40,    // the user is using an incompatible protocol +
-    REGISTER_EXISTS_USERNAME,           // there already is an account with this username +
-    REGISTER_EXISTS_EMAIL,              // there already is an account with this email address +
-    REGISTER_CAPTCHA_WRONG              // user didn't solve the captcha correctly +
-}; +
- +
-// Character creation specific return values +
-enum { +
-    CREATE_INVALID_HAIRSTYLE = 0x40, +
-    CREATE_INVALID_HAIRCOLOR, +
-    CREATE_INVALID_GENDER, +
-    CREATE_ATTRIBUTES_TOO_HIGH, +
-    CREATE_ATTRIBUTES_TOO_LOW, +
-    CREATE_ATTRIBUTES_EQUAL_TO_ZERO, +
-    CREATE_EXISTS_NAME, +
-    CREATE_TOO_MUCH_CHARACTERS +
-}; +
- +
-// Character attribute modification specific return value +
-enum AttribmodResponseCode { +
-    ATTRIBMOD_OK = ERRMSG_OK, +
-    ATTRIBMOD_INVALID_ATTRIBUTE = 0x40, +
-    ATTRIBMOD_NO_POINTS_LEFT, +
-    ATTRIBMOD_DENIED +
-}; +
- +
-// Object type enumeration +
-enum ThingType +
-+
-    // A simple item. +
-    OBJECT_ITEM = 0, +
-    // An item that toggle map/quest actions (doors, switchs, ...) +
-    // and can speak (map panels). +
-    OBJECT_ACTOR, +
-    // Non-Playable-Character is an actor capable of movement and maybe actions. +
-    OBJECT_NPC, +
-    // A monster (moving actor with AI. Should be able to toggle map/quest +
-    // actions, too). +
-    OBJECT_MONSTER, +
-    // A normal being. +
-    OBJECT_CHARACTER, +
-    // A effect to be shown. +
-    OBJECT_EFFECT, +
-    // Server-only object. +
-    OBJECT_OTHER +
-}; +
- +
-// Moving object flags +
-enum { +
-    // Payload contains the current position. +
-    MOVING_POSITION = 1, +
-    // Payload contains the destination. +
-    MOVING_DESTINATION = 2 +
-}; +
- +
-// Email change specific return values +
-enum { +
-    EMAILCHG_EXISTS_EMAIL = 0x40 +
-}; +
- +
-// Chat errors return values +
-enum { +
-    CHAT_USING_BAD_WORDS = 0x40, +
-    CHAT_UNHANDLED_COMMAND +
-}; +
- +
-// Chat channels event values +
-enum { +
-    CHAT_EVENT_NEW_PLAYER = 0, +
-    CHAT_EVENT_LEAVING_PLAYER, +
-    CHAT_EVENT_TOPIC_CHANGE, +
-    CHAT_EVENT_MODE_CHANGE, +
-    CHAT_EVENT_KICKED_PLAYER +
-}; +
- +
-// Guild member event values +
-enum { +
-    GUILD_EVENT_NEW_PLAYER = 0, +
-    GUILD_EVENT_LEAVING_PLAYER, +
-    GUILD_EVENT_ONLINE_PLAYER, +
-    GUILD_EVENT_OFFLINE_PLAYER +
-}; +
-enum 
-{ 
-    SPRITE_BASE = 0, 
-    SPRITE_SHOE, 
-    SPRITE_BOTTOMCLOTHES, 
-    SPRITE_TOPCLOTHES, 
-    SPRITE_HAIR, 
-    SPRITE_HAT, 
-    SPRITE_WEAPON, 
-    SPRITE_VECTOREND 
-}; 
 
manaserv_protocol.1276165924.txt.gz · Last modified: 2010/06/10 12:32 by Yohann Ferreira
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki