I know this is really rough, but here goes. I tried to whip this up quickly, since you
guys have been so helpful. (untested but should get you close)

void do_checkreset(CHAR_DATA * ch, char *argument)
        {
        int vnum, lookfor;
        AREA_DATA *pArea;
        RESET_DATA *pReset;
        MOB_INDEX_DATA *pMob = NULL;
        OBJ_INDEX_DATA *pObj;
        ROOM_INDEX_DATA *pRoom;
        char arg1[MAX_INPUT_LENGTH];
        char arg2[MAX_INPUT_LENGTH];

        one_argument(argument, arg1);
        one_argument(argument, arg2);

        if (arg1[0] == '\0' || !is_number(arg2))
                {
                send_to_char("checkreset <obj|mob> <vnum>\n\r", ch);
                return;
                }

        lookfor = atoi(arg2);

        for (pArea = area_first; pArea; pArea = pArea->next)
                {
                for (vnum = pArea->min_vnum; vnum <= pArea->max_vnum; vnum++)
                        {
                        if (!(pRoom = get_room_index(vnum)))
                        continue;

for (pReset = pRoom->reset_first; pReset; pReset = pReset->next)
                                {
                                switch (pReset->command)
                                        {
                                        case 'M':
if ((pMob = get_mob_index(pReset->arg1)) && !str_cmp(arg1, "mob") && pMob->vnum == lookfor)
                                                {
bugf("Mob reset found - room %d.", pRoom->vnum );
                                                }
                                        break;

                                        case 'O':
if ((pObj = get_obj_index(pReset->arg1)) !str_cmp(arg1, "obj") && pObj->vnum == lookfor)
                                                {
bugf("Convert_objects: 'O': bad vnum %d.", pReset->arg1);
                                                }
                                        break;
                                        }
                                }
                        }
                }
        }




At 12:49 PM 7/27/2004, Valnir wrote:
I have gone through and made several OLC functions for my mud, including
oedit->delete, redit->delete, medit->delete, and even aedit->delete. I have
run into the occasional issue though where I miss a reset when deleting a
mob or object. Does anyone know of an easy way to find if a VNUM is reset in
any loaded area?

- Valnir



--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to