[CODE] Overloading me maggots

From: X Schiltz (joes@SKIPNET.COM)
Date: 02/12/98


void limb_drop(struct char_data * ch,int hit_pos)
{
  struct obj_data *limb;
  struct obj_data *create_money(int amount);

  limb = create_obj();

  limb->item_number = NOTHING;
  limb->in_room = NOWHERE;
  limb->name = str_dup("limb");


if(hit_pos==HIT_POS_LEFT_HAND)
        {
  sprintf(buf2,
"Here lie some bloody fingers, connected by a thin strip of flesh.");
  limb->description = str_dup(buf2);
  sprintf(buf2, "some bloody fingers");
  limb->short_description = str_dup(buf2);
        }

if(hit_pos==HIT_POS_LEFT_FOOT)
        {
  sprintf(buf2,
"Here lie some bloody toes, connected by a thin strip of flesh.");
  limb->description = str_dup(buf2);
  sprintf(buf2, "some bloody toes");
  limb->short_description = str_dup(buf2);
        }

if(hit_pos==HIT_POS_RIGHT_FOOT)
        {
  sprintf(buf2,
"Here lie some bloody toes, connected by a thin strip of flesh.");
  limb->description = str_dup(buf2);
  sprintf(buf2, "some bloody toes");
  limb->short_description = str_dup(buf2);
        }



  GET_OBJ_TYPE(limb) = ITEM_CONTAINER;
  GET_OBJ_WEAR(limb) = ITEM_WEAR_TAKE;
  GET_OBJ_EXTRA(limb) = ITEM_NODONATE;
  GET_OBJ_VAL(limb, 0) = 0;     /* You can't store stuff in a corpse */
  GET_OBJ_VAL(limb, 3) = 1;     /* corpse identifier */
  GET_OBJ_WEIGHT(limb) = GET_WEIGHT(ch)/20;
  GET_OBJ_RENT(limb) = 200;
  if (IS_NPC(ch))
    GET_OBJ_TIMER(limb) = 5;
  else
    GET_OBJ_TIMER(limb) = 10;

____________

Well...that's not all of it, of course, I did some major cutting out. But,
all of the important stuff is there. Thanks for all of your help. BTW,
when I advanced GDB'ed the core, It gave me some stuff related to Puff,
the mob that I killed. Such as trying to eat blastproof armor(mine) or
feeling(probably related to her nice, easy feeling). I have no idea what
it meant...
Interestingly, I think that it is spurting out "blank" limbs. Aha! I just
tried purging all of the "blank" objects, and the rest were removed fine
by the maggots. I'll search for parsing errors that might be leaving stuff
out. Perhaps I'm passing it an invalid hit_pos. Hmm...
Well...If you'd like for me to send you the complete code for this
function, just ask...

___________
\  /
 \/
 /\
/  \
X Schiltz       MUD:dataserv.net 4000
(Joe Schilz)    homepage:http://www.skipnet.com/~joes/



  obj_to_room(limb, ch->in_room);
}


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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