Ok, I made a new pointer (victim_ptr), and I can get CHAR_DATA's to the new function now. But it seems like there is no way to get the char data of the victim passed on. I don't know why, because in the old function, it didn't have anything extra, but it did target the victim.
I didn't change anything in the code (so didn't remove the messages and all)
Old Code:
void do_handseal( CHAR_DATA *ch, char *argument)
{
char arg1[MAX_INPUT_LENGTH];
// char arg2[MAX_INPUT_LENGTH];
argument = one_argument( argument, arg1 );
// argument = one_argument( argument, arg2 );
CHAR_DATA *victim;
victim = ch;
else if ( arg1[0] == '\0' )
{
send_to_char("&YWhat would u like to perform?\n\r", ch);
return;
}
if ( !str_cmp( arg1, "mfbtobs" ) )
{
if (ch->level <= 50)
{
send_to_char("You cannot perform Chidori\n\r", ch);
return;
}
if ( argument[0] == '\0' && (victim = who_fighting(ch)) == NULL )
{
ch_printf( ch, "You can't seem to focus for Chidori.\n\r" );
global_retcode = damage( ch, ch, random_int(1, 1), TYPE_LIGHTNING );
return;
}
else if ( argument[0] != '\0' && (victim = get_char_room(ch, argument)) == NULL )
{
send_to_char( "You can't seem to focus for Chidori.\n\r", ch );
global_retcode = damage( ch, ch, random_int(1, 1), TYPE_LIGHTNING );
return;
}
// if(ch->position == POS_STANDING )
// {
// send_to_char("You can't do that when your not fighting\n\r", ch);
// return;
// }
if (can_use_skill(ch, number_percent(), gsn_lightning_bolt ))
{
act(AT_WHITE, "You quickly do some handseals for your jitsu.&R", ch, victim, NULL, TO_CHAR);
act( AT_RED, "\n\r$n raises his hand out in front of $mself and focuses $s chakra.", victim, NULL, ch, TO_CHAR);
act( AT_RED, "\n\r$n's chakra flows all over $s body. &YCHIDORI&r!!!", victim, NULL, ch, TO_CHAR);
act( AT_RED, "\n\rYou raise your hand out infront of yourself and focus your chakra.", ch, NULL, victim, TO_CHAR);
act( AT_RED, "\n\rYour chakra flows all over your body. &YCHIDORI&r!!! Victim: $N", ch, NULL, victim, TO_CHAR);
act( AT_RED, "\n\r$N raises $s hands and focuses $s chakra.", ch, NULL, victim, TO_NOTVICT);
act( AT_RED, "\n\r$N's chakra flows all over $s body. &YCHIDORI&r!!!", ch, NULL, victim, TO_NOTVICT);
one_hit( ch, victim, TYPE_LIGHTNING );
ch->mana -= 75;
act( AT_WHITE, "&w$N lowers $S hand." , victim, NULL, ch, TO_CHAR);
act( AT_WHITE, "&wYou lower your hand." , ch, NULL, victim, TO_CHAR);
act( AT_WHITE, "&w$N lowers $S hand." , ch, NULL, victim, TO_NOTVICT);
// learn_from_success( ch, spell_chidori );
}
else
{
act(AT_WHITE, "You quickly do some handseals for your jitsu.&R", ch, victim, NULL, TO_CHAR);
act( AT_RED, "\n\r$n raises his hand out in front of $mself and focuses $s chakra.", victim, NULL, ch, TO_CHAR);
act( AT_RED, "\n\r$n's chakra flows all over $s body. &YCHIDORI&r!!!", victim, NULL, ch, TO_CHAR);
act( AT_RED, "\n\rYou raise your hand out infront of yourself and focus your chakra.", ch, NULL, victim, TO_CHAR);
act( AT_RED, "\n\rYour chakra flows all over your body. &YCHIDORI&r!!! Victim: $N", ch, NULL, victim, TO_CHAR);
act( AT_RED, "\n\r$N raises $s hands and focuses $s chakra.", ch, NULL, victim, TO_NOTVICT);
act( AT_RED, "\n\r$N's chakra flows all over $s body. &YCHIDORI&r!!!", ch, NULL, victim, TO_NOTVICT);
damage(ch, victim, 0, TYPE_LIGHTNING);
ch->mana -= 150;
act( AT_WHITE, "&w$N lowers $S hand." , victim, NULL, ch, TO_CHAR);
act( AT_WHITE, "&wYou lower your hand." , ch, NULL, victim, TO_CHAR);
act( AT_WHITE, "&w$N lowers $S hand." , ch, NULL, victim, TO_NOTVICT);
// learn_from_failure( ch, spell_chidori );
return;
}
WAIT_STATE( ch, 14 );
}
}
|