Re: <CoDe> Exits, finding

From: Niese-Petersen (Tenp@cris.com)
Date: 01/14/97


Here is a little add on for ACMD(do_show) in act.wizard.c :

in fields[] insert:
   { "connections", LVL_IMPL },

in the switch(l) inside, before default:   :

   case 10: /* case 10 for stock circle, if "connections" are inserted
               right after "houses" in fields[]   */

	for((self ? j = world[ch->in_room].zone : j = atoi(value)),
	    i = 0; zone_table[i].number != j && i <= top_of_zone_table;
	    i++);
        if (i > top_of_zone_table)
	  sprintf(buf, "That is not a valid zone.\r\n");
	else {
	  sprintf(buf, "Connections in zone %d.\r\n", j);
	  strcat(buf,  "========================\r\n");
	  for (i = 0; i <= top_of_world; i++)
	    if (world[i].zone == j)
	      for(k = 0; k <NUM_OF_DIRS; k++)
		if(world[i].dir_option[k] &&
		   world[world[i].dir_option[k]->to_room].zone != j)
		  sprintf(buf, "%s%5d leads to %-5d.\r\n", buf,
		          world[i].number,
			  world[world[i].dir_option[k]->to_room].number);
	}
	send_to_char(buf, ch);
	break;
	

This should show a zones connetions to other zones. Nice to have when
online connecting zones.

Erik Niese-Petersen
AKA Quint the typo dane
Realms of Darkness IMP


+-----------------------------------------------------------+
| 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/18/00 PST