forked from raduprv/Eternal-Lands
-
Notifications
You must be signed in to change notification settings - Fork 3
/
client_serv.h
1205 lines (1112 loc) · 26.2 KB
/
client_serv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*!
* \file
* \ingroup protocol
* \brief this file defines the core client server protocol.
*/
#ifndef __CLIENT_SERV_H__
#define __CLIENT_SERV_H__
#ifdef __cplusplus
extern "C" {
#endif
/*!
* \name Actor types
*/
/*! @{ */
typedef enum actor_types_type
{
human_female = 0,
human_male = 1,
elf_female = 2,
elf_male = 3,
dwarf_female = 4,
dwarf_male = 5,
wraith = 6,
cyclops = 7,
beaver = 8,
rat = 9,
goblin_male_2 = 10,
goblin_female_1 = 11,
town_folk4 = 12,
town_folk5 = 13,
shop_girl3 = 14,
deer = 15,
bear = 16,
wolf = 17,
white_rabbit = 18,
brown_rabbit = 19,
boar = 20,
bear2 = 21,
snake1 = 22,
snake2 = 23,
snake3 = 24,
fox = 25,
puma = 26,
ogre_male_1 = 27,
goblin_male_1 = 28,
orc_male_1 = 29,
orc_female_1 = 30,
skeleton = 31,
gargoyle1 = 32,
gargoyle2 = 33,
gargoyle3 = 34,
troll = 35,
chimeran_wolf_mountain = 36,
gnome_female = 37,
gnome_male = 38,
orchan_female = 39,
orchan_male = 40,
draegoni_female = 41,
draegoni_male = 42,
skunk_1 = 43,
racoon_1 = 44,
unicorn_1 = 45,
chimeran_wolf_desert = 46,
chimeran_wolf_forest = 47,
bear_3 = 48,
bear_4 = 49,
panther = 50,
feran = 51,
leopard_1 = 52,
leopard_2 = 53,
chimeran_wolf_arctic = 54,
tiger_1 = 55,
tiger_2 = 56,
armed_female_orc = 57,
armed_male_orc = 58,
armed_skeleton = 59,
phantom_warrior = 60,
imp = 61,
brownie = 62,
leprechaun = 63,
spider_s_1 = 64,
spider_s_2 = 65,
spider_s_3 = 66,
spider_l_1 = 67,
spider_l_2 = 68,
spider_l_3 = 69,
wood_sprite = 70,
spider_l_4 = 71,
spider_s_4 = 72,
giant_1 = 73,
hobgoblin = 74,
yeti = 75,
snake4 = 76,
feros = 77,
dragon1 = 78
} actor_types_type;
/*! @} */
/*!
* \name Skin colors
*/
/*! @{ */
#define SKIN_BROWN 0
#define SKIN_NORMAL 1
#define SKIN_PALE 2
#define SKIN_TAN 3
#define SKIN_DARK_BLUE 4 // for Elf
#define SKIN_WHITE 5 // for Draegoni
/*! @} */
/*!
* \name Shirt colors
*/
/*! @{ */
#define SHIRT_BLACK 0
#define SHIRT_BLUE 1
#define SHIRT_BROWN 2
#define SHIRT_GREY 3
#define SHIRT_GREEN 4
#define SHIRT_LIGHTBROWN 5
#define SHIRT_ORANGE 6
#define SHIRT_PINK 7
#define SHIRT_PURPLE 8
#define SHIRT_RED 9
#define SHIRT_WHITE 10
#define SHIRT_YELLOW 11
#define SHIRT_LEATHER_ARMOR 12
#define SHIRT_CHAIN_ARMOR 13
#define SHIRT_STEEL_CHAIN_ARMOR 14
#define SHIRT_TITANIUM_CHAIN_ARMOR 15
#define SHIRT_IRON_PLATE_ARMOR 16
#define SHIRT_AUGMENTED_LEATHER_ARMOR 17
#define SHIRT_FUR 18
#define SHIRT_STEEL_PLATE_ARMOR 19
#define SHIRT_TITANIUM_PLATE_ARMOR 20
#define SHIRT_BRONZE_PLATE_ARMOR 21
/*! @} */
/*!
* \name No armor flags
*/
/*! @{ */
#define NO_BODY_ARMOR 0
#define NO_PANTS_ARMOR 0
#define NO_BOOTS_ARMOR 0
/*! @} */
/*!
* \name Hair colors
*/
/*! @{ */
#define HAIR_BLACK 0
#define HAIR_BLOND 1
#define HAIR_BROWN 2
#define HAIR_GRAY 3
#define HAIR_RED 4
#define HAIR_WHITE 5
#define HAIR_BLUE 6 // for Draegoni
#define HAIR_GREEN 7 // for Draegoni
#define HAIR_PURPLE 8 // for Draegoni
#define HAIR_DARK_BROWN 9
#define HAIR_STRAWBERRY 10
#define HAIR_LIGHT_BLOND 11
#define HAIR_DIRTY_BLOND 12
#define HAIR_BROWN_GRAY 13
#define HAIR_DARK_GRAY 14
#define HAIR_DARK_RED 15
/*! @} */
/*!
* \name Boots colors
*/
/*! @{ */
#define BOOTS_BLACK 0
#define BOOTS_BROWN 1
#define BOOTS_DARKBROWN 2
#define BOOTS_DULLBROWN 3
#define BOOTS_LIGHTBROWN 4
#define BOOTS_ORANGE 5
#define BOOTS_LEATHER 6
#define BOOTS_FUR 7
#define BOOTS_IRON_GREAVE 8
#define BOOTS_STEEL_GREAVE 9
#define BOOTS_TITANIUM_GREAVE 10
#define BOOTS_BRONZE_GREAVE 11
#define BOOTS_AUGMENTED_LEATHER_GREAVE 12
/*! @} */
/*!
* \name Pants colors
*/
/*! @{ */
#define PANTS_BLACK 0
#define PANTS_BLUE 1
#define PANTS_BROWN 2
#define PANTS_DARKBROWN 3
#define PANTS_GREY 4
#define PANTS_GREEN 5
#define PANTS_LIGHTBROWN 6
#define PANTS_RED 7
#define PANTS_WHITE 8
#define PANTS_LEATHER 9
#define PANTS_IRON_CUISSES 10
#define PANTS_FUR 11
#define PANTS_STEEL_CUISSES 12
#define PANTS_TITANIUM_CUISSES 13
#define PANTS_BRONZE_CUISSES 14
#define PANTS_AUGMENTED_LEATHER_CUISSES 15
/*! @} */
/*!
* \name Capes
*/
/*! @{ */
#define CAPE_BLACK 0
#define CAPE_BLUE 1
#define CAPE_BLUEGRAY 2
#define CAPE_BROWN 3
#define CAPE_BROWNGRAY 4
#define CAPE_GRAY 5
#define CAPE_GREEN 6
#define CAPE_GREENGRAY 7
#define CAPE_PURPLE 8
#define CAPE_WHITE 9
#define CAPE_FUR 10
#define CAPE_GOLD 11
#define CAPE_RED 12
#define CAPE_ORANGE 13
#define CAPE_MOD 14
#define CAPE_DERIN 15
#define CAPE_RAVENOD 16
#define CAPE_PLACID 17
#define CAPE_LORD_VERMOR 18
#define CAPE_AISLINN 19
#define CAPE_SOLDUS 20
#define CAPE_LOTHARION 21
#define CAPE_LEARNER 22
#define CAPE_NONE 30
/*! @} */
/*!
* \name Heads
*/
/*! @{ */
#define HEAD_1 0
#define HEAD_2 1
#define HEAD_3 2
#define HEAD_4 3
#define HEAD_5 4
/*! @} */
/*!
* \name Types of wearable items
*/
/*! @{ */
#define KIND_OF_WEAPON 0
#define KIND_OF_SHIELD 1
#define KIND_OF_CAPE 2
#define KIND_OF_HELMET 3
#define KIND_OF_LEG_ARMOR 4
#define KIND_OF_BODY_ARMOR 5
#define KIND_OF_BOOT_ARMOR 6
#define KIND_OF_NECK 7
//NECK ITEMS CODES
#define NECK_NONE 0
/*! @} */
/*!
* \name Helmets
*/
/*! @{ */
#define HELMET_IRON 0
#define HELMET_FUR 1
#define HELMET_LEATHER 2
#define HELMET_RACOON 3
#define HELMET_SKUNK 4
#define HELMET_CROWN_OF_MANA 5
#define HELMET_CROWN_OF_LIFE 6
#define HELMET_STEEL 7
#define HELMET_TITANIUM 8
#define HELMET_BRONZE 9
#define HELMET_NONE 20
/*! @} */
/*!
* \name Shields
*/
/*! @{ */
#define SHIELD_WOOD 0
#define SHIELD_WOOD_ENHANCED 1
#define SHIELD_IRON 2
#define SHIELD_STEEL 3
#define SHIELD_TITANIUM 4
#define SHIELD_BRONZE 5
#define QUIVER_ARROWS 7
#define SHIELD_NONE 11
#define QUIVER_BOLTS 13
/*! @} */
/*!
* \name Weapons
*/
/*! @{ */
#define WEAPON_NONE 0
#define SWORD_1 1
#define SWORD_2 2
#define SWORD_3 3
#define SWORD_4 4
#define SWORD_5 5
#define SWORD_6 6
#define SWORD_7 7
#define STAFF_1 8
#define STAFF_2 9
#define STAFF_3 10
#define STAFF_4 11
#define HAMMER_1 12
#define HAMMER_2 13
#define PICKAX 14
#define SWORD_1_FIRE 15
#define SWORD_2_FIRE 16
#define SWORD_2_COLD 17
#define SWORD_3_FIRE 18
#define SWORD_3_COLD 19
#define SWORD_3_MAGIC 20
#define SWORD_4_FIRE 21
#define SWORD_4_COLD 22
#define SWORD_4_MAGIC 23
#define SWORD_4_THERMAL 24
#define SWORD_5_FIRE 25
#define SWORD_5_COLD 26
#define SWORD_5_MAGIC 27
#define SWORD_5_THERMAL 28
#define SWORD_6_FIRE 29
#define SWORD_6_COLD 30
#define SWORD_6_MAGIC 31
#define SWORD_6_THERMAL 32
#define SWORD_7_FIRE 33
#define SWORD_7_COLD 34
#define SWORD_7_MAGIC 35
#define SWORD_7_THERMAL 36
#define PICKAX_MAGIC 37
#define BATTLEAXE_IRON 38
#define BATTLEAXE_STEEL 39
#define BATTLEAXE_TITANIUM 40
#define BATTLEAXE_IRON_FIRE 41
#define BATTLEAXE_STEEL_COLD 42
#define BATTLEAXE_STEEL_FIRE 43
#define BATTLEAXE_TITANIUM_COLD 44
#define BATTLEAXE_TITANIUM_FIRE 45
#define BATTLEAXE_TITANIUM_MAGIC 46
#define GLOVE_FUR 47
#define GLOVE_LEATHER 48
#define BONE_1 49
#define STICK_1 50
#define SWORD_EMERALD_CLAYMORE 51
#define SWORD_CUTLASS 52
#define SWORD_SUNBREAKER 53
#define SWORD_ORC_SLAYER 54
#define SWORD_EAGLE_WING 55
#define SWORD_RAPIER 56
#define SWORD_JAGGED_SABER 57
#define SWORD_BRONZE 58
#define BOW_LONG 64
#define BOW_SHORT 65
#define BOW_RECURVE 66
#define BOW_ELVEN 67
#define BOW_CROSS 68
/*! @} */
/*!
* \name Frames
*/
/*! @{ */
#define frame_walk 0
#define frame_run 1
#define frame_die1 2
#define frame_die2 3
#define frame_pain1 4
#define frame_pain2 11
#define frame_pick 5
#define frame_drop 6
#define frame_idle 7
#define frame_harvest 8
#define frame_cast 9
#define frame_ranged 10
#define frame_sit 12
#define frame_stand 13
#define frame_sit_idle 14
#define frame_combat_idle 15
#define frame_in_combat 16
#define frame_out_combat 17
#define frame_attack_up_1 18
#define frame_attack_up_2 19
#define frame_attack_up_3 20
#define frame_attack_up_4 21
#define frame_attack_down_1 22
#define frame_attack_down_2 23
#define frame_attack_down_3 24
#define frame_attack_down_4 25
#define frame_attack_down_5 26
#define frame_attack_down_6 27
#define frame_attack_down_7 28
#define frame_attack_down_8 29
#define frame_attack_down_9 30
#define frame_attack_down_10 31
#define frame_attack_up_5 32
#define frame_attack_up_6 33
#define frame_attack_up_7 34
#define frame_attack_up_8 35
#define frame_attack_up_9 36
#define frame_attack_up_10 37
//frame values for poses (40 different poses)
#define frame_poses_start 100
#define frame_poses_end 140
/*! @} */
/*!
* \name Colors
*/
/*! @{ */
#define c_lbound 0
#define c_red1 0
#define c_red2 7
#define c_red3 14
#define c_red4 21
#define c_orange1 1
#define c_orange2 8
#define c_orange3 15
#define c_orange4 22
#define c_yellow1 2
#define c_yellow2 9
#define c_yellow3 16
#define c_yellow4 23
#define c_green1 3
#define c_green2 10
#define c_green3 17
#define c_green4 24
#define c_blue1 4
#define c_blue2 11
#define c_blue3 18
#define c_blue4 25
#define c_purple1 5
#define c_purple2 12
#define c_purple3 19
#define c_purple4 26
#define c_grey1 6
#define c_grey2 13
#define c_grey3 20
#define c_grey4 27
#define c_ubound 27
/*! @} */
/*!
* \name Foreign chars
*/
/*! @{ */
#define SPECIALCHAR_LBOUND 180
#define EACUTE 181
#define ACIRC 182
#define AGRAVE 183
#define CCEDIL 184
#define ECIRC 185
#define EUML 186
#define EGRAVE 187
#define IUML 188
#define OCIRC 189
#define uGRAVE 190
#define aUMLAUT 191
#define oUMLAUT 192
#define uUMLAUT 193
#define AUMLAUT 194
#define OUMLAUT 195
#define UUMLAUT 196
#define DOUBLES 197
#define aELIG 198
#define oSLASH 199
#define aRING 200
#define AELIG 201
#define OSLASH 202
#define ARING 203
#define EnyE 204
#define ENYE 205
#define aACCENT 206
#define AACCENT 207
#define EACCENT 208
#define iACCENT 209
#define IACCENT 210
#define oACCENT 211
#define OACCENT 212
#define uACCENT 213
#define UACCENT 214
#define SPECIALCHAR_UBOUND 214
/*! @} */
/*!
* \name Windows
*/
/*! @{ */
#define RULE_WIN 1
#define RULE_INTERFACE 2
#define NEW_CHAR_INTERFACE 3
/*! @} */
/*!
* \name Actor commands
*
* Note to other developers: #defines are generally *bad form*. They
* interfere with innocent calls, like my call to eye_candy.idle(), in very
* confusing ways (in my case, "expected unqualified-id before numeric
* constant"). This is what enums are for; please use them. I'm fixing this
* one for you as an example.
*
* - Karen ([email protected])
*/
/*! @{ */
typedef enum actor_commands
{
nothing = 0,
kill_me = 1,
die1 = 3,
die2 = 4,
pain1 = 5,
pain2 = 17,
pick = 6,
drop = 7,
idle = 8,
harvest = 9,
cast = 10,
ranged = 11,
meele = 12,
sit_down = 13,
stand_up = 14,
turn_left = 15,
turn_right = 16,
enter_combat = 18,
leave_combat = 19,
move_n = 20,
move_ne = 21,
move_e = 22,
move_se = 23,
move_s = 24,
move_sw = 25,
move_w = 26,
move_nw = 27,
run_n = 30,
run_ne = 31,
run_e = 32,
run_se = 33,
run_s = 34,
run_sw = 35,
run_w = 36,
run_nw = 37,
turn_n = 38,
turn_ne = 39,
turn_e = 40,
turn_se = 41,
turn_s = 42,
turn_sw = 43,
turn_w = 44,
turn_nw = 45,
attack_up_1 = 46,
attack_up_2 = 47,
attack_up_3 = 48,
attack_up_4 = 49,
attack_down_1 = 50,
attack_down_2 = 51,
enter_aim_mode = 52,
leave_aim_mode = 53,
aim_mode_reload = 54,
aim_mode_fire = 55,
missile_miss = 56,
//unwear_bow = 57,
//unwear_quiver = 58,
missile_critical = 59,
attack_down_3 = 60,
attack_down_4 = 61,
attack_down_5 = 62,
attack_down_6 = 63,
attack_down_7 = 64,
attack_down_8 = 65,
attack_down_9 = 66,
attack_down_10 = 67,
attack_up_5 = 68,
attack_up_6 = 69,
attack_up_7 = 70,
attack_up_8 = 71,
attack_up_9 = 72,
attack_up_10 = 73,
emote_cmd = 100,
//from 100 to 255, commands are reserved for emotes
//#ifdef MORE_ATTACHED_ACTORS
wait_cmd=256, //to synch actor/horse (not sent by server)
//#endif
} actor_commands;
/*! @} */
/*!
* \name Weather types
*/
/*! @{ */
typedef enum
{
//precipitation types MUST come first, in the same order as in weather.c . same indexen.
weather_effect_rain = 1,
weather_effect_snow = 2,
weather_effect_hail = 3,
weather_effect_sand = 4,
weather_effect_dust = 5,
weather_effect_lava = 6,
//other effects can be put at the end
weather_effect_wind = 20,
weather_effect_leaves = 21
} weather_type;
/*! @} */
/*!
* \name To server commands
*/
/*! @{ */
#define MOVE_TO 1
#define SEND_PM 2
#define GET_PLAYER_INFO 5
#define RUN_TO 6
#define SIT_DOWN 7
#define SEND_ME_MY_ACTORS 8
#define SEND_OPENING_SCREEN 9
#define SEND_VERSION 10
#define TURN_LEFT 11
#define TURN_RIGHT 12
#define PING 13
#define HEART_BEAT 14
#define LOCATE_ME 15
#define USE_MAP_OBJECT 16
#define SEND_MY_STATS 17
#define SEND_MY_INVENTORY 18
#define LOOK_AT_INVENTORY_ITEM 19
#define MOVE_INVENTORY_ITEM 20
#define HARVEST 21
#define DROP_ITEM 22
#define PICK_UP_ITEM 23
#define LOOK_AT_GROUND_ITEM 24
#define INSPECT_BAG 25
#define S_CLOSE_BAG 26
#define LOOK_AT_MAP_OBJECT 27
#define TOUCH_PLAYER 28
#define RESPOND_TO_NPC 29
#define MANUFACTURE_THIS 30
#define USE_INVENTORY_ITEM 31
#define TRADE_WITH 32
#define ACCEPT_TRADE 33
#define REJECT_TRADE 34
#define EXIT_TRADE 35
#define PUT_OBJECT_ON_TRADE 36
#define REMOVE_OBJECT_FROM_TRADE 37
#define LOOK_AT_TRADE_ITEM 38
#define CAST_SPELL 39
#define ATTACK_SOMEONE 40
#define GET_KNOWLEDGE_INFO 41
#define ITEM_ON_ITEM 42
#define SEND_BOOK 43
#define GET_STORAGE_CATEGORY 44
#define DEPOSITE_ITEM 45
#define WITHDRAW_ITEM 46
#define LOOK_AT_STORAGE_ITEM 47
#define SPELL_NAME 48
#define SEND_VIDEO_INFO 49
#define POPUP_REPLY 50
#define FIRE_MISSILE_AT_OBJECT 51
#define PING_RESPONSE 60
#define SET_ACTIVE_CHANNEL 61
/* send: 16 bit quest id, request the server to supply quest title using HERE_IS_QUEST_ID */
#define WHAT_QUEST_IS_THIS_ID 63
#define DO_EMOTE 70
/* send: 16 bit buff bit-mask (only one set bit), server responds with SEND_BUFF_DURATION */
#define GET_BUFF_DURATION 71
#define LOG_IN 140
#define CREATE_CHAR 141
#define GET_DATE 230
#define GET_TIME 231
#define SERVER_STATS 232
#define ORIGINAL_IP 233
/*! @} */
/*!
* \name To client commands
*/
/*! @{ */
#define ADD_NEW_ACTOR 1
#define ADD_ACTOR_COMMAND 2
#define YOU_ARE 3
#define SYNC_CLOCK 4
#define NEW_MINUTE 5
#define REMOVE_ACTOR 6
#define CHANGE_MAP 7
#define COMBAT_MODE 8
#define KILL_ALL_ACTORS 9
#define GET_TELEPORTERS_LIST 10
#define PONG 11
#define TELEPORT_IN 12
#define TELEPORT_OUT 13
#define PLAY_SOUND 14
#define START_RAIN 15 //delete later on
#define STOP_RAIN 16 //delete later on
#define THUNDER 17
#define HERE_YOUR_STATS 18
#define HERE_YOUR_INVENTORY 19
#define INVENTORY_ITEM_TEXT 20
#define GET_NEW_INVENTORY_ITEM 21
#define REMOVE_ITEM_FROM_INVENTORY 22
#define HERE_YOUR_GROUND_ITEMS 23
#define GET_NEW_GROUND_ITEM 24
#define REMOVE_ITEM_FROM_GROUND 25
#define CLOSE_BAG 26
#define GET_NEW_BAG 27
#define GET_BAGS_LIST 28
#define DESTROY_BAG 29
#define NPC_TEXT 30
#define NPC_OPTIONS_LIST 31
#define CLOSE_NPC_MENU 32
#define SEND_NPC_INFO 33
#define GET_TRADE_INFO 34//delete later on
#define GET_TRADE_OBJECT 35
#define GET_TRADE_ACCEPT 36
#define GET_TRADE_REJECT 37
#define GET_TRADE_EXIT 38
#define REMOVE_TRADE_OBJECT 39
#define GET_YOUR_TRADEOBJECTS 40
#define GET_TRADE_PARTNER_NAME 41
#define GET_YOUR_SIGILS 42
#define SPELL_ITEM_TEXT 43
#define GET_ACTIVE_SPELL 44
#define GET_ACTIVE_SPELL_LIST 45
#define REMOVE_ACTIVE_SPELL 46
#define GET_ACTOR_DAMAGE 47
#define GET_ACTOR_HEAL 48
#define SEND_PARTIAL_STAT 49
#define SPAWN_BAG_PARTICLES 50
#define ADD_NEW_ENHANCED_ACTOR 51
#define ACTOR_WEAR_ITEM 52
#define ACTOR_UNWEAR_ITEM 53
#define PLAY_MUSIC 54
#define GET_KNOWLEDGE_LIST 55
#define GET_NEW_KNOWLEDGE 56
#define GET_KNOWLEDGE_TEXT 57
#define BUDDY_EVENT 59
#define PING_REQUEST 60
#define FIRE_PARTICLES 61
#define REMOVE_FIRE_AT 62
#define DISPLAY_CLIENT_WINDOW 63
#define OPEN_BOOK 64
#define READ_BOOK 65
#define CLOSE_BOOK 66
#define STORAGE_LIST 67
#define STORAGE_ITEMS 68
#define STORAGE_TEXT 69
#define SPELL_CAST 70
#define GET_ACTIVE_CHANNELS 71
#define MAP_FLAGS 72
#define GET_ACTOR_HEALTH 73
#define GET_3D_OBJ_LIST 74
#define GET_3D_OBJ 75
#define REMOVE_3D_OBJ 76
#define GET_ITEMS_COOLDOWN 77
#define SEND_BUFFS 78
#define SEND_SPECIAL_EFFECT 79
#define REMOVE_MINE 80
#define GET_NEW_MINE 81
#define GET_MINES_LIST 82
#define DISPLAY_POPUP 83
#define MISSILE_AIM_A_AT_B 84
#define MISSILE_AIM_A_AT_XYZ 85
#define MISSILE_FIRE_A_TO_B 86
#define MISSILE_FIRE_A_TO_XYZ 87
#define MISSILE_FIRE_XYZ_TO_B 88
#define ADD_ACTOR_ANIMATION 89
#define SEND_MAP_MARKER 90
#define REMOVE_MAP_MARKER 91
/* sent: 16 bit quest id for the next npc message */
#define NEXT_NPC_MESSAGE_IS_QUEST 92
/* sent: non null terminated string giving the title of the quest */
#define HERE_IS_QUEST_ID 93
/* sent: 16 bit quest id, this quest should be shown as finished */
#define QUEST_FINISHED 94
/* sent: 5 x 32 bit integers, each active bit is an achievement the last "You see: name" player has */
#define SEND_ACHIEVEMENTS 95
/* sent: 1 single byte buff duration, time remaining in seconds */
#define SEND_BUFF_DURATION 96
#define SEND_WEATHER 100
// reserved for future expansion 220-229, not being used in the server yet
#define MAP_SET_OBJECTS 220
#define MAP_STATE_OBJECTS 221
#define UPGRADE_NEW_VERSION 240 // TODO: Consider combining all this into one packet followed by one byte (plus optional text)
#define UPGRADE_TOO_OLD 241
#define REDEFINE_YOUR_COLORS 248
#define YOU_DONT_EXIST 249
#define LOG_IN_OK 250
#define LOG_IN_NOT_OK 251
#define CREATE_CHAR_OK 252
#define CREATE_CHAR_NOT_OK 253
/*! @} */
/*!
* \name Common (both to the server and client) commands
*/
/*! @{ */
#define RAW_TEXT 0
#define PROXY 254 // reserved for advanced PROXY support
#define BYE 255
/*! @} */
/*!
* \name Protocol places
*/
#define PROTOCOL 0 /*!< is an unsigned char */
/*!
* \name Stats
*/
/*! @{ */
#define PHY_CUR 0
#define PHY_BASE 1
#define COO_CUR 2
#define COO_BASE 3
#define REAS_CUR 4
#define REAS_BASE 5
#define WILL_CUR 6
#define WILL_BASE 7
#define INST_CUR 8
#define INST_BASE 9
#define VIT_CUR 10
#define VIT_BASE 11
#define HUMAN_CUR 12
#define HUMAN_BASE 13
#define ANIMAL_CUR 14
#define ANIMAL_BASE 15
#define VEGETAL_CUR 16
#define VEGETAL_BASE 17
#define INORG_CUR 18
#define INORG_BASE 19
#define ARTIF_CUR 20
#define ARTIF_BASE 21
#define MAGIC_CUR 22
#define MAGIC_BASE 23
#define MAN_S_CUR 24
#define MAN_S_BASE 25
#define HARV_S_CUR 26
#define HARV_S_BASE 27
#define ALCH_S_CUR 28
#define ALCH_S_BASE 29
#define OVRL_S_CUR 30
#define OVRL_S_BASE 31
#define DEF_S_CUR 32
#define DEF_S_BASE 33
#define ATT_S_CUR 34
#define ATT_S_BASE 35
#define MAG_S_CUR 36
#define MAG_S_BASE 37
#define POT_S_CUR 38
#define POT_S_BASE 39
#define CARRY_WGHT_CUR 40
#define CARRY_WGHT_BASE 41
#define MAT_POINT_CUR 42
#define MAT_POINT_BASE 43
#define ETH_POINT_CUR 44
#define ETH_POINT_BASE 45
#define FOOD_LEV 46
#define RESEARCHING 47
#define MAG_RES 48
#define MAN_EXP 49
#define MAN_EXP_NEXT 50
#define HARV_EXP 51
#define HARV_EXP_NEXT 52
#define ALCH_EXP 53
#define ALCH_EXP_NEXT 54
#define OVRL_EXP 55
#define OVRL_EXP_NEXT 56
#define DEF_EXP 57
#define DEF_EXP_NEXT 58
#define ATT_EXP 59
#define ATT_EXP_NEXT 60
#define MAG_EXP 61
#define MAG_EXP_NEXT 62
#define POT_EXP 63
#define POT_EXP_NEXT 64
#define RESEARCH_COMPLETED 65
#define RESEARCH_TOTAL 66
#define SUM_EXP 67
#define SUM_EXP_NEXT 68
#define SUM_S_CUR 69
#define SUM_S_BASE 70
#define CRA_EXP 71
#define CRA_EXP_NEXT 72
#define CRA_S_CUR 73
#define CRA_S_BASE 74
#define ENG_EXP 75
#define ENG_EXP_NEXT 76
#define ENG_S_CUR 77
#define ENG_S_BASE 78
#define RANG_EXP 79
#define RANG_EXP_NEXT 80
#define RANG_S_CUR 81
#define RANG_S_BASE 82
#define TAIL_EXP 83
#define TAIL_EXP_NEXT 84
#define TAIL_S_CUR 85
#define TAIL_S_BASE 86
#define ACTION_POINTS_CUR 87
#define ACTION_POINTS_BASE 88
/*! @} */
/*!
* \name Sound
*/
/*! @{ */
#define snd_rain 0
#define snd_tele_in 1
#define snd_tele_out 2
#define snd_teleprtr 3
#define snd_thndr_1 4
#define snd_thndr_2 5
#define snd_thndr_3 6
#define snd_thndr_4 7
#define snd_thndr_5 8
#define snd_fire 9
/*! @} */
/*!
* \name Text channels
*/
/*! @{ */
#define CHAT_LOCAL 0
#define CHAT_PERSONAL 1
#define CHAT_GM 2
#define CHAT_SERVER 3
#define CHAT_MOD 4
#define CHAT_MODPM 8
#if defined(OTHER_LIFE) && defined(OTHER_LIFE_EXTENDED_CHAT)
// channels 9-31 reserved for future use
#define CHAT_CHANNEL1 32
#define CHAT_CHANNEL2 33
#define CHAT_CHANNEL3 34
#define CHAT_CHANNEL4 35
#define CHAT_CHANNEL5 36
#define CHAT_CHANNEL6 37
#define CHAT_CHANNEL7 38
#define CHAT_CHANNEL8 39
#define CHAT_CHANNEL9 40
#define CHAT_CHANNEL10 41
#define CHAT_CHANNEL11 42
#define CHAT_CHANNEL12 43
#define CHAT_CHANNEL13 44
#define CHAT_CHANNEL14 45
#define CHAT_CHANNEL15 46
#define CHAT_CHANNEL16 47
#define CHAT_CHANNEL17 48
#define CHAT_CHANNEL18 49
#define CHAT_CHANNEL19 50
#define CHAT_CHANNEL20 51
#define CHAT_CHANNEL21 52
#define CHAT_CHANNEL22 53
#define CHAT_CHANNEL23 54
#define CHAT_CHANNEL24 55
#define CHAT_CHANNEL25 56
#define CHAT_CHANNEL26 57
#define CHAT_CHANNEL27 58
#define CHAT_CHANNEL28 59