Re: recall

From: Gary Barnett (gbarnett@polarnet.com)
Date: 10/22/96


 BlackWind <BlackWind@multiplex.com> wrote: (Tue, 22 Oct 1996 19:00:15 -0400)

 >  I am haveing trouble creating a recall skill...I figured I could just
 >  take the recall spell, and put it in fight.c like this
 >  
 <code snipped>

 ACMD(do_recall)
{
  extern sh_int r_mortal_start_room;

  if (ch == NULL || IS_NPC(ch))
    return;

  act("$n disappears.", TRUE, ch, 0, 0, TO_ROOM);
  char_from_room(ch);
  char_to_room(ch, r_mortal_start_room);
  act("$n appears in the middle of the room.", TRUE, ch, 0, 0, TO_ROOM);
  look_at_room(ch, 0);
}

That's the code I'm using for the beta period (my mud won't have recall.)

I think the error in your function was the use of 'victim' without reading
the command line to get a value for victim.. like so:

struct char_data *victim;
char   arg1[MAX_INPUT_LENGTH];

one_argument(argument, arg1);
if (!*arg1) {
	 send_to_char("Usage: RECALL <victim>\r\n",ch);
	 return;
}

victim = get_char_room_vis(ch, arg1);

Hope this helps...

Gary


-- http://www.polarnet.com/Users/gbarnett/ -- telnet://mud.polarnet.com:4000
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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