Based on your changes I would make a function out of your do_equipment code that you can call as need.. eg:
Code:
void show_equipment(struct char_data *ch, struct char_data *target)
{
int i, k, found = 0;
const int eq_remap[NUM_WEARS] = { 0, 6, 3, 4, 5,
12, 10, 14, 15,
9, 1, 2, 13, 7, 8,
11, 16, 17 };
for (k = 0; k < NUM_WEARS; k++) {
i = eq_remap[k];
if (GET_EQ(target, i)) {
found = TRUE;
if (CAN_SEE_OBJ(ch, GET_EQ(target, i))) {
send_to_char(ch, "%s", wear_where[i]);
show_obj_to_char(GET_EQ(target, i), ch, SHOW_OBJ_SHORT);
} else {
send_to_char(ch, "%s", wear_where[i]);
send_to_char(ch, "Something.\r\n");
}
}
}
if (!found)
send_to_char(ch, " Nothing.\r\n");
}
Then update do_equipment to be this:
Code:
ACMD(do_equipment)
{
send_to_char(ch, "You have the following items equipped:\r\n");
show_equipment(ch, ch);
}
And change look_at_char() to this:
Code:
static void look_at_char(struct char_data *i, struct char_data *ch)
{
int j, found;
if (!ch->desc)
return;
if (i->player.description)
send_to_char(ch, "%s", i->player.description);
else
act("You see nothing special about $m.", FALSE, i, 0, ch, TO_VICT);
diag_char_to_char(i, ch);
show_equipment(ch, i);
if (ch != i && (IS_THIEF(ch) || GET_LEVEL(ch) >= LVL_IMMORT)) {
act("\r\nYou attempt to peek at $s inventory:", FALSE, i, 0, ch, TO_VICT);
list_obj_to_char(i->carrying, ch, SHOW_OBJ_SHORT, TRUE);
}
}
So anywhere you want a list of equipment, use that new show_equipment(ch, target) function