RLIST, MLIST, OLIST COMMANDS These commands should server to list rooms, mobiles and objects on your mud in the range given. ACMD(do_rlist) { extern struct room_data *world; extern int top_of_world; int first, last, nr, found = 0; two_arguments(argument, buf, buf2); if (!*buf || !*buf2) { send_to_char("Usage: rlist \r\n", ch); return; } first = atoi(buf); last = atoi(buf2); if ((first < 0) || (first > 99999) || (last < 0) || (last > 99999)) { send_to_char("Values must be between 0 and 99999.\n\r", ch); return; } if (first >= last) { send_to_char("Second value must be greater than first.\n\r", ch); return; } for (nr = 0; nr <= top_of_world && (world[nr].number <= last); nr++) { if (world[nr].number >= first) { sprintf(buf, "%5d. [%5d] (%3d) %s\r\n", ++found, world[nr].number, world[nr].zone, world[nr].name); send_to_char(buf, ch); } } if (!found) send_to_char("No rooms were found in those parameters.\n\r", ch); } ACMD(do_mlist) { extern struct index_data *mob_index; extern struct char_data *mob_proto; extern int top_of_mobt; int first, last, nr, found = 0; two_arguments(argument, buf, buf2); if (!*buf || !*buf2) { send_to_char("Usage: mlist \r\n", ch); return; } first = atoi(buf); last = atoi(buf2); if ((first < 0) || (first > 99999) || (last < 0) || (last > 99999)) { send_to_char("Values must be between 0 and 99999.\n\r", ch); return; } if (first >= last) { send_to_char("Second value must be greater than first.\n\r", ch); return; } for (nr = 0; nr <= top_of_mobt && (mob_index[nr].virtual <= last); nr++) { if (mob_index[nr].virtual >= first) { sprintf(buf, "%5d. [%5d] %s\r\n", ++found, mob_index[nr].virtual, mob_proto[nr].player.short_descr); send_to_char(buf, ch); } } if (!found) send_to_char("No mobiles were found in those parameters.\n\r", ch); } ACMD(do_olist) { extern struct index_data *obj_index; extern struct obj_data *obj_proto; extern int top_of_objt; int first, last, nr, found = 0; two_arguments(argument, buf, buf2); if (!*buf || !*buf2) { send_to_char("Usage: olist \r\n", ch); return; } first = atoi(buf); last = atoi(buf2); if ((first < 0) || (first > 99999) || (last < 0) || (last > 99999)) { send_to_char("Values must be between 0 and 99999.\n\r", ch); return; } if (first >= last) { send_to_char("Second value must be greater than first.\n\r", ch); return; } for (nr = 0; nr <= top_of_objt && (obj_index[nr].virtual <= last); nr++) { if (obj_index[nr].virtual >= first) { sprintf(buf, "%5d. [%5d] %s\r\n", ++found, obj_index[nr].virtual, obj_proto[nr].short_description); send_to_char(buf, ch); } } if (!found) send_to_char("No objects were found in those parameters.\n\r", ch); }