From: "Markanth" To: Subject: SNIPPET: heel Date: Saturday, July 01, 2000 2:23 PM Greetings List, After adding a spell that makes multiple pets, I noticed that only one of them recalled when you did. To fix that this is my 'heel' command which transfers your pet(s) to your location. This is my first snippet, so any pointers are welcome. *** act_move.c *** void do_heel( CHAR_DATA *ch, char *argument ) { CHAR_DATA *pch; if(ch->pet == NULL) { send_to_char("You don't have any pets!",ch); return; } for(pch = char_list; pch != NULL; pch = pch->next) { if(!IS_NPC(pch)) continue; if(pch->leader != ch) continue; char_from_room(pch); char_to_room(pch, ch->in_room); } act("$n lets out a loud whistle and $s pet comes running.",ch, NULL, NULL, TO_ROOM); send_to_char("You let out a loud whistle and your pet comes running.\n\r",ch); } *** interp.c *** { "heel", do_heel, POS_RESTING, 0, LOG_NORMAL, 1 }, *** interp.h *** DECLARE_DO_FUN( do_heel ); Optionally you can change do_recall so multiple pets will recall with you. *** Add to function declarations: CHAR_DATA *pch; *** Change: if (ch->pet != NULL) do_function(ch->pet, &do_recall, ""); *** to: if (ch->pet != NULL) { for(pch = char_list; pch != NULL; pch = pch->next) { if(!IS_NPC(pch)) continue; if(pch->leader != ch) continue; act( "$n disappears.", ch, NULL, NULL, TO_ROOM ); char_from_room( pch ); char_to_room( pch, location ); act( "$n appears in the room.", ch, NULL, NULL, TO_ROOM ); } } -- Please trim unneccesary text (including this footer) from replies to the list.