Okay, here is a non-mime version of the functions. Also, remeber, this is a hack.. you might wanna page string it to make it easyer to read.. *shrug* Here yah are: ________________ ACMD (do_olist) { extern struct index_data *obj_index; extern struct obj_data *obj_proto; int j, nr, start, end, found = 0; char f; one_argument(argument, arg); j = atoi(arg); start = (j * 100); end = (start + 99); f = 'N'; for (nr = 0; nr <= top_of_objt; nr++) { if ((obj_index[nr].virtual >= start) && (obj_index[nr].virtual <= end)) { f = 'Y'; sprintf(buf, "%3d. [%5d] %s\r\n", ++found, obj_index[nr].virtual, obj_proto[nr].short_description); send_to_char(buf, ch); } } if (f == 'N') sprintf(buf, "Sorry, there are no objs in that zone."); else sprintf(buf, "** %d Objects found in Zone %d\r\n", found, j); send_to_char(buf, ch); } ACMD(do_rlist) { int i, j, ii, k; char found; one_argument(argument, arg); j = atoi(arg); found = 'N'; for (i = 0; i <= top_of_zone_table; i++) if (zone_table[i].number == j) break; k = i; for (ii = 0; ii <= top_of_world; ii++) if (world[ii].zone == k) { found = 'Y'; sprintf(buf, "[%5d] %s\r\n",world[ii].number, world[ii].name); send_to_char(buf,ch); } if (found == 'N') send_to_char("The desired zone does not exist.\r\n", ch); } ACMD (do_mlist) { extern struct index_data *mob_index; /* index table for mobile file */ extern struct char_data *mob_proto; /* prototypes for mobs */ int j, nr, start, end, found = 0; char f; one_argument(argument, arg); j = atoi(arg); start = (j * 100); end = (start + 99); f = 'N'; for (nr = 0; nr <= top_of_mobt; nr++) { if ((mob_index[nr].virtual >= start) && (mob_index[nr].virtual <= end)) { f = 'Y'; sprintf(buf, "%3d. [%5d] %s\r\n", ++found, mob_index[nr].virtual, mob_proto[nr].player.short_descr); send_to_char(buf, ch); } } if (f == 'N') sprintf(buf, "Sorry, there are no mobs in that zone."); else sprintf(buf, "** %d Mobiles found in Zone %d\r\n", found, j); send_to_char(buf, ch); } ------------ Have fun! Corey Hoitsma AKA -= Myrddin =- choitsma@netcom.com Tazmania dragonlance.cei.net 7000 +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST