Greetings list,
 
 How would you (in code) extract a certain number of the same object (vnum) 
from a character.

Here is what I tried and it didnt seem to work.  Any help would be appreciated.

 OBJ_DATA  *food;
 OBJ_DATA  *pack;
 OBJ_DATA  *food_next;
 int count=2;
 int packs;

for (x = 0; x < count; x++)
   {
    obj = create_object( get_obj_index( 41 ), 0 );
    obj_to_char( obj, ch );

    for (y = packs*6; y > 0; y--)
    {
     for ( food = ch->carrying; food != NULL; food = obj_next )
     {
       food_next = food->next_content;
       obj_from_char(food);
       extract_obj(food);
       continue;
     }
    }
   }

Example.

Say I have 6 items and want to combine them into 1.....

6 food items into 1 food pack.

Thanks for any insight!

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

Reply via email to