Go to the documentation of this file.
25 #define MAXSOCKBUF (2+65535+1)
32 #define MAP2_COORD_OFFSET 15
42 #define MAP2_TYPE_CLEAR 0x0
43 #define MAP2_TYPE_DARKNESS 0x1
44 #define MAP2_TYPE_LABEL 0x2 // SC 1030
66 #define MAP2_LAYER_START 0x10
67 #define MAP2_ADD_LENGTH 0b11100000 // OR this with the above for "next byte is length", SC 1030
69 #define CS_QUERY_YESNO 0x1
70 #define CS_QUERY_SINGLECHAR 0x2
71 #define CS_QUERY_HIDEINPUT 0x4
73 #define CS_SAY_NORMAL 0x1
74 #define CS_SAY_SHOUT 0x2
75 #define CS_SAY_GSAY 0x4
82 #define FLOAT_MULTI 100000
83 #define FLOAT_MULTF 100000.0
91 #define CS_STAT_MAXHP 2
93 #define CS_STAT_MAXSP 4
99 #define CS_STAT_CHA 10
100 #define CS_STAT_EXP 11
101 #define CS_STAT_LEVEL 12
102 #define CS_STAT_WC 13
103 #define CS_STAT_AC 14
104 #define CS_STAT_DAM 15
105 #define CS_STAT_ARMOUR 16
106 #define CS_STAT_SPEED 17
107 #define CS_STAT_FOOD 18
108 #define CS_STAT_WEAP_SP 19
109 #define CS_STAT_RANGE 20
110 #define CS_STAT_TITLE 21
111 #define CS_STAT_POW 22
112 #define CS_STAT_GRACE 23
113 #define CS_STAT_MAXGRACE 24
114 #define CS_STAT_FLAGS 25
115 #define CS_STAT_WEIGHT_LIM 26
116 #define CS_STAT_EXP64 28
117 #define CS_STAT_SPELL_ATTUNE 29
118 #define CS_STAT_SPELL_REPEL 30
119 #define CS_STAT_SPELL_DENY 31
120 #define CS_STAT_RACE_STR 32
121 #define CS_STAT_RACE_INT 33
122 #define CS_STAT_RACE_WIS 34
123 #define CS_STAT_RACE_DEX 35
124 #define CS_STAT_RACE_CON 36
125 #define CS_STAT_RACE_CHA 37
126 #define CS_STAT_RACE_POW 38
127 #define CS_STAT_BASE_STR 39
128 #define CS_STAT_BASE_INT 40
129 #define CS_STAT_BASE_WIS 41
130 #define CS_STAT_BASE_DEX 42
131 #define CS_STAT_BASE_CON 43
132 #define CS_STAT_BASE_CHA 44
133 #define CS_STAT_BASE_POW 45
134 #define CS_STAT_APPLIED_STR 46
135 #define CS_STAT_APPLIED_INT 47
136 #define CS_STAT_APPLIED_WIS 48
137 #define CS_STAT_APPLIED_DEX 49
138 #define CS_STAT_APPLIED_CON 50
139 #define CS_STAT_APPLIED_CHA 51
140 #define CS_STAT_APPLIED_POW 52
141 #define CS_STAT_GOLEM_HP 53
142 #define CS_STAT_GOLEM_MAXHP 54
143 #define CS_STAT_CHARACTER_FLAGS 55
144 #define CS_STAT_GOD_NAME 56
145 #define CS_STAT_OVERLOAD 57
146 #define CS_STAT_ITEM_POWER 58
148 #define CS_STAT_RESIST_START 100
149 #define CS_STAT_RESIST_END 117
151 #define CS_STAT_RES_PHYS 100
152 #define CS_STAT_RES_MAG 101
153 #define CS_STAT_RES_FIRE 102
154 #define CS_STAT_RES_ELEC 103
155 #define CS_STAT_RES_COLD 104
156 #define CS_STAT_RES_CONF 105
157 #define CS_STAT_RES_ACID 106
158 #define CS_STAT_RES_DRAIN 107
159 #define CS_STAT_RES_GHOSTHIT 108
160 #define CS_STAT_RES_POISON 109
161 #define CS_STAT_RES_SLOW 110
162 #define CS_STAT_RES_PARA 111
163 #define CS_STAT_TURN_UNDEAD 112
164 #define CS_STAT_RES_FEAR 113
165 #define CS_STAT_RES_DEPLETE 114
166 #define CS_STAT_RES_DEATH 115
167 #define CS_STAT_RES_HOLYWORD 116
168 #define CS_STAT_RES_BLIND 117
175 #define CS_STAT_SKILLINFO 140
182 #define CS_NUM_SKILLS 50
192 #define SF_FIREON 0x01
193 #define SF_RUNON 0x02
201 #define CF_CONFUSED 0x01
202 #define CF_POISONED 0x02
203 #define CF_BLIND 0x04
205 #define CF_DISEASED 0x10
206 #define CF_NOT_PERFECT 0x20
207 #define CF_HOSTILE 0x40
208 #define CF_STEALTHY 0x80
209 #define CF_PARALYZED 0x0100
210 #define CF_WIZARD 0x0200
227 #define ACL_FACE_NUM 8
251 #define NDI_DK_ORANGE 6
253 #define NDI_LT_GREEN 8
259 #define NDI_MAX_COLOR 12
261 #define NDI_COLOR_MASK 0xff
265 #define NDI_UNIQUE 0x100
266 #define NDI_ALL 0x200
267 #define NDI_ALL_DMS 0x400
269 #define NDI_NO_TRANSLATE 0x800
272 #define NDI_DELAYED 0x1000
286 #define F_APPLIED 0x000F
287 #define F_UNIDENTIFIED 0x0010
288 #define F_UNPAID 0x0200
289 #define F_MAGIC 0x0400
290 #define F_CURSED 0x0800
291 #define F_DAMNED 0x1000
292 #define F_OPEN 0x2000
293 #define F_NOPICK 0x4000
294 #define F_LOCKED 0x8000
295 #define F_BLESSED 0x0100
296 #define F_READ 0x0020
306 #define FACE_FLOOR 0x80
307 #define FACE_WALL 0x40
309 #define FACE_COLOR_MASK 0xf
317 #define UPD_LOCATION 0x01
318 #define UPD_FLAGS 0x02
319 #define UPD_WEIGHT 0x04
320 #define UPD_FACE 0x08
321 #define UPD_NAME 0x10
322 #define UPD_ANIM 0x20
323 #define UPD_ANIMSPEED 0x40
324 #define UPD_NROF 0x80
327 #define UPD_SP_MANA 0x01
328 #define UPD_SP_GRACE 0x02
329 #define UPD_SP_DAMAGE 0x04
336 #define SOUND_TYPE_LIVING 1
337 #define SOUND_TYPE_SPELL 2
338 #define SOUND_TYPE_ITEM 3
339 #define SOUND_TYPE_GROUND 4
340 #define SOUND_TYPE_HIT 5
341 #define SOUND_TYPE_HIT_BY 6
349 #define FACE_IS_ANIM 1<<15
350 #define ANIM_RANDOM 1<<13
351 #define ANIM_SYNC 2<<13
353 #define ANIM_FLAGS_MASK 0x6000
359 #define ANIM_MASK 0x1fff
376 #define EMI_NOREDRAW 0x01
380 #define EMI_SMOOTH 0x02
386 #define EMI_HASMOREBITS 0x80
398 #define MSG_TYPE_BOOK 1
399 #define MSG_TYPE_CARD 2
400 #define MSG_TYPE_PAPER 3
401 #define MSG_TYPE_SIGN 4
402 #define MSG_TYPE_MONUMENT 5
403 #define MSG_TYPE_DIALOG 6
404 #define MSG_TYPE_MOTD 7
405 #define MSG_TYPE_ADMIN 8
406 #define MSG_TYPE_SHOP 9
407 #define MSG_TYPE_COMMAND 10
408 #define MSG_TYPE_ATTRIBUTE 11
410 #define MSG_TYPE_SKILL 12
411 #define MSG_TYPE_APPLY 13
412 #define MSG_TYPE_ATTACK 14
413 #define MSG_TYPE_COMMUNICATION 15
414 #define MSG_TYPE_SPELL 16
415 #define MSG_TYPE_ITEM 17
416 #define MSG_TYPE_MISC 18
418 #define MSG_TYPE_VICTIM 19
420 #define MSG_TYPE_CLIENT 20
421 #define MSG_TYPE_LAST 21
423 #define MSG_SUBTYPE_NONE 0
426 #define MSG_TYPE_BOOK_CLASP_1 1
427 #define MSG_TYPE_BOOK_CLASP_2 2
428 #define MSG_TYPE_BOOK_ELEGANT_1 3
429 #define MSG_TYPE_BOOK_ELEGANT_2 4
430 #define MSG_TYPE_BOOK_QUARTO_1 5
431 #define MSG_TYPE_BOOK_QUARTO_2 6
432 #define MSG_TYPE_BOOK_SPELL_EVOKER 7
433 #define MSG_TYPE_BOOK_SPELL_PRAYER 8
434 #define MSG_TYPE_BOOK_SPELL_PYRO 9
435 #define MSG_TYPE_BOOK_SPELL_SORCERER 10
436 #define MSG_TYPE_BOOK_SPELL_SUMMONER 11
439 #define MSG_TYPE_CARD_SIMPLE_1 1
440 #define MSG_TYPE_CARD_SIMPLE_2 2
441 #define MSG_TYPE_CARD_SIMPLE_3 3
442 #define MSG_TYPE_CARD_ELEGANT_1 4
443 #define MSG_TYPE_CARD_ELEGANT_2 5
444 #define MSG_TYPE_CARD_ELEGANT_3 6
445 #define MSG_TYPE_CARD_STRANGE_1 7
446 #define MSG_TYPE_CARD_STRANGE_2 8
447 #define MSG_TYPE_CARD_STRANGE_3 9
448 #define MSG_TYPE_CARD_MONEY_1 10
449 #define MSG_TYPE_CARD_MONEY_2 11
450 #define MSG_TYPE_CARD_MONEY_3 12
453 #define MSG_TYPE_PAPER_NOTE_1 1
454 #define MSG_TYPE_PAPER_NOTE_2 2
455 #define MSG_TYPE_PAPER_NOTE_3 3
456 #define MSG_TYPE_PAPER_LETTER_OLD_1 4
457 #define MSG_TYPE_PAPER_LETTER_OLD_2 5
458 #define MSG_TYPE_PAPER_LETTER_NEW_1 6
459 #define MSG_TYPE_PAPER_LETTER_NEW_2 7
460 #define MSG_TYPE_PAPER_ENVELOPE_1 8
461 #define MSG_TYPE_PAPER_ENVELOPE_2 9
462 #define MSG_TYPE_PAPER_SCROLL_OLD_1 10
463 #define MSG_TYPE_PAPER_SCROLL_OLD_2 11
464 #define MSG_TYPE_PAPER_SCROLL_NEW_1 12
465 #define MSG_TYPE_PAPER_SCROLL_NEW_2 13
466 #define MSG_TYPE_PAPER_SCROLL_MAGIC 14
469 #define MSG_TYPE_SIGN_BASIC 1
470 #define MSG_TYPE_SIGN_DIR_LEFT 2
471 #define MSG_TYPE_SIGN_DIR_RIGHT 3
472 #define MSG_TYPE_SIGN_DIR_BOTH 4
473 #define MSG_TYPE_SIGN_MAGIC_MOUTH 5
476 #define MSG_TYPE_MONUMENT_STONE_1 1
477 #define MSG_TYPE_MONUMENT_STONE_2 2
478 #define MSG_TYPE_MONUMENT_STONE_3 3
479 #define MSG_TYPE_MONUMENT_STATUE_1 4
480 #define MSG_TYPE_MONUMENT_STATUE_2 5
481 #define MSG_TYPE_MONUMENT_STATUE_3 6
482 #define MSG_TYPE_MONUMENT_GRAVESTONE_1 7
483 #define MSG_TYPE_MONUMENT_GRAVESTONE_2 8
484 #define MSG_TYPE_MONUMENT_GRAVESTONE_3 9
485 #define MSG_TYPE_MONUMENT_WALL_1 10
486 #define MSG_TYPE_MONUMENT_WALL_2 11
487 #define MSG_TYPE_MONUMENT_WALL_3 12
490 #define MSG_TYPE_DIALOG_NPC 1
491 #define MSG_TYPE_DIALOG_ALTAR 2
492 #define MSG_TYPE_DIALOG_MAGIC_EAR 3
497 #define MSG_TYPE_ADMIN_RULES 1
498 #define MSG_TYPE_ADMIN_NEWS 2
499 #define MSG_TYPE_ADMIN_PLAYER 3
500 #define MSG_TYPE_ADMIN_DM 4
501 #define MSG_TYPE_ADMIN_HISCORE 5
502 #define MSG_TYPE_ADMIN_LOADSAVE 6
503 #define MSG_TYPE_ADMIN_LOGIN 7
504 #define MSG_TYPE_ADMIN_VERSION 8
505 #define MSG_TYPE_ADMIN_ERROR 9
511 #define MSG_TYPE_SHOP_LISTING 1
513 #define MSG_TYPE_SHOP_PAYMENT 2
515 #define MSG_TYPE_SHOP_SELL 3
516 #define MSG_TYPE_SHOP_MISC 4
522 #define MSG_TYPE_COMMAND_WHO 1
523 #define MSG_TYPE_COMMAND_MAPS 2
524 #define MSG_TYPE_COMMAND_BODY 3
525 #define MSG_TYPE_COMMAND_MALLOC 4
526 #define MSG_TYPE_COMMAND_WEATHER 5
527 #define MSG_TYPE_COMMAND_STATISTICS 6
528 #define MSG_TYPE_COMMAND_CONFIG 7
529 #define MSG_TYPE_COMMAND_INFO 8
530 #define MSG_TYPE_COMMAND_QUESTS 9
531 #define MSG_TYPE_COMMAND_DEBUG 10
532 #define MSG_TYPE_COMMAND_ERROR 11
533 #define MSG_TYPE_COMMAND_SUCCESS 12
534 #define MSG_TYPE_COMMAND_FAILURE 13
535 #define MSG_TYPE_COMMAND_EXAMINE 14
536 #define MSG_TYPE_COMMAND_INVENTORY 15
537 #define MSG_TYPE_COMMAND_HELP 16
538 #define MSG_TYPE_COMMAND_DM 17
539 #define MSG_TYPE_COMMAND_NEWPLAYER 18
552 #define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_GAIN 1
553 #define MSG_TYPE_ATTRIBUTE_ATTACKTYPE_LOSS 2
558 #define MSG_TYPE_ATTRIBUTE_PROTECTION_GAIN 3
559 #define MSG_TYPE_ATTRIBUTE_PROTECTION_LOSS 4
565 #define MSG_TYPE_ATTRIBUTE_MOVE 5
567 #define MSG_TYPE_ATTRIBUTE_RACE 6
568 #define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START 7
570 #define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_END 8
571 #define MSG_TYPE_ATTRIBUTE_STAT_GAIN 9
572 #define MSG_TYPE_ATTRIBUTE_STAT_LOSS 10
573 #define MSG_TYPE_ATTRIBUTE_LEVEL_GAIN 11
574 #define MSG_TYPE_ATTRIBUTE_LEVEL_LOSS 12
575 #define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_START 13
577 #define MSG_TYPE_ATTRIBUTE_GOOD_EFFECT_END 14
578 #define MSG_TYPE_ATTRIBUTE_GOD 15
590 #define MSG_TYPE_SKILL_MISSING 1
591 #define MSG_TYPE_SKILL_ERROR 2
592 #define MSG_TYPE_SKILL_SUCCESS 3
593 #define MSG_TYPE_SKILL_FAILURE 4
594 #define MSG_TYPE_SKILL_PRAY 5
595 #define MSG_TYPE_SKILL_LIST 6
604 #define MSG_TYPE_APPLY_ERROR 1
605 #define MSG_TYPE_APPLY_UNAPPLY 2
606 #define MSG_TYPE_APPLY_SUCCESS 3
607 #define MSG_TYPE_APPLY_FAILURE 4
608 #define MSG_TYPE_APPLY_CURSED 5
609 #define MSG_TYPE_APPLY_TRAP 6
610 #define MSG_TYPE_APPLY_BADBODY 7
611 #define MSG_TYPE_APPLY_PROHIBITION 8
612 #define MSG_TYPE_APPLY_BUILD 9
615 #define MSG_TYPE_ATTACK_DID_HIT 1
616 #define MSG_TYPE_ATTACK_PET_HIT 2
617 #define MSG_TYPE_ATTACK_FUMBLE 3
618 #define MSG_TYPE_ATTACK_DID_KILL 4
619 #define MSG_TYPE_ATTACK_PET_DIED 5
620 #define MSG_TYPE_ATTACK_NOKEY 6
621 #define MSG_TYPE_ATTACK_NOATTACK 7
622 #define MSG_TYPE_ATTACK_PUSHED 8
623 #define MSG_TYPE_ATTACK_MISS 9
625 #define MSG_TYPE_COMMUNICATION_RANDOM 1
626 #define MSG_TYPE_COMMUNICATION_SAY 2
627 #define MSG_TYPE_COMMUNICATION_ME 3
628 #define MSG_TYPE_COMMUNICATION_TELL 4
629 #define MSG_TYPE_COMMUNICATION_EMOTE 5
630 #define MSG_TYPE_COMMUNICATION_PARTY 6
631 #define MSG_TYPE_COMMUNICATION_SHOUT 7
632 #define MSG_TYPE_COMMUNICATION_CHAT 8
634 #define MSG_TYPE_SPELL_HEAL 1
635 #define MSG_TYPE_SPELL_PET 2
636 #define MSG_TYPE_SPELL_FAILURE 3
637 #define MSG_TYPE_SPELL_END 4
638 #define MSG_TYPE_SPELL_SUCCESS 5
639 #define MSG_TYPE_SPELL_ERROR 6
640 #define MSG_TYPE_SPELL_PERCEIVE_SELF 7
641 #define MSG_TYPE_SPELL_TARGET 8
642 #define MSG_TYPE_SPELL_INFO 9
645 #define MSG_TYPE_ITEM_REMOVE 1
646 #define MSG_TYPE_ITEM_ADD 2
647 #define MSG_TYPE_ITEM_CHANGE 3
648 #define MSG_TYPE_ITEM_INFO 4
653 #define MSG_TYPE_VICTIM_SWAMP 1
654 #define MSG_TYPE_VICTIM_WAS_HIT 2
655 #define MSG_TYPE_VICTIM_STEAL 3
657 #define MSG_TYPE_VICTIM_SPELL 4
659 #define MSG_TYPE_VICTIM_DIED 5
660 #define MSG_TYPE_VICTIM_WAS_PUSHED 6
663 #define MSG_TYPE_CLIENT_CONFIG 1
664 #define MSG_TYPE_CLIENT_SERVER 2
665 #define MSG_TYPE_CLIENT_COMMAND 3
666 #define MSG_TYPE_CLIENT_QUERY 4
667 #define MSG_TYPE_CLIENT_DEBUG 5
668 #define MSG_TYPE_CLIENT_NOTICE 6
669 #define MSG_TYPE_CLIENT_METASERVER 7
670 #define MSG_TYPE_CLIENT_SCRIPT 8
671 #define MSG_TYPE_CLIENT_ERROR 9
677 #define INFO_MAP_ARCH_NAME 1
678 #define INFO_MAP_NAME 2
679 #define INFO_MAP_DESCRIPTION 3
684 typedef struct SockList {
685 #ifdef CLIENT_TYPES_H
unsigned long total_ticktime
@ MAP2_LABEL_PLAYER_PARTY
unsigned long max_ticktime
unsigned long ticks_overtime