This code is an update to code previously posted on developer.circlemud.org, but there is no credit for the port of this code out of the ROM codebase. I have cleaned it up, somewhat, and made it work for bpl21+. Also, I have given the ability to check both inventory and equipment for either argument (thanks to George Greer for the tip!) Add the following code to the end of act.other.c (or act.informative.com). Don't forget to entries to interpreter.c. --zizazat@hotmail.com ACMD(do_compare) { char arg1[MAX_INPUT_LENGTH]; char arg2[MAX_INPUT_LENGTH]; struct obj_data *obj1, *obj2; struct char_data *tchar; int value1 = 0, value2 = 0, o1, o2; char *msg = NULL; two_arguments(argument, arg1, arg2); if (!*arg1 || !*arg2) { send_to_char(ch, "Compare what to what?\n\r"); return; } o1 = generic_find(arg1, FIND_OBJ_INV| FIND_OBJ_EQUIP, ch, &tchar, &obj1); o2 = generic_find(arg2, FIND_OBJ_INV| FIND_OBJ_EQUIP, ch, &tchar, &obj2); if (!o1 || !o2) { send_to_char(ch, "You do not have that item.\r\n"); return; } if ( obj1 == obj2 ) { msg = "You compare $p to itself. It looks about the same."; } else if (GET_OBJ_TYPE(obj1) != GET_OBJ_TYPE(obj2)) { msg = "You can't compare $p and $P."; } else { switch ( GET_OBJ_TYPE(obj1) ) { default: msg = "You can't compare $p and $P."; break; case ITEM_ARMOR: value1 = GET_OBJ_VAL(obj1, 0); value2 = GET_OBJ_VAL(obj2, 0);; break; case ITEM_WEAPON: value1 = (1 + GET_OBJ_VAL(obj1, 2)) * GET_OBJ_VAL(obj1, 1); value2 = (1 + GET_OBJ_VAL(obj2, 2)) * GET_OBJ_VAL(obj2, 1); break; } } if ( msg == NULL ) { if ( value1 == value2 ) msg = "$p and $P look about the same."; else if ( value1 > value2 ) msg = "$p looks better than $P."; else msg = "$p looks worse than $P."; } act( msg, FALSE, ch, obj1, obj2, TO_CHAR ); return; }