I'm playing with the assassinate snippet thats flowing out there on the I-net. Now I got everything in place and ran a make clean/make and it compiles. I how ever found 2 versions out there that are both kinda cool. One is just an instakill based off of backstab. The other involves 2 arguments in the command line to operate.
In Skills.c I have
and then in the code it self
The issue is this. If type assassinate <target> or assassinate <target> choke the game asks me what kind of assassination I want to attempt.
if i type assassinate <target>, choke it tells me that they aren't here.
I know the code is kinda hacked together and its been a while since I can't see the issue. I'm the only coder on my mud project too so i don't have anyone else to look over it. Can anyone help me find out where the error/bug is?
In Skills.c I have
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
CHAR_DATA *victim;
OBJ_DATA *obj;
short int percent;
and then in the code it self
if ( !str_cmp( arg2, "choke" ) )
{ act( AT_WHITE, "You wrap your meaty arms around $N's neck choking out the life.", ch, NULL, victim, TO_CHAR );
}
else if ( !str_cmp( arg2, "poison" ) )
{act( AT_LBLUE, "You blow posion powder in $N's face causing them to convulse as their bodies blood vessels explode.", ch, NULL, victim, TO_CHAR );
}
else if (!str_cmp( arg2, "backstab" ) )
{
/* Weapon Check for BackStab */
if ( ( obj = get_eq_char( ch, WEAR_WIELD ) ) == NULL
|| ( obj->value[3] != 11 && obj->value[3] != 2 ) )
{
send_to_char( "You need to wield a piercing or stabbing weapon.\n\r", ch );
return;
}
act( AT_RED, "Your backstab finds its mark between $N's shoulder blades.", ch, NULL, victim, TO_CHAR );
}
else
send_to_char( "What kind of assassination attemp: poison, choke, backstab?\n\r", ch );
return;
}
The issue is this. If type assassinate <target> or assassinate <target> choke the game asks me what kind of assassination I want to attempt.
if i type assassinate <target>, choke it tells me that they aren't here.
I know the code is kinda hacked together and its been a while since I can't see the issue. I'm the only coder on my mud project too so i don't have anyone else to look over it. Can anyone help me find out where the error/bug is?