[code] list of rooms...fixed..

From: ;P (siv@CYBERENET.NET)
Date: 07/22/97

hey...it seems i was a little quick on the trigger...i already fixed the
code to list rooms for a particular zone..and here is the
final (working) product....this could easily be modified to list mobs and
objects as well..


 int znum = 0,i;
 extern int top_of_world;
 extern struct zone_data *zone_table;

 one_argument(argument, arg);

 if (!*arg) {
   send_to_char("Usage: rooms <zone number>\r\n", ch);
   return; }

 if (isdigit(*arg))
    znum = atoi(arg);
    for (i = 0; i < top_of_world; i++)
      if (zone_table[world[i].zone].number == znum)
        sprintf(buf, " [%d] %s\r\n", world[i].number, world[i].name);
        send_to_char(buf, ch);
  } else
  send_to_char("You must supply a zone number.\r\n", ch);



     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST