I have made kick, bash, and trip able to be used to start a fight.
I also want to add something else the ability to attack someone
other than the person you are fighting.

In addition I will include the code to make kick,bash and trip
able to start a fight in case anyone likes that idea.
void do_kick( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

   if ( !IS_NPC(ch)
   &&   ch->level < skill_table[gsn_kick].skill_level[ch->class] )
   {
       send_to_char(
           "You better leave the martial arts to fighters.\n\r", ch );
       return;
   }

   if (IS_NPC(ch) && !IS_SET(ch->off_flags,OFF_KICK))
       return;

-    if ( ( victim = ch->fighting ) == NULL )
-    {
-        send_to_char( "You aren't fighting anyone.\n\r", ch );
-        return;
-    }

+    if ( ( victim = ch->fighting ) == NULL )
+    /* Kick to start the fight */
+    {
+        if (arg[0] == '\0')
+        {
+            send_to_char ("kick at whom?\n\r", ch);
+            return;
+        }
+
+        if ((victim = get_char_room (ch, arg)) == NULL)
+        {
+            send_to_char ("They aren't here.\n\r", ch);
+            return;
+        }
+    }
+
+    if (IS_AFFECTED (ch, AFF_CHARM) && ch->master == victim)
+    {
+        act ("But $N is your friend!", ch, NULL, victim, TO_CHAR);
+        return;
+    }
+
+    if(ch == victim)
+    {
+        send_to_char("What are you trying to do perform self auto lypo
+        return;
+    }

   WAIT_STATE( ch, skill_table[gsn_kick].beats );
   if ( get_skill(ch,gsn_kick) > number_percent())
   {
       damage(ch,victim,number_range( 1, ch->level ),
       gsn_kick,DAM_BASH,TRUE);
       check_improve(ch,gsn_kick,TRUE,1);
   }
   else
   {
       damage( ch, victim, 0, gsn_kick,DAM_BASH,TRUE);
       check_improve(ch,gsn_kick,FALSE,1);
   }
       check_killer(ch,victim);
   return;
}



If you read that and like the idea please do use it or if you read that
and know how to make the change I want to make please let me know.


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


Reply via email to