void do_donate( CHAR_DATA *ch, char *argument)
{
   OBJ_DATA *pit;
   OBJ_DATA *obj;
   ROOM_INDEX_DATA *original;
   char arg[MAX_INPUT_LENGTH];
   char buf[MAX_STRING_LENGTH];
   int amount;
   
   argument = one_argument(argument, arg);


   if (arg[0] == '\0' )
   {
      send_to_char("Donate what?\n\r",ch);
      return;
   }

   original = ch->in_room;
   if (ch->position == POS_FIGHTING)
   {
      send_to_char(" You're {Yfighting!{x\n\r",ch);
      return;
   }

   if ( (obj = get_obj_carry (ch, arg, ch)) == NULL)
   {
      send_to_char("You do not have that!\n\r",ch);
      return;
   }
   else
   {
      if (!can_drop_obj(ch, obj) && ch->level < 91)
      {
         send_to_char("Its stuck to you.\n\r",ch);
         return;
      }
      if ((obj->item_type == ITEM_CORPSE_NPC) ||
         (obj->item_type == ITEM_CORPSE_PC))
      {
         send_to_char("You cannot donate that!\n\r",ch);
         return;
      }
      if (obj->timer > 0)
      {
         send_to_char("You cannot donate that.\n\r",ch);
         return;
      }
      if (ch->in_room != get_room_index(ROOM_VNUM_ALTAR))
         act("$n donates {Y$p{x.",ch,obj,NULL,TO_ROOM);
      act("You donate {Y$p{x.",ch,obj,NULL,TO_CHAR);
         
      if ((!IS_OBJ_STAT(obj ,ITEM_ANTI_EVIL) && IS_EVIL(ch)) ||
         (!IS_OBJ_STAT(obj ,ITEM_ANTI_GOOD) && IS_GOOD(ch)) ||
         IS_NEUTRAL(ch)) 
         if (obj->cost > 0 && obj->level > 0)
         {
            amount = UMAX(1, obj->cost/2);
            if (amount == 1)
            {
               sprintf(buf, "You receive {Mone silver{x for your
donation.");
               send_to_char(buf,ch);
            }
            else
            {
               sprintf( buf, "You receive {M%d silver{x for your
donation.",amount);
               send_to_char(buf,ch);
            }
             
            ch->silver += amount;
         }
     
         char_from_room(ch);
         char_to_room(ch,get_room_index(ROOM_VNUM_ALTAR));
         pit = get_obj_list(ch, "pit", ch->in_room->contents);
         obj_from_char(obj);
         obj_to_obj(obj, pit);
         char_from_room(ch);
         char_to_room(ch,original);
         return;
     }   
}
