[Circle] [Code] Mob max-existing based on in ZONE, not entire WORLD

From: Melen (melen@melen.acmenet.net)
Date: 08/19/96

Welp, I figured out a way to do this for MOBS, if someone could please 
help me figure out a way to do this for objects, it would be much 
appreciated ;) Anyways, what this does is simple. Currently, in 
CircleMUD, the max existing field in the zone files stands for max 
existing in the entire WORLD (the whole MUD!), where I wanted it so that 
max existing was for ZONE.

In db.c in function void reset_zone:

Make the beginning look like this:

void reset_zone(int zone)
  int cmd_no, last_cmd = 0;
  struct char_data *mob = NULL;
  struct obj_data *obj, *obj_to;
  int found=0;
  struct char_data *nr;

... down farther, replace case 'M' with mine:

    case 'M':                   /* read a mobile */
    found = 0;
        for (nr = character_list; nr; nr=nr->next) {
           if (IS_NPC(nr) && world[nr->in_room].zone == zone &&
             nr->nr == ZCMD.arg1) {
      if (found < ZCMD.arg2) {
        mob = read_mobile(ZCMD.arg1, REAL);
        char_to_room(mob, ZCMD.arg3);
        last_cmd = 1;
      } else
        last_cmd = 0;

That's it... Basically it counts how many of a particular mob if it's in 
the zone being reset. THEN if theres less then the max existing it 
creates it.

Allanthya MUD: mad.eshores.com port 4000

| 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