1 /* $Id$ */ 2 /* 3 * Packet types 4 */ 5 6 /* Packet types 0-12 are "administrative" */ 7 #define PKT_UNDEFINED 0 8 #define PKT_VERIFY 1 9 #define PKT_REPLY 2 10 #define PKT_PLAY 3 11 #define PKT_QUIT 4 12 #define PKT_LEAVE 5 13 #define PKT_MAGIC 6 14 #define PKT_RELIABLE 7 15 #define PKT_ACK 8 16 #define PKT_TALK 9 17 18 #define PKT_START 10 19 #define PKT_END 11 20 #define PKT_LOGIN 12 21 #define PKT_KEEPALIVE 13 22 23 /* reserved 14 to 19 for non play purposes - evileye */ 24 #define PKT_FILE 14 /* internal file transfer */ 25 26 27 /* Packet types 20-59 are info that is sent to the client */ 28 #define PKT_PLUSSES 20 29 #define PKT_AC 21 30 #define PKT_EXPERIENCE 22 31 #define PKT_GOLD 23 32 #define PKT_HP 24 33 #define PKT_SP 25 34 #define PKT_CHAR_INFO 26 35 #define PKT_VARIOUS 27 36 #define PKT_STAT 28 37 #define PKT_HISTORY 29 38 39 #define PKT_INVEN 30 40 #define PKT_EQUIP 31 41 #define PKT_TITLE 32 42 #define PKT_LEVEL 33 43 #define PKT_DEPTH 34 44 #define PKT_FOOD 35 45 #define PKT_BLIND 36 46 #define PKT_CONFUSED 37 47 #define PKT_FEAR 38 48 #define PKT_POISON 39 49 50 #define PKT_STATE 40 51 #define PKT_LINE_INFO 41 52 #define PKT_SPEED 42 53 #define PKT_STUDY 43 54 #define PKT_CUT 44 55 #define PKT_STUN 45 56 #define PKT_MESSAGE 46 57 #define PKT_CHAR 47 58 #define PKT_SPELL_INFO 48 59 #define PKT_FLOOR 49 60 61 #define PKT_SPECIAL_OTHER 50 62 #define PKT_STORE 51 63 #define PKT_STORE_INFO 52 64 #define PKT_TARGET_INFO 53 65 #define PKT_SOUND 54 66 #define PKT_MINI_MAP 55 67 #define PKT_PICKUP_CHECK 56 68 #define PKT_SKILLS 57 69 #define PKT_PAUSE 58 70 #define PKT_MONSTER_HEALTH 59 71 72 73 /* Packet types 60-65 are sent from either the client or server */ 74 #define PKT_DIRECTION 60 75 #define PKT_ITEM 61 76 #define PKT_SELL 62 77 #define PKT_PARTY 63 78 #define PKT_SPECIAL_LINE 64 79 #define PKT_SKILL_MOD 65 80 81 82 /* Packet types 67-116 are sent from the client */ 83 #define PKT_TAKE_OFF_AMT 66 84 #define PKT_MIND 67 85 #define PKT_STORE_EXAMINE 68 86 #define PKT_KING 69 87 #define PKT_WALK 70 88 #define PKT_RUN 71 89 #define PKT_TUNNEL 72 90 #define PKT_AIM_WAND 73 91 #define PKT_DROP 74 92 #define PKT_FIRE 75 93 #define PKT_STAND 76 94 #define PKT_DESTROY 77 95 #define PKT_LOOK 78 96 #define PKT_SPELL 79 /* reuse now for Receive_request_spell/Send_spell */ 97 98 #define PKT_OPEN 80 99 #define PKT_PRAY 81 100 #define PKT_QUAFF 82 101 #define PKT_READ 83 102 #define PKT_SEARCH 84 103 #define PKT_TAKE_OFF 85 104 #define PKT_USE 86 105 #define PKT_THROW 87 106 #define PKT_WIELD 88 107 #define PKT_ZAP 89 108 109 #define PKT_TARGET 90 110 #define PKT_INSCRIBE 91 111 #define PKT_UNINSCRIBE 92 112 #define PKT_ACTIVATE 93 113 #define PKT_BASH 94 114 #define PKT_DISARM 95 115 #define PKT_EAT 96 116 #define PKT_FILL 97 117 #define PKT_LOCATE 98 118 #define PKT_MAP 99 119 120 #define PKT_SEARCH_MODE 100 121 #define PKT_FIGHT 101 122 #define PKT_CLOSE 103 123 #define PKT_GAIN 104 124 #define PKT_GO_UP 105 125 #define PKT_GO_DOWN 106 126 #define PKT_PURCHASE 107 127 #define PKT_STORE_LEAVE 108 128 #define PKT_STORE_CONFIRM 109 129 130 #define PKT_DROP_GOLD 110 131 #define PKT_REDRAW 111 132 #define PKT_REST 112 133 #define PKT_GHOST 113 134 #define PKT_SUICIDE 114 135 #define PKT_STEAL 115 136 #define PKT_OPTIONS 116 137 #define PKT_TARGET_FRIENDLY 117 138 #define PKT_MASTER 118 /* dungeon master commands */ 139 #define PKT_AUTOPHASE 119 /* automatically try to phase */ 140 #define PKT_HOUSE 120 /* house admin */ 141 142 /* Packet types 121-122 are more administrative stuff */ 143 #define PKT_FAILURE 121 144 #define PKT_SUCCESS 122 145 #define PKT_CLEAR_BUFFER 123 146 #define PKT_SCRIPT 124 147 #define PKT_CLEAR_ACTIONS 125 148 #define PKT_ZAP_DIR 126 149 #define PKT_ACTIVATE_DIR 127 150 #define PKT_SKILL_DEV 128 /* Sent from client->server: collapse/expand subtree of a skill */ 151 #define PKT_BPR 129 /* BpR display replaces Study display */ 152 153 #define PKT_SANITY 130 154 #define PKT_SCREEN_DIM 131 /* client's screen dimensions */ 155 #define PKT_GUILD_CFG 132 156 #define PKT_BONI_COL 133 /* client csheet boni tracking */ 157 #define PKT_MINI_MAP_POS 134 158 #define PKT_AUTOINSCRIBE 135 159 160 //XXX 136-149 161 #define PKT_SFX_VOLUME 148 /* Tell client to modify volume level of ambient and/or weather sfx */ 162 #define PKT_SFX_AMBIENT 149 /* background ambient sfx */ 163 164 /* Packet types 150- are hacks */ 165 #define PKT_FLUSH 150 166 #define PKT_OBSERVE 151 167 #define PKT_SPIKE 152 168 #define PKT_GUILD 153 169 #define PKT_SKILL_INIT 154 170 #define PKT_ACTIVATE_SKILL 155 171 #define PKT_RAW_KEY 156 172 #define PKT_CHARDUMP 157 173 #define PKT_BACT 158 174 #define PKT_STORE_CMD 159 175 176 /* its a cleanup, not a hack */ 177 #define PKT_SKILL_PTS 160 178 179 /* Page someone who is afk */ 180 #define PKT_BEEP 161 181 /* Give the client some info about the server details. - C. Blue 182 For example: Is it running 'RPG_SERVER' settings? or 'FUN_SERVER'? */ 183 #define PKT_SERVERDETAILS 162 184 #define PKT_AFK 163 185 #define PKT_ENCUMBERMENT 164 186 #define PKT_PARTY_STATS 165 /* DEG Packet type for party member info */ 187 #define PKT_PING 166 /* Ping packet */ 188 /* 167+ are further below.. */ 189 190 /* HACK -- used for SKILL_INIT */ 191 #define PKT_SKILL_INIT_NAME 0 192 #define PKT_SKILL_INIT_DESC 1 193 #define PKT_SKILL_INIT_MKEY 2 194 195 /* Not hack - file transfer packet subtypes */ 196 /* DO NOT TOUCH - work in progress */ 197 #define PKT_FILE_DATA 1 198 #define PKT_FILE_END 2 199 #define PKT_FILE_CHECK 3 200 #define PKT_FILE_ACK 4 /* acknowledge whatever */ 201 #define PKT_FILE_ERR 5 /* failure - close */ 202 #define PKT_FILE_SUM 6 /* checksum reply */ 203 #define PKT_FILE_INIT 7 /* initiate a transfer */ 204 205 /* new things for v4.4.1 or 4.4.0d (dual-wield & co) - C. Blue */ 206 #define PKT_SIP 167 207 #define PKT_TELEKINESIS 168 208 #define PKT_BBS 169 209 #define PKT_WIELD2 170 210 #define PKT_CLOAK 171 211 212 #define PKT_STAMINA 172 213 #define PKT_TECHNIQUE_INFO 173 214 #define PKT_EXTRA_STATUS 174 /* combat stance, fire mode, etc */ 215 #define PKT_INVEN_WIDE 175 /* similar to PKT_INVEN, but with additional info */ 216 #define PKT_UNIQUE_MONSTER 176 /* for client-side unique kills tracking */ 217 #define PKT_WEATHER 177 /* client-side weather (4.4.2.1) */ 218 #define PKT_INVENTORY_REV 178 /* inventory revision notification (4.4.2.2) */ 219 #define PKT_ACCOUNT_INFO 179 /* account information (4.4.2.3) */ 220 #define PKT_CHANGE_PASSWORD 180 /* password change request (4.4.2.3) */ 221 #define PKT_STORE_WIDE 181 /* for browsing custom books in home/stores */ 222 223 #define PKT_FORCE_STACK 182 /* force stacking of level 0 items with normal-level items in your inventory */ 224 #define PKT_MUSIC 183 /* background music */ 225 226 #define PKT_REQUEST_KEY 184 /* (special) gets a keypress from the player */ 227 #define PKT_REQUEST_NUM 185 /* (special) gets a number from the player */ 228 #define PKT_REQUEST_STR 186 /* (special) gets a 1-line string from the player */ 229 #define PKT_REQUEST_CFR 187 /* (special) requests confirmation ('y/n') from player */ 230 #define PKT_REQUEST_ABORT 188 /* (special) abort pending requests (eg if player left store) */ 231 #define PKT_STORE_SPECIAL_STR 189 /* for SPECIAL flag stores (those don't have an inventory) */ 232 #define PKT_STORE_SPECIAL_CHAR 190 /* for SPECIAL flag stores (those don't have an inventory) */ 233 #define PKT_STORE_SPECIAL_CLR 191 /* for SPECIAL flag stores (those don't have an inventory) */ 234 235 #define PKT_WARNING_BEEP 192 236 237 /* 238 * Possible error codes returned 239 */ 240 #define SUCCESS 0x00 241 #define E_VERSION_OLD 0x01 242 #define E_GAME_FULL 0x02 243 #define E_NEED_INFO 0x03 244 #define E_TWO_PLAYERS 0x04 245 #define E_PASSWORD 0x05 246 //#define E_ 0x06 247 #define E_LETTER 0x07 248 #define E_IN_USE 0x08 249 #define E_SOCKET 0x09 250 #define E_INVAL 0x0A 251 #define E_INVITE 0x0B 252 #define E_BANNED 0x0C 253 #define E_VERSION_UNKNOWN 0x0D 254 255 256 /* 257 * Some commands send to the server 258 */ 259 #define ENTER_GAME_pack 0x00 260 #define CONTACT_pack 0x31 261