Re: A really cool SPEC from Archipelago

From: Chris Jacobson (fear@ATHENET.NET)
Date: 07/22/97


On 7/22/97 7:06 PM, Christian Duvall (chris@DP.NET) stated:

>SPECIAL(animate_book)
>     {
>         char obj_name[MAX_INPUT_LENGTH];
>         struct obj_data *obj=0, *book=0;
>         struct char_data *mob=0;
>
>         if (!CMD_IS("get"))
>             return(0);
>
>         argument = one_argument(argument, obj_name);
>
>         book = (struct obj_data *)me;
>         if (!strcmp(obj_name,"book") && !strcmp(obj_name,"all"))
>             return(FALSE);
>
>         if (!(obj = get_obj_in_list_vis(ch, "book",
>     world[ch->in_room].contents)))
>             return(FALSE);
>         if (obj != book)
>             return(FALSE);
>
>         extract_obj(book);
>         mob = read_mobile(real_mobile(1211), REAL);
>         char_to_room(mob, ch->in_room);
>         act("The $p suddenly animates!",FALSE,ch,obj,0,TO_ROOM);
>         act("The $p suddenly animates!",FALSE,ch,obj,0,TO_CHAR);
>         hit(mob, ch, TYPE_UNDEFINED);
>         return(FALSE);
>     }

Perhaps you shouldn't extract_obj(book) until >after< the acts, otherwise
you are extracting it, then calling an act() on it.

- Chris Jacobson


     +------------------------------------------------------------+
     | 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/08/00 PST