| Message |
Ok, i have got it to work now, well sort of, it took some tinkering around on my part to work out exactly waht the hell was going on there for a while, Alas that call to seperate_obj(obj) was the most important part of all this code, trouble is that if all the objects are the same, ie, the corpse of robert (100), it still fails to seperate them and then the code fails, i have also config -combine, but that makes no difference either, here is the code as it stands
for ( obj = ch->last_carrying; obj; obj = obj->prev_content )
{
separate_obj( obj );
if (obj->item_type == ITEM_CORPSE_NPC)
{
checkcorpses++;
}
if (checkcorpses == mnum)
{
obj_from_char( obj ); //take the last one;
break; //Bust out now, dont take more than is needed.
}
separate_obj( obj );
obj_from_char( obj );
}
if (checkcorpses != mnum)
{
send_to_char("You dont have enough corpses.\n\r", ch);
return;//better work out a way to give back the objects
}
If anyone has any ideas how i can solve this stacking of objects i would love to hear them. Thanks
|
EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
| top |
|