From: blue@calico.gator.net To: rom@rom.org Subject: sell all Date: Monday, May 03, 1999 7:18 PM *grabs a peice of chalk and writes, "i'll never code on crack again" 10,000 times on the side of a murder king.* well now, that sucked a lot. for those of you still tuned in, here's a widdle bugfix. ---------------------------------------------------------------- do_sell() add: OBJ_DATA *obj_next; int tcost = 0, count = 0; then, below where it finds a keeper, add: if (!str_cmp(arg, "all")) { for (obj = ch->carrying; obj != NULL; obj = obj_next) { obj_next = obj->next_content; if (can_drop_obj(ch, obj) && obj->wear_loc == WEAR_NONE && can_see_obj(keeper, obj) && ((cost = get_cost(keeper, obj, FALSE)) > 0) && (cost < keeper->gold)) { tcost += cost; count++; ch->gold += cost; deduct_cost(keeper, cost); if (keeper->gold < 0) keeper->gold = 0; if (obj->item_type == ITEM_TRASH || IS_OBJ_STAT(obj, ITEM_SELL_EXTRACT)) { extract_obj(obj); } else { obj_from_char(obj); if (obj->timer) SET_BIT(obj->extra_flags, ITEM_HAD_TIMER); else obj->timer = number_range(50, 100); obj_to_keeper(obj, keeper); } } // salable item ifcheck } // for loop sprintf(buf, "You sell %d items for %d gold.\r\n", count, tcost); send_to_char(buf, ch); return; } // 'all' if check --------------------------------------------- and, there ya have it. ;) -- Blue Lang "Build a better man trap, and the rats will beat a path to your door!" - Clutch -- Please trim unneccesary text (including this footer) from replies to the list.