Re: Zone Problems: Part 3

From: Jaime Moraga (jim@moai.usach.cl)
Date: 10/21/94


> From: Jeffrey Daro <jdaro@netcom.com>
> Subject: Re: Zone Problems: Part 3

> 
> The problem with what I am doing is the extract_obj() only wants one arg 
> the object name,  how di i control which one it is?  What if two of the 
> objs exist in the realm?
> 
>  
  It's very simple indeed, you have the room number, say "room_number"
and the object vnum, say "obj_vnum" then you can do:

    for (obj = world[room_number].contents; obj; obj = next_obj) {
      next_obj = obj->next_content;
      if ( obj->item_number == obj_vnum )
      {
         obj_from_room( obj );
         extract_obj( obj );
         return TRUE;  /* yeah!, you did it! */
      }
    }



     Jim.



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