Ok, here's the full code as it is right now. Right now, I only get the 'They aren't here' messages, because the victim is NULL.
void do_chidori( CHAR_DATA *ch, char *argument/*, CHAR_DATA *victim*/)
{
CHAR_DATA *victim = ch->victim_ptr;
// CHAR_DATA *victim;
switch (ch->substate)
{
default:
if (ch->level <= 50)
{
send_to_char("You cannot perform Chidori\n\r", ch);
return;
}
if ( (victim = get_char_world( ch, argument ) ) == NULL )
{
send_to_char( "They aren't here.\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" );
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 );
return;
}
if ( ch == victim)
{
ch_printf( ch, "Using Chidori on yourself? Are you suicidal?\n\r");
return;
}
act(AT_WHITE, "You quickly do some handseals for your jitsu.&R", ch, victim, NULL, TO_CHAR);
add_timer( ch, TIMER_DO_FUN, 1, do_chidori, 1 );
return;
case 1:
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\r$n raises $s hands and focuses $s chakra.", ch, NULL, victim, TO_CANSEE);
add_timer( ch, TIMER_DO_FUN, 1, do_chidori, 2 );
return;
case 2:
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's chakra flows all over $s body. &YCHIDORI&r!!!", ch, NULL, victim, TO_CANSEE);
add_timer( ch, TIMER_DO_FUN, 1, do_chidori, 3);
return;
case 3:
damage( ch, victim, 150, TYPE_LIGHTNING );
ch->mana -= 75;
add_timer( ch, TIMER_DO_FUN, 1, do_chidori, 4);
return;
case 4:
act( AT_WHITE, "&wYou lower your hand." , ch, NULL, victim, TO_CHAR);
act( AT_WHITE, "&w$n lowers $s hand." , ch, NULL, victim, TO_CANSEE);
return;
}
return;
}
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 = who_fighting(ch);
//victim = ch->victim;
if ( arg1[0] == '\0' && (xIS_SET(ch->affected_by, AFF_SHARINGAN) ) )
{
send_to_char("You place your palms together.\n\r&WYour eyes return to normal as you stop using Sharingan.\n\r", ch);
act(AT_GREEN, "$n places $s palms together.\n\r$n's chakra fades as $e stops using sharingan", ch, NULL, NULL,TO_CANSEE );
xREMOVE_BIT(ch->affected_by, AFF_SHARINGAN);
ch->mod_str = 0;
ch->mod_dex = 0;
ch->mod_lck = 0;
ch->mod_wis = 0;
ch->mod_int = 0;
ch->mod_con = 0;
return;
}
else if ( arg1[0] == '\0' )
{
send_to_char("&YWhat would u like to perform?\n\r", ch);
return;
}
if ( !str_cmp( arg1, "mfotb" ) )
{
do_sharingan(ch, argument);
return;
}
else if ( !str_cmp( arg1, "mfbtobs" ) )
{
ch->victim_ptr = victim;
do_chidori(ch, argument);
return;
}
}
|