I would love to thank all who helped me.... here is the altered code that works just like it I wanted. Thanks again!!!!
void do_bandage( CHAR_DATA *ch, char *argument )
{
char arg1 [MAX_INPUT_LENGTH];
CHAR_DATA *victim;
/* OBJ_DATA *obj; This is commented out in case I want make them carry bandages later */
argument = one_argument( argument, arg1 );
if ( ch->mount )
{
send_to_char( "You can't do that while mounted.\n\r", ch );
return;
}
if ( arg1[0] == '\0')
{
send_to_char( "Bandage whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( victim->pcdata->condition[COND_BLEEDING] <= 0)
{
send_to_char( "How can you bandage that which is not bleeding? \n\r", ch );
return;
}
if ( victim->position == POS_SITTING || victim->position == POS_RESTING )
{
if(can_use_skill(ch, number_percent(), gsn_bleeding))
{
gain_condition(victim, COND_BLEEDING, -1);
act( AT_SKILL, "You place a bandage over $N's wound trying to help the bleeding!", ch, NULL, victim, TO_CHAR );
act( AT_SKILL, "$n places a bandage over your wound to help stop the bleeding!", ch, NULL, victim, TO_VICT );
act( AT_SKILL, "$n places a bandage over $N's wound to help stop the bleeding!", ch, NULL, victim, TO_NOTVICT );
learn_from_success( ch, gsn_bleeding );
return;
}
}
else
{
if ( victim == ch )
{
send_to_char( "You need to sit still to bandage yourself.\n\r", ch );
return;
}
else
{
send_to_char( "How can you bandage anyone if they won't sit still. /n/r", ch );
return;
}
return;
}
} |