//credits to the guy who wrote snoop btw -orlis //interp.h: DECLARE_DO_FUN( do_mimic ); //interp.c: { "mimic", do_mimic, POS_DEAD, L4, 1, LOG_ALWAYS, 1 }, //make the part after(and including) this(the end of void interpret(), //its also the second and last occurence in the file ): /* * Dispatch the command. */ //look like this: /* * Dispatch the command. */ if ( ch->desc != NULL && ch->desc->mimic_by != NULL && cmd_table[cmd].do_fun != do_delete && cmd_table[cmd].level < LEVEL_IMMORTAL ) ptc(ch->desc->mimic_by->character,"{!You are mimic-ing {#%s{! doing {5[{x%s{5] {x%s{x\n\r",ch->name,cmd_table[cmd].name, argument[0] != '\0' ? argument : "" ); (*cmd_table[cmd].do_fun) ( ch, argument ); if ( ch->desc != NULL && ch->desc->mimic_by != NULL && cmd_table[cmd].do_fun != do_delete && cmd_table[cmd].level < LEVEL_IMMORTAL ) (*cmd_table[cmd].do_fun) ( ch->desc->mimic_by->character, argument ); tail_chain( ); return; } //merc.h in descriptor_data: DESCRIPTOR_DATA * mimic_by; /*act_wiz.c (after do_snoop because i pretty much copied and pasted the entire thing, so credits to him lol, btw protect will also do this, i changed the sent_to_chars() to say that, perhaps you should do the same): */ void do_mimic( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; DESCRIPTOR_DATA *d; CHAR_DATA *victim; char buf[MAX_STRING_LENGTH]; one_argument( argument, arg ); if ( arg[0] == '\0' ) { send_to_char( "Mimic whom?\n\r", ch ); return; } if ( ( victim = get_char_world( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } if ( victim->desc == NULL ) { send_to_char( "No descriptor to mimic.\n\r", ch ); return; } if ( victim == ch ) { send_to_char( "Cancelling all mimics.\n\r", ch ); if (!IS_TRUSTED(ch,IMPLEMENTOR)) { wiznet("$N stops being such a copy-cat.", ch,NULL,WIZ_SNOOPS,WIZ_SECURE,get_trust(ch)); } for ( d = descriptor_list; d != NULL; d = d->next ) { if ( d->mimic_by == ch->desc ) d->mimic_by = NULL; } return; } if ( victim->desc->mimic_by != NULL ) { send_to_char( "Busy already.\n\r", ch ); return; } if (!is_room_owner(ch,victim->in_room) && ch->in_room != victim->in_room && room_is_private(ch,victim->in_room) && !IS_TRUSTED(ch,IMPLEMENTOR)) { send_to_char("That character is in a private room.\n\r",ch); return; } if ( get_trust( victim ) >= get_trust( ch ) || ( IS_SET(&victim->comm,COMM_SNOOP_PROOF) && !IS_TRUSTED(ch,IMPLEMENTOR))) { send_to_char( "You failed.\n\r", ch ); return; } if ( ch->desc != NULL ) { for ( d = ch->desc->mimic_by; d != NULL; d = d->mimic_by ) { if ( d->character == victim || d->original == victim ) { send_to_char( "No mimic loops.\n\r", ch ); return; } } } victim->desc->mimic_by = ch->desc; if (!IS_TRUSTED(ch,IMPLEMENTOR)) { sprintf(buf,"$N starts mimic-ing %s", (IS_NPC(ch) ? victim->short_descr : victim->name)); wiznet(buf,ch,NULL,WIZ_SNOOPS,WIZ_SECURE,get_trust(ch)); } send_to_char( "Ok.\n\r", ch ); return; }