On my attachments are three functions: rlist, olist, and mlist. after adding them to interpreter.c and recompiling, you can run them like: rlist/olist/mlist <zone> rlist - shows all the rooms for the zone olist - shows all the objs for the zone mlist - shows all the mobs for the zone Enjoy! Myrddin PS I don't really care if you put me in the credits or not:) Corey Hoitsma AKA -= Myrddin =- choitsma@netcom.com Tazmania dragonlance.cei.net 7000 ============================================================================== Content-ID: <Pine.3.89.9608171216.A2333@netcom6> Content-Description: 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); }
This archive was generated by hypermail 2b30 : 12/07/00 PST