NEWBIE...Needs help with sac code

From: Jeremy D. Helton (mars@MARKAB.NET)
Date: 01/28/02


I've seen part of this code here on the list, I apologize for not
remembering of the top of my head who wrote the original code.  I can get
the code to sac corpses, but I cannot get it to sac other things in a room
or in my inventory. I know some of this may have been covered. I'm very new
to coding in C, most of my work has been done in VB.
I'm running CircleMUD bpl18.
Here is the code, any help would be greatly appreciated.

ACMD(do_sac)
{
    struct obj_data *obj;

    one_argument(argument, arg);

    if (!*arg)
    {
 send_to_char("Sacrifice what?\n\r",ch);
 return;
    }
    if (!(obj = get_obj_in_list_vis(ch, arg, NULL, world[IN_ROOM
(ch)].contents)))
    {
 send_to_char("You do not see that object here!\n\r",ch);
 return;
    }
    if (!IS_CORPSE(obj))
    {
 send_to_char("You can't sacrifice that!\n\r",ch);
 return;
    }

    act("$n sacrifices $p.", FALSE, ch, obj, 0, TO_ROOM);
    act("You sacrifice $p to your god.\r\n",FALSE, ch, obj, 0, TO_CHAR);
    GET_SAC(ch) = GET_SAC(ch) + 1;
    extract_obj(obj);
}

Jeremy D. Helton

"Trying to not go insane building my own mud"

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT