Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Smaug Fuss
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| DaiusStryker
(13 posts) Bio
|
| Date
| Sun 06 Aug 2006 03:42 AM (UTC) |
| Message
| 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
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? | | Top |
|
| Posted by
| DaiusStryker
(13 posts) Bio
|
| Date
| Reply #1 on Sun 06 Aug 2006 04:12 AM (UTC) |
| Message
| I forgot my
argument = one_argument( argument, arg2 );
if ( arg2[0] == '\0' )
sorry to waste time | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,467 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top