forked from LuminariMUD/Luminari-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathact.item.c
executable file
·7059 lines (6241 loc) · 217 KB
/
act.item.c
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: act.item.c Part of LuminariMUD *
* Usage: Object handling routines -- get/drop and container handling. *
* *
* All rights reserved. See license for complete information. *
* *
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
**************************************************************************/
#include "conf.h"
#include "sysdep.h"
#include "structs.h"
#include "utils.h"
#include "comm.h"
#include "screen.h"
#include "interpreter.h"
#include "handler.h"
#include "db.h"
#include "spells.h"
#include "constants.h"
#include "dg_scripts.h"
#include "oasis.h"
#include "act.h"
#include "quest.h"
#include "spec_procs.h"
#include "clan.h"
#include "mud_event.h"
#include "hlquest.h"
#include "fight.h"
#include "mudlim.h"
#include "handler.h"
#include "actions.h"
#include "traps.h" /* for check_traps() */
#include "assign_wpn_armor.h"
#include "spec_abilities.h"
#include "item.h"
#include "feats.h"
#include "alchemy.h"
#include "mysql.h"
#include "treasure.h"
#include "crafts.h"
#include "hunts.h"
#include "class.h"
#include "spell_prep.h"
/* local function prototypes */
/* do_get utility functions */
static int can_take_obj(struct char_data *ch, struct obj_data *obj);
static void get_check_money(struct char_data *ch, struct obj_data *obj);
static void get_from_container(struct char_data *ch, struct obj_data *cont, char *arg, int mode, int amount);
static void get_from_room(struct char_data *ch, char *arg, int amount);
static void perform_get_from_container(struct char_data *ch, struct obj_data *obj, struct obj_data *cont, int mode);
static int perform_get_from_room(struct char_data *ch, struct obj_data *obj);
/* do_give utility functions */
static struct char_data *give_find_vict(struct char_data *ch, char *arg);
static void perform_give_gold(struct char_data *ch, struct char_data *vict, int amount);
/* do_drop utility functions */
static int perform_drop(struct char_data *ch, struct obj_data *obj, byte mode, const char *sname, room_rnum RDR);
static void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_rnum RDR);
/* do_put utility functions */
static void perform_put(struct char_data *ch, struct obj_data *obj, struct obj_data *cont);
/* do_remove utility functions */
/* do_wear utility functions */
static int hands_have(struct char_data *ch);
int hands_used(struct char_data *ch);
int hands_available(struct char_data *ch);
static void wear_message(struct char_data *ch, struct obj_data *obj, int where);
/**** start file code *****/
/*
case ITEM_CLANARMOR:
if (GET_OBJ_VAL(obj, 2) == NO_CLAN) {
len += snprintf(buf + len, sizeof (buf) - len,
"- Clan ID not set on CLANARMOR\r\n");
} else if (real_clan(GET_OBJ_VAL(obj, 2)) == NO_CLAN) {
len += snprintf(buf + len, sizeof (buf) - len,
"- Invalid Clan ID on CLANARMOR\r\n");
}
*/
/* values 0 is reserved for Apply to AC */
/*
case ITEM_CLANARMOR:
write_to_output(d, "Clan ID Number: ");
break;
*/
/* assistant function for statting/identify/lore of objects */
void display_item_object_values(struct char_data *ch, struct obj_data *item, int mode)
{
struct char_data *tempch = NULL, *pet = NULL;
struct obj_special_ability *specab;
obj_rnum target_obj = NOTHING;
char buf[MAX_STRING_LENGTH] = {'\0'};
char buf2[MAX_STRING_LENGTH] = {'\0'};
int line_length = 80, i = 0;
char actmtds[MAX_STRING_LENGTH] = {'\0'};
int (*name)(struct char_data * ch, void *me, int cmd, const char *argument);
bool found = FALSE;
/* zusuk set these up for quicker setup of new items */
int v1 = GET_OBJ_VAL(item, 0);
int v2 = GET_OBJ_VAL(item, 1);
int v3 = GET_OBJ_VAL(item, 2);
int v4 = GET_OBJ_VAL(item, 3);
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "\tc-----------Item-Type Specific Values:--------------\tn");
else
text_line(ch, "\tcItem-Type Specific Values:\tn", line_length, '-', '-');
switch (GET_OBJ_TYPE(item))
{
case ITEM_FOOD:
case ITEM_DRINK:
send_to_char(ch, "Duration: %d\r\n", GET_OBJ_VAL(item, 0));
break;
case ITEM_SWITCH: /* 35 */ /* activation mechanism */
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "[%s, affecting room VNum %d, %s %s]\r\n",
(v1 == 0) ? "Push switch" : (v1 == 1) ? "Pull switch"
: "BROKEN switch type",
v2,
(v4 == 0) ? "Unhides" : (v4 == 1) ? "Unlocks"
: (v4 == 2) ? "Opens"
: "BROKEN exit action",
(v3 == 0) ? "North" : (v3 == 1) ? "East"
: (v3 == 2) ? "South"
: (v3 == 3) ? "West"
: (v3 == 4) ? "Up"
: (v3 == 5) ? "Down"
: "BROKEN direction");
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "This appears to be a %s switch...\r\n",
v1 == 0 ? "\tcpush\tn" : v1 == 1 ? "\tcpull\tn"
: "(broken! report to staff)");
else
send_to_char(ch, "This appears to be a %s switch...\r\n",
v1 == 0 ? "\tcpush\tn" : v1 == 1 ? "\tcpull\tn"
: "(broken! report to staff)");
}
break;
case ITEM_TRAP: /* 31 */ /* punish those rogue-less groups! */
/* object value (0) is the trap-type */
/* object value (1) is the direction of the trap (TRAP_TYPE_OPEN_DOOR and TRAP_TYPE_UNLOCK_DOOR)
or the object-vnum (TRAP_TYPE_OPEN_CONTAINER and TRAP_TYPE_UNLOCK_CONTAINER and TRAP_TYPE_GET_OBJECT) */
/* object value (2) is the effect */
/* object value (3) is the trap difficulty */
/* object value (4) is whether this trap has been "detected" yet */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Trap type: %s\r\n", trap_type[GET_OBJ_VAL(item, 0)]);
else
send_to_char(ch, "Trap type: %s\r\n", trap_type[GET_OBJ_VAL(item, 0)]);
switch (GET_OBJ_VAL(item, 0))
{
case TRAP_TYPE_ENTER_ROOM:
break;
case TRAP_TYPE_LEAVE_ROOM:
break;
case TRAP_TYPE_OPEN_DOOR:
/*fall-through*/
case TRAP_TYPE_UNLOCK_DOOR:
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Direction: %s\r\n", dirs[GET_OBJ_VAL(item, 1)]);
else
send_to_char(ch, "Direction: %s\r\n", dirs[GET_OBJ_VAL(item, 1)]);
break;
case TRAP_TYPE_OPEN_CONTAINER:
/*fall-through*/
case TRAP_TYPE_UNLOCK_CONTAINER:
/*fall-through*/
case TRAP_TYPE_GET_OBJECT:
target_obj = real_object(GET_OBJ_VAL(item, 1));
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Target Object: %s\r\n",
(target_obj == NOTHING) ? "Nothing" : obj_proto[target_obj].short_description);
else
send_to_char(ch, "Target Object: %s\r\n",
(target_obj == NOTHING) ? "Nothing" : obj_proto[target_obj].short_description);
break;
}
if (GET_OBJ_VAL(item, 2) <= 0 || GET_OBJ_VAL(item, 2) >= TOP_TRAP_EFFECTS)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Invalid trap effect on this object [1]\r\n");
else
send_to_char(ch, "Invalid trap effect on this object [1]\r\n");
}
else if (GET_OBJ_VAL(item, 2) < TRAP_EFFECT_FIRST_VALUE && GET_OBJ_VAL(item, 2) >= LAST_SPELL_DEFINE)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Invalid trap effect on this object [2]\r\n");
else
send_to_char(ch, "Invalid trap effect on this object [2]\r\n");
}
else if (GET_OBJ_VAL(item, 2) >= TRAP_EFFECT_FIRST_VALUE)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Trap effect: %s\r\n", trap_effects[GET_OBJ_VAL(item, 2) - 1000]);
else
send_to_char(ch, "Trap effect: %s\r\n", trap_effects[GET_OBJ_VAL(item, 2) - 1000]);
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Spell effect: %s\r\n", spell_info[GET_OBJ_VAL(item, 2)].name);
else
send_to_char(ch, "Spell effect: %s\r\n", spell_info[GET_OBJ_VAL(item, 2)].name);
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Trap DC: %d\r\n", GET_OBJ_VAL(item, 3));
else
send_to_char(ch, "Trap DC: %d\r\n", GET_OBJ_VAL(item, 3));
break;
case ITEM_LIGHT: /* 1 */ /**< Item is a light source */
if (GET_OBJ_VAL(item, 2) == -1)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Hours left: Infinite\r\n");
else
send_to_char(ch, "Hours left: Infinite\r\n");
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Hours left: [%d]\r\n", GET_OBJ_VAL(item, 2));
else
send_to_char(ch, "Hours left: [%d]\r\n", GET_OBJ_VAL(item, 2));
}
break;
case ITEM_SCROLL: /* 2 */ /* fallthrough */
case ITEM_POTION: /* 10 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Spells: (Level %d) %s%s%s%s%s\r\n", GET_OBJ_VAL(item, 0),
GET_OBJ_VAL(item, 1) > 0 ? spell_info[GET_OBJ_VAL(item, 1)].name : "",
GET_OBJ_VAL(item, 2) > 0 ? ", " : "", GET_OBJ_VAL(item, 2) > 0 ? spell_info[GET_OBJ_VAL(item, 2)].name : "",
GET_OBJ_VAL(item, 3) > 0 ? ", " : "", GET_OBJ_VAL(item, 3) > 0 ? spell_info[GET_OBJ_VAL(item, 3)].name : "");
else
send_to_char(ch, "Spells: (Level %d) %s%s%s%s%s\r\n", GET_OBJ_VAL(item, 0),
GET_OBJ_VAL(item, 1) > 0 ? spell_info[GET_OBJ_VAL(item, 1)].name : "",
GET_OBJ_VAL(item, 2) > 0 ? ", " : "", GET_OBJ_VAL(item, 2) > 0 ? spell_info[GET_OBJ_VAL(item, 2)].name : "",
GET_OBJ_VAL(item, 3) > 0 ? ", " : "", GET_OBJ_VAL(item, 3) > 0 ? spell_info[GET_OBJ_VAL(item, 3)].name : "");
break;
case ITEM_WAND: /* 3 */ /* fallthrough */
case ITEM_STAFF: /* 4 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Spell: %s at level %d, %d (of %d) charges remaining\r\n",
spell_info[GET_OBJ_VAL(item, 3)].name, GET_OBJ_VAL(item, 0),
GET_OBJ_VAL(item, 2), GET_OBJ_VAL(item, 1));
else
send_to_char(ch, "Spell: %s at level %d, %d (of %d) charges remaining\r\n",
spell_info[GET_OBJ_VAL(item, 3)].name, GET_OBJ_VAL(item, 0),
GET_OBJ_VAL(item, 2), GET_OBJ_VAL(item, 1));
break;
case ITEM_FIREWEAPON: /* 7 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "**Deprecated, report to staff to fix this item**\r\n"
"Type: %s\r\n"
"Damage: %d\r\n"
"Breaking Probability: %d percent\r\n",
ranged_weapons[GET_OBJ_VAL(item, 0)], GET_OBJ_VAL(item, 1),
GET_OBJ_VAL(item, 2));
else
send_to_char(ch,
"**Deprecated, report to staff to fix this item**\r\n"
"Type: %s\r\n"
"Damage: %d\r\n"
"Breaking Probability: %d percent\r\n",
ranged_weapons[GET_OBJ_VAL(item, 0)], GET_OBJ_VAL(item, 1),
GET_OBJ_VAL(item, 2));
break;
case ITEM_WEAPON: /* 5 */
/* weapon poison */
if (item->weapon_poison.poison)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Weapon Poisoned: %s, Level of Poison: %d, Applications Left: %d\r\n",
spell_info[item->weapon_poison.poison].name,
item->weapon_poison.poison_level,
item->weapon_poison.poison_hits);
else
send_to_char(ch, "Weapon Poisoned: %s, Level of Poison: %d, Applications Left: %d\r\n",
spell_info[item->weapon_poison.poison].name,
item->weapon_poison.poison_level,
item->weapon_poison.poison_hits);
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Weapon Type: %s (%d) Enhancement Bonus: %d\r\n",
weapon_list[GET_WEAPON_TYPE(item)].name,
GET_WEAPON_TYPE(item),
GET_ENHANCEMENT_BONUS(item));
else
send_to_char(ch, "Weapon Type: %s (%d) Enhancement Bonus: %d\r\n",
weapon_list[GET_WEAPON_TYPE(item)].name,
GET_WEAPON_TYPE(item),
GET_ENHANCEMENT_BONUS(item));
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Todam: %dd%d, Avg Damage: %.1f.\r\n",
GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2),
((GET_OBJ_VAL(item, 2) + 1) / 2.0) * GET_OBJ_VAL(item, 1));
else
send_to_char(ch, "Todam: %dd%d, Avg Damage: %.1f.\r\n",
GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2),
((GET_OBJ_VAL(item, 2) + 1) / 2.0) * GET_OBJ_VAL(item, 1));
/* weapon special abilities*/
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Special Abilities:\r\n");
else
send_to_char(ch, "Special Abilities:\r\n");
for (specab = item->special_abilities; specab != NULL; specab = specab->next)
{
found = TRUE;
sprintbit(specab->activation_method, activation_methods, actmtds, MAX_STRING_LENGTH);
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
else
send_to_char(ch, "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
if (specab->ability == WEAPON_SPECAB_BANE)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
else
send_to_char(ch, "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
if (specab->value[1])
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
else
send_to_char(ch, "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
}
}
}
if (!found)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "No weapon special abilities assigned.\r\n");
else
send_to_char(ch, "No weapon special abilities assigned.\r\n");
}
/* values defined by weapon type */
int weapon_val = GET_OBJ_VAL(item, 0);
int crit_multi = 0;
switch (weapon_list[weapon_val].critMult)
{
case CRIT_X2:
crit_multi = 2;
break;
case CRIT_X3:
crit_multi = 3;
break;
case CRIT_X4:
crit_multi = 4;
break;
case CRIT_X5:
crit_multi = 5;
break;
case CRIT_X6:
crit_multi = 6;
break;
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Values defined by weapon type:\r\n");
else
send_to_char(ch, "Values defined by weapon type:\r\n");
sprintbit(weapon_list[weapon_val].weaponFlags, weapon_flags, buf, sizeof(buf));
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "Damage: %dD%d, Threat: %d, Crit. Multi: %d, Weapon Flags: %s\r\n",
weapon_list[weapon_val].numDice, weapon_list[weapon_val].diceSize,
(20 - weapon_list[weapon_val].critRange),
crit_multi, buf);
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Damage: %dD%d, Threat: %d, Crit. Multi: %d, Weapon Flags: %s\r\n",
weapon_list[weapon_val].numDice, weapon_list[weapon_val].diceSize,
(20 - weapon_list[weapon_val].critRange),
crit_multi, buf);
else
send_to_char(ch, "Damage: %dD%d, Threat: %d, Crit. Multi: %d, Weapon Flags: %s\r\n",
weapon_list[weapon_val].numDice, weapon_list[weapon_val].diceSize,
(20 - weapon_list[weapon_val].critRange),
crit_multi, buf);
}
sprintbit(weapon_list[weapon_val].damageTypes, weapon_damage_types, buf2, sizeof(buf2));
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "Sugg. Cost: %d, Damage-Types: %s, Sugg. Weight: %d\r\n",
weapon_list[weapon_val].cost, buf2, weapon_list[weapon_val].weight);
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Damage-Types: %s\r\n", buf2);
else
send_to_char(ch, "Damage-Types: %s\r\n", buf2);
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Range: %d, Family: %s\r\n",
weapon_list[weapon_val].range, weapon_family[weapon_list[weapon_val].weaponFamily]);
else
send_to_char(ch, "Range: %d, Family: %s\r\n",
weapon_list[weapon_val].range, weapon_family[weapon_list[weapon_val].weaponFamily]);
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "Sugg. Size: %s, Sugg. Material: %s, Handle Type: %s, Head Type: %s\r\n",
sizes[weapon_list[weapon_val].size], material_name[weapon_list[weapon_val].material],
weapon_handle_types[weapon_list[weapon_val].handle_type],
weapon_head_types[weapon_list[weapon_val].head_type]);
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Handle Type: %s, Head Type: %s\r\n",
weapon_handle_types[weapon_list[weapon_val].handle_type],
weapon_head_types[weapon_list[weapon_val].head_type]);
else
send_to_char(ch, "Handle Type: %s, Head Type: %s\r\n",
weapon_handle_types[weapon_list[weapon_val].handle_type],
weapon_head_types[weapon_list[weapon_val].head_type]);
}
break;
case ITEM_ARMOR: /* 9 */
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "AC-apply: [%d], Enhancement Bonus: +%d\r\n",
GET_OBJ_VAL(item, 0), GET_ENHANCEMENT_BONUS(item));
}
else
{
/* players should see the float value */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "AC-apply: [%.1f], Enhancement Bonus: +%d\r\n",
(float)GET_OBJ_VAL(item, 0) / 10.0, GET_ENHANCEMENT_BONUS(item));
else
send_to_char(ch, "AC-apply: [%.1f], Enhancement Bonus: +%d\r\n",
(float)GET_OBJ_VAL(item, 0) / 10.0, GET_ENHANCEMENT_BONUS(item));
}
/* values defined by armor type */
int armor_val = GET_OBJ_VAL(item, 1);
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Values defined by armor type:\r\n");
else
send_to_char(ch, "Values defined by armor type:\r\n");
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "Armor: %s, Type: %s, Sugg. Cost: %d, Sugg. AC: %d,\r\n",
armor_list[armor_val].name,
armor_type[armor_list[armor_val].armorType],
armor_list[armor_val].cost,
armor_list[armor_val].armorBonus);
}
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Armor-Proficiency: %s, Armor-Type: %s\r\n", armor_list[armor_val].name,
armor_type[armor_list[armor_val].armorType]);
else
send_to_char(ch, "Armor-Proficiency: %s, Armor-Type: %s\r\n", armor_list[armor_val].name,
armor_type[armor_list[armor_val].armorType]);
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Max Dex Bonus: %d, Armor-Check: %d, Spell-Fail: %d, 30ft: %d, 20ft: %d,\r\n",
armor_list[armor_val].dexBonus,
armor_list[armor_val].armorCheck,
armor_list[armor_val].spellFail,
armor_list[armor_val].thirtyFoot, armor_list[armor_val].twentyFoot);
else
send_to_char(ch, "Max Dex Bonus: %d, Armor-Check: %d, Spell-Fail: %d, 30ft: %d, 20ft: %d,\r\n",
armor_list[armor_val].dexBonus,
armor_list[armor_val].armorCheck,
armor_list[armor_val].spellFail,
armor_list[armor_val].thirtyFoot, armor_list[armor_val].twentyFoot);
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "Sugg. Weight: %d, Sugg. Material: %s, Sugg. Wear-Slot: %s\r\n",
armor_list[armor_val].weight,
material_name[armor_list[armor_val].material],
wear_bits[armor_list[armor_val].wear]);
}
/* Special abilities*/
found = FALSE;
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Special Abilities:\r\n");
else
send_to_char(ch, "Special Abilities:\r\n");
for (specab = item->special_abilities; specab != NULL; specab = specab->next)
{
found = TRUE;
sprintbit(specab->activation_method, activation_methods, actmtds, MAX_STRING_LENGTH);
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
else
send_to_char(ch, "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
if (specab->ability == WEAPON_SPECAB_BANE)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
else
send_to_char(ch, "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
if (specab->value[1])
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
else
send_to_char(ch, "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
}
}
}
if (!found)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "No special abilities assigned.\r\n");
else
send_to_char(ch, "No special abilities assigned.\r\n");
}
break;
case ITEM_CONTAINER: /* 15 */
sprintbit(GET_OBJ_VAL(item, 1), container_bits, buf, sizeof(buf));
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Weight capacity: %d, Lock Type: %s, Key Num: %d, Corpse: %s\r\n",
GET_OBJ_VAL(item, 0), buf, GET_OBJ_VAL(item, 2),
YESNO(GET_OBJ_VAL(item, 3)));
else
send_to_char(ch, "Weight capacity: %d, Lock Type: %s, Key Num: %d, Corpse: %s\r\n",
GET_OBJ_VAL(item, 0), buf, GET_OBJ_VAL(item, 2),
YESNO(GET_OBJ_VAL(item, 3)));
break;
case ITEM_AMMO_POUCH: /* 36 */
sprintbit(GET_OBJ_VAL(item, 1), container_bits, buf, sizeof(buf));
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Weight capacity: %d, Lock Type: %s, Key Num: %d, Corpse?: %s\r\n",
GET_OBJ_VAL(item, 0), buf, GET_OBJ_VAL(item, 2),
YESNO(GET_OBJ_VAL(item, 3)));
else
send_to_char(ch, "Weight capacity: %d, Lock Type: %s, Key Num: %d, Corpse?: %s\r\n",
GET_OBJ_VAL(item, 0), buf, GET_OBJ_VAL(item, 2),
YESNO(GET_OBJ_VAL(item, 3)));
break;
case ITEM_DRINKCON: /* fallthrough */ /* 17 */
case ITEM_FOUNTAIN: /* 23 */
sprinttype(GET_OBJ_VAL(item, 2), drinks, buf, sizeof(buf));
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Capacity: %d, Contains: %d, Spell: %s:%s, Liquid: %s\r\n",
GET_OBJ_VAL(item, 0), GET_OBJ_VAL(item, 1), YESNO(GET_OBJ_VAL(item, 3)),
(GET_OBJ_VAL(item, 3) > 0) ? spell_info[GET_OBJ_VAL(item, 3)].name : "none", buf);
else
send_to_char(ch, "Capacity: %d, Contains: %d, Spell: %s:%s, Liquid: %s\r\n",
GET_OBJ_VAL(item, 0), GET_OBJ_VAL(item, 1), YESNO(GET_OBJ_VAL(item, 3)),
(GET_OBJ_VAL(item, 3) > 0) ? spell_info[GET_OBJ_VAL(item, 3)].name : "none", buf);
break;
case ITEM_NOTE: /* 16 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Tongue: %d\r\n", GET_OBJ_VAL(item, 0));
else
send_to_char(ch, "Tongue: %d\r\n", GET_OBJ_VAL(item, 0));
break;
case ITEM_BOAT: /* 22 */
break;
case ITEM_KEY: /* 18 */
break;
// case ITEM_FOOD: // 19
// New food type above in switch statement
// if (mode == ITEM_STAT_MODE_G_LORE)
// send_to_group(NULL, GROUP(ch), "Makes full: %d, Spellnum: %d (%s), Poisoned: %s\r\n", GET_OBJ_VAL(item, 0), GET_OBJ_VAL(item, 1), spell_info[GET_OBJ_VAL(item, 1)].name, YESNO(GET_OBJ_VAL(item, 3)));
// else
// send_to_char(ch, "Makes full: %d, Spellnum: %d (%s), Poisoned: %s\r\n", GET_OBJ_VAL(item, 0), GET_OBJ_VAL(item, 1), spell_info[GET_OBJ_VAL(item, 1)].name, YESNO(GET_OBJ_VAL(item, 3)));
// break;
case ITEM_MONEY: /* 20 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Coins: %d\r\n", GET_OBJ_VAL(item, 0));
else
send_to_char(ch, "Coins: %d\r\n", GET_OBJ_VAL(item, 0));
break;
case ITEM_PORTAL: /* 29 */
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
if (GET_OBJ_VAL(item, 0) == PORTAL_NORMAL)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Type: Normal Portal to %d\r\n", GET_OBJ_VAL(item, 1));
else
send_to_char(ch, "Type: Normal Portal to %d\r\n", GET_OBJ_VAL(item, 1));
}
else if (GET_OBJ_VAL(item, 0) == PORTAL_RANDOM)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Type: Random Portal to range %d-%d\r\n", GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2));
else
send_to_char(ch, "Type: Random Portal to range %d-%d\r\n", GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2));
}
else if (GET_OBJ_VAL(item, 0) == PORTAL_CLANHALL)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Type: Clanportal (destination depends on player)\r\n");
else
send_to_char(ch, "Type: Clanportal (destination depends on player)\r\n");
}
else if (GET_OBJ_VAL(item, 0) == PORTAL_CHECKFLAGS)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Type: Checkflags Portal to %d\r\n", GET_OBJ_VAL(item, 1));
else
send_to_char(ch, "Type: Checkflags Portal to %d\r\n", GET_OBJ_VAL(item, 1));
}
}
break;
case ITEM_FURNITURE: /* 6 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Can hold: [%d] Num. of People in: [%d]\r\n", GET_OBJ_VAL(item, 0), GET_OBJ_VAL(item, 1));
else
send_to_char(ch, "Can hold: [%d] Num. of People in: [%d]\r\n", GET_OBJ_VAL(item, 0), GET_OBJ_VAL(item, 1));
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Holding : ");
else
send_to_char(ch, "Holding : ");
for (tempch = OBJ_SAT_IN_BY(item); tempch; tempch = NEXT_SITTING(tempch))
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "%s ", GET_NAME(tempch));
else
send_to_char(ch, "%s ", GET_NAME(tempch));
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "\r\n");
else
send_to_char(ch, "\r\n");
break;
case ITEM_MISSILE: /* 14 */
/* weapon poison */
if (item->weapon_poison.poison)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Weapon Poisoned: %s, Level of Poison: %d, Applications Left: %d\r\n",
spell_info[item->weapon_poison.poison].name,
item->weapon_poison.poison_level,
item->weapon_poison.poison_hits);
else
send_to_char(ch, "Weapon Poisoned: %s, Level of Poison: %d, Applications Left: %d\r\n",
spell_info[item->weapon_poison.poison].name,
item->weapon_poison.poison_level,
item->weapon_poison.poison_hits);
}
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Type: %s\r\n"
"Enhancement: %d\r\n"
"Imbued with spell: %d\r\n"
"Duration left on imbue: %d hours\r\n"
"Breaking Probability: %d percent\r\n",
ammo_types[GET_OBJ_VAL(item, 0)], GET_OBJ_VAL(item, 4), GET_OBJ_VAL(item, 1),
GET_OBJ_TIMER(item), GET_OBJ_VAL(item, 2));
else
send_to_char(ch,
"Type: %s\r\n"
"Enhancement: %d\r\n"
"Imbued with spell: %d\r\n"
"Duration left on imbue: %d hours\r\n"
"Breaking Probability: %d percent\r\n",
ammo_types[GET_OBJ_VAL(item, 0)], GET_OBJ_VAL(item, 4), GET_OBJ_VAL(item, 1),
GET_OBJ_TIMER(item), GET_OBJ_VAL(item, 2));
if (mode == ITEM_STAT_MODE_IMMORTAL)
{
send_to_char(ch, "Missile belongs to: %ld\r\n", MISSILE_ID(item));
}
break;
case ITEM_SPELLBOOK: /* 28 */
display_spells(ch, item, mode);
break;
case ITEM_POISON: /* 33 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Poison: %s\r\n"
"Level: %d\r\n"
"Applications: %d\r\n"
"Hits/App: %d\r\n",
spell_name(GET_OBJ_VAL(item, 0)), GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2), GET_OBJ_VAL(item, 3));
else
send_to_char(ch, "Poison: %s\r\n"
"Level: %d\r\n"
"Applications: %d\r\n"
"Hits/App: %d\r\n",
spell_name(GET_OBJ_VAL(item, 0)), GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2), GET_OBJ_VAL(item, 3));
break;
case ITEM_WORN: /* 11 */
/* monk glove */
if (CAN_WEAR(item, ITEM_WEAR_HANDS) && GET_OBJ_VAL(item, 0))
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Monk Glove Enchantment: %d\r\n", GET_OBJ_VAL(item, 0));
else
send_to_char(ch, "Monk Glove Enchantment: %d\r\n", GET_OBJ_VAL(item, 0));
}
/* default */
else
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Wearable item.\r\n");
else
send_to_char(ch, "Wearable item.\r\n");
}
break;
case ITEM_CRYSTAL: /* 25 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Arcanite crafting crystal - can be used in crafting.\r\n");
else
send_to_char(ch, "Arcanite crafting crystal - can be used in crafting.\r\n");
break;
case ITEM_TREASURE: /* 8 */
break;
case ITEM_OTHER: /* 12 */
break;
case ITEM_TRASH: /* 13 */
break;
case ITEM_PEN: /* 21 */
break;
case ITEM_CLANARMOR: /* 24 */
break;
case ITEM_ESSENCE: /* 26 */
break;
case ITEM_MATERIAL: /* 27 */
break;
case ITEM_PLANT: /* 30 */
break;
case ITEM_TELEPORT: /* 32 */
/* portal replaced this */
break;
case ITEM_SUMMON: /* 34 */
/* needs to be implemented from HL! */
/* Special abilities*/
found = FALSE;
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Special Abilities:\r\n");
else
send_to_char(ch, "Special Abilities:\r\n");
for (specab = item->special_abilities; specab != NULL; specab = specab->next)
{
found = TRUE;
sprintbit(specab->activation_method, activation_methods, actmtds, MAX_STRING_LENGTH);
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
else
send_to_char(ch, "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
if (specab->ability == WEAPON_SPECAB_BANE)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
else
send_to_char(ch, "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
if (specab->value[1])
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
else
send_to_char(ch, "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
}
}
}
if (!found)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "No special abilities assigned.\r\n");
else
send_to_char(ch, "No special abilities assigned.\r\n");
}
break;
case ITEM_PICK: /* 37 */
break;
case ITEM_INSTRUMENT: /* 38 */
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Instrument class: %s\r\n"
"Difficulty: %d\r\n"
"Level: %d\r\n"
"Breakability: %d\r\n",
instrument_names[GET_OBJ_VAL(item, 0)], GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2), GET_OBJ_VAL(item, 3));
else
send_to_char(ch, "Instrument class: %s\r\n"
"Difficulty: %d\r\n"
"Level: %d\r\n"
"Breakability: %d\r\n",
instrument_names[GET_OBJ_VAL(item, 0)], GET_OBJ_VAL(item, 1), GET_OBJ_VAL(item, 2), GET_OBJ_VAL(item, 3));
/* Special abilities*/
found = FALSE;
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Special Abilities:\r\n");
else
send_to_char(ch, "Special Abilities:\r\n");
for (specab = item->special_abilities; specab != NULL; specab = specab->next)
{
found = TRUE;
sprintbit(specab->activation_method, activation_methods, actmtds, MAX_STRING_LENGTH);
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
else
send_to_char(ch, "Ability: %s Level: %d\r\n"
" Activation Methods: %s\r\n"
" CommandWord: %s\r\n"
" Values: [%d] [%d] [%d] [%d]\r\n",
special_ability_info[specab->ability].name,
specab->level, actmtds,
(specab->command_word == NULL ? "Not set." : specab->command_word),
specab->value[0], specab->value[1], specab->value[2], specab->value[3]);
if (specab->ability == WEAPON_SPECAB_BANE)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
else
send_to_char(ch, "Bane Race: %s.\r\n", race_family_types[specab->value[0]]);
if (specab->value[1])
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
else
send_to_char(ch, "Bane Subrace: %s.\r\n", npc_subrace_types[specab->value[1]]);
}
}
}
if (!found)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "No special abilities assigned.\r\n");
else
send_to_char(ch, "No special abilities assigned.\r\n");
}
case ITEM_DISGUISE: /* 39 */
break;
case ITEM_WALL: /* 40 */
/* quick out */
if (GET_OBJ_VAL(item, WALL_TYPE) >= NUM_WALL_TYPES ||
GET_OBJ_VAL(item, WALL_TYPE) < 0)
{
if (mode == ITEM_STAT_MODE_G_LORE)
send_to_group(NULL, GROUP(ch), "Invalid wall type, let staff know please.\r\n");
else
send_to_char(ch, "Invalid wall type, let staff know please.\r\n");
break;
}
// char *wall_lname = wallinfo[GET_OBJ_VAL(item, WALL_TYPE)].longname;
// char *wall_keyword = wallinfo[GET_OBJ_VAL(item, WALL_TYPE)].keyword;
int wall_spellnum = wallinfo[GET_OBJ_VAL(item, WALL_TYPE)].spell_num;
bool wall_stopmove = wallinfo[GET_OBJ_VAL(item, WALL_TYPE)].stops_movement;
const char *wall_sname = wallinfo[GET_OBJ_VAL(item, WALL_TYPE)].shortname;
int wall_duration = wallinfo[GET_OBJ_VAL(item, WALL_TYPE)].duration;
int wall_level = 0;
struct char_data *wall_creator = find_char(GET_OBJ_VAL(item, WALL_IDNUM));
bool found_player = FALSE;
/* lets see if we can find the wall creator! */
if (!wall_creator)
{