DBZu/area/
DBZu/area/imc/
DBZu/boards/
DBZu/clans/
DBZu/color/
DBZu/councils/
DBZu/deity/
DBZu/doc/mudprogs/
DBZu/gods/
DBZu/log/
DBZu/notes/
DBZu/player/a/
DBZu/player/backup/c/
DBZu/player/backup/k/
DBZu/player/c/
DBZu/player/d/
DBZu/player/j/
DBZu/player/k/
DBZu/player/o/
DBZu/player/r/
DBZu/player/s/
DBZu/player/t/
DBZu/player/v/
DBZu/player/w/
DBZu/player/z/
/****************************************************************************
 * |Dragon Ball Z Universe, Version FINAL                     |             *
 * -----------------------------------------------------------|             *
 * |DBZUCodebase V. FINAL, 2005, 2006, 2007, Jessie Reidl     |             *
 * -----------------------------------------------------------|             *
 ****************************************************************************/

#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>
#include "mud.h"

bool not_transformed args( (CHAR_DATA *ch ) );
bool in_range args(( CHAR_DATA *ch, CHAR_DATA *victim ));
bool can_userace( CHAR_DATA *ch, int gsn );

int     summon_state;
int     game_state;
int     moon_state;
AREA_DATA * summon_area;
ROOM_INDEX_DATA * summon_room;

POLL_DATA * first_vote;
POLL_DATA * last_vote;

bool can_usepl( CHAR_DATA *ch, int gsn )
{
  SKILLTYPE *skill;

skill = skill_table[gsn];

if ( skill->pl >= ch->exp )
return FALSE;
else
return TRUE;

}

bool can_userace( CHAR_DATA *ch, int gsn )
{
  SKILLTYPE *skill;

  skill = skill_table[gsn];

  if ( !skill )
  return FALSE;

  /* Human */
  if (xIS_SET(skill->raceskill, RACESKILL_HUMAN) && ch->race == RACE_HUMAN)
  return TRUE;
  /* Android */
  if (xIS_SET(skill->raceskill, RACESKILL_ANDROID) && ch->race == RACE_ANDROID)
  return TRUE;
  /* Saiyan */
  if (xIS_SET(skill->raceskill, RACESKILL_SAIYAN) && ch->race == RACE_SAIYAN)
  return TRUE;
  /* Halfbreed */
  if (xIS_SET(skill->raceskill, RACESKILL_HALFBREED) && ch->race == RACE_HALFBREED)
  return TRUE;
  /* Biodroid */
  if (xIS_SET(skill->raceskill, RACESKILL_BIOANDROID) && ch->race == RACE_BIOANDROID)
  return TRUE;
  /* Mutant */
  if (xIS_SET(skill->raceskill, RACESKILL_MUTANT) && ch->race == RACE_MUTANT)
  return TRUE;
  /* Icer */
  if (xIS_SET(skill->raceskill, RACESKILL_ICER) && ch->race == RACE_ICER)
  return TRUE;
  /* Namek */
  if (xIS_SET(skill->raceskill, RACESKILL_NAMEK) && ch->race == RACE_NAMEK)
  return TRUE;

 return FALSE;
}


ch_ret spell_cure( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;
    int dam;

    dam         = number_range( get_curr_con(ch) * 1.1, get_curr_con(ch) * 1.4 );
    victim->hit += dam;
    ch_printf(ch, "&wYour cure recovers %s for %d.&D\n\r", victim->name, dam );
    ch_printf(victim, "&wYour light wounds mend as your pain ebbs slightly. &G[%d]\n\r", dam );
    if (victim->hit > victim->max_hit)
    victim->hit = victim->max_hit;
}

ch_ret spell_cura( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;
    int dam;

    dam         = number_range( get_curr_con(ch) * 2, get_curr_con(ch) * 2.2 );
    victim->hit += dam;
    ch_printf(ch, "&wYour cura recovers %s for %d.&D\n\r", victim->name, dam );
    ch_printf(victim, "&wYour serious wounds mend as your pain ebbs slightly. &G[%d]\n\r", dam );
    if (victim->hit > victim->max_hit)
    victim->hit = victim->max_hit;
}

int convert_pos( int number )
{
   int temp;
   if (number > 0)
   return number;
   temp = number * number;
   temp = sqrt(temp);

   return temp;
}

ch_ret spell_curaga( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;
    int dam;

    dam         = number_range( get_curr_con(ch) * 4, get_curr_con(ch) * 4.4 );
    victim->hit += dam;
    ch_printf(ch, "&wYour curaga recovers %s for %d.&D\n\r", victim->name, dam );
    ch_printf(victim, "&wYour critical wounds mend as your pain ebbs slightly. &G[%d]\n\r", dam );
    if (victim->hit > victim->max_hit)
    victim->hit = victim->max_hit;
}

ch_ret spell_shell( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;
    AFFECT_DATA af;

    if ( IS_AFFECTED( victim, AFF_SHELL ) )
    {
    ch_printf(ch, "&GYou to try create a magical barrier but your target already has one.&D\n\r" );
      return rSPELL_FAILED;
    }
   else

  af.type = gsn_shell;
  af.duration = get_curr_str(ch);
  af.modifier  = 0;
  af.location = APPLY_AFFECT;
  af.bitvector = meb(AFF_SHELL);
  affect_to_char(victim, &af);

}

ch_ret spell_flare( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;

    int dam;
    int num1;
    int num2;

    dam         = number_range( 1, get_curr_con(ch) * 4 );
    if ( get_curr_wis(victim) > 1)
    dam - get_curr_wis(victim)/4; 
    return damage( ch, victim, dam, sn );
}

void do_stats( CHAR_DATA *ch, char *argument )
{
  ch_printf( ch, "\n\r&RCharacter Statistics&z:\n\r\n\r");
  ch_printf( ch, "&zYour current Practice Session is&O:&W %d\n\r", ch->practice );
  ch_printf( ch, "&zYour current Ki Gain is&O:&w %d\n\r", ch->skigain );
  ch_printf( ch, "&zYour current Stat Gain is&O: &W%d\n\r", ch->statgain);
  ch_printf( ch, "&zGravity is set to&O:&w %d\n\r", ch->gravset);
}

void do_slash( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;

    if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
    {
        send_to_char( "You can't concentrate enough for that.\n\r", ch );
        return;
    }

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

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

    WAIT_STATE( ch, skill_table[gsn_slash]->beats );
    if ( can_use_skill(ch, number_percent(),gsn_slash ) )
    {
        if ( can_use_skill(ch, number_percent(),gsn_dblslash ) )
        {
        global_retcode = damage( ch, victim, number_range( 1, ch->level ), gsn_slash );
        global_retcode = damage( ch, victim, number_range( 1, ch->level*1.5 ), gsn_dblslash );
        learn_from_success( ch, gsn_dblslash );
        }
        else
        global_retcode = damage( ch, victim, number_range( 1, ch->level ), gsn_slash );
        learn_from_success( ch, gsn_slash );
    }
    else
    {
        learn_from_failure( ch, gsn_slash );
        global_retcode = damage( ch, victim, 0, gsn_slash );
    }
    return;
}

#define CHANGES_FILE SYSTEM_DIR "changes.dat"

void append_changes( CHAR_DATA *ch, char *str );
static char *timestamp(void);

CHAR_DATA *sense_for_victim( CHAR_DATA *ch, char *name )
{
    CHAR_DATA *victim;
    ROOM_INDEX_DATA *was_in_room;
    EXIT_DATA *pexit;
    bool found;

    found = FALSE;
    victim = NULL;

    was_in_room = ch->in_room;
     for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
     {
      char_from_room( ch );
      char_to_room( ch, pexit->to_room ); 

      if ( ( victim = get_char_room( ch, name ) ) == NULL )
      found = FALSE;

      if ( ( victim = get_char_room( ch, name ) ) != NULL )
      {
       found = TRUE;

       if (xIS_SET(ch->in_room->room_flags, ROOM_NOSNIPE))
       {
        found = FALSE;
        break;
       }

       break;
      }
     }
      char_from_room( ch );
      char_to_room( ch, was_in_room ); 

/*       if ( found && xIS_SET( victim->act, ACT_DEFLECT ) )
       {
        act( AT_WHITE, "&W$N stretches $s arm and deflects the ki attack back at you []" , ch,NULL,victim,TO_CHAR);
       } */

       if ( found && !can_use_skill(ch, number_percent(), gsn_sense ) )
       {
        act( AT_WHITE, "&W$n closes $s and tries to sense $N\n\r$n opens $s eyes and wonders..." , ch,NULL,victim, TO_ROOM);
        learn_from_failure( ch, gsn_sense );
        return NULL;
       }
     
      else if ( found && can_use_skill(ch, number_percent(), gsn_sense ) ) 
      {
      act( AT_WHITE, "&W$n closes $s and tries to sense $N\n\r$n opens $s eyes and grins..." , ch,NULL,victim,TO_ROOM);
      learn_from_success( ch, gsn_sense );
      return victim;
      }

  return NULL;
}


/* stamp that time! -Nopey */
static char *timestamp(void)
{
   static char buf[MAX_STRING_LENGTH];
   struct tm *t = localtime(&current_time);

   sprintf( buf, "%04d-%02d-%02d", t->tm_year+1900, t->tm_mon+1,  t->tm_mday );
   return buf;
}

void warcry( CHAR_DATA *ch, CHAR_DATA *victim )
{
  char buf[MAX_STRING_LENGTH];

   if ( ch->position != POS_FIGHTING  )
   {
    if ( !IS_NPC(victim))
    {
      sprintf( buf, "Help!  I am being attacked by %s!", ch->name );
      if ( IS_PKILL(victim) || victim->exp >= 5000000)
        do_wartalk( victim, buf );
      else
        do_yell( victim, buf );
    }
   }
}
                          
/* append changes to the changes.dat file inside /system/ -Nopey */
void append_changes( CHAR_DATA *ch, char *str )
{
    char buf[MAX_STRING_LENGTH];
    FILE *fp;

    if ( IS_NPC(ch) || str[0] == '\0' )
	return;

    if ( ( fp = fopen( CHANGES_FILE, "a" ) ) == NULL )
    {
	perror( CHANGES_FILE );
	send_to_char( "Could not open the file!\n\r", ch );
    }
    else
    {
	fprintf( fp, "&g[&G %s&g ]&c %s&C: %s\n", timestamp(), capitalize(ch->name), str );
	fclose( fp );
    }
    return;
}

/* The changes function :o -Nopey */
/*  void do_changes(CHAR_DATA *ch, char *argument)
{
    char buf[MAX_STRING_LENGTH];

  if(IS_NPC(ch))
  {
    send_to_char("Huh?\n\r", ch);
    return;
  }
  
  if(*argument == '\0' || !argument || !IS_IMMORTAL(ch))
  {
    set_char_color(AT_WHITE, ch);
    show_file(ch, CHANGES_FILE);
    return;
  }
  else if(IS_IMMORTAL(ch))
  { 
    append_changes(ch, argument);
    send_to_char("Changes log appended.\n\r", ch);
    sprintf( buf, "&z[&WDBZU&z]&W A new &rc&Rh&ra&Rn&rg&Re&W has been added, type 'changes' to view it.&D" );
    talk_info( AT_BLUE, buf );
    return;
  }
} */

#define NUM_DAYS 35
#define NUM_MONTHS 17
#define MAP_WIDTH 72
#define MAP_HEIGHT 8


const char * star_map[] =
{
"                                               C. C.                  g*",
"    O:       R*        G*    G.  W* W. W.          C. C.    Y* Y. Y.    ", 
"  O*.                c.          W.W.     W.            C.       Y..Y.  ",   
"O.O. O.              c.  G..G.           W:      B*                   Y.",     
"     O.    c.     c.                     W. W.                  r*    Y.",
"     O.c.     c.      G.             P..     W.        p.      Y.   Y:  ",
"        c.                    G*    P.  P.           p.  p:     Y.   Y. ",
"                 b*             P.: P*                 p.p:             "
};

/****************** CONSTELLATIONS and STARS *****************************
  Cygnus     Mars        Orion      Dragon       Cassiopeia          Venus
           Ursa Ninor                           Mercurius     Pluto    
               Uranus              Leo                Crown       Raptor
*************************************************************************/	
const char * sun_map[] =
{
"\\`|'/",
"- O -",
"/.|.\\"
};
const char * moon_map[] =
{
" @@@ ",
"@@@@@",
" @@@ "
};

void look_sky ( CHAR_DATA * ch )
{
    static char buf[MAX_STRING_LENGTH];
    static char buf2[4];
    int starpos, sunpos, moonpos, moonphase, i, linenum, precip;

   pager_printf_color(ch,"You gaze up towards the heavens and see:\n\r");

	precip = (ch->in_room->area->weather->precip + 3*weath_unit - 1)/
		weath_unit;
   if (precip > 1)                 
{
  send_to_char("There are some clouds in the sky so you cannot see anything else.\n\r", ch);
   return;
}
   sunpos  = (MAP_WIDTH * (24 - time_info.hour) / 24);
   moonpos = (sunpos + time_info.day * MAP_WIDTH / NUM_DAYS) % MAP_WIDTH;
   if ((moonphase = ((((MAP_WIDTH + moonpos - sunpos ) % MAP_WIDTH ) +
                      (MAP_WIDTH/16)) * 8 ) / MAP_WIDTH)
		         > 4) moonphase -= 8;
   starpos = (sunpos + MAP_WIDTH * time_info.month / NUM_MONTHS) % MAP_WIDTH;
   /* The left end of the star_map will be straight overhead at midnight during 
      month 0 */

   for ( linenum = 0; linenum < MAP_HEIGHT; linenum++ )
   {
     if ((time_info.hour >= 6 && time_info.hour <= 18) &&
         (linenum < 3 || linenum >= 6))
       continue;
     sprintf(buf," ");
   

     /* for ( i = MAP_WIDTH/4; i <= 3*MAP_WIDTH/4; i++)*/
     for ( i = 1; i <= MAP_WIDTH; i++)
     {
       /* plot moon on top of anything else...unless new moon & no eclipse */
       if ((time_info.hour >= 6 && time_info.hour <= 18)  /* daytime? */
        && (moonpos >= MAP_WIDTH/4 - 2) && (moonpos <= 3*MAP_WIDTH/4 + 2) /* in sky? */
        && ( i >= moonpos - 2 ) && (i <= moonpos + 2) /* is this pixel near moon? */
        && ((sunpos == moonpos && time_info.hour == 12) || moonphase != 0  ) /*no eclipse*/
        && (moon_map[linenum-3][i+2-moonpos] == '@'))
       {
         if ((moonphase < 0 && i - 2 - moonpos >= moonphase) ||
             (moonphase > 0 && i + 2 - moonpos <= moonphase))
           strcat(buf,"&W@");
         else
           strcat(buf," ");
       }
       else
       if ((linenum >= 3) && (linenum < 6) && /* nighttime */
           (moonpos >= MAP_WIDTH/4 - 2) && (moonpos <= 3*MAP_WIDTH/4 + 2) /* in sky? */
        && ( i >= moonpos - 2 ) && (i <= moonpos + 2) /* is this pixel near moon? */
        && (moon_map[linenum-3][i+2-moonpos] == '@'))
       {
         if ((moonphase < 0 && i - 2 - moonpos >= moonphase) ||
             (moonphase > 0 && i + 2 - moonpos <= moonphase))
           strcat(buf,"&W@");
         else
           strcat(buf," ");
       }
       else /* plot sun or stars */
       {
         if (time_info.hour>=6 && time_info.hour<=18) /* daytime */
         {
           if ( i >= sunpos - 2 && i <= sunpos + 2 )
           {
             sprintf(buf2,"&Y%c",sun_map[linenum-3][i+2-sunpos]);
             strcat(buf,buf2);
           }
           else
             strcat(buf," ");
         }
         else
         {
           switch (star_map[linenum][(MAP_WIDTH + i - starpos)%MAP_WIDTH])
           {
             default     : strcat(buf," ");    break;
             case ':'    : strcat(buf,":");    break;
             case '.'    : strcat(buf,".");    break;
             case '*'    : strcat(buf,"*");    break;
             case 'G'    : strcat(buf,"&G ");  break;
             case 'g'    : strcat(buf,"&g ");  break;
             case 'R'    : strcat(buf,"&R ");  break;
             case 'r'    : strcat(buf,"&r ");  break;
             case 'C'    : strcat(buf,"&C ");  break;
             case 'O'    : strcat(buf,"&O ");  break;
             case 'B'    : strcat(buf,"&B ");  break;
             case 'P'    : strcat(buf,"&P ");  break;
             case 'W'    : strcat(buf,"&W ");  break;
             case 'b'    : strcat(buf,"&b ");  break;
             case 'p'    : strcat(buf,"&p ");  break;
             case 'Y'    : strcat(buf,"&Y ");  break;
             case 'c'    : strcat(buf,"&c ");  break;
           }
         }
       }
     }
     strcat(buf,"\n\r");
     pager_printf_color(ch,buf);
  }
}

void do_train( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *mob;
/*   char              arg1[MAX_INPUT_LENGTH]; */
    sh_int *pAbility;
    char *pOutput;
    int cost;
    int chance;
    int reqki1, reqki2;
    chance = number_range(0, 3);
    reqki1 = ch->max_mana / 4;
    reqki2 = ch->max_mana / 3; 

/*   argument = one_argument( argument, arg1 ); */

    if ( IS_NPC(ch) )
        return;

/*    if (!xIS_SET(ch->in_room->room_flags, ROOM_GRAVITY) && !str_cmp( argument, "gravity" ) )
      {
         send_to_char( "You aren't in a gravity chamber.\n\r", ch );
         return;
      }

   if ( xIS_SET(ch->in_room->room_flags, ROOM_GRAVITY) && !str_cmp( argument, "gravity" ) )
      {
        if ( ch->gravset = 0 )
         {
         send_to_char( "You must first set a level of gravity using 'Gravset'.\n\r", ch );
         return;
         }
       } */

   if (!IN_TRAIN(ch) )
     {
      if ( !str_cmp( argument, "str" ) || !str_cmp( argument, "int" ) || !str_cmp( argument,  "wis" ) || !str_cmp( argument, "dex" ) || !str_cmp( argument, "con" ) || !str_cmp( argument,"cha" ) || !str_cmp( argument, "lck" ) || !str_cmp( argument, "chikara1" ) || !str_cmp( argument, "chikara2" )|| !str_cmp( argument, "chikara3") || !str_cmp( argument, "chikara4") || !str_cmp( argument, "primary") || !str_cmp( argument, "secondary") || !str_cmp( argument, "chikara5") )
     {
         send_to_char( "You can't do that here.\n\r", ch );
         return;
    }
   }

    if (ch->position < POS_STANDING)
    {
        send_to_char( "You cannot train in this position.\n\r", ch );
        return;
    }
    cost = 1;   /* Other then prime att cost */

    if ( !str_cmp( argument, "gravity" ) )
    {
       
    }

    if ( !str_cmp( argument, "str" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_STR )
            cost    = 1;
        pAbility    = &ch->perm_str;
        pOutput     = "strength";
    }

    else if ( !str_cmp( argument, "int" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_INT )
            cost    = 1;
        pAbility    = &ch->perm_int;
        pOutput     = "intelligence";
    }
    else if ( !str_cmp( argument, "wis" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_WIS )
            cost    = 1;
        pAbility    = &ch->perm_wis;
        pOutput     = "wisdom";
    }

    else if ( !str_cmp( argument, "dex" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_DEX )
            cost    = 1;
        pAbility    = &ch->perm_dex;
        pOutput     = "dexterity";
    }

    else if ( !str_cmp( argument, "con" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_CON )
            cost    = 1;
        pAbility    = &ch->perm_con;
        pOutput     = "constitution";
    }
    else if ( !str_cmp( argument, "cha" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_CHA )
            cost    = 1;
        pAbility    = &ch->perm_cha;
        pOutput     = "charisma";
    }

    else if ( !str_cmp( argument, "lck" ) )
    {
        if ( class_table[ch->class]->attr_prime == APPLY_LCK )
            cost    = 1;
        pAbility    = &ch->perm_lck;
        pOutput     = "luck";
    }
    else if( !str_cmp( argument, "chikara1" ) )
    {
     save_char_obj( ch );
     if (ch->pcdata->learned[gsn_chikone] == 0) { send_to_char("You don't know Chikara 1.\n\r",ch); return; }
     if (ch->mana < reqki1){ send_to_char("You need more energy to train.\n\r", ch); return;}
     if (ch->pcdata->learned[gsn_chikone] >= 100 )
     { send_to_char("You have fully trained Chikara 1.\n\r", ch); ch->pcdata->learned[gsn_chikone] = 100; return;}
     if (ch->pcdata->learned[gsn_chikone] < 101 )
     {
      ch->mana -= reqki1;
      send_to_char("\n\r&wYou feel the power rushing through your body as you train, excellent!.\n\r", ch);
      do_release(ch, "" );
      do_sleep(ch, "" );
      act( AT_YELLOW, "$n trains Chikara 1.", ch, NULL, NULL, TO_ROOM );
      if (chance == 0 || chance == 2)
      ch->pcdata->learned[gsn_chikone] += number_range(2, 3);
     }
     return;
    }
    else if( !str_cmp( argument, "chikara2" ) )
    {
     save_char_obj( ch );
     if (ch->pcdata->learned[gsn_chiktwo] == 0) { send_to_char("You don't know Chikara 2.\n\r",ch); return; }
     if (ch->mana < reqki1){ send_to_char("You need more energy to train.\n\r", ch); return;}
     if (ch->pcdata->learned[gsn_chiktwo] >= 100 )
     { send_to_char("You have fully trained Chikara 2.\n\r", ch); ch->pcdata->learned[gsn_chiktwo] = 100; return;}
     if (ch->pcdata->learned[gsn_chiktwo] < 101 )
     {
      ch->mana -= reqki1;
       send_to_char("\n\r&wYou feel the power rushing through your body as you train,excellent!.\n\r", ch);
      do_release(ch, "" );
      do_sleep(ch, "" );
      act( AT_YELLOW, "$n trains Chikara 2.", ch, NULL, NULL, TO_ROOM );
      if (chance == 0 || chance == 2)
      ch->pcdata->learned[gsn_chiktwo] += number_range(2, 3);
     }
     return;
    }
    else if( !str_cmp( argument, "chikara3" ) )
    {
     save_char_obj( ch );
     if (ch->pcdata->learned[gsn_chikthree] == 0) { send_to_char("You don't know Chikara 3.\n\r",ch); return; }
     if (ch->mana < reqki2){ send_to_char("You need more energy to train.\n\r", ch); return;}
     if (ch->pcdata->learned[gsn_chikthree] >= 100 )
     { send_to_char("You have fully trained Chikara 3.\n\r", ch); ch->pcdata->learned[gsn_chikthree] = 100; return;}
     if (ch->pcdata->learned[gsn_chikthree] < 101 )
     {
      ch->mana -= reqki2;
      send_to_char("\n\r&wYou feel the power rushing through your body as you train, excellent!.\n\r", ch);
      do_release(ch, "" );
      do_sleep(ch, "" );
      act( AT_YELLOW, "$n trains Chikara 3.", ch, NULL, NULL, TO_ROOM );
      if (chance == 0 || chance == 2)
      ch->pcdata->learned[gsn_chikthree] += number_range(2, 3);
     }
    return;
    }
    else if( !str_cmp( argument, "chikara4" ) )
    {
     save_char_obj( ch );
     if (ch->pcdata->learned[gsn_chikfour] == 0) { send_to_char("You don't know Chikara 4.\n\r",ch); return; }
     if (ch->mana < reqki2){ send_to_char("You need more energy to train.\n\r", ch); return;}
     if (ch->pcdata->learned[gsn_chikfour] >= 100 )
     { send_to_char("You have fully trained Chikara 4.\n\r", ch); ch->pcdata->learned[gsn_chikfour] = 100; return;}
     if (ch->pcdata->learned[gsn_chikfour] < 101 )
     {
      ch->mana -= reqki2;
      send_to_char("\n\r&wYou feel the power rushing through your body as you train,excellent!.\n\r", ch);
      do_release(ch, "" );
      do_sleep(ch, "" );
      act( AT_YELLOW, "\n\r$n trains Chikara 4.", ch, NULL, NULL, TO_ROOM );
      if (chance == 0 || chance == 2)
      ch->pcdata->learned[gsn_chikfour] += number_range(2, 3);
     }
    return;
    }
/*    else if( !str_cmp( argument, "chikara5" ) )
    {
     save_char_obj( ch );
     if (ch->pcdata->learned[gsn_chikfive] == 0) { send_to_char("You don't know Chikara 5.\n\r",ch); return; }
     if (ch->mana < reqki2){ send_to_char("You need more energy to train.\n\r", ch); return;}
     if (ch->pcdata->learned[gsn_chikfive] >= 100 )
     { send_to_char("You have fully trained Chikara 5.\n\r", ch); ch->pcdata->learned[gsn_chikfive] = 100; return;}
     if (ch->pcdata->learned[gsn_chikfive] < 101 )
     {
      ch->mana -= reqki2;
      send_to_char("\n\r&wYou feel the power rushing through your body as you train, excellent!.\n\r", ch);
      do_release(ch, "" );
      do_sleep(ch, "" );
      act( AT_YELLOW, "$n trains Chikara 5.", ch, NULL, NULL, TO_ROOM );
      if (chance == 0 || chance == 2)
      ch->pcdata->learned[gsn_chikfive] += number_range(2, 3);
     }
    return;
    } */

    else if( !str_cmp( argument, "secondary" ) )
    {
     save_char_obj( ch );

     if (ch->mana < 1000)
     { send_to_char("You need more energy to train.\n\r", ch);
       return;
     }
     if (ch->pcdata->learned[gsn_secondary_skill] >= 100 )
     {
        send_to_char("You have fully trained Secondary Skill.\n\r", ch);
        return;
     }
     if (ch->pcdata->learned[gsn_secondary_skill] == 0)
     {
         send_to_char( "You don't know Secondary Skill.\n\r",ch);
         return;
     }
     else if(ch->pcdata->learned[gsn_secondary_skill] < 100 )
     {
        ch->mana -= 1000;
        send_to_char("&wYou train your Secondary Skill.\n\r", ch);
        act( AT_YELLOW, "$n trains Secondary Skill.", ch, NULL, NULL, TO_ROOM );
        if (chance == 0 || chance == 2)
        ch->pcdata->learned[gsn_secondary_skill] += number_range(2, 3);
     }
        if ( ch->pcdata->learned[gsn_secondary_skill] >= 50
        && !xIS_SET(ch->act, PLR_SECONDARY_CORTEX)
        && !xIS_SET(ch->act, PLR_SECONDARY_IMPROVEDSKIN)
        && !xIS_SET(ch->act, PLR_SECONDARY_SPIKES)
        && !xIS_SET(ch->act, PLR_SECONDARY_KICONTROL)
        && !xIS_SET(ch->act, PLR_SECONDARY_ULTRABODY))
        {
        if (number_range( 1, 10 ) == 1 )
        {
        send_to_char("&RYou body beings to grow.\n\r&cLarge Spikes petrude from your body.\n\r&YYou have just attained  Spikes.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_SPIKES );
        }
        else if (number_range( 1, 10 ) == 2 )
        {
        send_to_char("&RYour body begins to change.\n\r&cYour skin begins to harden.\n\r&YYou have just attained Improved Skin.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_IMPROVEDSKIN );
        }
        else if (number_range( 1, 10 ) == 3 )
        {
        send_to_char("&RYou body beings to grow.\n\r&cLarge Spikes petrude from your body.\n\r&YYou have just attained Spikes.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_SPIKES );
        }
        else if (number_range( 1, 10 ) == 4 )
        {
        send_to_char("&RYour body changes.\n\r&cYour feel like you can take on the world.\n\r&YYou have just attainedUltraBody.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_ULTRABODY );
        }
        else if (number_range( 1, 10 ) == 5 )
        {
        send_to_char("&RYour body changes.\n\r&cYour feel like you can take on the world.\n\r&YYou have just attained UltraBody.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_ULTRABODY );
        }
        else if (number_range( 1, 10 ) == 6 )
        {
        send_to_char("&RYour body changes.\n\r&cYour feel like you can take on the world.\n\r&YYou have just attainedUltraBody.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_ULTRABODY );
        }
        else if (number_range( 1, 10 ) == 8 )
        {
        send_to_char("&RYour intelligence rises.\n\r&cYour feel more adept using ki abilities.\n\r&YYou have just attained Ki Control.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_KICONTROL );
        }
        else if (number_range( 1, 10 ) == 7 )
        {
        send_to_char("&RYour intelligence rises.\n\r&cYour feel more adept using ki abilities.\n\r&YYou have justattained Ki Control.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_KICONTROL );
        }
        else if (number_range( 1, 10 ) == 9 )
        {
        send_to_char("&RA warm glow fills your body.\n\r&cYou become more adept to the skill scattershot.\n\r&YYou have just attained Cortex", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_CORTEX );
        }
        else if (number_range( 1, 10 ) == 10 )
        {
        send_to_char("&RYou body beings to grow.\n\r&cLarge Spikes petrude from your body.\n\r&YYou have just attained Spikes.", ch );
        xSET_BIT( ch->act, PLR_SECONDARY_SPIKES );
        }
       
        learn_from_success( ch, gsn_secondary_skill);
        return;
      }
  return;
}

/*    else if( !str_cmp( argument, "primarytechnique" ) )
    {
     int result;

     save_char_obj( ch );
     saving_char = NULL;
     if (!IS_BIODROID(ch)){ send_to_char("Huh?\n\r", ch ); return;}
     if (ch->mana < ch->max_mana/7)
     {
      send_to_char("You need more ki.\n\r", ch); return;
     }
     if (ch->pcdata->learned[gsn_primaryattack] == 0) { send_to_char("Practice it First.\n\r",ch); return; }
     if (ch->pcdata->learned[gsn_primaryattack] >= 100) {send_to_char("Its at maximum.\n\r",ch); return;}
     if (ch->pcdata->learned[gsn_primaryattack] < 100 ) {
     send_to_char("\n\r&YYou train your primary attack.\n\r", ch);
     ch->mana -= ch->max_mana/7;
     ch->pcdata->learned[gsn_primaryattack] += 1; }
       if (xIS_SET(ch->act, PLR_PRIMARY_TRIBEAM) || xIS_SET(ch->act, PLR_PRIMARY_MASENKO) || xIS_SET(ch->act, PLR_PRIMARY_DDD) || xIS_SET(ch->act, PLR_PRIMARY_SCATTER) || xIS_SET(ch->act, PLR_PRIMARY_BARRIER))
       return;

     save_char_obj( ch );
     int result;

       result = (sh_int) number_range( 0, 12 );

     if (ch->mana < ch->max_mana/7)
     { send_to_char("You need more energy to train.\n\r", ch);
       return;
     }
     if (ch->pcdata->learned[gsn_primaryattack] >= 100 )
     {
        send_to_char("You have fully trained Primary Technique.\n\r", ch);
        return;
     }
     if (ch->pcdata->learned[gsn_primaryattack] == 0)
     {
         send_to_char( "You don't know Primary Technique.\n\r",ch);
         return;
     }
     else if(ch->pcdata->learned[gsn_primaryattack] < 100 )
     {
        ch->mana -= ch->max_mana/7;
        send_to_char("&wYou train your Primary Technique.\n\r", ch);
        act( AT_YELLOW, "$n trains Primary Technique.", ch, NULL, NULL, TO_ROOM );
        if (chance == 0 || chance == 2)
        ch->pcdata->learned[gsn_primaryattack] += number_range(2, 3);
     }
        if ( ch->pcdata->learned[gsn_primaryattack] >= 50
        && !xIS_SET(ch->act, PLR_PRIMARY_SCATTER)
        && !xIS_SET(ch->act, PLR_PRIMARY_TRIBEAM)
        && !xIS_SET(ch->act, PLR_PRIMARY_BARRIER)
        && !xIS_SET(ch->act, PLR_PRIMARY_MASENKO)
        && !xIS_SET(ch->act, PLR_PRIMARY_DDD))
        {

       if ( result >= 0 && result <= 4  )
       {
        send_to_char("&zAs you train your primary technique.\n\r&pYou clench your fists and gain a sudden rush of energy.\n\r&RYou are now adept with TRIBEAM!\n\r", ch);
        xSET_BIT(ch->act, PLR_PRIMARY_TRIBEAM);
        ch->pcdata->learned[gsn_tribeam] = 100;
        return;
       }
       if ( result >= 5 && result <= 9 )
       {
        send_to_char("&zAs you train your primary technique.\n\r&pYou clench your fists and gain a sudden rush of energy.\n\r&RYou are now adept with MASENKO!\n\r", ch);
        xSET_BIT(ch->act, PLR_PRIMARY_MASENKO);
        ch->pcdata->learned[gsn_masenko] = 100;
        return;
       }
       if ( result == 10 )
       {
        send_to_char("&zAs you train your primary technique.\n\r&pYou clench your fists and gain a sudden rush of energy.\n\r&RYou are now adept with SCATTERSHOT!\n\r", ch);
        xSET_BIT(ch->act, PLR_PRIMARY_SCATTER);
        ch->pcdata->learned[gsn_scattershot] = 100;
        return;
       }
       if ( result == 11 )
       {
        send_to_char("&zAs you train your primary attack,\n\r&pYou clench your fists and gain a sudden rush of energy.\n\r&RYou are now adept with DUAL DESTRUCTO DISK!\n\r", ch);
        xSET_BIT(ch->act, PLR_PRIMARY_DDD);
        ch->pcdata->learned[gsn_ddd] = 100;
        return;
       }
       if ( result == 12 )
       {
        send_to_char("&zAs you train your primary attack,\n\r&pYou clench your fists and gain a sudden rush of energy.\n\r&RYou are now adept with ENERGY BARRIER!\n\r", ch);
        xSET_BIT(ch->act, PLR_PRIMARY_BARRIER);
        ch->pcdata->learned[gsn_ebar] = 100;
        return;
       }
}
    return;
    } */

    else if( !str_cmp( argument, "primary" ) )
    {
     save_char_obj( ch );

     if (ch->mana < 100)
     { send_to_char("You need more energy to train.\n\r", ch);
       return;
     }
     if (ch->pcdata->learned[gsn_primary_skill] >= 100 )
     {
        send_to_char("You have fully trained Primary Skill.\n\r", ch);
        return;
     }
     if (ch->pcdata->learned[gsn_primary_skill] == 0)
     {
         send_to_char( "You don't know Primary Skill.\n\r",ch);
         return;
     }
     else if(ch->pcdata->learned[gsn_primary_skill] < 100 )
     {
        ch->mana -= 100;
        send_to_char("&wYou train your Primary Skill.\n\r", ch);
        act( AT_YELLOW, "$n trains Primary Skill.", ch, NULL, NULL, TO_ROOM );
        if (chance == 0 || chance == 2)
        ch->pcdata->learned[gsn_primary_skill] += number_range(2, 3);
     }
        if ( ch->pcdata->learned[gsn_primary_skill] >= 50
        && !xIS_SET(ch->act, PLR_PRIMARY_MEGABRAIN)
        && !xIS_SET(ch->act, PLR_PRIMARY_HIKI)
        && !xIS_SET(ch->act, PLR_PRIMARY_STONESKIN)
        && !xIS_SET(ch->act, PLR_PRIMARY_SMALLSIZE)
        && !xIS_SET(ch->act, PLR_PRIMARY_LARGESIZE) )
        {
        if (number_range( 1, 6 ) == 1 )
        {
       send_to_char("&RYour body shinks in size.\n\r&cYou become smaller, but faster.\n\r&YYou have just attained Small Size.", ch );
        xSET_BIT( ch->act, PLR_PRIMARY_SMALLSIZE );
        ch->mod_dex = 10;
        ch->mod_str = -5;
        }
/*        else if (number_range( 1, 6 ) == 3 )
        {
        send_to_char("&RYour body begins to change.\n\r&cYour skin changes into stone.\n\r&YYou have just attained Stone Skin.", ch );
        xSET_BIT( ch->act, PLR_PRIMARY_STONESKIN );
        ch->mod_lck = 2;
        ch->mod_str = 2;
        } */
        else if (number_range( 1, 6 ) == 6 )
        {
        send_to_char("&RYour body begins to change.\n\r&cYour skin changes into stone.\n\r&YYou have just attained Stone Skin.", ch );
        xSET_BIT( ch->act, PLR_PRIMARY_STONESKIN );
        ch->mod_lck = 2;
        ch->mod_str = 2;
        }
        else if (number_range( 1, 6 ) == 3 )
        {
       send_to_char("&RYour body shinks in size.\n\r&cYou become smaller, but faster.\n\r&YYou have just attained Small Size.", ch );
        xSET_BIT( ch->act, PLR_PRIMARY_SMALLSIZE );
        ch->mod_dex = 10;
        ch->mod_str = -5;
        }
        else if (number_range( 1, 6 ) == 2 )
        {
        send_to_char("&RYou feel your body's energy increase.\n\r&cYour ki has just been multiplied.\n\r&YYou have just attained Hi Ki.", ch );
        xSET_BIT( ch->act, PLR_PRIMARY_HIKI );
        ch->max_mana *= 1.5;
           ch->mod_str = -3;
           ch->mod_dex = 3;
           ch->mod_lck = 3;
        }
        else if (number_range( 1, 6 ) == 4 )
        {
        send_to_char("&RYour body grows in size.\n\r&cYou become stronger, but slower.\n\r&YYou have just attained Large Size.", ch);
        xSET_BIT( ch->act, PLR_PRIMARY_LARGESIZE );
           ch->mod_str = 10;
           ch->mod_dex = -5;
           ch->mod_lck = 2;
        }
        else if (number_range( 1, 6 ) == 5 )
        {
        send_to_char("&RYou head begins to grow.\n\r&cYou become much smarter.\n\r&YYou have just attained MegaBrain.", ch );
        xSET_BIT( ch->act, PLR_PRIMARY_MEGABRAIN );
        ch->mod_wis = 10;
        ch->mod_dex = 2;
        }
        learn_from_success( ch, gsn_primary_skill);
        return;
        }
    return;
   }
    else
    {

        send_to_char( "Train what?\n\r", ch );
        return;
    }

    if ( *pAbility >= 25  && (!str_cmp( argument, "str" ) || !str_cmp( argument, "int" ) || !str_cmp( argument, "wis" ) || !str_cmp( argument, "dex" ) || !str_cmp( argument, "con" ) || !str_cmp( argument, "cha" ) || !str_cmp( argument, "lck" ) ))  /* 25 is the max you can train a stat */

   {
        act(AT_BLUE, "Your $T is already at maximum.", ch, NULL, pOutput, TO_CHAR );
        return;
    }
    if ( cost > ch->train )
    {
        send_to_char( "You don't have enough trains.\n\r", ch );
        return;
    }

    ch->train       -= cost;
    *pAbility           += 1;
         act(AT_YELLOW, "Your $T increases!", ch, NULL, pOutput, TO_CHAR );
         act(AT_YELLOW, "$n's $T increases!", ch, NULL, pOutput, TO_ROOM );
         return;
}

char *strlinwrp(char *src, int length)
{
  int srclen,in_p,x,last_line;
  char newstr[MAX_STRING_LENGTH];
  bool looking;
    if(!length)
      length = 60;
    srclen = strlen(src);
    in_p = 0;
// STRFREE(newstr); Commented out - was just defined!
    looking = FALSE;
    for(x=0,last_line=0;x<srclen;x++,last_line++)
    {
        if(src[x] == '\r' || src[x] == '\n')
        {
            last_line = 0;
            looking = FALSE;
        }
        else if(last_line%length == 0 && x != 0)
            looking = TRUE;
        if(looking)
        {
          if(src[x] == ' ')
          {
            newstr[in_p++] = '\r';
            newstr[in_p++] = '\n';
            looking = FALSE;
            last_line = 0;
            if(src[x+1] == ' ')
              x++;
            continue;
          }
        }
        newstr[in_p++] = src[x];
    }
    newstr[in_p++] = '\r';
    newstr[in_p++] = '\n';
    newstr[in_p++] = '\0';
  return strdup( newstr );
}


char *strrep(char *src, char *sch,char *rep)
{
  int lensrc,lensch,lenrep;
  char newsrc[MAX_STRING_LENGTH];
  int x,y,in_p;
  bool searching;
    lensrc = strlen(src);
    lensch = strlen(sch);
    lenrep = strlen(rep);
    searching = FALSE;
    for(x=0,in_p=0;x<lensrc;x++,in_p++)
    {
        if(src[x] == sch[0])
        {
            searching = TRUE;
            for(y=0;y<lensch;y++)
                if(src[x+y] != sch[y])
                    searching = FALSE;
            if(searching)
            {
                for(y=0;y<lenrep;y++,in_p++)
                    newsrc[in_p] = rep[y];
                x+=lensch;
                searching = FALSE;
            }
        }
        newsrc[in_p] = src[x];
    }
    newsrc[in_p] = '\0';
  return STRALLOC( newsrc );
}

void do_learn( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *mob=NULL;
  char buf[MAX_STRING_LENGTH];
  int sn, value, gsn;
  bool can=FALSE;
  int lasttype, lasttype2;
  struct skill_type *skill;
  bool ability=FALSE;

 lasttype = SKILL_ASKILL;
 lasttype2 = SKILL_SSKILL;

  if ( IS_NPC(ch))
  {
      send_to_char( "Huh?\n\r", ch);
      return;
  }

   if (!IN_TRAIN(ch))
   {
    send_to_char( "You can't do that here.\n\r", ch );
    return;
   }

  if ( ( sn = skill_lookup( argument )) >= 0 )
//    if ( ( sn = bsearch_skill_prefix( argument ) ) >= 0 )
  {
     skill = skill_table[sn];
     if ( skill->type == lasttype )
     ability=TRUE;
     else if ( skill->type == lasttype2 )
     ability=FALSE;
     else
     {
     send_to_char( "Unknown Skill.\n\r", ch );
     return;
     }

  }
  else
  {
     send_to_char( "Unknown Skill.\n\r", ch );
     return;
  }

  if ( ability )
  {
       if ( can_userace( ch, sn ) == FALSE )
         can = FALSE;
       else
        can=TRUE;
       if ( !can )
       {
         send_to_char("You cannot learn this skill.\n\r", ch);
         return;
       }
  }

  gsn = ch->pcdata->learned[sn];

  if ( skill->teachers )
  {
        send_to_char("This cannot be practiced here.\n\r", ch);
        return;
  }

  if ( ch->practice < 1 )
  {
    send_to_char( "You don't have any practice sessions available.\n\r", ch);
    return;
  }

  if ( skill->pl && ch->exp < skill->pl )
  {
    send_to_char( "You are not strong enough.\n\r", ch);
    return;
  }
  if ( gsn > 0 )
  {
    send_to_char( "You have to train this on your own.\n\r", ch);
    return;
  }

  value = 5;
  value += get_curr_int(ch)/2;
  value = URANGE( 0, value, 20 );
  ch->pcdata->learned[sn] = value;
  ch->practice -= 1;
  ch_printf(ch,"You practice %s.\n\r", skill->name);
  act( AT_WHITE, "$n practices $T.", ch, NULL, skill->name, TO_ROOM );

}


/* void do_learn( 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);

   if (IS_NPC(ch))
   return;
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if ( arg1[0] == '\0' )
   {
     send_to_char( "Practice what?\n\r", ch );
     return;
   }
   if (!IN_TRAIN(ch))
   {
    send_to_char( "You can't do that here.\n\r", ch );
    return;
   }
   if ( ch->practice <= 0 )
   {
    act( AT_TELL, "You must earn some more practice sessions.", ch, NULL, NULL, TO_CHAR );
    return;
   }

   if ( !str_cmp( arg1, "barrier" ) && (IS_HALFBREED(ch) || IS_HUMAN(ch) || IS_NAMEK(ch) || IS_MUTANT (ch)))
   {
     if (ch->pcdata->learned[gsn_ebar] > 0)
     {
       send_to_char("You already know everything about Energy Barrier.\n\r", ch);
       return;
     }
     if ( ch->exp < 50000 )
     {
       send_to_char("You're not ready to learn Energy Barrier.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_ebar] = 15;
     send_to_char("You practice Energy Barrier.\n\r", ch);
     act( AT_WHITE, "$n practices Energy Barrier.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "mentalthrow" ) && (IS_ICER(ch) ))
   {
     if (ch->pcdata->learned[gsn_mentalthrow] > 0)
     {
       send_to_char("You already know everything about Mental Throw.\n\r", ch);
       return;
     }
     if ( ch->exp < 5500000 )
     {
       send_to_char("You're not ready to learn Mental Throw.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_mentalthrow] = 15;
     send_to_char("You practice Mental Throw.\n\r", ch);
     act( AT_WHITE, "$n practices Mental Throw.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "ddd" ) && (IS_ICER(ch) ))
   {
     if (ch->pcdata->learned[gsn_ddd] > 0)
     {
       send_to_char("You already know everything about Dual Destructo Disk.\n\r", ch);
       return;
     }
     if ( ch->exp < 4000000 )
     {
       send_to_char("You're not ready to learn Dual Destructo Disk.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_ddd] = 15;
     send_to_char("You practice Dual Destructo Disk.\n\r", ch);
     act( AT_WHITE, "$n practices Dual Destructo Disk.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "destructodisk" ) && (IS_ICER(ch) || IS_HUMAN(ch)))
   {
     if (ch->pcdata->learned[gsn_destructo] > 0)
     {
       send_to_char("You already know everything about Destructo Disk.\n\r", ch);
       return;
     }
     if ( ch->exp < 750000 )
     {
       send_to_char("You're not ready to learn Destructo Disk.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_destructo] = 15;
     send_to_char("You practice Destructo Disk.\n\r", ch);
     act( AT_WHITE, "$n practices Destructo Disk.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "secondattack" ))
   {
     if (ch->pcdata->learned[gsn_second_attack] > 0)
     {
       send_to_char("You already know everything about Second Attack.\n\r", ch);
       return;
     }
     if ( ch->exp < 2500000 )
     {
       send_to_char("You're not ready to learn Second Attack.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_second_attack] = 15;
     send_to_char("You practice Second Attack.\n\r", ch);
     act( AT_WHITE, "$n practices Second Attack.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "extract" ))
   {
     if (ch->pcdata->learned[gsn_extract] > 0)
     {
       send_to_char("You already know everything about Extract.\n\r", ch);
       return;
     }
     if ( ch->exp < 5000000 )
     {
       send_to_char("You're not ready to learn Extract.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_extract] = 15;
     send_to_char("You practice Extract.\n\r", ch);
     act( AT_WHITE, "$n practices Extract.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "sense" ))
   {
     if (ch->pcdata->learned[gsn_sense] > 0)
     {
       send_to_char("You already know everything about Sense.\n\r", ch);
       return;
     }
     if ( ch->exp < 500000 )
     {
       send_to_char("You're not ready to learn Sense.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_sense] = 15;
     send_to_char("You practice Sense.\n\r", ch);
     act( AT_WHITE, "$n practices Sense.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "grip" ) && (IS_ANDROID(ch) || IS_BIODROID(ch)))
   {
     if (ch->pcdata->learned[gsn_grip] > 0)
     {
       send_to_char("You already know everything about Grip.\n\r", ch);
       return;
     }
     if ( ch->exp < 1000000 )
     {
       send_to_char("You're not ready to learn Grip.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_grip] = 15;
     send_to_char("You practice Grip.\n\r", ch);
     act( AT_WHITE, "$n practices Grip.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "regenerate" ) && (IS_SAIYAN(ch) || IS_BIODROID(ch)))
   {
     if (ch->pcdata->learned[gsn_regen] > 0)
     {
       send_to_char("You already know everything about Regenerate.\n\r", ch);
       return;
     }
     if ( ch->exp < 250000 )
     {
       send_to_char("You're not ready to learn Regenerate.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_regen] = 15;
     send_to_char("You practice Regenerate.\n\r", ch);
     act( AT_WHITE, "$n practices Regenerate.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "fly" ))
   {
     if (ch->pcdata->learned[gsn_fly] > 0)
     {
       send_to_char("You already know everything about Fly.\n\r", ch);
       return;
     }
     if ( ch->exp < 50000 )
     {
       send_to_char("You're not ready to learn Fly.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_fly] = 15;
     send_to_char("You practice Fly.\n\r", ch);
     act( AT_WHITE, "$n practices Fly.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "suppress" ))
   {
     if (ch->pcdata->learned[gsn_suppress] > 0)
     {
       send_to_char("You already know everything about Suppress.\n\r", ch);
       return;
     }
     if ( ch->exp < 1000000 )
     {
       send_to_char("You're not ready to learn Suppress.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_suppress] = 15;
     send_to_char("You practice Suppress.\n\r", ch);
     act( AT_WHITE, "$n practices Suppress.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "claw" ) && (IS_MUTANT(ch)))
   {
     if (ch->pcdata->learned[gsn_claw] > 0)
     {
       send_to_char("You already know everything about Claw.\n\r", ch);
       return;
     }
     if ( ch->exp < 250000 )
     {
       send_to_char("You're not ready to learn Claw.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_claw] = 15;
     send_to_char("You practice Claw.\n\r", ch);
     act( AT_WHITE, "$n practices Claw.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "absorb" ) && (IS_BIODROID(ch) || IS_ANDROID(ch) ))
   {
     if (ch->pcdata->learned[gsn_absorb] > 0)
     {
       send_to_char("You already know everything about Absorb.\n\r", ch);
       return;
     }
     if ( ch->exp < 125000 )
     {
       send_to_char("You're not ready to learn Absorb.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_absorb] = 15;
     send_to_char("You practice Absorb.\n\r", ch);
     act( AT_WHITE, "$n practices Absorb.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "fingerbeam" ) && (IS_BIODROID(ch) || IS_ANDROID(ch) || IS_ICER(ch)))
   {
     if (ch->pcdata->learned[gsn_fingerbeam] > 0)
     {
       send_to_char("You already know everything about Fingerbeam.\n\r", ch);
       return;
     }
     if ( ch->exp < 1000000 )
     {
       send_to_char("You're not ready to learn Fingerbeam.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_fingerbeam] = 15;
     send_to_char("You practice Fingerbeam.\n\r", ch);
     act( AT_WHITE, "$n practices Fingerbeam.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "kamehameha" ) && (IS_HALFBREED(ch) || IS_SAIYAN(ch) || IS_HUMAN(ch) || IS_BIODROID(ch)))
   {
     if (ch->pcdata->learned[gsn_kame] > 0)
     {
       send_to_char("You already know everything about Kamehameha.\n\r", ch);
       return;
     }
     if ( ch->exp < 1500000 )
     {
       send_to_char("You're not ready to learn Kamehameha.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_kame] = 15;
     send_to_char("You practice Kamehameha.\n\r", ch);
     act( AT_WHITE, "$n practices Kamehameha.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "punch" ))
   {
     if (ch->pcdata->learned[gsn_punch] > 0)
     {
       send_to_char("You already know everything about Punch.\n\r", ch);
       return;
     }
     if ( ch->exp < 5000 )
     {
       send_to_char("You're not ready to learn Punch.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_punch] = 15;
     send_to_char("You practice Punch.\n\r", ch);
     act( AT_WHITE, "$n practices Punch.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "blastdoor" ))
   {
     if (ch->pcdata->learned[gsn_blastdoor] > 0)
     {
       send_to_char("You already know everything about Blastdoor.\n\r", ch);
       return;
     }
     if ( ch->exp < 5000000 )
     {
       send_to_char("You're not ready to learn Blastdoor.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_blastdoor] = 15;
     send_to_char("You practice Blastdoor.\n\r", ch);
     act( AT_WHITE, "$n practices Blastdoor.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "kick" ))
   {
     if (ch->pcdata->learned[gsn_kick] > 0)
     {
       send_to_char("You already know everything about Kick.\n\r", ch);
       return;
     }
     if ( ch->exp < 1000 )
     {
       send_to_char("You're not ready to learn Kick.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_kick] = 15;
     send_to_char("You practice Kick.\n\r", ch);
     act( AT_WHITE, "$n practices Kick.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "instanttransmission" ) )
   {
     if (ch->pcdata->learned[gsn_instant] > 0)
     {
       send_to_char("You already know everything about Instant Transmission.\n\r", ch);
       return;
     }
     if ( ch->exp < 95000000 )
     {
       send_to_char("You're not ready to learn Instant Transmission.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_instant] = 15;
     send_to_char("You practice Instant Transmission.\n\r", ch);
     act( AT_WHITE, "$n practices Instant Transmission.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "direct" ))
   {
     if (ch->pcdata->learned[gsn_direct] > 0)
     {
       send_to_char("You already know everything about Direct.\n\r", ch);
       return;
     }
     if ( ch->exp < 25000 )
     {
       send_to_char("You're not ready to learn Direct.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_direct] = 15;
     send_to_char("You practice Direct.\n\r", ch);
     act( AT_WHITE, "$n practices Direct.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "energyball" ))
   {
     if (ch->pcdata->learned[gsn_energyball] > 0)
     {
       send_to_char("You already know everything about Energy Ball.\n\r", ch);
       return;
     }
     if ( ch->exp < 25000 )
     {
       send_to_char("You're not ready to learn Energy Ball.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_energyball] = 15;
     send_to_char("You practice Energy Ball.\n\r", ch);
     act( AT_WHITE, "$n practices Energy Ball.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "energysphere" ) && (IS_SAIYAN(ch) || IS_NAMEK(ch) || IS_HALFBREED(ch) || IS_BIODROID(ch) ||IS_ANDROID(ch) || IS_MUTANT(ch) ))
   {
     if (ch->pcdata->learned[gsn_energysphere] > 0)
     {
       send_to_char("You already know everything about Energy Sphere.\n\r", ch);
       return;
     }
     if ( ch->exp < 25000 )
     {
       send_to_char("You're not ready to learn Energy Sphere.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_energysphere] = 15;
     send_to_char("You practice Energy Sphere.\n\r", ch);
     act( AT_WHITE, "$n practices Energy Sphere.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "charge" ))
   {
     if (ch->pcdata->learned[gsn_charge] > 0)
     {
       send_to_char("You already know everything about Charge.\n\r", ch);
       return;
     }
     if ( ch->exp < 25000 )
     {
       send_to_char("You're not ready to learn Charge.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_charge] = 15;
     send_to_char("You practice Charge.\n\r", ch);
     act( AT_WHITE, "$n practices Charge.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "superandroid" ) && (IS_ANDROID(ch)))
   {
     if (ch->pcdata->learned[gsn_accelerate] > 0)
     {
       send_to_char("You already know everything about Super Android.\n\r", ch);
       return;
     }
     if ( ch->exp < 5000000 )
     {
       send_to_char("You're not ready to learn Super Android.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_accelerate] = 15;
     send_to_char("You practice Super Android.\n\r", ch);
     act( AT_WHITE, "$n practices Super Android.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "eyebeam" ) && (IS_ANDROID(ch)))
   {
     if (ch->pcdata->learned[gsn_eyebeam] > 0)
     {
       send_to_char("You already know everything about Eyebeam.\n\r", ch);
       return;
     }
     if ( ch->exp < 4000000 )
     {
       send_to_char("You're not ready to learn Eyebeam.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_eyebeam] = 15;
     send_to_char("You practice Eyebeam.\n\r", ch);
     act( AT_WHITE, "$n practices Eyebeam.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "superhuman" ) && (IS_HUMAN(ch)))
   {
     if (ch->pcdata->learned[gsn_superhuman] > 0)
     {
       send_to_char("You already know everything about Superhuman.\n\r", ch);
       return;
     }
     if ( ch->exp < 2500000 )
     {
       send_to_char("You're not ready to learn Superhuman.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_superhuman] = 15;
     send_to_char("You practice Superhuman.\n\r", ch);
     act( AT_WHITE, "$n practices Superhuman.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "doublepunch" ) && (IS_HUMAN(ch)))
   {
     if (ch->pcdata->learned[gsn_doublepunch] > 0)
     {
       send_to_char("You already know everything about Doublepunch.\n\r", ch);
       return;
     }
     if ( ch->exp < 1500000 )
     {
       send_to_char("You're not ready to learn Doublepunch.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_doublepunch] = 15;
     send_to_char("You practice Doublepunch.\n\r", ch);
     act( AT_WHITE, "$n practices Doublepunch.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "doublekick" ) && (IS_HUMAN(ch)))
   {
     if (ch->pcdata->learned[gsn_doublekick] > 0)
     {
       send_to_char("You already know everything about Doublekick.\n\r", ch);
       return;
     }
     if ( ch->exp < 1500000 )
     {
       send_to_char("You're not ready to learn Doublekick.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_doublekick] = 15;
     send_to_char("You practice Doublekick.\n\r", ch);
     act( AT_WHITE, "$n practices Doublekick.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "tribeam" ) && (IS_HUMAN(ch)))
   {
     if (ch->pcdata->learned[gsn_tribeam] > 0)
     {
       send_to_char("You already know everything about Tribeam.\n\r", ch);
       return;
     }
     if ( ch->exp < 55000000 )
     {
       send_to_char("You're not ready to learn Tribeam.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_tribeam] = 15;
     send_to_char("You practice Tribeam.\n\r", ch);
     act( AT_WHITE, "$n practices Tribeam.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "masenko" ) && (IS_HALFBREED(ch)))
   {
     if (ch->pcdata->learned[gsn_masenko] > 0)
     {
       send_to_char("You already know everything about Masenko.\n\r", ch);
       return;
     }
     if ( ch->exp < 55000000 )
     {
       send_to_char("You're not ready to learn Masenko.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_masenko] = 15;
     send_to_char("You practice Masenko.\n\r", ch);
     act( AT_WHITE, "$n practices Masenko.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "splitform" ) && (IS_NAMEK(ch)))
   {
     if (ch->pcdata->learned[gsn_split] > 0)
     {
       send_to_char("You already know everything about Split Form.\n\r", ch);
       return;
     }
     if ( ch->exp < 500000 )
     {
       send_to_char("You're not ready to learn Split Form.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_split] = 15;
     send_to_char("You practice Split Form.\n\r", ch);
     act( AT_WHITE, "$n practices Split Form.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "heal" ) && (IS_NAMEK(ch) || IS_BIODROID(ch)))
   {
     if (ch->pcdata->learned[gsn_heal] > 0)
     {
       send_to_char("You already know everything about Heal.\n\r", ch);
       return;
     }
     if ( ch->exp < 100000 )
     {
       send_to_char("You're not ready to learn Heal.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_heal] = 15;
     send_to_char("You practice Heal.\n\r", ch);
     act( AT_WHITE, "$n practices Heal.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "sbc" ) && (IS_NAMEK(ch) || IS_BIODROID(ch)))
   {
     if (ch->pcdata->learned[gsn_sbc] > 0)
     {
       send_to_char("You already know everything about Special Beam Cannon.\n\r", ch);
       return;
     }
     if ( ch->exp < 5000000 )
     {
       send_to_char("You're not ready to learn Special Beam Cannon.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_sbc] = 15;
     send_to_char("You practice Special Beam Cannon.\n\r", ch);
     act( AT_WHITE, "$n practices Special Beam Cannon.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "aid" ))
   {
     if (ch->pcdata->learned[gsn_aid] > 0)
     {
       send_to_char("You already know everything about Aid.\n\r", ch);
       return;
     }
     if ( ch->exp < 1000 )
     {
       send_to_char("You're not ready to learn Aid.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_aid] = 15;
     send_to_char("You practice Aid.\n\r", ch);
     act( AT_WHITE, "$n practices Aid.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "blast" ))
   {
     if (ch->pcdata->learned[gsn_blast] > 0)
     {
       send_to_char("You already know everything about Blast.\n\r", ch);
       return;
     }
     if ( ch->exp < 5000000 )
     {
       send_to_char("You're not ready to learn Blast.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_blast] = 15;
     send_to_char("You practice Blast.\n\r", ch);
     act( AT_WHITE, "$n practices Blast.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "galicgun" ) && IS_SAIYAN(ch))
   {
     if (ch->pcdata->learned[gsn_galicgun] > 0)
     {
       send_to_char("You already know everything about Galic Gun.\n\r", ch);
       return;
     }
     if ( ch->exp < 85000000 )
     {
       send_to_char("You're not ready to learn Galic Gun.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_galicgun] = 15;
     send_to_char("You practice Galic Gun.\n\r", ch);
     act( AT_WHITE, "$n practices Galic Gun.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "scatter" ) && (IS_NAMEK(ch) || IS_MUTANT(ch)))
   {
     if (ch->pcdata->learned[gsn_scattershot] > 0)
     {
       send_to_char("You already know everything about Scattershot.\n\r", ch);
       return;
     }
     if ( ch->exp < 55000000 )
     {
       send_to_char("You're not ready to learn Scattershot.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_scattershot] = 15;
     send_to_char("You practice Scattershot.\n\r", ch);
     act( AT_WHITE, "$n practices Scattershot.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "secondaryskill" ) && (IS_MUTANT(ch)))
   {
     if (ch->pcdata->learned[gsn_secondary_skill] > 0)
     {
       send_to_char("You already know everything about Secondary Skill.\n\r", ch);
       return;
     }
     if ( ch->exp < 85000000 )
     {
       send_to_char("You're not ready to learn Secondary Skill.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_secondary_skill] = 15;
     send_to_char("You practice Secondary Skill.\n\r", ch);
     act( AT_WHITE, "$n practices Secondary Skill.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "primarytechnique" ) && (IS_BIODROID(ch)))
   {
     if (ch->pcdata->learned[gsn_primaryattack] > 0)
     {
       send_to_char("You already know everything about Primary Technique.\n\r", ch);
       return;
     }
     if ( ch->exp < 70000000 )
     {
       send_to_char("You're not ready to learn Primary Technique.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_primaryattack] = 15;
     send_to_char("You practice Primary Technique.\n\r", ch);
     act( AT_WHITE, "$n practices Primary Technique.", ch, NULL, NULL, TO_ROOM );
   }
   else if ( !str_cmp( arg1, "primaryskill" ) && (IS_MUTANT(ch)))
   {
     if (ch->pcdata->learned[gsn_primary_skill] > 0)
     {
       send_to_char("You already know everything about Primary skill.\n\r", ch);
       return;
     }
     if ( ch->exp < 1500000 )
     {
       send_to_char("You're not ready to learn Primary Skill.\n\r", ch);
       return;
     }
     ch->pcdata->learned[gsn_primary_skill] = 15;
     send_to_char("You practice Primary Skill.\n\r", ch);
     act( AT_WHITE, "$n practices Primary Skill.", ch, NULL, NULL, TO_ROOM );
   }
   else
   {
    send_to_char("You're not ready to learn that yet.\n\r", ch);
    return;
   }
  ch->practice -= 1;
} */

/* void do_practice( CHAR_DATA *ch, char *argument )
{
    char              arg1[MAX_INPUT_LENGTH];

   if ( IS_NPC(ch) )
     return;

   argument = one_argument( argument, arg1 );

   if ( arg1[0] == '\0' )
   {
     ch_printf( ch,"\n\r&z------------------------------[ &wSkills&z ]------------------------------\n\r");
     ch_printf( ch,"\n\r  &cChikara 1  &z[&w%3d&W%%&z]  &c        Chikara 2 &z[&w%3d&W%%&z]&c        Chikara 3 &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_chikone], ch->pcdata->learned[gsn_chiktwo], ch->pcdata->learned[gsn_chikthree] );
     ch_printf( ch,"\n\r  &cChikara 4  &z[&w%3d&W%%&z]  &c           Charge &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_chikfour], ch->pcdata->learned[gsn_charge] );
     ch_printf( ch,"\n\r  &c    Sense  &z[&w%3d&W%%&z]  &c    Second Attack &z[&w%3d&W%%&z]&c           Direct &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_sense], ch->pcdata->learned[gsn_second_attack], ch->pcdata->learned[gsn_direct] );
     ch_printf( ch,"\n\r  &c     Kick  &z[&w%3d&W%%&z]  &c            Punch &z[&w%3d&W%%&z]&c            Blast &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_kick], ch->pcdata->learned[gsn_punch], ch->pcdata->learned[gsn_blast] );
     ch_printf( ch,"\n\r  &c      Aid  &z[&w%3d&W%%&z]  &c         Suppress &z[&w%3d&W%%&z]&c              Fly &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_aid], ch->pcdata->learned[gsn_suppress], ch->pcdata->learned[gsn_fly]);
     ch_printf( ch,"\n\r  &c       IT  &z[&w%3d&W%%&z]  &c        Blastdoor &z[&w%3d&W%%&z]&c          Extract &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_instant], ch->pcdata->learned[gsn_blastdoor], ch->pcdata->learned[gsn_extract] );
     ch_printf( ch,"\n\r  &cEnergyball &z[&w%3d&W%%&z]  &cBattle Experience &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_energyball], ch->pcdata->learned[gsn_be] );
     ch_printf( ch,"\n\r");
     ch_printf( ch,"\n\r&z-----------------------------[ &wAbilities&z ]-----------------------------\n\r");
    if (IS_BIODROID(ch))
    {
     ch_printf( ch,"\n\r &c       SBC &z[&w%3d&W%%&z]&c        PrimaryTech &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_sbc], ch->pcdata->learned[gsn_primaryattack] );
     ch_printf( ch,"\n\r &c      Heal &z[&w%3d&W%%&z]&c         Kamehameha &z[&w%3d&W%%&z]&c       Fingerbeam &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_heal], ch->pcdata->learned[gsn_kame], ch->pcdata->learned[gsn_fingerbeam] );
     ch_printf( ch,"\n\r &c    Absorb &z[&w%3d&W%%&z]&c         Regenerate &z[&w%3d&W%%&z]&c             Grip &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_absorb], ch->pcdata->learned[gsn_regen], ch->pcdata->learned[gsn_grip] );
    }
    else if (IS_ANDROID(ch))
    {
     ch_printf( ch,"\n\r&c Fingerbeam &z[&w%3d&W%%&z]&c      
Super Android &z[&w%3d&W%%&z]     &cGrip &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_fingerbeam], ch->pcdata->learned[gsn_accelerate], ch->pcdata->learned[gsn_grip] );
     ch_printf( ch,"\n\r&c     Absorb &z[&w%3d&W%%&z]&c            Eyebeam &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_absorb], ch->pcdata->learned[gsn_eyebeam] );
    }
    else if (IS_HALFBREED(ch))
    {
     ch_printf( ch,"\n\r&c    Masenko &z[&w%3d&W%%&z] &c        Kamehameha &z[&w%3d&W%%&z]&c     Energy Barrier &z[&w%d&w%%&z]", ch->pcdata->learned[gsn_masenko], ch->pcdata->learned[gsn_kame], ch->pcdata->learned[gsn_ebar] );
     ch_printf( ch,"\n\r&c     Mystic &z[&w%3d&W%%&z] &c           Kaioken &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_mystic], ch->pcdata->learned[gsn_kaioken] );
    }
    else if (IS_HUMAN(ch))
    {
     ch_printf( ch,"\n\r&c    Tribeam &z[&w%3d&W%%&z]&c        Doublepunch &z[&w%3d&W%%&z]&c       Doublekick &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_tribeam], ch->pcdata->learned[gsn_doublepunch], ch->pcdata->learned[gsn_doublekick] );
     ch_printf( ch,"\n\r&cEnergy Disk &z[&w%3d&W%%&z]&c     Energy Barrier &z[&w%3d&W%%&z]&c      Super Human &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_destructo], ch->pcdata->learned[gsn_ebar], ch->pcdata->learned[gsn_superhuman] );
     ch_printf( ch,"\n\r&cKamehameha  &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_kame] ); 
    }
    else if (IS_ICER(ch))
    {
     ch_printf( ch,"\n\r&c Fingerbeam &z[&w%3d&W%%&z]&c Dual Destructo Dis &z[&w%3d&W%%&z]&c Red Destructo Disk &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_fingerbeam], ch->pcdata->learned[gsn_ddd], ch->pcdata->learned[gsn_destructo] );
     ch_printf( ch,"\n\r&c       Tail &z[&w%3d&W%%&z]&c       Mental Throw&z [&w%3d&W%%&z]", ch->pcdata->learned[gsn_claw], ch->pcdata->learned[gsn_mentalthrow] );
    }
    else if (IS_NAMEK(ch))
    {
     ch_printf( ch,"\n\r&c       Heal &z[&w%3d&W%%&z]&c        Scattershot &z[&w%3d&W%%&z]&c   Energy Barrier &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_heal], ch->pcdata->learned[gsn_scattershot], ch->pcdata->learned[gsn_ebar] );
     ch_printf( ch,"\n\r&c        SBC &z[&w%3d&W%%&z]&c      Energy Sphere &z[&w%3d&W%%&z]&c       Split Form &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_sbc], ch->pcdata->learned[gsn_energysphere], ch->pcdata->learned[gsn_split] );
    }
    else if (IS_MUTANT(ch))
    {
     ch_printf( ch,"\n\r&c       Claw &z[&w%3d&W%%&z]&c       Scattershot &z[&w%3d&W%%&z]&c    Primary Skill &z[&w%3d&W%%&z]&R", ch->pcdata->learned[gsn_claw], ch->pcdata->learned[gsn_scattershot], ch->pcdata->learned[gsn_primary_skill] );
     ch_printf( ch,"\n\r&cEnergy Barrier &z[&w%3d&W%%&z]&c Secondary Skill &z[&w%3d&W%%&z]&c", ch->pcdata->learned[gsn_ebar], ch->pcdata->learned[gsn_secondary_skill] );
    }
    else if (IS_SAIYAN(ch))
    {
     ch_printf( ch,"\n\r&c    Kaioken &z[&w%3d&W%%&z]&c         Kamehameha &z[&w%3d&W%%&z]&c       Regenerate &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_kaioken], ch->pcdata->learned[gsn_kame], ch->pcdata->learned[gsn_regen] );
     ch_printf( ch,"\n\r&c  Galic Gun &z[&w%3d&W%%&z]", ch->pcdata->learned[gsn_galicgun] );
    }
     ch_printf( ch,"\n\r\n\r&z-----------------------------------------------------------------------\n\r");
     ch_printf( ch,"&wYou have &z%d&w practice sessions left.\n\r", ch->practice);
     ch_printf( ch,"&wYou have &z%d&w attribute training sessions left.\n\r", ch->train);
   }
  else
   {
     do_learn(ch, arg1);
     return;
   }
} */

void do_practice( CHAR_DATA *ch, char *argument )
{
   int sn, col, col2;
   col = col2 = 0;
   if ( IS_NPC(ch))
   {
      send_to_char( "Huh?\n\r", ch);
      return;
   }
   if ( argument[0] == '\0' )
   {
     ch_printf( ch,"\n\r&B-----------------------------------[ &wSkills&B &B]----------------------------------&w\n\r\n\r");
     for ( sn = 0; sn < top_sn; sn++ )
     {
        sh_int lasttype;

        lasttype = SKILL_SSKILL;

          if ( skill_table[sn]->type != lasttype )
          continue;

      if ( skill_table[sn]->name )
      {
       col++;
       ch_printf(ch, " &B%17.17s  &w%3d%%", skill_table[sn]->name, ch->pcdata->learned[sn] );
      }

      if ( col >= 3 )
      {
       ch_printf(ch, "\n\r");
       col = 0;
       }
     }
     ch_printf( ch,"\n\r\n\r&B---------------------------------[ &wAbilities &B]---------------------------------&w\n\r\n\r");
/*     for ( sn = 0; sn < top_sn; sn++ )
     {
      if ( col2 >= 3 )
      {
       ch_printf(ch, "\n\r");
       col2 = 0;
      }

      if ( skill_table[sn]->name )
      {
       if ( can_userace( ch, sn ) == FALSE )
       continue;
       col2++;
       ch_printf(ch, " &B%17.17s  &w%3d%%", skill_table[sn]->name, ch->pcdata->learned[sn] );
      }
     } */
     for ( sn = 0; sn < top_sn; sn++ )
     {
        sh_int lasttype3;

        lasttype3 = SKILL_ASKILL;

          if ( skill_table[sn]->type != lasttype3 )
          continue;

      if ( skill_table[sn]->name )
      {
       if ( can_userace( ch, sn ) == FALSE )
       continue;

       col++;
       ch_printf(ch, " &B%17.17s  &w%3d%%", skill_table[sn]->name, ch->pcdata->learned[sn] );
      }

      if ( col >= 3 )
      {
       ch_printf(ch, "\n\r");
       col = 0;
       }
     }
/*     ch_printf( ch,"\n\r\n\r&B----------------------------------[ &wRacial 
&B]-----------------------------------&w\n\r\n\r");
     for ( sn = 0; sn < top_sn; sn++ )
     {
        sh_int lasttype2;

        lasttype2 = SKILL_RSKILL;

          if ( skill_table[sn]->type != lasttype2 )
          continue;

       if ( can_usepl( ch, sn ) == FALSE )
       continue;

      if ( skill_table[sn]->name )
      {
       col++;
       ch_printf(ch, " &B%17.17s", skill_table[sn]->name );
      }

      if ( col >= 3 )
      {
       ch_printf(ch, "\n\r");
       col = 0;
       }
     } */
     ch_printf( ch,"\n\r\n\r&B-------------------------------------------------------------------------------\n\r");
     ch_printf( ch,"&BYou have &w%d &Battribute training sessions left.\n\r", ch->train);
     ch_printf( ch,"&BYou have &w%d&B practice sessions left.\n\r", ch->practice);
   }
   else
   {
     do_learn(ch, argument);
     return;
   }

}

void do_cuttail( CHAR_DATA *ch, char *argument)
{

   if (!xIS_SET(ch->act, PLR_TAIL))
   {
    send_to_char( "You don't have a tail.\n\r", ch );
    return;
   }
   if (IS_ICER(ch))
   {
    send_to_char( "You can't do that to your tail.\n\r", ch );
    return;
   }

   if (ch->position == POS_RESTING || ch->position == POS_SITTING )
   {
    send_to_char( "Stand up first.\n\r", ch);
    return;
   }
   if (!IS_AWAKE(ch))
   {
    send_to_char( "You're sleeping!\n\r", ch);
    return;
   }
   send_to_char("You grab ahold of your tail and rip it out!\n\r", ch);
   act(AT_RED,"$n grabs ahold of there tail and rips it out!", ch, NULL, NULL, TO_CANSEE);
   xREMOVE_BIT(ch->act, PLR_TAIL);

   if (xIS_SET(ch->act, PLR_OOZARU))
   {
    send_to_char("As you cut your tail, you lose your power of Oozaru!\n\r", ch);
    act(AT_RED,"As $n finishes ripping there tail off as they lose there Oozaru transformation!", ch, NULL, NULL,TO_CANSEE);
    ch->mod = 1;
    ch->height_mod = 0;
    ch->weight_mod = 0;
    ch->mod_str = 0;
    ch->mod_dex = 0;
    ch->mod_lck = 0;
    ch->mod_int = 0;
    xREMOVE_BIT(ch->act, PLR_OOZARU);
    return;
}
}



void do_growtail( CHAR_DATA *ch, char *argument )
{
 if (CAN_TAIL(ch))
 {
  if (!xIS_SET(ch->act, PLR_TAIL))
  {
   xSET_BIT(ch->act, PLR_TAIL);
   send_to_char( "&OYour tail grows back.&D\n\r", ch);
  }
 }
}

bool not_transformed(CHAR_DATA *ch)
{
   if( IS_NPC(ch) ) return FALSE;

if(xIS_SET( ch->act,  PLR_USSJ ) ) return FALSE;
if(xIS_SET( ch->act,  PLR_MUTATE2 ) ) return FALSE;
if(xIS_SET( ch->act,  PLR_MUTATE3) ) return FALSE;
if(xIS_SET( ch->act,  PLR_MUTATE4) ) return FALSE;
if(xIS_SET( ch->act,  PLR_SNAMEK) ) return FALSE;
if(xIS_SET( ch->act,  PLR_OOZARU) ) return FALSE;
if(xIS_SET( ch->act,  PLR_MYSTIC) ) return FALSE;
if(xIS_SET( ch->act,  PLR_KAIOKEN) ) return FALSE;
if(xIS_SET( ch->act,  PLR_SSJ1) ) return FALSE;
if(xIS_SET( ch->act,  PLR_SSJ2) ) return FALSE;
if(xIS_SET( ch->act,  PLR_SSJ3) ) return FALSE;
if(xIS_SET( ch->act,  PLR_SSJ4) ) return FALSE;
if(xIS_SET( ch->act,  PLR_TRANSFORM2) ) return FALSE;
if(xIS_SET( ch->act,  PLR_TRANSFORM3 ) ) return FALSE;
if(xIS_SET( ch->act,  PLR_TRANSFORM4) ) return FALSE;
if(xIS_SET( ch->act,  PLR_TRANSFORM5) ) return FALSE;

return TRUE;
}

void do_powerdown(CHAR_DATA* ch, char* argument)
{
     char pdown_msg[256] = "&BYou close your eyes and release your breath as your aura fades and your incredible strength returns to normal.\n\r ";

     if(IS_NPC(ch)) return;

     if(!IS_AWAKE(ch))
     {
          send_to_char("You're asleep...\n\r", ch);
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP7))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP7);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP6))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP6);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP5))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP5);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP4))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP4);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP3))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP3);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP2))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP2);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_POWERUP1))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_POWERUP1);
          ch->mod = 1;
          return;
     }
     if(xIS_SET(ch->act, PLR_ACCELERATE))
     {
          send_to_char(pdown_msg, ch);
          xREMOVE_BIT(ch->act, PLR_ACCELERATE);
          ch->mod = 1;
          ch->mod_str = 0;
          ch->mod_dex = 0;
          ch->mod_int = 0;
          ch->mod_lck = 0;
          ch->mod_con = 0;
          ch->mod_lck = 0;
          return;
     }

     send_to_char("You're not powered up.\n\r", ch);
}

OBJ_DATA *carrying_dball( CHAR_DATA *ch )
{
    OBJ_DATA *obj, *obj_next;
    for( obj = ch->first_carrying; obj != NULL ; obj = obj_next )
    {
        obj_next = obj->next_content;
        if( obj->item_type == ITEM_DRAGONBALL )
        {
            return obj;
        }
    }
    return NULL;
}

bool seven_dballs_here( CHAR_DATA *ch, char *planet )
{
    OBJ_DATA *obj;
    bool onestar = FALSE;
    bool twostar = FALSE;
    bool threestar = FALSE;
    bool fourstar = FALSE;
    bool fivestar = FALSE;
    bool sixstar = FALSE;
    bool sevenstar = FALSE;

    if( !str_cmp(planet,"earth") )
    {
        if( (obj = get_obj_vnum_room(ch,51)) != NULL )
          onestar = TRUE;
        if( (obj = get_obj_vnum_room(ch,52)) != NULL )
          twostar = TRUE;
        if( (obj = get_obj_vnum_room(ch,53)) != NULL )
          threestar = TRUE;
        if( (obj = get_obj_vnum_room(ch,54)) != NULL )
          fourstar = TRUE;
        if( (obj = get_obj_vnum_room(ch,55)) != NULL )
          fivestar = TRUE;
        if( (obj = get_obj_vnum_room(ch,56)) != NULL )
          sixstar = TRUE;
        if( (obj = get_obj_vnum_room(ch,57)) != NULL )
          sevenstar = TRUE;

        if( onestar && twostar && threestar && fourstar &&
            fivestar && sixstar && sevenstar )
          return TRUE;
        else
          return FALSE;
    }

    return FALSE;
}

void do_grant( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];

    if( IS_NPC(ch) )
        return;

    if( summon_state != SUMMON_NONE1 )
     {
        ch_printf(ch,"How can you make a wish without the Eternal Dragon summoned?\n\r");
        return;
    }

    if( argument[0] == '\0' )
    {
        ch_printf(ch,"\n\rSyntax: grant (option)\n\r");
        ch_printf(ch,"\n\rOption has to be one of the following:\n\r");
        ch_printf(ch,"gold power bless\n\r");
        return;
    }

    if( !str_cmp(argument,"finish") )
    {
        summon_state = SUMMON_LEAVE1;
        return;
    }

    else if( !str_cmp(argument,"gold") )
    {
        ch->gold += 4000000;
        sprintf( buf, "&z[&WDBZU&z]&C %s&W has wished for wealth!&D", ch->name );
        talk_info( AT_BLUE, buf );
        summon_state = SUMMON_LEAVE1;
        return;
    }

    else if( !str_cmp(argument,"power") )
    {
        ch->exp += ch->exp / 25;
        sprintf( buf, "&z[&WDBZU&z]&C %s&W has wished for power!&D", ch->name );
        talk_info( AT_BLUE, buf );
        summon_state = SUMMON_LEAVE1;
        return;
    }

    else if( !str_cmp(argument,"bless") )
    {
        ch->pcdata->quest_curr += 2;
        ch->pcdata->quest_accum += 2;
        sprintf( buf, "&z[&WDBZU&z]&C %s&W has wished to be blessed by the gods!&D", ch->name );
        talk_info( AT_BLUE, buf );
        summon_state = SUMMON_LEAVE1;
        return;
    }

/*    else if( !str_cmp(argument,"spacepod") )
    {
        sprintf( buf, "&z[&WDBZU&z]&C %s&W has wished to have a personal spacepod!&D", ch->name );
        talk_info( AT_BLUE, buf );
        summon_state = SUMMON_LEAVE1;
        return;
    } */

    return;
}

void do_dragonball( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *vch;
  CHAR_DATA *vch_next;
  char buf[MAX_STRING_LENGTH];
   int value;
   char arg[MAX_STRING_LENGTH];
   argument = one_argument( argument, arg );

   if ( arg[0] == '\0' )
   {
      send_to_char("\n\r&wSyntax: Handle <field> <value>\n\r", ch);
      send_to_char("  Field being one of:\n\r\n\r", ch);
      send_to_char("  db, db2, db3, kitimer, mobileupdate, search_boost, reset_sector,\n\r", ch);
      send_to_char("  add_income, scatter, start_ctf, end_ctf, start_koth, end_koth, find_fighters, moonphase,\n\r", ch);
      send_to_char("  space_update, moon_update, char_update, db_update, time_update,\n\r", ch);
      send_to_char("  shuttle_update, webclan, webwho, webwizlist, webchanges\n\r", ch);

      return;
   }

   if (!str_cmp(arg, "time_update"))
   {
     time_update();
     ch_printf( ch, "\n\rUpdating Time...&w\n\r");
     return;
   }

   if (!str_cmp(arg, "demoon"))
   {
        for ( vch = first_char; vch; vch = vch_next )
        {
            vch_next = vch->next;

            if ( !IS_NPC( vch ) )
            {
               if ( ( IS_SAIYAN(vch) || IS_HALFBREED(vch) ) && xIS_SET(vch->act, PLR_OOZARU) )
               untransform_oozaru(vch);
            }
        }
      moon_state = MOON_NONE;
     ch_printf( ch, "\n\rArtificial moon destroyed.&w\n\r");
        sprintf( buf, "&z[&WDBZU&z]&C %s&W sends a ki blast at the moon, destroying it!!!!&D", ch->name );
        talk_info( AT_BLUE, buf );
     return;
   }

   if (!str_cmp(arg, "moon"))
   {
        for ( vch = first_char; vch; vch = vch_next )
        {
            vch_next = vch->next;

            if ( !IS_NPC( vch ) )
            {
               if ( ( IS_SAIYAN(vch) || IS_HALFBREED(vch) ) && !xIS_SET(vch->act, PLR_OOZARU) )
               transform_oozaru(vch);
            }
        }
        moon_state = MOON_FULL;
        sprintf( buf, "&z[&WDBZU&z]&C %s&W throws a glowing ball of light into the sky!&D", ch->name );
        talk_info( AT_BLUE, buf );
     ch_printf( ch, "\n\rArtificial moon created.&w\n\r");
     return;
   }

   if (!str_cmp(arg, "doublegains"))
   {

        if ( game_state == GAME_DOUBLE )
        {
        game_state = GAME_NONE;
        sprintf( buf, "&z[&WDBBZV&z]&w %s&W pulls the plug on the PL machine!&D",ch->name );
        talk_info( AT_BLUE, buf );
        ch_printf( ch, "\n\rPL gains now set to single.&w\n\r");
        return;
        }
        game_state = GAME_DOUBLE;
        sprintf( buf, "&z[&WDBBZV&z]&w %s&W inserts a coin into the nearest PL machine, your gains have doubled!&D", ch->name );
        talk_info( AT_BLUE, buf );
        ch_printf( ch, "\n\rPL gains now doubled.&w\n\r");
        return;
   }

   if (!str_cmp(arg, "stunwars"))
   {

        if ( game_state == GAME_STUNWARS )
        {
        game_state = GAME_NONE;
        sprintf( buf, "&z[&WDBZU&z]&C STUNWARS has officially ended! Players stuncounters have been reset!&D" );
        talk_info( AT_BLUE, buf );
        ch_printf( ch, "\n\rStunwars Ends. Players stuncounters have been reset!&w\n\r");
        for ( vch = first_char; vch; vch = vch_next )
        {
            vch_next = vch->next;

            if ( !IS_NPC( vch ) )
            {
               vch->stuns = 0;
            }
        }

        return;
        }
        game_state = GAME_STUNWARS;
        sprintf( buf, "&z[&WDBZU&z]&C A Game of STUNWARS has begun!&D" );
        talk_info( AT_BLUE, buf );
        ch_printf( ch, "\n\rStunwars Begins.&w\n\r");
        return;
   }

   if (!str_cmp(arg, "char_update"))
   {
     char_update();
     ch_printf( ch, "\n\rUpdating in MUD characters...&w\n\r");
     return;
   }

}

char *itoa(int foo)
{
  static char bar[256];

  sprintf(bar,"%d",foo);
  return(bar);
}
void add_letter( char *string, char letter)
{
  char buf[MAX_INPUT_LENGTH];

  sprintf(buf, "%c", letter);
  strcat(string, buf);
  return;
}


char *number_sign( char *txt, int num )
{
  static char newstring[MAX_INPUT_LENGTH];
  int i;

  if ( !txt)
    return "";

  newstring[0] = '\0';
  for ( i = 0; txt[i] != '\0'; i++ )
  {
     if (txt[i] == '#')
       strcat(newstring, itoa(num));
     else
      add_letter(newstring, txt[i]);
  }
  return newstring;
}

void do_loop( CHAR_DATA *ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];
    int start, stop, x;

    if ( argument[0] == '\0' )
    {
        send_to_char( "Syntax: loop <start> <end> <command>   \n\r", ch );
        return;
    }
    argument = one_argument( argument, arg );

    if ( (start = atoi(arg)) < 0)
    {
      if (!is_number(arg))
      return;

        send_to_char( "You must start on a zero or higher.\n\r", ch );
        return;
    }
    argument = one_argument( argument, arg );

    if ((stop= atoi(arg)) <= start)
    {
      if (!is_number(arg))
      return;
        ch_printf( ch, "You must stop at a point higher than you've started. %d is %s than %d.\n\r", stop, stop == start ? "equal to" : "less than", start );
        return;
    }

    for ( x = start; x <= stop; x++ )
     interpret( ch, number_sign(argument, x) );
}


void do_dbscatter( CHAR_DATA *ch , char *argument )
{
    char arg1[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char arg3[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];
    CHAR_DATA *victim;
    AREA_DATA *tarea;
    int count, created;
    bool found=FALSE;
    MOB_INDEX_DATA *pMobIndex;
    OBJ_INDEX_DATA *pObjIndex;
    ROOM_INDEX_DATA *location;
    ROOM_INDEX_DATA *location2;
    ROOM_INDEX_DATA *location3;
    ROOM_INDEX_DATA *location4;
    ROOM_INDEX_DATA *location5;
    ROOM_INDEX_DATA *location6;
    ROOM_INDEX_DATA *location7;
    OBJ_DATA *obj;
    
    int set1, set2;

    argument = one_argument( argument, arg1 );
    argument = one_argument( argument, arg2 );
    count = atoi( arg2 );
    if ( arg1[0] == '\0' )
    {
	send_to_char( "dbscatter <area>\n\r", ch );
	return;
    }
    for ( tarea = first_area; tarea; tarea = tarea->next )
	if ( !str_cmp( tarea->filename, arg1 ) )
	{
	  found = TRUE;
	  break;
	}

    if ( !found )
    {
	send_to_char( "Area not found.\n\r", ch );
	return;
    }

    if ( found )
    {

        set1 = tarea->low_r_vnum;
        set2 = tarea->hi_r_vnum;


/*        obj = create_object( get_obj_index(51), 1 );
        location = get_room_index( number_range(set1, set2) );
        if ( location == NULL )
        return;
        obj_to_room( obj, location );
        obj = create_object( get_obj_index(52), 1 );
        location2 = get_room_index( number_range(set1, set2) );
        obj_to_room( obj, location2 );
        obj = create_object( get_obj_index(53), 1 );
        location3 = get_room_index( number_range(set1, set2) );
        obj_to_room( obj, location3 );
        obj = create_object( get_obj_index(54), 1 );
        location4 = get_room_index( number_range(set1, set2 ) );
        obj_to_room( obj, location4 );
        obj = create_object( get_obj_index(55), 1 );
        location5 = get_room_index(number_range(set1, set2) );
        obj_to_room( obj, location5 );
        obj = create_object( get_obj_index(56), 1 );
        location6 = get_room_index(number_range( set1, set2) );
        obj_to_room( obj, location6 );
        obj = create_object( get_obj_index(57), 1 );
        location7 = get_room_index(number_range(set1, set2) );
        obj_to_room( obj, location7 ); */

        location = get_room_index( number_range(set1, set2) );
        location2 = get_room_index( number_range(set1, set2) );
        location3 = get_room_index( number_range(set1, set2) );
        location4 = get_room_index( number_range(set1, set2 ) );
        location5 = get_room_index(number_range(set1, set2) );
        location6 = get_room_index(number_range( set1, set2) );
        location7 = get_room_index(number_range(set1, set2) );

        if ( location == NULL )
        {
        send_to_char( "FATAL ERROR: Contact Cell, area needs to be fixed!\n\r", ch );
        return;
        }        
        if ( location2 == NULL )
        {
        send_to_char( "FATAL ERROR: Contact cell, area needs to be fixed!\n\r", ch );
        return;
        }
        if ( location3 == NULL )
        {
        send_to_char( "FATAL ERROR: Contact Cell, area needs to be fixed!\n\r", ch );
        return;
        }
        if ( location4 == NULL )
        {
        send_to_char( "FATAL ERROR: Contact Cell, area needs to be fixed!\n\r", ch );
        return;
        }
        if ( location5 == NULL )
        {
        send_to_char( "FATAL ERROR: Contact Cell, area needs to be fixed!\n\r", ch );
        return;
        }
        if ( location6 == NULL )
        {
        send_to_char( "FATAL ERROR: Contact Cell, area needs to be fixed!\n\r", ch );
        return;
        }
        if ( location7 == NULL )
        {
        send_to_char( "FATAL ERROR: Contact Cell, area needs to be fixed!\n\r", ch );
        return;
        }

        obj = create_object( get_obj_index(51), 1 );
        obj_to_room( obj, location );
        obj = create_object( get_obj_index(52), 1 );
        obj_to_room( obj, location2 );
        obj = create_object( get_obj_index(53), 1 );
        obj_to_room( obj, location3 );
        obj = create_object( get_obj_index(54), 1 );
        obj_to_room( obj, location4 );
        obj = create_object( get_obj_index(55), 1 );
        obj_to_room( obj, location5 );
        obj = create_object( get_obj_index(56), 1 );
        obj_to_room( obj, location6 );
        obj = create_object( get_obj_index(57), 1 );
        obj_to_room( obj, location7 ); 


	send_to_char( "The scatter was successful!\n\r", ch );
        sprintf( buf, "&z[&WDBZU&z]&W The dragonballs have been scattered across %s!&D", tarea->name );
        talk_info( AT_BLUE, buf );
        return;
    }

}

void do_summon( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    /*CHAR_DATA *dragon;
    MOB_INDEX_DATA *pMobIndex;*/
    char buf[MAX_STRING_LENGTH];
    OBJ_DATA *obj;

    if( IS_NPC(ch) )
        return;

    if( summon_state != SUMMON_NONE )
    {
        ch_printf(ch,"A dragon is already being summoned!\n\r");
        return;
    }
    if( summon_room != NULL || summon_area != NULL )
    {
        ch_printf(ch,"A dragon is already summoned somewhere else.\n\r");
        return;
    }

    if( argument[0] == '\0' )
    {
        ch_printf(ch,"\n\rSyntax: summon <dragon>\n\r");
        ch_printf(ch,"\n\rDragon has to be one of the following:\n\r");
        ch_printf(ch,"shenron\n\r");
        return;
    }
    if( xIS_SET(ch->in_room->room_flags, ROOM_SAFE) )
    {
        ch_printf(ch,"You can't summon the dragon in a safe room.\n\r");
        return;
    }

    if( !str_cmp(argument,"shenron") )
    {
        if( !seven_dballs_here(ch,"earth") )
        {
          ch_printf(ch,"\n\r&RAll seven dragonballs must be here on the ground for you to be able to summon the dragon.\n\r" );
          return;
        }

        summon_state = SUMMON_SKY1;
        summon_area = ch->in_room->area;
        summon_room = ch->in_room;

        sprintf(buf,"%s has summoned the eternal dragon Shenron at room %d",
                ch->name, ch->in_room->vnum );
        to_channel( buf, CHANNEL_MONITOR, "Monitor", LEVEL_IMMORTAL );
        sprintf( buf, "&z[&WDBZU&z]&W %s has summoned the eternal dragon Shenron!&D", ch->name );
        talk_info( AT_BLUE, buf );

        if( (obj = get_obj_vnum_room(ch,51)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);
        if( (obj = get_obj_vnum_room(ch,52)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);
        if( (obj = get_obj_vnum_room(ch,53)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);
        if( (obj = get_obj_vnum_room(ch,54)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);
        if( (obj = get_obj_vnum_room(ch,55)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);
        if( (obj = get_obj_vnum_room(ch,56)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);
        if( (obj = get_obj_vnum_room(ch,57)) != NULL )
          REMOVE_BIT(obj->wear_flags,ITEM_TAKE);

        xSET_BIT(summon_room->room_flags, ROOM_SAFE);
        return;
    }
    do_summon(ch,"");
}





/* void do_sense( CHAR_DATA *ch, char *argument )
{
    ROOM_INDEX_DATA *was_in_room;
    EXIT_DATA *pexit;
    sh_int dir = -1;
    sh_int dist;
    sh_int max_dist = 8;
    bool found = FALSE;

    set_char_color( AT_ACTION, ch );

  if (ch->pcdata->learned[gsn_sense] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }

   if ( ch->position < POS_SLEEPING )
   {
        send_to_char("You can't do that while sleeping!\n\r", ch);
        return;
   }

    if ( argument[0] == '\0' )
    {
        was_in_room = ch->in_room;

        for(dir = 0; dir < 10; ++dir)
        {
             if((pexit = get_exit(ch->in_room, dir)) == NULL) continue;

             if(IS_SET(pexit->exit_info, EX_CLOSED) || IS_SET(pexit->exit_info, EX_SECRET)
                  || IS_SET(pexit->exit_info, EX_DIG)) break;

             if(room_is_private(pexit->to_room) && ch->level < LEVEL_GREATER) break;

             char_from_room(ch);
             char_to_room(ch, pexit->to_room);

             if(ch == ch->in_room->first_person) break;
             set_char_color( AT_YELLOW, ch );
             send_to_char( ch->in_room->name, ch );
             send_to_char( "\n\r", ch );
             send_to_char("You pick up the ", ch);
             if(ch->in_room->first_person->exp > ch->exp) send_to_char("&Rstrong&Y", ch);
             else send_to_char("&bfaint&Y", ch);
             send_to_char(" powerlevel of ", ch);
             send_to_char(ch->in_room->first_person->name, ch);
             send_to_char("\n\r", ch);
             found = TRUE;
         }
         if(!found)send_to_char("You can't sense any powerlevels nearby.\n\r", ch);
         char_from_room(ch);

         char_to_room(ch, was_in_room);

         return;
    }
    if ( ( dir = get_door( argument ) ) == -1 )
    {
        send_to_char( "Sense in WHAT direction?\n\r", ch );
        return;
    }
   if ( ch->position < POS_SLEEPING )
   {
        send_to_char("You can't do that while sleeping!\n\r", ch);
        return;
   }

    was_in_room = ch->in_room;
    act( AT_GREY, "Sensing $t...", ch, dir_name[dir], NULL, TO_CHAR );
    act( AT_GREY, "$n senses $t.", ch, dir_name[dir], NULL, TO_ROOM );

    if ( !can_use_skill(ch, number_percent(), gsn_sense ) )
    {
        act( AT_GREY, "You can't pick up any more powerlevels coming from $t.", ch,
            dir_name[dir], NULL, TO_CHAR );
        learn_from_failure( ch, gsn_sense );
        return;
    }

    if ( ( pexit = get_exit( ch->in_room, dir ) ) == NULL )
    {
        act( AT_GREY, "You can't see $t.", ch, dir_name[dir], NULL, TO_CHAR );
        return;
    }

    for ( dist = 1; dist <= max_dist; )
    {
        if ( IS_SET(pexit->exit_info, EX_CLOSED) )
        {
            if ( IS_SET(pexit->exit_info, EX_SECRET)
            ||   IS_SET(pexit->exit_info, EX_DIG) )
                act( AT_GREY, "Your cant sense $t any further.", ch,
                    dir_name[dir], NULL, TO_CHAR );
            else
                act( AT_GREY, "Your cant sense $t any further.", ch,
                    dir_name[dir], NULL, TO_CHAR );
            break;
        }
        if ( room_is_private( pexit->to_room )

        &&   ch->level < LEVEL_GREATER )
        {
            act( AT_GREY, "Your cant sense $t any further.", ch,
                dir_name[dir], NULL, TO_CHAR );
            break;
        }
               send_to_char(dir_name[dir], ch);
               send_to_char("\n\r", ch);


        char_from_room( ch );
        char_to_room( ch, pexit->to_room );
        set_char_color( AT_YELLOW, ch );
        send_to_char( ch->in_room->name, ch );
        send_to_char( "\n\r", ch );
        show_char_to_char( ch->in_room->first_person, ch );
        switch( ch->in_room->sector_type )
        {
            default: dist++; break;
            case SECT_AIR:
                if ( number_percent() < 80 ) dist++; break;
            case SECT_INSIDE:
            case SECT_FIELD:
            case SECT_UNDERGROUND:
                dist++; break;
            case SECT_FOREST:
            case SECT_CITY:
            case SECT_DESERT:
            case SECT_HILLS:
                dist += 2; break;
            case SECT_WATER_SWIM:
            case SECT_WATER_NOSWIM:
                dist += 3; break;
            case SECT_MOUNTAIN:
            case SECT_UNDERWATER:
            case SECT_OCEANFLOOR:
                dist += 4; break;
        }
        if ( dist >= max_dist )
        {
            act( AT_GREY, "You can't pick up any more powerlevels coming from $t.", ch, dir_name[dir], NULL, TO_CHAR );
            break;
        }
        if ( ( pexit = get_exit( ch->in_room, dir ) ) == NULL )
        {
            act( AT_GREY, "You can't pick up any more powerlevels coming from $t.", ch,
                dir_name[dir], NULL, TO_CHAR );
            break;
        }
    }

    char_from_room( ch );
    char_to_room( ch, was_in_room );
    learn_from_success( ch, gsn_sense );

    return;
} */

void do_sense( CHAR_DATA *ch, char *argument )
{
    ROOM_INDEX_DATA *was_in_room;
    EXIT_DATA *pexit;
    ROOM_INDEX_DATA *location;
    CHAR_DATA *inroom;
    sh_int dir = -1;
    sh_int dist;
    sh_int max_dist = 4;
    char  buf[MAX_INPUT_LENGTH];
    char  buf2[MAX_INPUT_LENGTH];
    location = ch->in_room;

    if ( IS_NPC(ch))
    return;

  if (ch->pcdata->learned[gsn_sense] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }

   if ( !IS_AWAKE(ch) )
   {
      send_to_char("Not in your sleep...\n\r", ch);
      return;
   }

    if ( argument[0] == '\0' )
    {
   if ( ch->position < POS_SLEEPING )
   {
        send_to_char("You can't do that while sleeping!\n\r", ch);
        return;
   }

      was_in_room = ch->in_room;
      location = ch->in_room;
      send_to_char("&wScanning Surroundings...&G\n\r", ch );
      learn_from_success( ch, gsn_sense );
      for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
      {
        if ( IS_SET(pexit->exit_info, EX_CLOSED) || location == pexit->to_room )
        {
            if ( IS_SET(pexit->exit_info, EX_SECRET)
            ||   IS_SET(pexit->exit_info, EX_DIG) )
                act( AT_GREY, "Your cant sense any further.", ch,
                    NULL, NULL, TO_CHAR );
            else
                act( AT_GREY, "Your cant sense any further.", ch,
                    NULL, NULL, TO_CHAR );
            break;
        }

        char_from_room( ch );
        char_to_room( ch, pexit->to_room );
        set_char_color( AT_GREEN, ch );
        send_to_char( ch->in_room->name, ch );
        send_to_char( "\n\r", ch );
        for ( inroom = ch->in_room->first_person; inroom; inroom = inroom->next_in_room )
        {
          if (inroom == ch)
          continue;
         if ( inroom->exp < 1000000 )
         sprintf(buf2, "&Rfaint");
         else if ( inroom->exp < 5000000 )
         sprintf(buf2, "&Rweak");
         else if ( inroom->exp < 50000000 )
         sprintf(buf2, "&Rstrong");
         else
         sprintf(buf2, "&Rvery strong");

          sprintf( buf, "&YJudging from the &R%s&Y powerlevel, you think &w%s&Y is here.&w\n\r", buf2, inroom->name );
          if (!IS_ANDROID(inroom) && !xIS_SET(inroom->act, PLR_WIZINVIS) && !xIS_SET(inroom->act, ACT_MOBINVIS) )
          {
             send_to_char( buf, ch);
          }
        }
      }
      char_from_room( ch );
      char_to_room( ch, was_in_room );
      return;
    }
    else if ( ( dir = get_door( argument ) ) == -1 )
    {
        send_to_char( "Sense in WHAT direction?\n\r", ch );
        return;
    }
    else
    {
   if ( ch->position < POS_SLEEPING )
   {
        send_to_char("You can't do that while sleeping!\n\r", ch);
        return;
   }

    was_in_room = ch->in_room;
    act( AT_GREY, "You close your eyes as you sense $t...", ch, dir_name[dir], NULL, TO_CHAR );
    act( AT_GREY, "$n tries to pick up new powerlevels from $t.", ch, dir_name[dir], NULL, TO_ROOM );


    if ( ( pexit = get_exit( ch->in_room, dir ) ) == NULL )
    {
        act( AT_GREY, "You can't see $t.", ch, dir_name[dir], NULL, TO_CHAR );
        return;
    }
    if (IS_SET(pexit->exit_info, EX_SECRET))
    {
        act( AT_GREY, "You can't see $t.", ch, dir_name[dir], NULL, TO_CHAR );
        return;
    }
    for ( dist = 1; dist <= max_dist; )
    {
        if ( IS_SET(pexit->exit_info, EX_CLOSED) || location == pexit->to_room )
        {
            if ( IS_SET(pexit->exit_info, EX_SECRET)
            ||   IS_SET(pexit->exit_info, EX_DIG) )
                act( AT_GREY, "Your cant sense $t any further.", ch,
                    dir_name[dir], NULL, TO_CHAR );
            else
                act( AT_GREY, "Your cant sense $t any further.", ch,
                    dir_name[dir], NULL, TO_CHAR );
            break;
        }

        char_from_room( ch );
        char_to_room( ch, pexit->to_room );
        set_char_color(AT_GREEN, ch );
        send_to_char( ch->in_room->name, ch );
        send_to_char( "\n\r", ch );
        for ( inroom = ch->in_room->first_person; inroom; inroom = inroom->next_in_room )
        {
          if (inroom == ch)
          continue;
         if ( inroom->exp < 1000000 )
         sprintf(buf2, "&Rfaint");
         else if ( inroom->exp < 5000000 )
         sprintf(buf2, "&Rweak");
         else if ( inroom->exp < 50000000 )
         sprintf(buf2, "&Rstrong");
         else
         sprintf(buf2, "&Rvery strong");

          sprintf( buf, "&YJudging from the &R%s&Y powerlevel, you think &w%s&Y is here.&w\n\r", buf2, inroom->name );
          if (!IS_ANDROID(inroom) && !xIS_SET(inroom->act, PLR_WIZINVIS) && !xIS_SET(inroom->act, ACT_MOBINVIS) )
          {
             send_to_char( buf, ch);
          }
       }
            dist++;
        if ( dist >= max_dist )
        {
            act( AT_GREY, "You can't pick up any more powerlevels coming from $t.", ch, dir_name[dir], NULL, TO_CHAR );
            break;
        }
        if ( ( pexit = get_exit( ch->in_room, dir ) ) == NULL )
        {
            act( AT_GREY, "You can't pick up any more powerlevels coming from $t.", ch,
                dir_name[dir], NULL, TO_CHAR );
            break;
        }
    }

    char_from_room( ch );
    char_to_room( ch, was_in_room );
   }
    return;
}

void do_scan( CHAR_DATA *ch, char *argument )
{
    OBJ_DATA * eyes;
    char arg[MAX_INPUT_LENGTH];
    char buf[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    int class, classtotal;


    if ( ( eyes = get_eq_char( ch, WEAR_EYES ) ) == NULL )
    {
        send_to_char( "You don't have anything in your eyes.\n\r", ch );
        return;
    }
    if ( eyes->item_type != ITEM_SCOUTER )
    {
        send_to_char( "You can only scan a person with a scouter..\n\r", ch );
        return;
    }
    one_argument( argument, arg );
    if ( arg[0] == '\0' )
    {
        send_to_pager( "Scan who?\n\r", ch );
        return;
    }
    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
        send_to_pager( "They aren't here.\n\r", ch );
        return;
    }

          if ( eyes->value[3] == 1 )
          classtotal = 25000000;
       else  if ( eyes->value[3] == 2 )
          classtotal = 100000000;
       else  if ( eyes->value[3] == 3 )
          classtotal = 500000000;
       else  if ( eyes->value[3] == 4 )
          classtotal = 1000000000;
       else  if ( eyes->value[3] == 5 )
          classtotal = 2000000000;
        else
          classtotal = 2000000000;


//        if ( victim->exp * victim->mod  >= eyes->value[3] ) 

      if ( IS_NPC(victim) )
        {
      if ( victim->exp > classtotal )
             {
            act( AT_GREY, "Your scouter explodes from $N's powerlevel.", ch, NULL, victim, TO_CHAR );
            act( AT_GREY, "$n's scouter explodes from your powerlevel.", ch, NULL, victim, TO_VICT );
            act( AT_GREY, "$n's scouter explodes from $N's powerlevel.", ch, NULL, victim, TO_NOTVICT );
            obj_from_char( eyes );
            extract_obj( eyes );
                return;
             } 
         }

      if ( !IS_NPC(victim) )
        {
      if ( victim->exp * victim->mod >= classtotal )
             {
            act( AT_GREY, "Your scouter explodes from $N's powerlevel.", ch, NULL, victim, TO_CHAR );
            act( AT_GREY, "$n's scouter explodes from your powerlevel.", ch, NULL, victim, TO_VICT );
            act( AT_GREY, "$n's scouter explodes from $N's powerlevel.", ch, NULL, victim, TO_NOTVICT );
            obj_from_char( eyes );
            extract_obj( eyes );
                return;
             }
         }

       sprintf( buf , "&R%s presses a button on %s scouter and looks at you.&D" , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
       act( AT_GREY, buf , victim, NULL, ch, TO_CHAR );
       sprintf( buf, "&R%s presses a button on %s scouter and looks at %s.&D" , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", victim->name );
       act( AT_GREY, buf, ch, NULL, victim, TO_NOTVICT );
    if (IS_NPC(victim))
{
      ch_printf(ch,"&gIt appears that&w %s&g has a powerlevel of &G%s.\n\r", victim->name, num_punct(victim->exp));
      return;
}
      ch_printf(ch,"&gIt appears that&w %s&g has a powerlevel of &G%s.\n\r", victim->name,
      xIS_SET( victim->act, PLR_SUPPRESS ) ? num_punct(victim->suppress) : num_punct(victim->exp *victim->mod));
      if ( victim->barrier > 0 )
      ch_printf(ch,"&gThe energy barrier is an estimated &G%s&g.\n\r", num_punct(victim->barrier) );
      if ( victim->charge > 0 )
      ch_printf(ch,"&gThe energy attack is an estimated &G%sx&g their powerlevel.\n\r", num_punct(victim->charge) );
   }

void do_remember(CHAR_DATA *ch, char *argument )
{
	
	 char arg[MAX_INPUT_LENGTH];
        ROOM_INDEX_DATA *location, *in_room;
 	one_argument( argument, arg );
       int value;

   location = ch->in_room;
    if( xIS_SET(ch->in_room->room_flags, ROOM_ARENA) )
    {
        ch_printf(ch,"&YYou can't seem to keep a mental image of this room.\n\r");
        return;
    }
   if ( arg[0] == '\0')
    {
	send_to_char( "Which location to remember in?\n\r", ch );
	return;
    }
    if ( !is_number(arg) )
   {
	send_to_char("Sorry must be a number 1-6\n\r", ch );
	return;
    }

  	value = atoi( arg );
    if ( value < 1 || value > 6 )
     {
	send_to_char("Sorry must be a number 1-6\n\r", ch );
	return;
	}
         ch_printf(ch,"&YYou remember this room for later use.\n\r");
         ch->itlist[value-1] = ch->in_room->vnum;
         return;

}

void do_splitform(CHAR_DATA *ch, char *argument )
{
        char buf  [MAX_STRING_LENGTH];
        CHAR_DATA *victim;
        CHAR_DATA *och;
        MOB_INDEX_DATA *pMobIndex;
        CHAR_DATA *och_next;


        if ( IS_NPC(ch))
        {
                send_to_char( "NPC's can't do that.\n\r", ch );
                return;
        }

   if (ch->pcdata->learned[gsn_split] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }

        if( ch->mana < ch->max_mana/10 )
        {
                pager_printf_color(ch, "You don't have enough ki to use this technique.\n\r" );
                return;
        }

        if ( ( pMobIndex = get_mob_index( 82 ) ) == NULL )
        {
            bug("do_split: mob does not exist");
            send_to_char( "Hmm... Something went wrong...\n\r", ch );
            return;
        }

        if( xIS_SET( (ch)->act, PLR_SPLIT_FORM ) )
        {
                pager_printf_color(ch, "You're already split!\n\r" );
                return;
        } 

        if ( can_use_skill(ch, number_percent(),gsn_split ) )
        {
        victim = create_mobile( pMobIndex );
        char_to_room( victim, ch->in_room );
          sprintf( buf, "split%s", ch->name );
          STRFREE( victim->name );
          victim->name = STRALLOC( buf );
          STRFREE( victim->short_descr );
          victim->short_descr = STRALLOC( ch->name );
          victim->exp = ch->exp;
                sprintf( buf, "%s is standing here.\n\r", victim->short_descr );
                STRFREE( victim->long_descr );
                victim->long_descr = STRALLOC( buf );
                victim->alignment = ch->alignment;
          xSET_BIT(victim->act, ACT_SENTINEL);
          xSET_BIT(victim->act, PLR_SPLIT_FORM);

        act( AT_SKILL, "You channel all your energy as you scream out in pain, your body seperates into two!", ch, NULL, NULL, TO_CHAR );
        act( AT_SKILL, "$n channels all $s energy as $e screams out in pain, $s body seperates into two!", ch, NULL, NULL, TO_NOTVICT );
        add_follower( victim, ch );
        victim->master = ch;
        victim->leader = ch;
        ch->leader = ch;
        xSET_BIT( ch->act, PLR_SPLIT_FORM);
                learn_from_success( ch, gsn_split );
        ch->mana -= ch->max_mana/25;
        }
        else
        {
                act( AT_SKILL, "You begin to create a double of your self, but just before the final separation you lose focus and something goes wrong.", ch, NULL, NULL, TO_CHAR );
                act( AT_SKILL, "$n begins to create a double of $s self, but just before the final separation $e loses focus and something goes wrong.", ch, NULL, NULL, TO_NOTVICT );
                learn_from_failure( ch, gsn_split );
        }

}

void reuniteSplitForms(CHAR_DATA *ch, char *argument)
{
        int count = 0;
        CHAR_DATA *och;
        CHAR_DATA *och_next;
        CHAR_DATA *purgeQue[5];


        for ( och = first_char; och; och = och_next )
        {
                och_next = och->next;

                if (!IS_NPC(och))
                        continue;

                if ( xIS_SET(och->act, PLR_SPLIT_FORM) && och->master == ch)
                {
                        if (och->in_room != ch->in_room)
                        {
                                send_to_char("You must be in the same room as your double.", ch);
                                return;
                        }
                        extract_char( och, TRUE );
                        xREMOVE_BIT( (ch)->act, PLR_SPLIT_FORM );
                        act( AT_SKILL, "You and your double merge back into one being.", ch, NULL, NULL, TO_CHAR );
                        act( AT_SKILL, "$n and $s double merge back into one being.", ch, NULL, NULL, TO_NOTVICT );
                        return;
                }

        }
        send_to_char("Something wierd happened?", ch);
        /*bug("reuniteSplitForms: couldn't clean splits normaly, purging all of %s's forms", ch->name);*/

        for ( och = first_char; och; och = och_next )
        {
                och_next = och->next;

                if (!IS_NPC(och))
                        continue;

                if( (xIS_SET(och->act, PLR_SPLIT_FORM)
                        && och->master == ch))
                {
                        extract_char( och, TRUE );
                }
        }
        xREMOVE_BIT( (ch)->act, PLR_SPLIT_FORM );
        return;
}

void do_instant(CHAR_DATA *ch, char *argument )
{
	 char arg[MAX_INPUT_LENGTH];
        ROOM_INDEX_DATA *prev_room;
        ROOM_INDEX_DATA *location, *in_room;
        one_argument( argument, arg );
       int value;

    


    if( ch->fighting )
    {
        send_to_char( "You can't find enough time to concentrate.\n\r", ch );
        return;
    }

   if ( ch->mana < ch->max_mana/2 )
    {
        send_to_char( "You don't have enough ki to use this technique.\n\r", ch );
        return;
    }

/*    if ( get_timer(ch, TIMER_PKILLED) > 0 )
    {
        set_char_color( AT_GREEN, ch );
        send_to_char( "You have been killed within the last 5 minutes.\n\r", ch );
        return;
    } */

      if ( carrying_dball(ch) )
    {
        send_to_char( "You can't focus enough while holding the dragonballs.\n\r", ch );
        return;
    }

      if ( get_timer( ch, TIMER_RECENTFIGHT) > 0 )
    {
     send_to_char("You can't IT this soon after a Pkill fight!\n\r", ch);
     return;
    }

   if ( arg[0] == '\0'  )
    {
	send_to_char( "Please select a location from your list\n\r", ch );
	return;
    }
   if ( !is_number(arg) )
    {
	send_to_char("Please select a number 1-6\n\r", ch );
    }

 	 value = atoi( arg );
    if ( value < 1 || value > 6 )
     {
	send_to_char("Sorry must be a number 1-6\n\r", ch );
	return;
	}
   location = get_room_index(ch->itlist[value-1]);
    if  ( get_timer(ch, TIMER_INSTANT) > 0)
    {
     send_to_char("You can't use that yet, your body has to heal.\n\r", ch);
     return;
    }

    if( xIS_SET(ch->in_room->room_flags, ROOM_ARENA) )
    {
        ch_printf(ch,"&RSorry, no teleporting out of PKill zones.\n\r");
        return;
    }

    if( xIS_SET(ch->in_room->room_flags, ROOM_NO_RECALL) )
    {
        ch_printf(ch,"&RYou can't seem to use that technique here.....\n\r");
        return;
    }

   if( xIS_SET(location->room_flags, ROOM_NO_RECALL) )
    {
        ch_printf(ch,"&RYou can't teleport into there!\n\r");
        return;
    }

   if( xIS_SET(location->room_flags, ROOM_ARENA) )
    {
        ch_printf(ch,"&RYou can't teleport into a pkill zone.\n\r");
        return;
    }

        if ( (location = get_room_index( ch->itlist[value-1] )) == NULL )
        {
            send_to_char( "Non-existant room.\n\r", ch );
            return;
        }

        if ( can_use_skill(ch, number_percent(), gsn_instant ) )
        {
        learn_from_success( ch, gsn_instant );
         remove_timer( ch, TIMER_PKILLED );
        act( AT_YELLOW, "You disappear in a flash of light!", ch, NULL, NULL, TO_CHAR );
        act( AT_MAGIC, "$n disappears in a flash of light!", ch, NULL, NULL, TO_ROOM );
             char_from_room(ch);
        char_to_room( ch, location );
        act( AT_IMMORT, "$n $T", ch, NULL, "materializes infront of you.", TO_ROOM );
        do_look( ch, "auto" );
       WAIT_STATE(ch, 6 );
        ch->mana -= ch->max_mana/2;
    add_timer( ch, TIMER_INSTANT, 40, NULL, 0 );
        }
        else
        {
            learn_from_failure( ch, gsn_instant );
            send_to_char( "&YYou raise your fingers to your forhead.......... the technique fails.\n\r", ch );
        }

}


void do_fly( CHAR_DATA *ch, char *argument)
{
   AFFECT_DATA *paf;
   AFFECT_DATA *paf_next;
   bool found=FALSE;

  if (ch->pcdata->learned[gsn_fly] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
  for ( paf = ch->first_affect; paf; paf = paf_next)
  {
   paf_next = paf->next;
   if( xIS_SET(paf->bitvector, AFF_FLYING)
   || xIS_SET(paf->bitvector, AFF_FLOATING))
   {
    affect_remove( ch, paf );
    found = TRUE;
   }
  }
  if ( ch->hit <= 10)
  {
   send_to_char("You don't have enough energy to try and fly..", ch);
   return;
  }
  if ( IS_AFFECTED( ch, AFF_FLYING))
  {
   act( AT_BLUE, "You descend towards the ground.", ch, NULL, NULL, TO_CHAR );
   act( AT_BLUE, "$n descends towards the ground.", ch, NULL, NULL, TO_ROOM );
   xREMOVE_BIT(ch->affected_by, AFF_FLYING);
  }
  else if ( !IS_AFFECTED( ch, AFF_FLYING))
  {
   if ( can_use_skill(ch, number_percent(), gsn_fly ))
   {
    act( AT_BLUE, "You begin to hover above the ground.", ch, NULL, NULL, TO_CHAR );
    act( AT_BLUE, "$n begins to hover above the ground.", ch, NULL, NULL, TO_ROOM );
    xSET_BIT(ch->affected_by, AFF_FLYING);
    learn_from_success( ch, gsn_fly );
   }
   else
   {
    act( AT_GREEN, "You try to fly but crash back into the ground.", ch, NULL, NULL, TO_CHAR );
    act( AT_GREEN, "$n tries to fly but crashes back into the ground.", ch, NULL, NULL, TO_ROOM );
    ch->hit -= 1;
    learn_from_failure( ch, gsn_fly );
    return;
   }
 }
}

void do_powerup( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   char              buf[MAX_INPUT_LENGTH];

     argument = one_argument( argument, arg1 );
     if ( IS_NPC(ch) )
     return;

    if (!IS_AWAKE(ch))
    {
     send_to_char("You aren't awake...\n\r", ch);
     return;
    }
      if (xIS_SET(ch->act, PLR_ACCELERATE))
      {
      send_to_char("You're in your Super Android form!\n\r", ch);
      return;
      }
    if (IS_BIODROID(ch))
    {
     send_to_char("Biodroids can't powerup!\n\r", ch);
     return;
    }
    if (!not_transformed(ch))
    {
     send_to_char("You can't power up while you're transformed!\n\r", ch);
     return;
    }

     if ( !str_cmp( arg1, "max" ) )
     {

      if (xIS_SET(ch->act, PLR_POWERUP7))
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP6) && ch->exp < 2000000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP5) && ch->exp < 1000000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP4) && ch->exp < 750000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP3) && ch->exp < 500000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP2) && ch->exp < 250000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP1) && ch->exp < 50000 )
      {
       send_to_char("You're already poweredup to your maximum.\n\r", ch);
       return;
      } 
 }

    if ( arg1[0] == '\0' )
    {
      if (xIS_SET(ch->act, PLR_POWERUP7))
      {
      send_to_char("Your already powered up to your maximum.\n\r", ch);
      return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP6) && ch->exp < 2000000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP5) && ch->exp < 1000000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP4) && ch->exp < 750000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP3) && ch->exp < 500000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP2) && ch->exp < 250000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      else if (xIS_SET(ch->act, PLR_POWERUP1) && ch->exp < 50000 )
      {
       send_to_char("You're already poweredup to your maximum.\n\r", ch);
       return;
      }


      else if (xIS_SET(ch->act, PLR_POWERUP6) && (ch->exp >= 2000000)  && !xIS_SET(ch->act, PLR_POWERUP7))
      {
      xREMOVE_BIT(ch->act, PLR_POWERUP6);
      xSET_BIT(ch->act, PLR_POWERUP7);
      ch->mod = 1.7;
      send_to_char("&BYour aura now grows in size as you begin to hover above the ground slightly.\n\rYou scream as you let loose all of your power that was still inside!\n\r", ch );
      sprintf( buf , "%s's aura now grows in size as %s begins to hover above the ground slightly.\n\r%s screams as %s lets loose all of %s power that was still inside!",      ch->name, ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it", ch->name, ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its");
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }

      else if (xIS_SET(ch->act, PLR_POWERUP5) && (ch->exp >= 1000000) && !xIS_SET(ch->act, PLR_POWERUP6))
      {
      xREMOVE_BIT(ch->act, PLR_POWERUP5);
      xSET_BIT(ch->act, PLR_POWERUP6);
      ch->mod = 1.6;
      send_to_char("&BDust around you begins to accumulate surrounding you in circles,\n\rthen it explodes as you powerup for the sixth time!\n\r", ch );
      sprintf( buf , "The dust around you begins to accumulate surrounding %s in circles, then it explodes as %s powerups for the sixth time!",      ch->name, ch->name);
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }

      else if (xIS_SET(ch->act, PLR_POWERUP4) && (ch->exp >= 750000) && !xIS_SET(ch->act, PLR_POWERUP5))
      {
      xREMOVE_BIT(ch->act, PLR_POWERUP4);
      xSET_BIT(ch->act, PLR_POWERUP5);
      ch->mod = 1.5;
      send_to_char("&BYour aura now flashes brightly as you continue to raise your powerlevel further.\n\r", ch );
      sprintf( buf , "%s's aura now flashes brightly as %s continues to raise %s powerlevel further.",
      ch->name, ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its");
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }

      else if (xIS_SET(ch->act, PLR_POWERUP3) && (ch->exp >= 500000) && !xIS_SET(ch->act, PLR_POWERUP4))
      {
      xREMOVE_BIT(ch->act, PLR_POWERUP3);
      xSET_BIT(ch->act, PLR_POWERUP4);
      ch->mod = 1.4;
      send_to_char("&BThe ground begins to tremble as you powerup for the fourth time.\n\r", ch );
      sprintf( buf , "The ground begins to tremble as %s powersup for the fourth time.",
      ch->name);
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }

      else if (xIS_SET(ch->act, PLR_POWERUP2) && (ch->exp >= 250000) && !xIS_SET(ch->act, PLR_POWERUP3))
      {
      xREMOVE_BIT(ch->act, PLR_POWERUP2);
      xSET_BIT(ch->act, PLR_POWERUP3);
      ch->mod = 1.3;
      send_to_char("&BYour clothing now begins to flutter as you push your powerlevel into the next level.\n\r", ch );
      sprintf( buf , "%s's clothing now begins to flutter as %s pushes %s powerlevel into the next level.",
      ch->name, ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its");
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }

      else if (xIS_SET(ch->act, PLR_POWERUP1) && (ch->exp >= 50000) && !xIS_SET(ch->act, PLR_POWERUP2))
      {
      xREMOVE_BIT(ch->act, PLR_POWERUP1);
      xSET_BIT(ch->act, PLR_POWERUP2);
      ch->mod = 1.2;
      send_to_char("&BA few rocks begin to hover above the ground as you powerup for the second time.\n\r", ch );
      sprintf( buf , "A few rocks begin to hover above the ground as %s powers up for the second time.",
      ch->name);
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }
      else if (NO_POWERUP(ch))
      {

     if( IS_ANDROID(ch) )
        {
          OBJ_DATA *obj;
          OBJ_DATA *obj2;

          if( ( obj = get_obj_wear( ch, "A1 Power Chip" ) ) != NULL )
          {
                  xSET_BIT( ch->act, PLR_ACCELERATE );
              ch->mod = 2;
                      ch->mod_str = 2;
                      ch->mod_dex = 2;
              send_to_char("&WYou begin to be surrounded by a violent aura as you power up.\n\r&BYour metal body is fueled with massive power!&w\n\r", ch );
              sprintf( buf , "&W%s begins to be surrounded by a violent aura as %s powers up.\n\r&B$s metal body is fueled with massive power!&w",
              ch->name, ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it");
              act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
                      return;
          }
          if( ( obj = get_obj_wear( ch, "A2 Power Chip" ) ) != NULL )
          {

                  xSET_BIT( ch->act, PLR_ACCELERATE );
              ch->mod = 4;
                      ch->mod_str = 2;
                      ch->mod_int = 1;
                      ch->mod_dex = 2;
              send_to_char("&WYou feel your powerlevel skyrocket as you idle in one position.\n\r&BSuddenly, a bright aura surrounds your metal body!&w\n\r", ch );
              sprintf( buf , "&W$n bends $s head, almost mechanically. You sense their powerlevel skyrocket as $e idles there.\n\r&BSuddenly, $n's head snaps up and a bright aura lights their sillhouette!&w");
              act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
              return;
          }
          else if( ( obj = get_obj_wear( ch, "A3 Power Chip" ) ) != NULL )
          {
                  xSET_BIT( ch->act, PLR_ACCELERATE );
              ch->mod = 6;
                      ch->mod_str = 2;
                      ch->mod_int = 1;
                      ch->mod_dex = 2;
                      ch->mod_lck = 1;
              send_to_char("&WYou scream in glee as an irridescent aura licks around your body.\n\r&BYour eyes twitch to you while an elightening feeling sets itself upon you!&w\n\r", ch );
              sprintf( buf , "&W$n screams in glee as an irridescent aura licks around $s body.\n\r&B$n's eyes shift to you while a look of total euphoria appears on $s face!&w" );
              act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
                      return;
          }

          else if( ( obj = get_obj_wear( ch, "A4 Power Chip" ) ) != NULL )
          {
                  xSET_BIT( ch->act, PLR_ACCELERATE );
              ch->mod = 8.6;
              ch->mod_str = 3;
              ch->mod_int = 3;
              ch->mod_dex = 3;
              ch->mod_con = -2;
              ch->mod_lck = 2;
              send_to_char("&WYou spread your arms wide with a wicked grin forming on your face.\n\rSuddenly, a shaft of light encompasses you.\n\r&BYou tilt your head up clench your fists tightly, dust flies around you.\n\r&wYou have just transformed into a Super Android!&w\n\r", ch );
              sprintf( buf , "&W$n spreads $s arms wide with a wicked grin forming on $s face.\n\rSuddenly, a shaft of light encompasses the Android.\n\r&BAs you regain your vision, you see $n standing calmly.\n\r&w$n has transformed into a Super Android!&w");
              act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
                      return;
           }

/*          else if( ( obj = get_obj_wear( ch, "A5 Power Chip" ) ) != NULL )
          {

           if ( !xIS_SET(ch->act, PLR_CAN_A5) )
           {
           send_to_char( "&RALERT: Your body doesn't recognize this chip.&w\n\r", ch );
           return;
           }

           if (can_use_skill(ch, number_percent(), gsn_accelerate ))
           {
              learn_from_success( ch, gsn_accelerate );
                  xSET_BIT( ch->act, PLR_ACCELERATE );
              ch->mod = 9.6;
              ch->mod_str = 3;
              ch->mod_int = 3;
              ch->mod_dex = 3;
              ch->mod_con = -2;
              ch->mod_lck = 2;
              send_to_char("&wThe gears inside your body start generating massive energy.\n\r&WYou clench your fists and release all of your harvested power.\n\r&CCalmly, the blue aura which was released from your body molds around you.\n\r&zYour eyes glow a dim red, but change back. You are now in your Ultimate form.\n\r", ch );
              sprintf( buf , "&wThe gears inside $n's body start generating massive energy.\n\r&W$e clenches $s fists and releases all of $s harvested power.\n\r&CCalmly, the blue aura which was released from $n's body molds around $s.\n\r&z$s eyes glow a dim red, but change back. $n is now in $s Ultimate form.");
              act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
                      return;
           }
           learn_from_failure( ch, gsn_accelerate );
           send_to_char( "&GYour energy core glows brightly... but fades&w\n\r", ch );
           sprintf( buf , "&G$n's energy core glows brightly... but fades.&w");
           act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
           return;
          } */

         send_to_char( "Nothing happened..\n\r", ch );
          return;

        }


      xSET_BIT(ch->act, PLR_POWERUP1);
      ch->mod = 1.1;
      send_to_char("&BYou begin to be surrounded by a white aura as you powerup for the first time.\n\r", ch );
      sprintf( buf , "%s begins to be surrounded by a white aura as %s powers up for the first time.",
      ch->name, ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it");
      act( AT_BLUE, buf , ch, NULL, NULL, TO_CANSEE );
      return;
      }

/*     if ( !str_cmp( arg1, "max" ) )
     { 

      if (xIS_SET(ch->act, PLR_POWERUP7))
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_POWERUP6) && ch->exp < 1000000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_POWERUP5) && ch->exp < 1000000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_POWERUP4) && ch->exp < 750000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_POWERUP3) && ch->exp < 500000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_POWERUP2) && ch->exp < 250000 )
      {
       send_to_char("Your already poweredup to your maximum.\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_POWERUP1) && ch->exp < 50000 )
      {
       send_to_char("You're already poweredup to your maximum.\n\r", ch);
       return;
      } */
/*  } */
}
}

bool in_range( CHAR_DATA *ch, CHAR_DATA *victim )
{
    EXIT_DATA *pexit;
    ROOM_INDEX_DATA *was_in_room;
    sh_int dir = -1;
    bool found = FALSE;

    set_char_color( AT_ACTION, ch );

        was_in_room = ch->in_room;

        for(dir = 0; dir < 10; ++dir)
        {
             if((pexit = get_exit(ch->in_room, dir)) == NULL) continue;

             if(IS_SET(pexit->exit_info, EX_CLOSED) || IS_SET(pexit->exit_info, EX_SECRET)
                  || IS_SET(pexit->exit_info, EX_DIG)) break;

             if( ( get_char_room( ch, victim->name ) ) != NULL )
             {
               found = FALSE;
               break;
             }

             char_from_room(ch);
             char_to_room(ch, pexit->to_room);

             if( ( get_char_room( ch, victim->name ) ) != NULL )
             {
               found = TRUE;
               break;
             }
             else
             found = FALSE;
         }
         char_from_room(ch);
         char_to_room(ch, was_in_room);

         return found;

}

void do_tribeam( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char arg1[MAX_INPUT_LENGTH];
 bool sense=FALSE;

/*  if (IS_NPC(ch))
  return; */

  argument = one_argument( argument, arg1 );

  if ( !IS_NPC(ch) )
 {
  if (ch->pcdata->learned[gsn_tribeam] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}
  if (IS_HUMAN(ch) || xIS_SET(ch->act, PLR_PRIMARY_TRIBEAM ) )
  {
   if ( arg1[0] == '\0' )
   {
    send_to_char( "Usage: Tribeam <Target>\n\r", ch );
    return;
   }
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }

  if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
  {
    if ( ( victim = sense_for_victim( ch, arg1 ) ) == NULL )
    {
      send_to_char( "You can't sense them.\n\r", ch );
      return;
    }
    else
    sense = TRUE;
  }

   if ( victim == ch )
   {
     send_to_char( "Target yourself? Dumbass.\n\r", ch );
     return;
   }
   if ( xIS_SET( victim->in_room->room_flags, ROOM_SAFE ) )
   {
     send_to_char( "You can't do that here.\n\r", ch );
     return;
   }
   if (ch->mana <= ch->max_mana/15)
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_tribeam ))
   {

  if ( !sense )
  warcry( ch, victim );

  if ( sense )
  {
    act( AT_WHITE, "&w$n stretches $s's arms and prepares for a tribeam.\n\r$n forms a triangle with $s hands and starts to gather energy.\n\r&Y$n raises $s hand, pointing at $N as $e launches a small yellow beam towards the sky!" , ch, NULL, victim, TO_NOTVICT);
  }
     act( AT_WHITE, "&w$N stretches $S arms and prepares for a tribeam.\n\r$N forms a triangle with $S hands and starts to gather energy.\n\r&Y$N sends $S tribeam right at you!" , victim, NULL, ch, TO_CHAR);
     act( AT_WHITE, "&wYou strech your arms and you prepare for a tribeam\n\r&wYou form a triangle with your hands and you start to gather energy.\n\r&YYou send your tribeam right at $N!", ch, NULL, victim, TO_CHAR);
     act( AT_WHITE, "&w$N stretches $S arms and prepares for a tribeam.\n\r$N forms a triangle with $S hands and starts to gather energy.\n\r&Y$N sends $S tribeam right at $n!" , victim, NULL, ch, TO_NOTVICT);
        if ( sense )
        sensedamage( ch, victim, TYPE_TRIBEAM, TYPE_TRIBEAM );
        else
     one_hit(ch, victim, TYPE_TRIBEAM);

     act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
     act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
     act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
     ch->mana -= ch->max_mana/15;
     if (char_died(ch))
     {
       stop_fighting( ch , TRUE );
       return;
     }
     learn_from_success( ch, gsn_tribeam );
  }
  else
  {
    act( AT_WHITE, "&w$N stretches $S arms and prepares for a tribeam.\n\r$N forms a triangle with $S hands and starts to gather energy.\n\r&Y$N sends $S tribeam right at you, but it's off target" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou strech your arms and you prepare for a tribeam\n\r&wYou form a triangle with your hands and you start to gather energy.\n\r&YYou send your tribeam right at $N, but it's off target.", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n stretches $S arms and prepares for a tribeam.\n\r$n forms a triangle with $S hands and starts to gather energy.\n\r&Y$n sends $S tribeam right at $N, but it's off target.", ch, NULL, victim, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_TRIBEAM);
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    learn_from_failure( ch, gsn_tribeam );
    ch->mana -= ch->max_mana/15;
   WAIT_STATE( ch, 13 );

    return;
  }
   WAIT_STATE( ch, 13 );
 }
 else
 {
  send_to_char("Huh?\n\r", ch);
  return;
 }
}

void do_vigor( CHAR_DATA *ch, char *argument )
{

  if ( !IS_NPC(ch) )
 {
  if (ch->pcdata->learned[gsn_vigor] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}


  if (IS_HALFBREED(ch) )
  {

   if ( xIS_SET(ch->act, PLR_VIGOR) )
   {
    send_to_char( "You have already channeled your energy.\n\r", ch);
    return;
   }


   if (ch->hit <= 15 )
   {
    send_to_char( "You need more health in order to channel your energy.\n\r", ch);
    return;
   }

   if (can_use_skill(ch, number_percent(), gsn_vigor ))
   {
    send_to_char( "&PYou grip your fists tightly together and crouch down, you have channeled your energy.\n\r", ch);
    act( AT_RED, "&P$n grips $s fists tightly together and crouches down, $n has channeled his energy.",ch, NULL, NULL, TO_ROOM );
    ch->hit -= 15;
    xSET_BIT(ch->act, PLR_VIGOR);
    learn_from_success( ch, gsn_vigor );
    WAIT_STATE(ch, 8 );
   }
   else
   {
    send_to_char( "&PYou attempt to channel your energy...... but fail.\n\r", ch);
    act( AT_RED, "&P$n attempts to channel $s energy....... but fails.",ch, NULL,NULL, TO_ROOM );
    learn_from_success( ch, gsn_vigor );
    ch->hit -= 15;
    WAIT_STATE(ch, 8 );
   }
}

}

void do_masenko( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char arg1[MAX_INPUT_LENGTH];
  bool sense=FALSE;


/*  if (IS_NPC(ch))
  return; */

  argument = one_argument( argument, arg1 );

  if ( !IS_NPC(ch) )
 {
  if (ch->pcdata->learned[gsn_masenko] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

  if (IS_HALFBREED(ch) || xIS_SET(ch->act, PLR_PRIMARY_MASENKO) )
  {
   if ( arg1[0] == '\0' )
   {
    send_to_char( "Usage: Masenko <Target>\n\r", ch );
    return;
   }
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }
    if ( ch->hit <= 7 && ( victim = who_fighting( ch ) ) == NULL )
    {
    send_to_char( "You are too injured to fight properly.\n\r", ch );
    return;
    }

  if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
  {
    if ( ( victim = sense_for_victim( ch, arg1 ) ) == NULL )
    {
      send_to_char( "You can't sense them.\n\r", ch );
      return;
    }
    else
    sense = TRUE;
  }

   if (victim == ch)
   {
    send_to_char( "You can't do that.\n\r", ch );
    return;
   }

   if ( victim == ch )
   {
     send_to_char( "Target yourself? Dumbass?\n\r", ch );
     return;
   }
   if ( xIS_SET( victim->in_room->room_flags, ROOM_SAFE ) )
   {
    send_to_char( "You can't do that here..\n\r", ch );
    return;
   }
   if (ch->mana <= ch->max_mana /24)
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_masenko ))
   {

  if ( !sense )
    warcry( ch, victim );

  if ( sense )
  {
     act( AT_WHITE, "&w$n raises both $s arms above $s head and starts to gather energy...\n\r&wA sphere of energy forms between $s hands.\n\r&Y$n yells MA-SEN-KO-HAAAA!!!!\n\r&w$n thrusts $s arms forward...\n\r&W$n hurls $s Energy Ball towards the sky!!" , ch, NULL, victim, TO_NOTVICT);
  }
    act( AT_WHITE, "&w$N raises both $S arms above $S head and starts to gather energy...\n\r&wA sphere of energy forms between $S hands.\n\r&Y$N yells MA-SEN-KO-HAAAA!!!!\n\r&w$N thrusts $S arms forward...\n\r&W$N hurls $S Energy Ball right at you!!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou raise both arms above your head and you start to gather energy...\n\r&wA sphere of energy forms between your hands.\n\r&YYou yell MA-SEN-KO-HAAAA!!!!\n\r&wYou thrust your arms forward...\n\r&WYou hurl your Energy Ball right at $N!!" , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N raises both $S arms above $S head and starts to gather energy...\n\r&wA sphere of energy forms between $S hands.\n\r&Y$N yells MA-SEN-KO-HAAAA!!!!\n\r&w$N thrusts $S arms forward...\n\r&W$N hurls $S Energy Ball right at $n!!" , victim, NULL, ch, TO_NOTVICT);
        if ( sense )
        sensedamage( ch, victim, TYPE_MASENKO, TYPE_MASENKO );
        else
    one_hit(ch, victim, TYPE_MASENKO);
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_NOTVICT);
    ch->mana -= ch->max_mana /24;
    if (char_died(ch))
    {
      stop_fighting( ch , TRUE );
      return;
    }
    learn_from_success( ch, gsn_masenko );
   }
   else
   {
    act( AT_WHITE, "&w$N raises both $S arms above $S head and starts to gather energy...\n\r&wA sphere of energy forms between $S hands.\n\r&Y$N yells MA-SEN-KO-HAAAA!!!!\n\r&w$N thrusts $S arms forward...\n\r&W$N hurls $S Energy Ball right at  you!!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou raise both arms above your head and you start to gather energy...\n\r&wA sphere of energy forms between your hands.\n\r&YYou yell MA-SEN-KO-HAAAA!!!!\n\r&wYou thrust your arms forward...\n\r&WYou hurl your Energy Ball right at $N!!" , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n raises both $S arms above $S head and starts to gather energy...\n\r&wA sphere of energy forms between $S hands.\n\r&Y$n yells MA-SEN-KO-HAAAA!!!!\n\r&w$n thrusts $S arms forward...\n\r&W$n hurls $S Energy Ball right at $N, but it's off target" , ch, NULL, victim, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_MASENKO);
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_NOTVICT);
    learn_from_failure( ch, gsn_masenko );
    ch->mana -= 500;
    WAIT_STATE( ch, 10 );
    return;
   }
    WAIT_STATE( ch, 10 );
  }
  else
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

void do_aid( CHAR_DATA *ch, char *argument )
{
    char arg[MAX_INPUT_LENGTH];
    CHAR_DATA *victim;
    int percent;

    if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
    {
        send_to_char( "You can't concentrate enough for that.\n\r", ch );
        return;
    }

    one_argument( argument, arg );
    if ( arg[0] == '\0' )
    {
        send_to_char( "Aid 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_NPC(victim) )                        /* Gorog */
    {
        send_to_char( "Not on mobs.\n\r", ch );
        return;
    }

    if ( ch->mount )
    {
        send_to_char( "You can't do that while mounted.\n\r", ch );
        return;
    }

    if ( victim == ch )
    {
        send_to_char( "Aid yourself?\n\r", ch );
        return;
    }

    if ( victim->position > POS_STUNNED )
    {
        act( AT_PLAIN, "$N doesn't need your help.", ch, NULL, victim,
             TO_CHAR);
        return;
    }

    if ( victim->hit <= -6 )
    {
        act( AT_PLAIN, "$N's condition is beyond your aiding ability.", ch,
             NULL, victim, TO_CHAR);
        return;
    }

    percent = number_percent( ) - (get_curr_lck(ch) - 13);
    WAIT_STATE( ch, skill_table[gsn_aid]->beats );
    if ( !can_use_skill( ch, percent, gsn_aid ) )
    {
        send_to_char( "You fail.\n\r", ch );
        learn_from_failure( ch, gsn_aid );
        return;
    }
 
    act( AT_SKILL, "&GYou aid $N!&D",  ch, NULL, victim, TO_CHAR    );
    act( AT_SKILL, "&G$n aids $N!&D",  ch, NULL, victim, TO_NOTVICT );
    learn_from_success( ch, gsn_aid );
    adjust_favor( ch, 8, 1 );
    if ( victim->hit < 1 )
      victim->hit = 1;

    update_pos( victim );
    act( AT_SKILL, "$n aids you!", ch, NULL, victim, TO_VICT    );
    return;
}

void do_climb( CHAR_DATA *ch, char *argument )
{
        CHAR_DATA *gch;

   if ( !xIS_SET( ch->in_room->room_flags, ROOM_KOTH2 ) )
   {
    send_to_char( "You can't do that here..\n\r", ch );
    return;
   }

          act(AT_GREEN, "You climb", ch, NULL, NULL, TO_CHAR );
          act(AT_GREEN, "$n climbs", ch, NULL, NULL, TO_ROOM );

}

void do_blastdoor( CHAR_DATA *ch, char *argument )
{
        CHAR_DATA *gch;
        EXIT_DATA *pexit;
        char       arg [ MAX_INPUT_LENGTH ];
            char            *keyword;
         int dam;
    char buf1[256], buf2[256];

        keyword = "door";

        one_argument( argument, arg );

   if (ch->pcdata->learned[gsn_blastdoor] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   } 

        if ( arg[0] == '\0' )
        {
            send_to_char( "Blast what?\n\r", ch );
            return;
        }

        if ( ch->fighting )
        {
            send_to_char( "You can't break off your fight.\n\r", ch );
            return;
        }

        if( ch->mana < 500 )
        {
                pager_printf_color(ch, "You don't have enough ki to use this technique.\n\r" );
                return;
        }

        if ( ( pexit = find_door( ch, arg, FALSE ) ) != NULL )
        {
            ROOM_INDEX_DATA *to_room;
            EXIT_DATA       *pexit_rev;
            int              chance;
            char            *keyword;

            if ( !IS_SET( pexit->exit_info, EX_CLOSED ) )
            {
                send_to_char( "Calm down.  It is already open.\n\r", ch );
                return;
            }

            dam = number_range( 500, 900 );

            sprintf( buf1, "*WHAM!* You launch a bolt of energy against the $d [%d]\n\r&GThe barrier shatters!", dam );
            sprintf( buf2, "*WHAM!* $n launches a bolt of energy against the $d [%d]\n\r&GThe barrier shatters!", dam );

            WAIT_STATE( ch, 10 );

            if ( IS_SET( pexit->exit_info, EX_SECRET ) )
                keyword = "wall";
            else
                keyword = pexit->keyword;
            if ( !IS_NPC(ch) )
                chance = LEARNED(ch, gsn_blastdoor) / 2;
            else
                chance = 90;
            if ( IS_SET( pexit->exit_info, EX_LOCKED ) )
                chance /= 3;

            if ( IS_SET( pexit->exit_info, EX_BASHABLE ) && pexit->health <=  0 )
            {
                REMOVE_BIT( pexit->exit_info, EX_CLOSED );
                if ( IS_SET( pexit->exit_info, EX_LOCKED ) )
                REMOVE_BIT( pexit->exit_info, EX_LOCKED );
                SET_BIT( pexit->exit_info, EX_BASHED );


                act(AT_GREEN, buf1, ch, keyword, NULL, TO_CHAR );
                act(AT_GREEN, buf2, ch, keyword, NULL, TO_ROOM );

                learn_from_success(ch, gsn_blastdoor);

                if ( (to_room = pexit->to_room) != NULL
                &&   (pexit_rev = pexit->rexit) != NULL
                &&    pexit_rev->to_room        == ch->in_room )
                {
                        CHAR_DATA *rch;

                        REMOVE_BIT( pexit_rev->exit_info, EX_CLOSED );
                        if ( IS_SET( pexit_rev->exit_info, EX_LOCKED ) )
                          REMOVE_BIT( pexit_rev->exit_info, EX_LOCKED );
/*                        SET_BIT( pexit_rev->exit_info, EX_BASHED ); */

                        for ( rch = to_room->first_person; rch; rch = rch->next_in_room )
                        {
                            act(AT_SKILL, "The $d blows open!",
                                rch, NULL, pexit_rev->keyword, TO_CHAR );
                        }
                }
                ch->mana -= 500;

            }
            else
            {
            sprintf( buf1, "*WHAM!* You launch a bolt of energy against the $d [%d]", dam );
            sprintf( buf2, "*WHAM!* $n launches a bolt of energy against the $d [%d]", dam );

                act(AT_GREEN, buf1, ch, keyword, NULL, TO_CHAR );
                act(AT_GREEN, buf2, ch, keyword, NULL, TO_ROOM );
                        ch->mana -= 500;

                learn_from_failure(ch, gsn_blastdoor);
                pexit->health -= dam;
            }
        }
        else
        {
                act(AT_GREEN, "*WHAM!* You launch a bolt of energy against the $d, but it doesn't budge.",
                        ch, NULL, keyword, TO_CHAR );
                act(AT_GREEN, "*WHAM!* $n launches a bolt of energy against the $d, but it doesn't budge.",
                        ch, NULL, keyword, TO_ROOM );
            learn_from_failure(ch, gsn_blastdoor);
                        ch->mana -= 500;
        }


        return;

}
void do_blast( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

   if (IS_NPC(ch))
   return;

   if (ch->pcdata->learned[gsn_blast] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }

   if ( ( victim = who_fighting( ch ) ) == NULL )
   {
    send_to_char( "You aren't fighting anyone.\n\r", ch );
    return;
   }
   if (ch->mana <= ch->max_mana/15)
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }

   if (can_use_skill(ch, number_percent(), gsn_blast ))
   {
    act( AT_WHITE, "&w$N stretches $S arms and prepares for an Energy Blast." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou stretch your arms and prepare for an Energy Blast.", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "$n stretches $S arms and prepares for an Energy Blast.", ch, NULL, victim, TO_NOTVICT);
    if ( xIS_SET(ch->act, PLR_SECONDARY_KICONTROL) )
    {
    one_hit(ch, victim, TYPE_NBLAST);
    one_hit(ch, victim, TYPE_NBLAST);
    one_hit(ch, victim, TYPE_NBLAST);
    one_hit(ch, victim, TYPE_NBLAST);
    }
    else
    {
    one_hit(ch, victim, TYPE_NBLAST);
    one_hit(ch, victim, TYPE_NBLAST);
    one_hit(ch, victim, TYPE_NBLAST);
    }
    ch->mana -= ch->max_mana /15;
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    learn_from_success( ch, gsn_blast );
    WAIT_STATE(ch, 13);
   }
   else
   {
    act( AT_WHITE, "&w$n stretches $S arms and prepares for an Energy Blast." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou stretch your arms and prepare for an Energy Blast.", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "$N stretches $S arms and prepares for an Energy Blast.", ch, NULL, victim, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_NBLAST);
    damage(ch, victim, 0, TYPE_NBLAST);
    damage(ch, victim, 0, TYPE_NBLAST);
    ch->mana -= ch->max_mana /15;
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    learn_from_failure( ch, gsn_blast );
    WAIT_STATE(ch, 13);
    return;
   }

}

void do_kitap( CHAR_DATA *ch, char *argument )
{
  if (IS_NPC(ch))
  return;

  if (ch->pcdata->learned[gsn_kitap] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }

  if (IS_NAMEK(ch) )
  {
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

   if (can_use_skill(ch, number_percent(), gsn_kitap ))
   {
      send_to_char( "&GYou tap into your energy and regenerate from it.\n\r", ch );
      act( AT_GREEN, "$n taps into $s energy and regenerates from it.", ch, NULL, NULL,TO_CANSEE );
      ch->mana += 750;
      if ( ch->mana > ch->max_mana )
      ch->mana = ch->max_mana;
      learn_from_success( ch, gsn_kitap );
      WAIT_STATE( ch, 8 );
      return;
   }
   else
   {
      send_to_char( "&GYou tap into your energy and attempt to regenerate from it.\n\r&GYou Fail.\n\r", ch );
      act( AT_GREEN, "$n taps into $s energy and attempts to regenerate from it.\n\r&G$n fails.", ch, NULL, NULL,TO_CANSEE );
      learn_from_failure( ch, gsn_kitap );
      WAIT_STATE( ch, 8 );
      return;
   }

  }

}

void do_scattershot( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
    char buf1[256], buf2[256], buf3[256];
   int bolts;
  char arg1[MAX_INPUT_LENGTH];
  bool sense=FALSE;

  argument = one_argument( argument, arg1 );


  if (IS_NPC(ch))
  return;

  if (ch->pcdata->learned[gsn_scattershot] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
  if (IS_MUTANT(ch) || IS_NAMEK(ch) || xIS_SET(ch->act, PLR_PRIMARY_SCATTER) )
  {
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }


   if ( IS_NAMEK(ch) )
  {

   if ( arg1[0] == '\0' )
   {
    send_to_char( "Usage: Scattershot <Target>\n\r", ch );
    return;
   }

  if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
  {
    if ( ( victim = sense_for_victim( ch, arg1 ) ) == NULL )
    {
      send_to_char( "You can't sense them.\n\r", ch );
      return;
    }
    else
    sense = TRUE;
  }



  }



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

   if (ch->mana <= 1750 && xIS_SET(ch->act, PLR_PRIMARY_SCATTER ))
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (ch->mana <= 2500 && IS_MUTANT(ch))
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   else if (ch->mana <= 4000 && IS_MUTANT(ch) && xIS_SET(ch->act, PLR_SECONDARY_CORTEX))
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (ch->mana <= 1500 && IS_NAMEK(ch))
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_scattershot ))
   {
    if (IS_MUTANT(ch))
    {
/*            if (xIS_SET(ch->act, PLR_SECONDARY_CORTEX) )
            bolts = number_range( get_curr_dex(ch)/4, 15 ); 
            else
            bolts = number_range( get_curr_dex(ch)/5, 10 );
            sprintf( buf1, "%d of your bolts hit %s", bolts, victim->name );
            sprintf( buf2, "%d of %s's bolts hit %s", bolts, ch->name, victim->name );
            sprintf( buf3, "%d of %s's bolts hit you", bolts, ch->name ); */

    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou raise your arms and scream as you prepare for your attack.\n\r&BCrackling energy surrounds you as you launch your attack!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!" , victim, NULL, ch, TO_NOTVICT);
    one_hit(ch, victim, TYPE_SCATTERSHOT);
    if (xIS_SET(ch->act, PLR_SECONDARY_CORTEX) )
    ch->mana -= 4000;
    else
    ch->mana -= 2500;
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    }
    else if (IS_NAMEK(ch) || xIS_SET(ch->act, PLR_PRIMARY_SCATTER ))
    {
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou raise your arms and scream as you prepare for your attack.\n\r&BCrackling energy surrounds you as you launch your attack!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!" , victim, NULL, ch, TO_NOTVICT);
        if ( sense )
        sensedamage( ch, victim, TYPE_SCATTERSHOT, TYPE_SCATTERSHOT );
        else
    one_hit(ch, victim, TYPE_SCATTERSHOT);
    ch->mana -= 1500;
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    }
    learn_from_success( ch, gsn_scattershot );
   }
   else
   {
    if (IS_MUTANT(ch))
    {
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!\n\r&Y$N sends 10 electric bolts right at you!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou raise your arms and scream as you prepare for your attack.\n\r&BCrackling energy surrounds you as you launch your attack!\n\r&YYou send 10 electric bolts right at $N!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!\n\r&Y$N sends 10 electric bolts right at $n!" , victim, NULL, ch, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_SCATTERSHOT);
    if (xIS_SET(ch->act, PLR_SECONDARY_CORTEX) )
    ch->mana -= 4000;
    else
    ch->mana -= 2500;
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    }
    else if (IS_NAMEK(ch) || xIS_SET(ch->act, PLR_PRIMARY_SCATTER ) )
    {
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!\n\r&Y$N sends 5 electric bolts right at you!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou raise your arms and scream as you prepare for your attack.\n\r&BCrackling energy surrounds you as you launch your attack!\n\r&YYou send 5 electric bolts right at $N!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N raises $S arms and screams as $E prepares $S attack.\n\r&BCrackling energy surrounds $N as $E launches $S attack!\n\r&Y$N sends 5 electric bolts right at $n!" , victim, NULL, ch, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_SCATTERSHOT);
    ch->mana -= 1500;
    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$N lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    }
    WAIT_STATE( ch, 17 );
    learn_from_failure( ch, gsn_scattershot );
    return;
   }
    WAIT_STATE( ch, 17 );
  }
  else
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

void do_mentalthrow( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char arg1[MAX_INPUT_LENGTH];
  int reqki;

/*  if (IS_NPC(ch))
    return; */

  argument = one_argument( argument, arg1 );

 if ( !IS_NPC(ch) )
{
   if (ch->pcdata->learned[gsn_mentalthrow] == 0 || !IS_ICER(ch))
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

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

   if ( xIS_SET( victim->in_room->room_flags, ROOM_SAFE ) )
   {
    send_to_char( "You can't do that here..\n\r", ch );
    return;
   }

   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }

   reqki = ch->max_mana / 4;

   if (ch->mana < reqki )
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_mentalthrow ))
   {
    act( AT_BLOOD, "&wYou close your eyes and focus your mental energy.", ch, NULL, victim, TO_CHAR );
    act( AT_BLOOD, "&WSlowly a HUGE piece of rock starts to hover above the ground.", ch, NULL, victim, TO_CHAR );
    act( AT_BLOOD, "&WAll of a sudden the massive rock gets sent towards $N.", ch, NULL, victim, TO_CHAR );

    act( AT_BLOOD, "&w$n closes $s eyes and focus $s mental energy.", ch , NULL, victim, TO_VICT );
    act( AT_BLOOD, "&WSlowly a HUGE piece of rock starts to hover above the ground.", ch, NULL, victim, TO_VICT );
    act( AT_BLOOD, "&WAll of a sudden the massive rock gets sent towards you.", ch, NULL, victim, TO_VICT );

    act( AT_BLOOD, "&w$n closes $s eyes and focus $s mental energy.", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&WSlowly a HUGE piece of rock starts to hover above the ground.", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&WAll of a sudden the massive rock gets sent towards $N.", ch, NULL, victim, TO_NOTVICT );

    one_hit(ch, victim, TYPE_MENTALTHROW);
    ch->mana -= reqki;

    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT);
    if (char_died(ch))
    {
      stop_fighting( ch , TRUE );
      return;
    }

    learn_from_success( ch, gsn_mentalthrow );
    WAIT_STATE( ch, 22 );

   }
   else
   {

     act( AT_WHITE, "&w$N lowers $S arms again.", victim, NULL, ch, TO_CHAR);
     act( AT_WHITE, "&wYou lower your arms again.", victim, NULL, ch, TO_VICT);
     act( AT_WHITE, "&w$N lowers $S arms again.", victim, NULL, ch, TO_NOTVICT);

    damage(ch, victim, 0, TYPE_MENTALTHROW);

    ch->mana -= reqki;
    learn_from_failure( ch, gsn_mentalthrow );
    WAIT_STATE( ch, 22 );

    return;
   }
}



ch_ret one_hit  args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dt ) );

/* void do_erupt( CHAR_DATA *ch, char *argument )
{

  if ( !IS_SAIYAN(ch) )
  {
    send_to_char_color( "Huh?\n\r", ch);
    return;
  }

  if ( xIS_SET(ch->in_room->room_flags, ROOM_SAFE) )
  {
    send_to_char_color( "&BA godly force prevents you.\n\r", ch);
    return;
  }

    if ( !xIS_SET(ch->in_room->room_flags, ROOM_ARENA) )
  {
    send_to_char_color( "&BYou aren't in a PKill zone.\n\r", ch);
    return;
  }

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

   ki = ch->max_mana - 1;

   if (ch->mana <= ki )
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }

   if (can_use_skill(ch, number_percent(), gsn_spiritbomb ))
   {
    ch->mana = 1;
    send_to_char( "&YYou raise your hands above your head and close your eyes.\n\rEnergy seeps into your body from all directions.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the Energy Ball has an attack power of %d.\n\r",  (mod * pl));
    act( AT_RED, "$n raises $s hands above $s head and closes $ eyes.", ch, NULL, NULL, TO_ROOM );
    learn_from_success( ch, gsn_spiritbomb );
   }
   else
   {
    send_to_char( "&RYou close your hands and create an Energy Ball, but you create nothing.\n\r", ch);
    act( AT_RED, "$n closes $s hands and tries to create an Energy Ball...", ch, NULL, NULL, TO_ROOM );
    ch->mana = 1;
    learn_from_failure( ch, gsn_spiritbomb );
    return;
   }

} */



void do_galicgun( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *vch;
  CHAR_DATA *vch_next;
  sh_int nvict = 0;
  sh_int nhit = 0;
  sh_int percent;
  int galicdam;
  int ki;

  if ( !IS_SAIYAN(ch) )
  {
    send_to_char_color( "Huh?\n\r", ch);
    return;
  }


  if ( xIS_SET(ch->in_room->room_flags, ROOM_SAFE) )
  {
    send_to_char_color( "&BA godly force prevents you.\n\r", ch);
    return;
  }

    if ( !xIS_SET(ch->in_room->room_flags, ROOM_ARENA) )
  {    
    send_to_char_color( "&BYou aren't in a PKill zone.\n\r", ch);
    return;

  }

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

    ki = ch->max_mana/1.8;

   if (ch->mana <= ki )
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }

  if ( !ch->in_room->first_person )
  {
    send_to_char( "There's no one else here!\n\r", ch );
    return;
  } 

/*   act( AT_YELLOW, "&Y$n raises $s arms above $s head and starts to tunnel energy.\n\r&zThe sky turns dark and 
crackling lighting charges $n for $s attack...\n\r&R$n screams GAAAAAALIC-GUN!!! and throws a massive blast of energy 
away from $m", ch, NULL, vch, TO_CANSEE ); */
   act( AT_YELLOW, "$n raises $s arms above $s head and starts to tunnel energy.\n\rThe sky turns dark and crackling lightning charges $n for $s attack...\n\r$n screams GAAAAAALIC-GUN!!! and throws a massive blast of energy away from $m!!\n\r\n\r\n\r", ch, NULL, NULL, TO_NOTVICT );
  send_to_char_color( "\n\r&YYou raise your arms above your head and you start to tunnel energy.\n\rThe sky turns dark and crackling lightning charges you for your attack...\n\rYou scream GAAAAAALIC-GUN!!!! and you throw a massive blast of energy away from you!!!\n\r", ch );


  percent = LEARNED(ch, gsn_galicgun);
  for ( vch = ch->in_room->first_person; vch; vch = vch_next )
  {
    vch_next = vch->next_in_room;

//      if ( !can_see(ch, vch) || is_same_group(ch, vch) )

if ( !can_see(ch, vch))
      continue;

    if ( chance(ch, percent) )
    {
/*     galicdam = number_range( 42, 54 );
     if ( vch->style == STYLE_DEFENSIVE )
          galicdam = number_range( 27, 42 );
     if( obj = get_obj_wear( victim, "Blue Barrier B1" ) )
          galicdam =  */

      nhit++;
          global_retcode = one_hit(ch, vch, TYPE_GALIC);
    }
    else
     damage(ch, vch, 0, TYPE_GALIC);
    /* Fireshield, etc. could kill ch too.. :>.. -- Altrag */
    if ( global_retcode == rCHAR_DIED || global_retcode == rBOTH_DIED
    ||   char_died(ch) )
      return;
  }
  if ( !nvict )
  {
    send_to_char( "There's no one else here!\n\r", ch );
    learn_from_success(ch, gsn_galicgun);
    ch->mana = 1;
    return;
  }


  if ( nhit )
  {
    ch->mana = 1;
    learn_from_success(ch, gsn_galicgun);
      WAIT_STATE( ch, 3 );
   }
  else
    ch->mana = 1;
    learn_from_failure(ch, gsn_galicgun);
  return;
}

void do_sbc( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char              arg1[MAX_INPUT_LENGTH];
  char              buf[MAX_STRING_LENGTH];
  bool sense=FALSE;
  int ki;

  if (IS_NPC(ch))
  return;

   argument = one_argument( argument, arg1 );

  if (ch->pcdata->learned[gsn_sbc] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
  if (IS_BIODROID(ch) || IS_NAMEK(ch))
  {
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

    if ( ch->hit <= 7 && ( victim = who_fighting( ch ) ) == NULL )
    {
    send_to_char( "You are too injured to fight properly.\n\r", ch );
    return;
    }

    if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
  {
    if ( ( victim = sense_for_victim( ch, arg1 ) ) == NULL )
    {
      send_to_char( "You can't sense them.\n\r", ch );
      return;
    }
    else
    sense = TRUE;
  }

   if (victim == ch)
   {
    send_to_char( "You can't do that.\n\r", ch );
    return;
   }

   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }

    if ( IS_NPC(victim) )
    ki = 750;
    else
    ki = 5000;

   if (ch->mana <= ki )
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }

   if (can_use_skill(ch, number_percent(), gsn_sbc ))
   {
    if ( !sense )
    warcry( ch, victim );
        if ( sense )
        {
                act( AT_WHITE, "&B$n crosses $s arms and closes $s eyes.\n\r&B$n grins and whispers 'Special Beam Cannon'.\n\r&W$n points $s fingers and blast a white with blue energy beam towards the sky!" , ch, NULL, victim,TO_NOTVICT);
        }
    act( AT_WHITE, "&B$N crosses $S arms and closes $S eyes.\n\r&B$N grins and whispers 'Special Beam Cannon'.\n\r&W$N points $S finger and blast a white with blue energy beam towards you!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&BYou cross your arms and close your eyes\n\r&BYou grin and whisper 'Special Beam Cannon'.\n\r&WYou point your finder and blast a white with blue energy towards $N!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&B$N crosses $S arms and closes $S eyes.\n\r&B$N grins and whispers 'Special Beam Cannon'.\n\r&W$N points $S finger and blast a white with blue energy beam towards $n!" , victim, NULL, ch, TO_NOTVICT);
    if ( sense )
    sensedamage( ch, victim, TYPE_SBC, TYPE_SBC );
    else
    one_hit(ch, victim, TYPE_SBC);
    if ( IS_NPC(victim) )
    ch->mana -= ki;
    else
    ch->mana -= ki;
    learn_from_success( ch, gsn_sbc );
   }
   else
   {
    act( AT_WHITE, "&B$N crosses $S arms and closes $S eyes.\n\r&B$N grins and whispers 'Special Beam Cannon'.\n\r&W$N points $S finger and blast a white with blue energy beam towards you!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&BYou cross your arms and close your eyes\n\r&BYou grin and whisper 'Special Beam Cannon'.\n\r&WYou point your finder and blast a white with blue energy towards $N!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&B$n crosses $S arms and closes $S eyes.\n\r&B$n grins and whispers 'Special Beam Cannon'.\n\r&W$n points $S finger and blast a white with blue energy beam towards $N, but it's off target!" , ch, NULL, victim, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_SBC);
    if ( IS_NPC(victim) )
    ch->mana -= ki;
    else
    ch->mana -= ki;
    learn_from_failure( ch, gsn_sbc );
    return;
   }
    WAIT_STATE( ch, 17 );
  }
  else
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

void do_fkame( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char arg1[MAX_INPUT_LENGTH];
  sh_int dam, extra, lvl;
  dam = extra = lvl = 0;

  if (IS_NPC(ch))
  return;

  argument = one_argument( argument, arg1 );
/*   if ( ch->name != Buu )
   {
    ch_printf( ch, "Is your name Buu, no, fuck you..\n\r");
    return;
   } */
   if ( arg1[0] == '\0' )
   {
    ch_printf( ch, "Target Final Kamehameha Attack at who?\n\r");
    return;
   }
   if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
   {
    send_to_char( "Target must be inside this room.\n\r", ch );
    return;
   }
   warcry( ch, victim );
   act( AT_WHITE, "&W$n spreads both of $s arms as $e begins to gather energy.\n\r&zLight Blue energyballs appear surrounding each of $s hands.\n\r&b$N joins both of $s hands infront of $m as $e yells: 'FINAL-KA-ME-HA-ME-HA', and a beam of blue energy is released towards you!!!" , ch, NULL, victim, TO_VICT);
   act( AT_WHITE, "&WYou spread your arms as you begin to gather energy.\n\r&zLight Blue energyballs appear surrounding each of your hands.\n\r&bYou join both hands infront of you as you yell: 'FINAL-KA-ME-HA-ME-HA', and a beam of blue energy is released towards $N!!!" , ch, NULL, victim, TO_CHAR);
   act( AT_WHITE, "&W$n spreads both of $s arms as $e begins to gather energy.\n\r&zLight Blue energyballs appear surrounding each of $s hands.\n\r&b$N joins both of $s hands infront of $m as $e yells: 'FINAL-KA-ME-HA-ME-HA', and a beam of blue energy is released towards $N!!!" , ch, NULL, victim, TO_NOTVICT);

   if (can_use_skill(ch, number_percent(), gsn_fkame ))
   {
    dam = number_range( 60, 81 );
    damage(ch, victim, dam, TYPE_FKAME);
    learn_from_success( ch, gsn_fkame );
   }
   else
   {
    damage(ch, victim, dam, TYPE_FKAME);
    learn_from_failure( ch, gsn_fkame );
   }
   ch->mana -= ch->max_mana / 2;

}

void do_ultimatekamehameha( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char arg1[MAX_INPUT_LENGTH];
  bool sense=FALSE;
  int kamedam, dam, kameextra, reqki;

  if ( IS_SAIYAN(ch) && xIS_SET(ch->act, PLR_CAN_ULTIMATEKAME ) )
  {
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }

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

   reqki = ch->max_mana / 4;

   if (ch->mana < reqki )
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }

    act( AT_BLOOD, "&BYou lower both your hands to your sides and form a glowing ball in each palm.", ch, NULL, victim, TO_CHAR );
    act( AT_BLOOD, "&BSlowly you merge both energy balls into one at your side.", ch, NULL, victim, TO_CHAR );
    act( AT_BLOOD, "&wYou yell '...Times TEN!'", ch, NULL, victim, TO_CHAR );
    act( AT_BLOOD, "&wYou mutter the words 'KA-ME-HA-ME-HA!'", ch, NULL, victim, TO_CHAR );
    act( AT_BLOOD, "&zYou push your arms forward, unleashing all your energy at $N.", ch, NULL, victim, TO_CHAR );

    act( AT_BLOOD, "&B$n lowers both $s hands to $s sides and forms a glowing ball in each palm.", ch , NULL, victim, TO_VICT );
    act( AT_BLOOD, "&BSlowly $e merges both energy balls into one at $s side.", ch, NULL, victim, TO_VICT );
    act( AT_BLOOD, "&w$n yells '...Times TEN!'.", ch, NULL, victim, TO_VICT );
    act( AT_BLOOD, "&w$n mutters the words 'KA-ME-HA-ME-HA!'", ch, NULL, victim, TO_VICT );
    act( AT_BLOOD, "&z$n pushes $s arms forward, unleashing all $s energy at you.", ch, NULL, victim, TO_VICT );

    act( AT_BLOOD, "&B$n lowers both $s hands to $s sides and forms a glowing ball in each palm.", ch , NULL, victim,TO_NOTVICT );
    act( AT_BLOOD, "&BSlowly $e merges both energy balls into one at $s side.", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&w$n yells '...Times TEN!'.", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&w$n mutters the words 'KA-ME-HA-ME-HA!'", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&z$n pushes $s arms forward, unleashing all $s energy at $N.", ch, NULL, victim, TO_NOTVICT );


/*    act( AT_BLOOD, "&w$n closes $s eyes and focus $s mental energy.", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&WSlowly a HUGE piece of rock starts to hover above the ground.", ch, NULL, victim, TO_NOTVICT );
    act( AT_BLOOD, "&WAll of a sudden the massive rock gets sent towards $N.", ch, NULL, victim, TO_NOTVICT ); */



    ch->mana -= reqki;

/*    act( AT_WHITE, "&w$N lowers $S arms again." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&wYou lower your arms again." , ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&w$n lowers $S arms again." , ch, NULL, victim, TO_NOTVICT); */
    if (char_died(ch))
    {
      stop_fighting( ch , TRUE );
      return;
    }
    xSET_BIT(victim->act, PLR_DELAYEDATTACK);
    WAIT_STATE( ch, 22 );

    return;
   }
}

void do_kame( CHAR_DATA *ch, char *argument )
{
  CHAR_DATA *victim;
  char arg1[MAX_INPUT_LENGTH];
  bool sense=FALSE;
  int kamedam, dam, kameextra;

/*  if (IS_NPC(ch))
  return; */

  argument = one_argument( argument, arg1 );

   if ( !IS_NPC(ch) )
  {
  if (ch->pcdata->learned[gsn_kame] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

  if (IS_BIODROID(ch) || IS_SAIYAN(ch) || IS_HALFBREED(ch) || IS_HUMAN(ch))
  {
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

   if (IN_SPAR(ch))
   {
    send_to_char("You can't use ki attacks while sparring.\n\r", ch);
    return;
   }

    if ( ch->hit <= 7 && ( victim = who_fighting( ch ) ) == NULL )
    {
    send_to_char( "You are too injured to fight properly.\n\r", ch );
    return;
    }

  if ( ( victim = get_char_room( ch, arg1 ) ) == NULL )
  {
    if ( ( victim = sense_for_victim( ch, arg1 ) ) == NULL )
    {
      send_to_char( "You can't sense them.\n\r", ch );
      return;
    }
    else
    sense = TRUE;
  }

   if (victim == ch)
   {
    send_to_char( "You can't do that.\n\r", ch );
    return;
   }

/* Snipe Damage */
    kamedam = number_range(10, 20);
    kameextra = get_curr_str(ch) - get_curr_str(victim);
    kamedam += kameextra;
    if ( IS_NPC(victim) )
    dam = kamedam/2;
    else
    dam = kamedam;

   if (ch->mana <= 4000 )
   {
    send_to_char( "You need more ki to use this technique.\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_kame ))
   {
     if ( !sense )
     warcry( ch, victim );

        if ( sense )
        {
                act( AT_WHITE, "&B$n spreads $s arms as $e begins to tunnel energy into $s hands.\n\r$n yells 'KA-ME-HA-ME-HA!\n\r&W$n pushes $s arms forward as $e launches a white energy blast towards the sky!" , ch, NULL,victim, TO_NOTVICT);
                WAIT_STATE( ch, 13 );
        }
    act( AT_WHITE, "&B$N spreads $S arms and turns towards you.\n\r$N yells 'KA-ME-HA-ME-HA!\n\r&W$N pushes $S arms forward as $E launches a white energy blast towards you!" , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&BYou spread your arms and turn towards $N.\n\rYou yell 'KA-ME-HA-ME-HA!\n\r&WYou push your arms forward as you launch a white energy blast towards $N!", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&B$N spreads $S arms and turns towards $n.\n\r$N yells 'KA-ME-HA-ME-HA!\n\r&W$N pushes $S arms forward as $E launches a white energy blast towards $n!" , victim, NULL, ch, TO_NOTVICT);

    if ( sense )
    {
    sensedamage( ch, victim, TYPE_KAME, TYPE_KAME ); 
    ch->mana -= 4000;
    learn_from_success( ch, gsn_kame );
    return;
    }
    one_hit(ch, victim, TYPE_KAME);
    ch->mana -= 4000;
    learn_from_success( ch, gsn_kame );
   }
   else
   {
    act( AT_WHITE, "&B$N spreads $S arms and turns towards you.\n\r$N yells 'KA-ME-HA-ME-HA!\n\r&W$N pushes $S arms forward as $E launches a white energy blast towards you, but it's off target." , victim, NULL, ch, TO_CHAR);
    act( AT_WHITE, "&BYou spread your arms and turn towards $N.\n\rYou yell 'KA-ME-HA-ME-HA!\n\r&WYou push your arms forward as you launch a white energy blast towards $N, but it's off target.", ch, NULL, victim, TO_CHAR);
    act( AT_WHITE, "&B$n spreads $S arms and turns towards $N.\n\r$n yells 'KA-ME-HA-ME-HA!\n\r&W$n pushes $S arms forward as $E launches a white energy blast towards $N, but it's off target." , ch, NULL, victim, TO_NOTVICT);
    damage(ch, victim, 0, TYPE_KAME);
    ch->mana -= 4000;
    learn_from_failure( ch, gsn_kame );
    WAIT_STATE( ch, 13 );
    return;
   }
    WAIT_STATE( ch, 13 );
  }
  else
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

void do_analyze( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   CHAR_DATA       * victim;
   char              buf[MAX_STRING_LENGTH];
   int               pl;

/*   if (IS_NPC(victim))
   pl = victim->exp;
   else
   pl = victim->exp * victim->mod; */

   argument = one_argument( argument, arg1 );

   if (!IS_ANDROID(ch))
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
   if ( arg1[0] == '\0' )
   {
     send_to_char( "Analyze Who?\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 == ch )
    {
        send_to_char( "Analyze yourself? Use your prompt for that.\n\r", ch );
        return;
    }

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

       char_from_room( ch );
       char_to_room( ch, victim->in_room );

       sprintf( buf , "&R%s analyzes you." , ch->name);
       act( AT_WHITE, buf , victim, NULL, ch, TO_CHAR );
       if (IS_NPC(victim))
       {
       ch_printf( ch, "&gIt appears that &w%s&g has a powerlevel of &R%s&g.\n\r", victim->name, num_punct(victim->exp) );
       ch_printf( ch, "It also seems that &w%s&g has &G%d%%&g Lifeforce\n\r", victim->name, victim->hit );
       ch_printf( ch, "and &w%s's&g ki is now at &G%d&g out of &G%d&g.\n\r", victim->name, victim->mana, victim->max_mana );
       }
      else if (!xIS_SET(victim->act, PLR_SUPPRESS))
       {
       ch_printf( ch, "&gIt appears that &w%s&g has a powerlevel of &R%s&g.\n\r", victim->name, num_punct(victim->exp * victim->mod) );
       ch_printf( ch, "It also seems that &w%s&g has &G%d%%&g Lifeforce\n\r", victim->name, victim->hit );
       ch_printf( ch, "and &w%s's&g ki is now at &G%d&g out of &G%d&g.\n\r", victim->name, victim->mana, victim->max_mana);
       }
       else
       {
       ch_printf( ch, "&gIt appears that &w%s&g has a powerlevel of &R%s&g.\n\r", victim->name, num_punct(victim->suppress) );
       ch_printf( ch, "It also seems that &w%s&g has &G%d%%&g Lifeforce\n\r", victim->name, victim->hit );
       ch_printf( ch, "and &w%s's&g ki is now at &G%d&g out of &G%d&g.\n\r", victim->name, victim->mana, victim->max_mana);
       }

/*       act( AT_RED, buf, ch, NULL, victim, TO_CHAR ); */
       sprintf( buf, "&R%s analyzes the power of $N." , ch->name);
       act( AT_WHITE, buf, ch, NULL, victim, TO_NOTVICT );

}


/* void do_alist( CHAR_DATA *ch, char *argument )
{
      if ( IS_NPC(ch) )
        return;

     ch_printf(ch, "\n\r&z+---------------------------------------------------------------+&D\n\r" );
     ch_printf(ch, "&z|&Y                       ABILITY LIST&z                            |&D\n\r" );
     ch_printf(ch, "&z+---------------------------------------------------------------+&D\n\r" );
     ch_printf(ch, "&z|&R  Skill                 Learned                 Powerlevel&z     |&D\n\r" );
     ch_printf(ch, "&z+---------------------------------------------------------------+&D\n\r" );
     ch_printf(ch, "&z|                                                               |&D\n\r" );

    if (IS_BIODROID(ch))
    {
      ch_printf(ch, "&z|&c  Primary Technique       &w%3d&W%%                 70,000,000&z      |\n\r",ch->pcdata->learned[gsn_primaryattack] );
      ch_printf(ch, "&z|&c  Special Beam Cannon     &w%3d&W%%                  5,000,000&z      |\n\r", ch->pcdata->learned[gsn_sbc] );
      ch_printf(ch, "&z|&c  Kamehameha              &w%3d&W%%                  5,000,000&z      |\n\r", ch->pcdata->learned[gsn_kame] );
      ch_printf(ch, "&z|&c  Fingerbeam              &w%3d&W%%                  1,000,000&z      |\n\r", ch->pcdata->learned[gsn_fingerbeam] );
      ch_printf(ch, "&z|&c  Grip                    &W%3d&z%%                  1,000,000&z      |\n\r",ch->pcdata->learned[gsn_grip] );
      ch_printf(ch, "&z|&c  Regenerate              &w%3d&W%%                  250,000&z        |\n\r", ch->pcdata->learned[gsn_regen] );
      ch_printf(ch, "&z|&c  Absorb                  &w%3d&W%%                  125,000&z        |\n\r", ch->pcdata->learned[gsn_absorb] );
      ch_printf(ch, "&z|&c  Heal                    &w%3d&W%%                  100,000&z        |\n\r", ch->pcdata->learned[gsn_heal] );
      ch_printf(ch, "&z|&c  Energy Sphere           &w%3d&W%%                  250,000&z        |\n\r", ch->pcdata->learned[gsn_energysphere] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_ANDROID(ch))
   {
      ch_printf(ch, "&z|&c  Super Android          &W%3d&z%%                   &W5,000,000&z      |\n\r",  ch->pcdata->learned[gsn_accelerate]);      
      ch_printf(ch, "&z|&c  Eyebeam                &W%3d&z%%                   &W4,000,000&z      |\n\r", ch->pcdata->learned[gsn_eyebeam] );
      ch_printf(ch, "&z|&c  Fingerbeam             &W%3d&z%%                   &W1,000,000&z      |\n\r", ch->pcdata->learned[gsn_fingerbeam] );
      ch_printf(ch, "&z|&c  Grip                   &W%3d&z%%                   &W1,000,000&z      |\n\r",ch->pcdata->learned[gsn_grip] );
      ch_printf(ch, "&z|&c  Energy Sphere          &W%3d&z%%                   &W250,000&z        |\n\r", ch->pcdata->learned[gsn_energysphere] );
      ch_printf(ch, "&z|&c  Absorb                 &W%3d&z%%                   &W125,000&z        |\n\r",ch->pcdata->learned[gsn_absorb] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_HALFBREED(ch))
   {
      ch_printf(ch, "&z|&c  Masenko                &w%3d&W%%                   55,000,000&z     |\n\r", ch->pcdata->learned[gsn_masenko] );
      ch_printf(ch, "&z|&c  Mystic                 &w%3d&W%%                   20,000,000&z     |\n\r", ch->pcdata->learned[gsn_mystic] );
      ch_printf(ch, "&z|&c  Kamehameha             &w%3d&W%%                   5,000,000&z      |\n\r", ch->pcdata->learned[gsn_kame] );
      ch_printf(ch, "&z|&c  Kaioken                &w%3d&W%%                   4,000,000&z      |\n\r", ch->pcdata->learned[gsn_kaioken] );
      ch_printf(ch, "&z|&c  Energy Barrier         &w%3d&W%%                   50,000&z         |\n\r", ch->pcdata->learned[gsn_ebar] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_HUMAN(ch))
   {
      ch_printf(ch, "&z|&c  Tribeam                &w%3d&W%%                   55,000,000&z     |\n\r",  ch->pcdata->learned[gsn_tribeam] );
      ch_printf(ch, "&z|&c  Kamehameha             &w%3d&W%%                   5,000,000&z      |\n\r",ch->pcdata->learned[gsn_kame] );
      ch_printf(ch, "&z|&c  Super Human            &w%3d&W%%                   2,500,000&z      |\n\r", ch->pcdata->learned[gsn_superhuman] );
      ch_printf(ch, "&z|&c  Doublepunch            &w%3d&W%%                   1,500,000&z      |\n\r", ch->pcdata->learned[gsn_doublepunch] );
      ch_printf(ch, "&z|&c  Doublekick             &w%3d&W%%                   1,500,000&z      |\n\r", ch->pcdata->learned[gsn_doublekick] );
      ch_printf(ch, "&z|&c  Destructo Disk         &w%3d&W%%                   1,000,000&z      |\n\r", ch->pcdata->learned[gsn_destructo] );
      ch_printf(ch, "&z|&c  Energy Barrier         &w%3d&W%%                   50,000&z         |\n\r", ch->pcdata->learned[gsn_ebar] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_ICER(ch))
   {
      ch_printf(ch, "&z|&c  Mental Throw           &w%3d&W%%                   55,000,000&z     |\n\r", ch->pcdata->learned[gsn_mentalthrow] );
      ch_printf(ch, "&z|&c  Dual Destructo Disk    &w%3d&W%%                   4,000,000&z      |\n\r", ch->pcdata->learned[gsn_ddd] );
      ch_printf(ch, "&z|&c  Fingerbeam             &w%3d&W%%                   1,000,000&z      |\n\r", ch->pcdata->learned[gsn_fingerbeam] );
      ch_printf(ch, "&z|&c  Tail                   &w%3d&W%%                   1,000,000&z      |\n\r" );
      ch_printf(ch, "&z|&c  Destructo Disk         &w%3d&W%%                   750,000&z        |\n\r", ch->pcdata->learned[gsn_destructo] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_NAMEK(ch))
   {
      ch_printf(ch, "&z|&c  Scattershot            &w%3d&W%%                   55,000,000&z     |\n\r", ch->pcdata->learned[gsn_scattershot] );
      ch_printf(ch, "&z|&c  Special Beam Cannon    &w%3d&W%%                   5,000,000&z      |\n\r", ch->pcdata->learned[gsn_sbc] );
      ch_printf(ch, "&z|&c  Energy Sphere          &w%3d&W%%                   250,000&z        |\n\r",ch->pcdata->learned[gsn_energysphere] );
      ch_printf(ch, "&z|&c  Split Form             &w%3d&W%%                   500,000&z        |\n\r",ch->pcdata->learned[gsn_split] );
      ch_printf(ch, "&z|&c  Heal                   &w%3d&W%%                   100,000&z        |\n\r", ch->pcdata->learned[gsn_heal] );
      ch_printf(ch, "&z|&c  Energy Barrier         &w%3d&W%%                   50,000&z         |\n\r", ch->pcdata->learned[gsn_ebar] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_MUTANT(ch))
   {
      ch_printf(ch, "&z|&c  Secondary Skill        &w%3d&W%%                   85,000,000&z     |\n\r",ch->pcdata->learned[gsn_secondary_skill] );
      ch_printf(ch, "&z|&c  Scattershot            &w%3d&W%%                   55,000,000&z     |\n\r", ch->pcdata->learned[gsn_scattershot] );
      ch_printf(ch, "&z|&c  Primary Skill          &w%3d&W%%                   1,500,000&z      |\n\r",ch->pcdata->learned[gsn_primary_skill] );
      ch_printf(ch, "&z|&c  Claw                   &w%3d&W%%                   250,000&z        |\n\r", ch->pcdata->learned[gsn_claw] );
      ch_printf(ch, "&z|&c  Energy Barrier         &w%3d&W%%                   50,000&z         |   \n\r",ch->pcdata->learned[gsn_ebar] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }
   else if (IS_SAIYAN(ch))
   {
      ch_printf(ch, "&z|&c  Galic Gun              &w%3d&W%%                   85,000,000&z     |\n\r", ch->pcdata->learned[gsn_galicgun] );
      ch_printf(ch, "&z|&c  Kamehameha             &w%3d&W%%                   5,000,000&z      |\n\r", ch->pcdata->learned[gsn_kame] );
      ch_printf(ch, "&z|&c  Kaioken                &w%3d&W%%                   4,000,000&z      |\n\r", ch->pcdata ->learned[gsn_kaioken] );
      ch_printf(ch, "&z|&c  Regenerate             &w%3d&W%%                   250,000&z        |\n\r", ch->pcdata->learned[gsn_regen] );
      ch_printf(ch, "&z|&c  Energy Sphere          &w%3d&W%%                   250,000&z        |\n\r", ch->pcdata->learned[gsn_energysphere] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
   }

} */

/* void do_slist( CHAR_DATA *ch, char *argument)
{
    if ( IS_NPC(ch) )
        return;

      ch_printf(ch, "\n\r&z+---------------------------------------------------------------+&D\n\r" );
      ch_printf(ch, "&z|&Y                       SKILL LIST&z                              |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+&D\n\r" );
      ch_printf(ch, "&z|&R  Skill                 Learned                 Powerlevel&z     |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+&D\n\r" );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z|&c  Chikara 1              &w%3d&W%%                   5,000,000&z      |\n\r", ch->pcdata->learned[gsn_chikone] );
      ch_printf(ch, "&z|&c  Chikara 2              &w%3d&W%%                   25,000,000&z     |\n\r", ch->pcdata->learned[gsn_chiktwo] );
      ch_printf(ch, "&z|&c  Chikara 3              &w%3d&W%%                   55,000,000&z     |\n\r", ch->pcdata->learned[gsn_chikthree] );
      ch_printf(ch, "&z|&c  Chikara 4              &w%3d&W%%                   75,000,000&z     |\n\r", ch->pcdata->learned[gsn_chikfour] );
      ch_printf(ch, "&z|&c  Instant Transmission   &w%3d&W%%                   95,000,000&z     |\n\r", ch->pcdata->learned[gsn_instant] );
      ch_printf(ch, "&z|&c  Blast                  &w%3d&W%%                   5,000,000&z      |\n\r" , ch->pcdata->learned[gsn_blast] );
      ch_printf(ch, "&z|&c  Blastdoor              &w%3d&W%%                   5,000,000&z      |\n\r" ,ch->pcdata->learned[gsn_blastdoor] );
      ch_printf(ch, "&z|&c  Extract                &w%3d&W%%                   5,000,000&z      |\n\r",ch->pcdata->learned[gsn_extract] );
      ch_printf(ch, "&z|&c  Second Attack          &w%3d&W%%                   2,500,000&z      |\n\r", ch->pcdata->learned[gsn_second_attack] );
      ch_printf(ch, "&z|&c  Suppress               &w%3d&W%%                   1,000,000&z      |\n\r",  ch->pcdata->learned[gsn_suppress] );
      ch_printf(ch, "&z|&c  Sense                  &w%3d&W%%                   500,000&z        |\n\r", ch->pcdata->learned[gsn_sense] );
      ch_printf(ch, "&z|&c  Fly                    &w%3d&W%%                   50,000&z         |\n\r",  ch->pcdata->learned[gsn_fly] );
      ch_printf(ch, "&z|&c  Charge                 &w%3d&W%%                   25,000&z         |\n\r",   ch->pcdata->learned[gsn_charge] );
      ch_printf(ch, "&z|&c  Direct                 &w%3d&W%%                   25,000&z         |\n\r", ch->pcdata->learned[gsn_direct] );
      ch_printf(ch, "&z|&c  Energy Ball            &w%3d&W%%                   25,000&z         |\n\r",ch->pcdata->learned[gsn_energyball] );
      ch_printf(ch, "&z|&c  Punch                  &w%3d&W%%                   5,000&z          |\n\r",ch->pcdata->learned[gsn_punch] );
      ch_printf(ch, "&z|&c  Kick                   &w%3d&W%%                   5,000&z          |\n\r",ch->pcdata->learned[gsn_kick] );
      ch_printf(ch, "&z|&c  Aid                    &w%3d&W%%                   1,000&z          |\n\r", ch->pcdata->learned[gsn_aid] );
      ch_printf(ch, "&z|                                                               |&D\n\r" );
      ch_printf(ch, "&z+---------------------------------------------------------------+\n\r");
} */

void do_alist( CHAR_DATA *ch, char *argument)
{
   sh_int sn, lasttype;
   if ( IS_NPC(ch))
   {
      send_to_char( "Huh?\n\r", ch);
      return;
   }
     lasttype = SKILL_ASKILL;
     for ( sn = 0; sn < top_sn; sn++ )
     {
         if ( skill_table[sn]->type != lasttype )
           continue;

      if ( !can_userace( ch, sn ) )
       continue;

            ch_printf(ch, "\n\r&BSkill:&w %-20.20s&B  Current: &W%3d%%    &BPowerlevel: &W%-12.12s\n\r",skill_table[sn]->name,ch->pcdata->learned[sn],   skill_table[sn]->pl ? num_punct(skill_table[sn]->pl) : "0" );

     }
      ch_printf(ch, "\n\r");
      ch_printf(ch, "\n\r&zSee also: slist, pract, ralist\n\r");
}

void do_slist( CHAR_DATA *ch, char *argument)
{
   sh_int sn, lasttype;
   if ( IS_NPC(ch))
   {
      send_to_char( "Huh?\n\r", ch);
      return;
   }
     lasttype = SKILL_SSKILL;
     for ( sn = 0; sn < top_sn; sn++ )
     {
         if ( skill_table[sn]->type != lasttype )
           continue;

            ch_printf(ch, "\n\r&BSkill:&w %-20.20s&B  Current: &W%3d%%    &BPowerlevel: &W%-12.12s   \n\r",skill_table[sn]->name,ch->pcdata->learned[sn],   skill_table[sn]->pl ? num_punct(skill_table[sn]->pl) : "0" );

     }
      ch_printf(ch, "\n\r");
      ch_printf(ch, "\n\r&zSee also: alist, pract, ralist\n\r");
}

void do_ralist( CHAR_DATA *ch, char *argument)
{
   sh_int sn, lasttype;
   if ( IS_NPC(ch))
   {
      send_to_char( "Huh?\n\r", ch);
      return;
   }
     lasttype = SKILL_RSKILL;
     for ( sn = 0; sn < top_sn; sn++ )
     {
         if ( skill_table[sn]->type != lasttype )
           continue;

      if ( !can_userace( ch, sn ) )
       continue;


            ch_printf(ch, "\n\r&BRacial:&w %-20.20s&B  &BPowerlevel: &W%-12.12s\n\r",skill_table[sn]->name,   skill_table[sn]->pl ? num_punct(skill_table[sn]->pl) : "0" );


     }
      ch_printf(ch, "\n\r");
      ch_printf(ch, "\n\r&zSee also: alist, pract, ralist\n\r");
}

void do_evolve( CHAR_DATA *ch, char *argument )
{
       char              arg1[MAX_INPUT_LENGTH];
       char              buf[MAX_INPUT_LENGTH];

   argument = one_argument(argument, arg1);

    if( !IS_BIODROID(ch) )
    {
      ch_printf(ch,"&wHuh?\n\r");
      return;
    }

   if (!IS_AWAKE(ch))
   {
    send_to_char( "You're sleeping!\n\r", ch);
    return;
   }

        if ( arg1[0] == '\0')
    {
        send_to_char( "&wHow do you want to evolve?\n\r", ch );
        send_to_char( "&BLarvae &GAdult&R Semi&P Perfect&z\n\r", ch );
        return;
    }

     if ( !str_cmp( arg1, "Larvae" ) )
     {
      if ( !xIS_SET(ch->act, PLR_ADULT) && !xIS_SET(ch->act, PLR_SEMIP) && !xIS_SET(ch->act, PLR_PERFECT) )
      {
       ch_printf(ch, "&YYour already at that stage.\n\r");
       return;
      }
       act( AT_SKILL, "You shrink in size and release all your stored energy, reverting back to your larvae stage.", ch , NULL, NULL, TO_CHAR );
       act( AT_SKILL, "$n shrinks in size and releases all $s stored energy, reverting back to $s larvae stage.", ch, NULL, NULL, TO_NOTVICT  );
       xREMOVE_BIT(ch->act, PLR_ADULT);
       xREMOVE_BIT(ch->act, PLR_SEMIP);
       xREMOVE_BIT(ch->act, PLR_PERFECT);
       ch->mod = 1;
         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 ( !str_cmp( arg1, "Adult" ) )
      {
       if (xIS_SET(ch->act, PLR_ADULT))
       {
         send_to_char("&wYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->biomass <= 99)
       {
         send_to_char("&wYou have not yet absorbed enough biomass to reach that stage.\n\r", ch);
         return;
       }
       act( AT_PURPLE, "A purple substance releases from your skin. Your body undergoes a metamorphous change into an adult, revealing your new power.",ch, NULL, NULL, TO_CHAR );
       act( AT_PURPLE, "A purple substance releases from the skin of $n. $s body undergoes a metamorphous change into an adult, revealing $s new power.", ch,NULL, NULL, TO_NOTVICT );
       xREMOVE_BIT(ch->act, PLR_SEMIP);
       xREMOVE_BIT(ch->act, PLR_PERFECT);
       xSET_BIT(ch->act, PLR_ADULT);
       ch->mod = 4;
      return;
     }

      else if ( !str_cmp( arg1, "Semi" ) )
      {
       if (xIS_SET(ch->act, PLR_SEMIP))
       {
         send_to_char("&wYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->biomass <= 499)
       {
         send_to_char("&wYou have not yet absorbed enough biomass to reach that stage.\n\r", ch);
         return;
       }
       act( AT_PURPLE, "Your horns shift closer together, your features becoming more humanoid as you grow in size and complete your evolution to a Semi-Perfect form.", ch, NULL, NULL, TO_CHAR );
       sprintf( buf , "%s's horns shift closer together, %s features becoming more humanoid as %s grows in side and completes %s transformation to Semi-Perfect stage! " , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->sex == 1 ? "he" : ch->sex == 2 ? "she" : "it", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
       act( AT_PURPLE, buf , ch, NULL, NULL, TO_CANSEE );
       xREMOVE_BIT(ch->act, PLR_ADULT);
       xREMOVE_BIT(ch->act, PLR_PERFECT);
       xSET_BIT(ch->act, PLR_SEMIP);
       ch->mod = 6;
      return;
     }

      else if ( !str_cmp( arg1, "Perfect" ) )
      {
       if (xIS_SET(ch->act, PLR_PERFECT))
       {
         send_to_char("&wYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->biomass <= 999)
       {
         send_to_char("&wYou have not yet absorbed enough biomass to reach that stage.\n\r", ch);
         return;
       }
       act( AT_PURPLE, "You draw on newfound power, your body moving with perfect grace and\n\refficiency, your entire form free from blemish or impurity. Your tail retracts into your back.\n\rYou calmly stand in this most human of forms, having evolved into a &PPerfect&p being. A dark purple aura engulfs your body!",ch, NULL, NULL, TO_CHAR );
        sprintf( buf , "%s draws on newfound power, %s body moving with perfect grace and\n\refficiency, %s entire form free from blemish or impurity. %s tail retract into %s back.\n\r%s calmly stands in this most human of forms, having  evolved into a &PPerfect&p being. A dark purple aura engulfs %s's body!", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its",ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->sex == 1 ? "His" : ch->sex == 2 ? "Her" : "Its", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
       act( AT_PURPLE, buf , ch, NULL, NULL, TO_CANSEE );
       xREMOVE_BIT(ch->act, PLR_SEMIP);
       xREMOVE_BIT(ch->act, PLR_ADULT);
       xSET_BIT(ch->act, PLR_PERFECT);
       ch->mod = 10;
       ch->mod_con = -2;
       ch->mod_str = 2;
       ch->mod_dex = 3;
      return;
     }

/*      else if ( !str_cmp( arg1, "Ultra" ) && xIS_SET(ch->act, PLR_CAN_ULTRA) )
      {
       if (xIS_SET(ch->act, PLR_ULTRA))
       {
         send_to_char("&wYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->biomass < 5000)
       {
         send_to_char("&wYou have not yet absorbed enough biomass to reach that stage.\n\r", ch);
         return;
       }
       act( AT_PURPLE, "&pYou feel your body change as you harness the ultimate power.\n\r&PSurpassing your normal plateau, your body surges with strength beyond strength.\n\r&zYour aura radiates with a dim, ominous glow. You have attained Ultra Perfection.",ch, NULL, NULL, TO_CHAR );
       sprintf( buf , "&p%s's body changes as %s harnesses the ultimate power.\n\r&PSurpassing %s normal plateau, %s body surges with strength beyond strength.\n\r&z%s aura radiates with a dim, ominous glow. %s has attained Ultra Perfection.", ch->name, ch->sex == 1 ? "he" : ch->sex == 2  ? "she" : "it", ch->sex == 1 ? "his" : ch->sex == 2  ? "her" : "its", ch->sex == 1 ? "his" : ch->sex == 2  ? "her" : "its", ch->sex == 1 ? "His" : ch->sex == 2  ? "Her" : "Its", ch->name  );
       act( AT_PURPLE, buf , ch, NULL, NULL, TO_CANSEE );
       xREMOVE_BIT(ch->act, PLR_SEMIP);
       xREMOVE_BIT(ch->act, PLR_ADULT);
       xREMOVE_BIT(ch->act, PLR_PERFECT);
       xSET_BIT(ch->act, PLR_ULTRA);
       ch->mod = 11;
       ch->mod_str = 2;
       ch->mod_dex = 3;
       ch->mod_con = -2;
       return;

} */

}

void do_mutate( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   char              buf[MAX_INPUT_LENGTH];

   argument = one_argument( argument, arg1 );

     if ( IS_NPC(ch) )
     return;
     if (!IS_MUTANT(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if (IS_POWERUP(ch))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if ( arg1[0] == '\0' )
     {
      send_to_char( "Mutate into which form?\n\r", ch );
      return;
     }
     if ( !is_number(arg1))
     {
      send_to_char( "It must be a number.\n\r", ch);
      return;
     }
     if ( !str_cmp( arg1, "1" ) )
     {
      if (!xIS_SET(ch->act, PLR_MUTATE2) && !xIS_SET(ch->act, PLR_MUTATE3) && !xIS_SET(ch->act, PLR_MUTATE4) )
      {
       ch_printf(ch, "&YYour already at that stage.\n\r");
       return;
      }
       send_to_char("&YYou shrink and mutate to your normal form.\nYour muscles and your body has returned to the way they were.\n\r", ch);
       sprintf( buf , "%s shrinks and mutates to %s normal form\n\r%s muscles and %s body have returned to the way they were." , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->sex == 1 ? "His" : ch->sex == 2 ? "Her" : "Its", ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
       act( AT_YELLOW, buf , ch, NULL, NULL, TO_CANSEE );
       xREMOVE_BIT(ch->act, PLR_MUTATE2);
       xREMOVE_BIT(ch->act, PLR_MUTATE3);
       xREMOVE_BIT(ch->act, PLR_MUTATE4);
       ch->mod = 1;
       ch->height_mod = 0;
       ch->weight_mod = 0;
       return;
      }
      else if ( !str_cmp( arg1, "2" ) )
      {
       if (xIS_SET(ch->act, PLR_MUTATE2))
       {
         send_to_char("&YYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->exp <= 1499999)
       {
         send_to_char("&YYou are too young to mutate into that stage.\n\r", ch);
         return;
       }
         send_to_char("&YYou growl as you unleash all of your power and you mutate into your second form!\n\rYou scream in pain as your body undergoes changes. You grow in size as your mutation finishes.\n\r", ch);
         act(AT_YELLOW,"$n growls as $e unleashes all of $s power and $e mutates into $s second form!\n\r$n screams in pain as $s body undergoes changes.", ch, NULL, NULL, TO_CANSEE);
         xSET_BIT(ch->act, PLR_MUTATE2);
         xREMOVE_BIT(ch->act, PLR_MUTATE3);
         xREMOVE_BIT(ch->act, PLR_MUTATE4);
         ch->mod = 2;
         ch->height_mod = 4;
         ch->weight_mod = 21;
         return;
       }
      else if ( !str_cmp( arg1, "3" ) )
      {
       if (xIS_SET(ch->act, PLR_MUTATE3))
       {
         send_to_char("&YYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->exp <= 3999999)
       {
         send_to_char("&YYou are too young to mutate into that stage.\n\r", ch);
         return;
       }
         send_to_char("&YYou grow in size as your body undergoes its mutation into its third form.\n\rYou feel all the power that now runs through your veins as you.\n\r", ch);
         act(AT_YELLOW,"$n grows in size as $s body undergoes its mutation into its third form.\n\r$n stands there flexing $s new built muscles.", ch, NULL, NULL, TO_CANSEE);
         xSET_BIT(ch->act, PLR_MUTATE3);
         xREMOVE_BIT(ch->act, PLR_MUTATE2);
         xREMOVE_BIT(ch->act, PLR_MUTATE4);
         ch->height_mod = 8;
         ch->weight_mod = 40;
         ch->mod  =  6;
}
      else if ( !str_cmp( arg1, "4" ) )
      {
       if (xIS_SET(ch->act, PLR_MUTATE4))
       {
         send_to_char("&YYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->exp <= 14999999)
       {
         send_to_char("&YYou are too young to mutate into that stage.\n\r", ch);
         return;
       }
         send_to_char("&YYou close your eyes as you try to harvest the ultimate power within you.\n\rYou begin to grow in size and that power now comes alive and begins to be unleashed.\n\rYou open your eyes which are now turned white as you feel amazingly new power that you have achieve.\n\r", ch);
         act(AT_YELLOW,"$n closes $s eyes as $e tries to harvest the ultimate power within $m\n\r$n begins to grow in size and that now comes alive and begins to be unleashed.\n\r$n opens $s eyes which are now turned into white, and you can feel the amazingly new power that $n has achieved.", ch, NULL, NULL, TO_CANSEE);
         xSET_BIT(ch->act, PLR_MUTATE4);
         xREMOVE_BIT(ch->act, PLR_MUTATE3);
         xREMOVE_BIT(ch->act, PLR_MUTATE2);
         ch->height_mod = 15;
         ch->weight_mod = 60;
         ch->mod = 8.6;
}
/*      else if ( !str_cmp( arg1, "5" ) )
      {
       if (xIS_SET(ch->act, PLR_MUTATE5))
       {
         send_to_char("&YYour already at that stage.\n\r", ch);
         return;
       }
       if (!xIS_SET(ch->act, PLR_CAN_MUTATE5) )
       {
         send_to_char("&YYou are not ready for that.... yet.\n\r", ch);
         return;
       }
       if (ch->exp <= 94999999)
       {
         send_to_char("&YYou are too young to mutate into that stage.\n\r", ch);
         return;
       }
         send_to_char("&rYou feel a horrible energy coursing through your body.\n\r&rYou lose your mind and scream out in a devestating rage.\n\r&YYou begin to mutate into a hideous beast and your powerlevel continues rising.\n\r&zYou feel your transformation is complete and you cool down feeling stronger than ever.\n\r", ch);
         act(AT_YELLOW,"&rA horrible energy courses through the body of $n.\n\r&r$n loses $s mind and screams out in a devastating rage.\n\r&Y$n begins to mutate into a hideous beast, $s powerlevel continues to rise.\n\r&z$n has mutated into $s final transformation.", ch, NULL, NULL, TO_CANSEE);
         xSET_BIT(ch->act, PLR_MUTATE5);
         xREMOVE_BIT(ch->act, PLR_MUTATE4);
         xREMOVE_BIT(ch->act, PLR_MUTATE3);
         xREMOVE_BIT(ch->act, PLR_MUTATE2);
         ch->height_mod = 15;
         ch->weight_mod = 60;
         ch->mod = 9.6;
        if ( xIS_SET(ch->act, PLR_PRIMARY_MEGABRAIN) )
           {
           ch->mod_wis = 10;
           ch->mod_dex = 2;
           }
        if ( xIS_SET(ch->act, PLR_PRIMARY_HIKI) )
           {
           ch->mod_str = -3;
           ch->mod_dex = 3;
           ch->mod_lck = 3;
           }
        if ( xIS_SET(ch->act, PLR_PRIMARY_LARGESIZE) )
           {
           ch->mod_str = 10;
           ch->mod_dex = -5;
           ch->mod_lck = 2;
           }
        if ( xIS_SET(ch->act, PLR_PRIMARY_SMALLSIZE) )
           {
           ch->mod_str = -5;
           ch->mod_dex = 10;
           }
        if ( xIS_SET(ch->act, PLR_PRIMARY_STONESKIN) )
           {
           ch->mod_str = 2;
           ch->mod_lck = 2;
           }
     } */

}

void do_transform( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   argument = one_argument( argument, arg1 );

     if ( IS_NPC(ch) )
     return;
     if (!IS_ICER(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if ( arg1[0] == '\0' )
     {
      send_to_char( "Transform into which stage?\n\r", ch );
      return;
     }
    if ( !is_number(arg1))
     {
      send_to_char( "It must be a number.\n\r", ch);
      return;
     } 
     if ( !str_cmp( arg1, "1" ) )
      {
       ch->mod = 1;
       if (!xIS_SET(ch->act, PLR_TRANSFORM2) && !xIS_SET(ch->act, PLR_TRANSFORM3) && !xIS_SET(ch->act, PLR_TRANSFORM4) && !xIS_SET(ch->act, PLR_TRANSFORM5) )
       {
       ch_printf(ch, "&WYour already at that stage.\n\r");
       return;
       }
       else if (xIS_SET(ch->act, PLR_TRANSFORM2) || xIS_SET(ch->act, PLR_TRANSFORM3) || xIS_SET(ch->act, PLR_TRANSFORM4) || xIS_SET(ch->act, PLR_TRANSFORM5))
       {
         send_to_char("&WYou shrink and you transform to your normal form.\n\rYour body and your muscles have shrunk to the way they were.\r", ch);
         act( AT_GREY, "&W$n shrinks and transforms to $s normal form.\n\r$n muscles and $s body are not so big and powerful as before.", ch, NULL, NULL, TO_CANSEE );
         xREMOVE_BIT(ch->act, PLR_TRANSFORM2);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM3);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM4);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM5);
         ch->mod = 1;
         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 ( !str_cmp( arg1, "2" ) )
      {
       if (xIS_SET(ch->act, PLR_TRANSFORM2))
       {
         send_to_char("&WYour already at that stage.\n\r", ch);
         return;
       }
         send_to_char("&WYou growl as you unleash all of your power and you transform into your second form!\n\rYou scream in pain as your body undergoes changes. You grow in size as your mutation finishes.\n\r", ch);
         act(AT_GREY,"&W$n growls as $e unleashes all of $s power and $e transforms into $s second form!\n\r$n screams in pain as $s body undergoes changes.", ch, NULL, NULL, TO_CANSEE);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM3);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM5);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM4);
         xSET_BIT(ch->act, PLR_TRANSFORM2);
         ch->mod = 2;
         ch->mod_str = 2;
         ch->mod_dex = 0;
         ch->mod_lck = 0;
         ch->mod_wis = 0;
         ch->mod_int = 0;
         ch->mod_con = 0;
         return;
       }
      else if ( !str_cmp( arg1, "3" ) )
      {
       if (xIS_SET(ch->act, PLR_TRANSFORM3))
       {
         send_to_char("&WYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->exp <= 3999999)
       {
         send_to_char("&WYou are too young to transform into that stage.\n\r", ch);
         return;
       }
         send_to_char("&WYou grow in size as your body undergoes its mutation into its third form.\n\rYou feel all the power that now runs through your veins as you.\n\r", ch);
         act(AT_GREY,"&W$n grows in size as $s body undergoes its mutation into its third form.\n\r$n stands there flexing $s new built muscles.", ch, NULL, NULL, TO_CANSEE);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM2);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM4);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM5);
         xSET_BIT(ch->act, PLR_TRANSFORM3);
         ch->mod = 4;
         ch->mod_str = 4;
         ch->mod_dex = 2;
         ch->mod_lck = -2;
         ch->mod_wis = 0;
         ch->mod_int = 0;
         ch->mod_con = 0;
         return;
       }
      else if ( !str_cmp( arg1, "4" ) )
      {
       if (xIS_SET(ch->act, PLR_TRANSFORM4))
       {
         send_to_char("&WYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->exp <= 10000000)
       {
         send_to_char("&WYou are too young to transform into that stage.\n\r", ch);
         return;
       }
         send_to_char("&WYou close your eyes as you try to harvest the ultimate power within you.\n\rYou begin to grow in size and that power now comes alive and begins to be unleashed.\n\rYou open your eyes which are now turned white as you feel amazingly new power that you have achieve.\n\r", ch);
         act(AT_GREY,"&W$n closes $s eyes as $e tries to harvest the ultimate power within $m\n\r$n begins to grow in size and that now comes alive and begins to be unleashed.\n\r$n opens $s eyes which are now turned into white, and you can feel the amazingly new power that $n has achieved.", ch, NULL, NULL, TO_CANSEE);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM2);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM3);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM5);
         xSET_BIT(ch->act, PLR_TRANSFORM4);
         ch->mod = 6;
         ch->mod_str = 6;
         ch->mod_dex = 2;
         ch->mod_lck = -4;
         ch->mod_wis = 0;
         ch->mod_int = 0;
         ch->mod_con = 0;
         return;
}
      else if ( !str_cmp( arg1, "5" ) )
      {
       if (xIS_SET(ch->act, PLR_TRANSFORM5))
       {
         send_to_char("&WYour already at that stage.\n\r", ch);
         return;
       }
       if (ch->exp <= 24999999)
       {
         send_to_char("&WYou are too young to transform into that stage.\n\r", ch);
         return;
       }
          send_to_char("&WYou begin to shrink into a midget.\n\rYou are now fast and accurate in all your attacks, your skin turns smooth and shiny.\n\r", ch);
         act(AT_GREY,"&W$n begins to shrink into a midget.\n\r$n is now fast and accurate in all $s attacks. $n's skin turns smooth and shiny.", ch, NULL, NULL, TO_CANSEE);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM2);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM3);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM4);
         xSET_BIT(ch->act, PLR_TRANSFORM5);
         ch->mod = 9;
         ch->mod_str = 1;
         ch->mod_dex = 4;
         ch->mod_lck = -2;
         ch->mod_wis = 0;
         ch->mod_int = 4;
         ch->mod_con = 0;
         return;
      }

/*      else if ( !str_cmp( arg1, "metal" ) )
      {
       if (xIS_SET(ch->act, PLR_TRANSFORM_METAL))
       {
         send_to_char("&WYour already at that stage.\n\r", ch);
         return;
       }
       if (!xIS_SET(ch->act, PLR_CAN_METAL))
       {
         send_to_char("&WHuh?\n\r", ch);
         return;
       }
       if (ch->exp <= 89999999)
       {
         send_to_char("&WYou are too young to transform into that stage.\n\r", ch);
         return;
       }
          send_to_char("&cA veil of ice forms around your body, covering you head to toe.\n\r&CThe massive storm starts to solidify into a metal like armor.\n\r&CYou look up into the sky and your body rises off the ground.\n\r&wYour new body plating shimmers in the sun, you have transformed into Metal Form!\n\r", ch);
         act(AT_GREY,"&cA veil of ice forms around $n's body, covering $e head to toe.\n\r&CThe massive storm starts to solidify into a metal like armor.\n\r&C$n looks up into the sky as $s body rises off the ground.\n\r&w$n's new body plating shimmers in the sun, $e has transformed into $s Metal Form!", ch, NULL, NULL, TO_CANSEE);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM2);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM3);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM4);
         xREMOVE_BIT(ch->act, PLR_TRANSFORM5);
         xSET_BIT(ch->act, PLR_TRANSFORM_METAL);
         ch->mod = 10;
         ch->mod_str = 1;
         ch->mod_dex = 4;
         ch->mod_lck = -2;
         ch->mod_wis = 0;
         ch->mod_int = 4;
         ch->mod_con = 0;
         return;
      } */

}

/* void do_ascension( CHAR_DATA *ch, char *argument )
{
     if ( IS_NPC(ch) )
     return;
     if (!IS_HUMAN(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!xIS_SET(ch->act, PLR_CAN_ASCENSION))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if (IS_POWERUP(ch))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_SUPERHUMAN) )
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (ch->exp < 85000000)
     {
      send_to_char("You can't fathom that power... train more...\n\r", ch);
      return;
     }
     if (ch->mana < 51 )
     {
      send_to_char("You need more energy to use this technique.\n\r", ch);
      return;
     }

     if (xIS_SET(ch->act, PLR_ASCENSION))
     {
      xREMOVE_BIT(ch->act, PLR_ASCENSION);
      send_to_char( "You concentrate and your body and muscles begin to dissappear...\n\rYour enourmous power fades as you return to your normal form.\n\r", ch );
      act(AT_GREY,"$n concentrates and $s body and muscles begin to dissappear...\n\r$s enourmous power fades as $e return to $s normal form.", ch, NULL, NULL, TO_CANSEE);
      ch->mod_dex = 0;
      ch->mod_lck = 3;
      ch->mod = 1;
     }
     else
     {
      xSET_BIT(ch->act, PLR_ASCENSION);
      send_to_char( "&zYou close your eyes and start to draw in massive amounts of energy.\n\r&wYou unleash an enormous white aura which engulfs you from the ground up.\n\r&WClenching your fists tighter, you release a feral scream.\n\r&wYour body throbs with raw energy, you have ascended beyond a Super Human!\n\r", ch );
      act(AT_GREY,"&z$n closes $s eyes and starts to drawn in massive amounts of energy.\n\r&w$n unleashes an enormous white aura which engulfs $m from the ground up.\n\r&WClenching $s fists tigether, $e releases a feral scream.\n\r&w$n's body throbs with raw energy, $e has ascended beyond a Super Human!", ch, NULL, NULL, TO_CANSEE);
         ch->mana -= 200;
         ch->mod = 9.5;
         ch->mod_dex = 6;
         ch->mod_lck = 3;
      return;
     }
}

void do_namekfusion( CHAR_DATA *ch, char *argument )
{
     if ( IS_NPC(ch) )
     return;
     if (!IS_NAMEK(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!xIS_SET(ch->act, PLR_CAN_NAMEKFUSION))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if (IS_POWERUP(ch))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_SNAMEK) )
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (ch->exp < 90000000)
     {
      send_to_char("You can't fathom that power... train more...\n\r", ch);
      return;
     }
     if (ch->mana < 51 )
     {
      send_to_char("You need more energy to use this technique.\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_NAMEKFUSION))
     {
      xREMOVE_BIT(ch->act, PLR_NAMEKFUSION);
      send_to_char( "You concentrate and your body and muscles begin to dissappear...\n\rYour enourmous power fades as you return to your normal form.\n\r", ch );
      act(AT_GREY,"$n concentrates and $s body and muscles begin to dissappear...\n\r$s enourmous power fades as $e return to $s normal form.", ch, NULL, NULL, TO_CANSEE);
      ch->mod_str = 0;
      ch->mod_int = 0;
      ch->mod_dex = 0;
      ch->mod = 1;
     }
     else
     {
      xSET_BIT(ch->act, PLR_NAMEKFUSION);
      send_to_char( "&GYour body is engulfed in bright green flames.\n\rThe former body in which you fused with breaks out, swirling around you.\n\r&gYou arch your body and rise off the ground, your body seeps with raw energy.\n\r&cYour bodies combine into one, you have used the Namekian Fusion technique!\n\r", ch );
      act(AT_GREY,"&G$n's body is engulfed in bright green flames.\n\rThe former body in which $n fused with breaks out, swirling around $m.\n\r&g$n arches $s body and rises off the ground, $s body seeping with raw energy.\n\r&cThe bodies combine into one, $n has used the Namekian Fusion technique!", ch, NULL, NULL, TO_CANSEE);
      ch->mod = 9.9;
      ch->mod_str = -2;
      ch->mod_int = 4;
      ch->mod_dex = 4;
      ch->mana -= 50;
      return;
     }
} */


void do_snamek( CHAR_DATA *ch, char *argument )
{
     if ( IS_NPC(ch) )
     return;
     if (!IS_NAMEK(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if (IS_POWERUP(ch))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (ch->exp < 3500000)
     {
      send_to_char("Your no Super Namek...\n\r", ch);
      return;
     }
     if (ch->mana < 51 )
     {
      send_to_char("You need more energy to use this technique.\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_SNAMEK))
     {
      xREMOVE_BIT(ch->act, PLR_SNAMEK);
      send_to_char( "You concentrate and your body and muscles begin to dissappear...\n\rYour enourmous power fades as you return to your normal form.\n\r", ch );
      act(AT_GREY,"$n concentrates and $s body and muscles begin to dissappear...\n\r$s enourmous power fades as $e return to $s normal form.", ch, NULL, NULL, TO_CANSEE);
      ch->mod_str = 0;
      ch->mod_int = 0;
      ch->mod_dex = 0;
      ch->mod = 1;
     }
     else
     {
      xSET_BIT(ch->act, PLR_SNAMEK);
      send_to_char( "&GYou scream as your muscles and your body grow...\n\rYou raidate with extreme power as you become a Super Namek!!!\n\r", ch );
      act(AT_GREY,"&G$n screams as $s muscles and $s body grows...\n\r$e raidates with extreme power as $e becomes a S&gu&Gp&ge&Gr&g N&Ga&gm&Ge&gk&G!!!", ch, NULL, NULL, TO_CANSEE);
      ch->mod = 8.9;
      ch->mod_str = -2;
      ch->mod_int = 4;
      ch->mod_dex = 4;
      ch->mana -= 50;
      return;
     }
}

void do_toggle( CHAR_DATA *ch, char *argument )
{
     if ( IS_NPC(ch) )
     return;

     if xIS_SET(ch->act, PLR_TOGGLE)
     {
        xREMOVE_BIT(ch->act, PLR_TOGGLE);
        send_to_char( "&wYou will now be finishing people off!\n\r", ch );
     }
     else
     {
        xSET_BIT(ch->act, PLR_TOGGLE);
        send_to_char( "&wYou will now be sparing with people.\n\r", ch );
        return;
     }

}

void do_direct( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   CHAR_DATA       * victim;
   char              buf[MAX_STRING_LENGTH];

   argument = one_argument( argument, arg1 );

   if (!IS_NPC(ch) )
 {
   if (ch->pcdata->learned[gsn_direct] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
 }

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

    if ( ch->hit <= 7 && ( victim = who_fighting( ch ) ) == NULL )
    {
    send_to_char( "You are too injured to fight properly.\n\r", ch );
    return;
    }

   if ( arg1[0] == '\0' )
   {
     send_to_char( "Usage: Direct <Target>\n\r", ch );
     return;
   }
   if ( xIS_SET( ch->in_room->room_flags, ROOM_SAFE ) )
   {
    send_to_char( "&wYou can't do that here.\n\r", ch );
    return;
   }
   if ( xIS_SET(ch->act, PLR_EBAR))
   {
    send_to_char( "You can't direct an Energy Barrier.\n\r", ch);
    return;
   }
   if ( !xIS_SET(ch->act, PLR_DDD) && !xIS_SET(ch->act,PLR_EBALL) && !xIS_SET(ch->act, PLR_ESPHERE) && !xIS_SET(ch->act, PLR_DESTRUCTO))
   {
    send_to_char( "&wYou are not controlling an energy attack.\n\r", ch);
    return;
   }
    if ( ch->hit <= 7)
    {
    send_to_char( "You are too injured to fight properly.\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 == ch )
   {
    send_to_char( "Direct it to yourself?\n\r", ch );
    return;
   }
   if ( xIS_SET( victim->in_room->room_flags, ROOM_SAFE ) )
   {
    send_to_char( "&wYou can't do that here.\n\r", ch );
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_direct ))
   {
          if(xIS_SET(ch->act, PLR_DDD))
          {
               sprintf(buf, "%s brings %s hand down quickly, throwing a second Destructo Disk at you!",ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its");
               act(AT_RED, buf, victim, NULL, ch, TO_CHAR);
               act(AT_RED, "You bring your hand down quickly, throwing a second Destructo Disk at $N!", ch, NULL, victim, TO_CHAR);
               sprintf(buf, "&R%s brings %s hand down quickly, throwing a second Destructo Disk at $N.", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its");
               act(AT_RED, buf, ch, NULL, victim, TO_NOTVICT);
          }
     else
     {
          sprintf( buf , "%s's directs %s energy attack towards you!" , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
          act( AT_RED, buf , victim, NULL, ch, TO_CHAR );
          act( AT_RED, "You direct your energy attack at $N.", ch, NULL, victim, TO_CHAR );
          sprintf( buf, "&R%s directs %s energy attack towards $N." , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
          act( AT_RED, buf, ch, NULL, victim, TO_NOTVICT );
     }
     if (xIS_SET(ch->act, PLR_DESTRUCTO))
      {
      one_hit( ch, victim, TYPE_DESTRUCTO );
      }
     if (xIS_SET(ch->act, PLR_ESPHERE))
      { 
      one_hit( ch, victim, TYPE_BURN ); 
      }
     if (xIS_SET(ch->act, PLR_EBALL))
      {
      one_hit( ch, victim, TYPE_BURN2 );
      }
     if(xIS_SET(ch->act, PLR_DDD))
     {
          if(xIS_SET(ch->act, PLR_DDD)) 
          one_hit(ch, victim, TYPE_DDD);
      WAIT_STATE( ch, 7 );
     }

     if (char_died(ch))
     {
      stop_fighting( ch , TRUE );
      return;
     }
     learn_from_success( ch, gsn_direct );
   }
   else
   {
    act( AT_ACTION, "You direct your energy attack towards $N but it misses.", ch, NULL, victim, TO_CHAR );
    sprintf( buf, "%s's energy attack misses %s." , ch->name, victim->name );
    act( AT_ACTION, buf, ch, NULL, victim, TO_ROOM );
    learn_from_failure( ch, gsn_direct );
   }
    ch->charge = 0;
    WAIT_STATE( ch, 2 * PULSE_PER_SECOND );
    xREMOVE_BIT(ch->act, PLR_DDD);
    xREMOVE_BIT(ch->act, PLR_DDD2);
    xREMOVE_BIT(ch->act, PLR_ESPHERE);
    xREMOVE_BIT(ch->act, PLR_DESTRUCTO);
    xREMOVE_BIT(ch->act, PLR_EBALL);
}


void do_charge( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   int               charge, ki, currcharge, arg, charpl;
   int pl, mod;

   pl = 0; mod = 0;
   argument = one_argument( argument, arg1 );
   charge = ch->charge;
   ki = ch->mana+1;
   currcharge = 20000000;
   arg = atoi(arg1);
   charpl = (pl * mod);

   if ( !xIS_SET(ch->act, PLR_SUPPRESS))
   { pl = ch->exp;  mod = ch->mod;}
   else
   { pl = ch->suppress; mod = 1;}
   if (ch->pcdata->learned[gsn_charge] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if (xIS_SET(ch->act, PLR_EBAR))
   {
    send_to_char("You can't re-charge energy barriers...\n\r", ch);
    return;
   }
   if ( !xIS_SET(ch->act, PLR_DDD) && !xIS_SET(ch->act, PLR_EBALL) && !xIS_SET(ch->act, PLR_DESTRUCTO) && !xIS_SET(ch->act, PLR_ESPHERE) )
   {
    send_to_char( "You are not controlling an energy attack.\n\r", ch);
    return;
   }
   if ( arg1[0] == '\0' )
   {
    send_to_char( "Usage: Charge <Percentage>\n\r", ch );
    return;
   }
   if ( !is_number(arg1))
   {
    send_to_char( "The percentage must be a number.\n\r", ch);
    return;
   }
   if ( charge + atoi(arg1)  > 100 )
   {
    send_to_char( "You cannot control an attack of that potential.\n\r", ch);
    return;
   }
   if ( atoi(arg1) * 150  > ki)
   {
    send_to_char( "You don't have enough energy...\n\r", ch);
    return;
   }
   if ( (charpl + ((atoi(arg1) + charge) * currcharge) >= 1500000000) )
   {
    send_to_char( "You cannot control an attack of that potential.\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_charge ))
   {
    ch->charge += atoi(arg1);
    send_to_char( "&RYou concentrate and you tunnel more energy into your attack.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the attack's power is at %d.\n\r",     (charpl + ((arg + charge) * currcharge)) );
    act( AT_RED, "$n begins to concentrate and $e tunnels more energy into the attack.", ch, NULL, NULL, TO_ROOM );
    learn_from_success( ch, gsn_charge );
    ch->mana -= atoi(arg1) * 150;
   }
   else
   {
    ch->charge = 0;
    send_to_char( "&RYou concentrate and you try to tunnel more energy into the attack... but it dissolves into nothing...\n\r", ch);
    act( AT_RED, "&R$n concentrates and tries to tunnel more energy into the attack... but it dissolves into nothing...", ch, NULL, NULL, TO_ROOM );
    learn_from_failure( ch, gsn_charge );
    ch->mana -= (charge*10);
    xREMOVE_BIT(ch->act, PLR_DDD);
    xREMOVE_BIT(ch->act, PLR_DDD2);
    xREMOVE_BIT(ch->act, PLR_ESPHERE);
    xREMOVE_BIT(ch->act, PLR_DESTRUCTO);
    xREMOVE_BIT(ch->act, PLR_EBALL);
    return;
   }
   if (ch->mana == 0)
   {
    ch->charge = 0;
    act( AT_GREY, "$n falls unconsious for the loss of ki.", ch, NULL, NULL, TO_ROOM );
    act( AT_GREY, "You fall unconsious for the loss of ki.", ch, NULL, NULL, TO_CHAR );
    if ( ch->position > POS_FIGHTING)
    {
     stop_fighting( ch, TRUE );
     return;
    }
    ch->hit = -1;
    update_pos( ch );
    xREMOVE_BIT(ch->act, PLR_EBAR);
    xREMOVE_BIT(ch->act, PLR_DDD);
    xREMOVE_BIT(ch->act, PLR_DDD2);
    xREMOVE_BIT(ch->act, PLR_ESPHERE);
    xREMOVE_BIT(ch->act, PLR_DESTRUCTO);
    xREMOVE_BIT(ch->act, PLR_EBALL);
  }

}

void do_release( CHAR_DATA *ch, char *argument )
{
   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if ( !xIS_SET(ch->act, PLR_EBAR) && !xIS_SET(ch->act, PLR_BBARRIER) && !xIS_SET(ch->act, PLR_DDD) && !xIS_SET(ch->act, PLR_EBALL ) && !xIS_SET(ch->act, PLR_ESPHERE) && !xIS_SET(ch->act, PLR_DESTRUCTO ) && !xIS_SET(ch->act, PLR_ESPHERE))
   {
    send_to_char( "You are not controlling an energy attack.\n\r", ch);
    return;
   }
   ch->barrier = 0;
   ch->maxbarrier = 0;
   ch->charge = 0;
   send_to_char( "&GYou lower your arms and watch as your Energy Attack slowly fades away into nothing...\n\r", ch);
   act( AT_GREEN, "$n lowers $s arms and watches as $s Energy Attack slowly fades away into nothing...", ch, NULL, NULL, TO_ROOM);
   xREMOVE_BIT(ch->act, PLR_EBAR);
   xREMOVE_BIT(ch->act, PLR_BBARRIER);
   xREMOVE_BIT(ch->act, PLR_DDD);
   xREMOVE_BIT(ch->act, PLR_DDD2);
   xREMOVE_BIT(ch->act, PLR_DESTRUCTO);
   xREMOVE_BIT(ch->act, PLR_ESPHERE);
   xREMOVE_BIT(ch->act, PLR_EBALL);
}

void do_bluebarrier( CHAR_DATA *ch, char *argument )
{

  if (IS_NPC(ch))
  return;

  if (ch->pcdata->learned[gsn_bluebarrier] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
  if (IS_ANDROID(ch))
  {
   if ( xIS_SET(ch->act, PLR_BBARRIER))
   {
    send_to_char( "&RYou are already controlling an energy attack.\n\r", ch);
    return;
   }
   if (ch->mana < 1500)
   {
    send_to_char( "You need more energy to perform this technique...", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_bluebarrier ))
   {
    ch->mana -= 1500;
    send_to_char( "&BYou spread your arms and create a Blue Barrier around yourself.\n\r", ch);
    ch_printf(ch, "&BYou estimate that your Blue Barrier is in &RSuperb&B condition.\n\r", ch->suppress);
    act( AT_RED, "&B$n spreads $s arms and creates a Blue Barrier to protect $m.", ch, NULL, NULL, TO_ROOM );
    xSET_BIT(ch->act, PLR_BBARRIER);
    learn_from_success( ch, gsn_bluebarrier );
   }
   else
   {
    send_to_char( "&BYou spread your arms and try to create a Blue Barrier...\n\r", ch);
    act( AT_RED, "&B$n spreads $s arms and tries to create a Blue Barrier...", ch, NULL, NULL, TO_ROOM );
    ch->mana -= 100;
    learn_from_failure( ch, gsn_bluebarrier );
    return;
   }
   if (ch->mana == 0)
   {
    act( AT_GREY, "$n falls unconsious for the loss of ki.", ch, NULL, NULL, TO_ROOM );
    act( AT_GREY, "You fall unconsious for the loss of ki.", ch, NULL, NULL, TO_CHAR );
    if ( ch->position > POS_FIGHTING)
    {
     stop_fighting( ch, TRUE );
     return;
    }
    ch->hit = -1;
    update_pos( ch );
    xREMOVE_BIT(ch->act, PLR_BBARRIER);
    xREMOVE_BIT(ch->act, PLR_EBAR);
   }
  }
  else
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
}

void do_extract( CHAR_DATA *ch, char *argument )
{
   char arg[MAX_INPUT_LENGTH];
   CHAR_DATA *victim;
    OBJ_DATA *pobj;
    CLAN_DATA *clan;
    OBJ_DATA *material;

    if ( IS_NPC(ch))
         return;

   if ( xIS_SET(ch->in_room->room_flags, ROOM_CLANSTOREROOM) ) 
     { 
       if ( ch->gold < 5000 )
       {
       send_to_char( "You can't afford to buy resource materials.\n\r", ch);
       return;
       }
    else if ( ch->carry_number == 20 )
       {
       send_to_char( "You can't carry anymore items.\n\r", ch);
       return;
       }
    else
       {
       ch->gold -= 5000;
       send_to_char( "You buy some resource materials for 5,000 gold.\n\r", ch); 
       material = create_object( get_obj_index( 60 ), 0 );
       obj_to_char( material, ch );
       return;
       }

     }

   if (ch->pcdata->learned[gsn_extract] == 0 )
   {
       send_to_char( "Huh?\n\r", ch);
       return;
   }

    for ( pobj = ch->first_carrying; pobj; pobj = pobj->next_content )
    {
        if ( pobj->pIndexData->vnum == 60 )
        break;
    }

    if ( !pobj )
    {
        ch_printf(ch,"You don't have the required equipment to extract.\n\r");
        return;
    }


    if( !xIS_SET(ch->in_room->room_flags, ROOM_EXTRACT) )
    {
        ch_printf(ch,"This room seems to be depleted of resources.\n\r");
        return;
    }

    if ( !can_use_skill( ch, number_percent(), gsn_extract ) )
     {
       act( AT_BLUE, "You fail to extract resources.",  ch, NULL, NULL, TO_CHAR );
       act( AT_BLUE, "$n fails to extract resources.", ch, NULL, NULL, TO_NOTVICT );
       WAIT_STATE( ch, 8 );
       learn_from_failure( ch, gsn_extract );
       return;
     }
    else
     {
       act( AT_BLUE, "You find some resources!",  ch, NULL, NULL, TO_CHAR );
       act( AT_BLUE, "$n finds some resources!", ch, NULL, NULL, TO_NOTVICT );
       learn_from_failure( ch, gsn_extract );
       WAIT_STATE( ch, 8 );
       separate_obj( pobj );
       extract_obj( pobj );
       xREMOVE_BIT(ch->in_room->room_flags, ROOM_EXTRACT);
       return;

     }


}


void do_heal( CHAR_DATA *ch, char *argument )
{
   char arg[MAX_INPUT_LENGTH];
   CHAR_DATA *victim;


   one_argument( argument, arg );

   if (ch->pcdata->learned[gsn_heal] == 0)
   {
       send_to_char( "Huh?\n\r", ch);
       return;
   }
   if ( ch->position < POS_SLEEPING )
   {
        send_to_char("You can't do that in this position.\n\r", ch);
        return;
   }
   if (IS_BIODROID(ch) || IS_NAMEK(ch))
   {
    if ( arg[0] == '\0' )
    {
        send_to_char( "Heal who?\n\r", ch );
        return;
    }
    if ( ( victim = get_char_room( ch, arg ) ) == NULL )
    {
        send_to_char( "They aren't here.\n\r", ch );
        return;
    }
    if ( victim->position == POS_FIGHTING)
    {
        send_to_char( "They are too busy for that.\n\r", ch );
        return;
    }
    if (ch->mana <= 100 )
    {
        send_to_char( "You don't have enough energy for that.\n\r", ch );
        return;
    }

    if ( ch->position == POS_FIGHTING )
    {
        send_to_char( "You are too busy for that.\n\r", ch );
        return;
    }

      if ( get_timer( ch, TIMER_RECENTFIGHT) > 0 )
    {
     send_to_char("You can't heal this soon after a Pkill fight!\n\r", ch);
     return;
    }


    if  ( get_timer(ch, TIMER_HEAL) > 0)
    {
     send_to_char("You can't heal again yet, your body needs to recover.\n\r", ch);
     return;
    }
    WAIT_STATE( ch, 5 );


    if ( !can_use_skill( ch, number_percent(), gsn_heal ) )
    {
      if ( !str_cmp( arg, "self" ) )
      {
       act( AT_GREEN, "You try to heal your wounds.",  ch, NULL, victim, TO_CHAR    );
       act( AT_GREEN, "$n tries to heal $s wounds.",  ch, NULL, victim, TO_NOTVICT );
       act( AT_GREEN, "$n tries to heal $s wounds.", ch, NULL, victim, TO_VICT    );
      }
      else
      {
       act( AT_GREEN, "You try to heal $N's wounds.",  ch, NULL, victim, TO_CHAR    );
       act( AT_GREEN, "$n tries to heal $N's wounds.",  ch, NULL, victim, TO_NOTVICT );
       act( AT_GREEN, "$n tries to heal your wounds.", ch, NULL, victim, TO_VICT    );
      }

       learn_from_failure( ch, gsn_heal );
       ch->mana -= 100;
       return;
    }

    else
    {
      if ( !str_cmp( arg, "self" ) )
      {
       act( AT_GREEN, "You heal your wounds.",  ch, NULL, victim, TO_CHAR    );
       act( AT_GREEN, "$n heals $s wounds.",  ch, NULL, victim, TO_NOTVICT );
       act( AT_GREEN, "$n heals $s wounds.", ch, NULL, victim, TO_VICT    );
       ch->hit = 100;
       learn_from_success( ch, gsn_heal );
       update_pos( ch );
       add_timer( ch, TIMER_HEAL, 20, NULL, 0 );
       return;
      }
      else
      {
       act( AT_GREEN, "You heal $N's wounds.",  ch, NULL, victim, TO_CHAR    );
       act( AT_GREEN, "$n heals $N's wounds.",  ch, NULL, victim, TO_NOTVICT );
       act( AT_GREEN, "$n heals your wounds.", ch, NULL, victim, TO_VICT    );
       victim->hit = 100;
       learn_from_success( ch, gsn_heal );
       update_pos( victim );
       add_timer( ch, TIMER_HEAL, 20, NULL, 0 );
       return;
      }
 
    }

 }

}

void do_absorb( CHAR_DATA *ch, char *argument )
{
   char buf[MAX_INPUT_LENGTH];
   CHAR_DATA *victim;
   int gain, pl, plcheck;

     gain = 0;
     pl = 0;
     plcheck = 0;

     if ( IS_NPC(ch) )
     return;

     if (ch->pcdata->learned[gsn_absorb] == 0)
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }

     if (ch->exp < 125000)
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }

     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }

      if ( ch->mana < ch->max_mana / 8 )
      {
       send_to_char( "You don't have enough energy.\n\r", ch);
       return;
      }

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

      if ( victim == ch )
      {
       send_to_char( "Absorb yourself?\n\r", ch );
       return;
      }

    if (can_use_skill(ch, number_percent(), gsn_absorb ))
    {
       if ( ch->exp >= 5000000 && ch->exp < 25000000)  {plcheck = ch->pcdata->learned[gsn_chikone] * 250000;}
       else if ( ch->exp >= 25000000 && ch->exp < 55000000){plcheck = ch->pcdata->learned[gsn_chiktwo] * 550000; }
       else if ( ch->exp >= 55000000 && ch->exp < 75000000){plcheck = ch->pcdata->learned[gsn_chikthree] * 750000; }
       else if ( ch->exp >= 75000000 && ch->exp < 100000000){plcheck = ch->pcdata->learned[gsn_chikfour] *  1000000;}
//       else if ( ch->exp >= 90000000 && ch->exp < 100000000){plcheck = ch->pcdata->learned[gsn_chikfive] * 1000000;}

       if (ch->exp >= 5000000)
         {
           if (  plcheck < ch->exp)
            gain = 0;
            else
            gain = ch->exp / 550;
          }
        else
         gain = ch->exp / 550;

     if (xIS_SET(ch->act, PLR_SUPPRESS ) )
         gain /= 2;

       act( AT_RED, "&r$N grabs you by the throat and drains energy from you.",victim, NULL, ch, TO_CHAR);
       act( AT_RED, "&rYou grab $N by the throat and you drain energy from $m." , ch, NULL, victim, TO_CHAR);
       act( AT_RED, "&r$n grabs $N by the throat and $e drains energy from $M." , ch, NULL, victim, TO_NOTVICT);
       if (can_use_skill(ch, number_percent(), gsn_grip ) && ch->style == STYLE_AGGRESSIVE)
       {
        act( AT_RED, "&r$N tightens the grip as $E continues to absorb you.",victim, NULL, ch, TO_CHAR);
        act( AT_RED, "&rYou tighten your grip as you continue to absorb $m." , ch, NULL, victim, TO_CHAR);
        act( AT_RED, "&r$n tightens the grip as $e continues to absorb $M." , ch, NULL, victim, TO_NOTVICT);
        gain *= 1.5;
        learn_from_success(ch, gsn_grip);
       if ( IS_BIODROID(ch) && victim->race == 0 && ch->celltype == 0 )
       {
       send_to_char( "&YYou feel the pure-blooded saiyans cells stir within!\n\r", ch );
       ch->celltype = 1;
       }

       if ( !IS_NPC(victim) && victim->exp < 100400000)
       {
       victim->exp -= gain;
       }

       }

       sprintf(buf, "&r%s have just drawn %d powerlevel from you.", victim->name, gain );
       act( AT_RED, buf,victim, NULL, ch, TO_CHAR);
       sprintf(buf, "&rYou have just drawn %d PL.", gain );
       act( AT_RED, buf, ch, NULL, victim, TO_CHAR);
       ch->exp += gain;
       learn_from_success(ch, gsn_absorb);
       ch->mana -= ch->max_mana/8;
       WAIT_STATE( ch, 15);
       return;
      }
      else
      {
       act( AT_RED, "&r$N grabs you by the throat and tries to drain energy from you.",victim, NULL, ch, TO_CHAR);
       act( AT_RED, "&rYou grab $N by the throat and you try to drain energy from $m." , ch, NULL, victim, TO_CHAR);
       act( AT_RED, "&r$N grabs $n by the throat and $E tries to drain energy from $m." , ch, NULL, victim, TO_NOTVICT);
       learn_from_failure(ch, gsn_absorb);
       ch->mana -= ch->max_mana/8;
       WAIT_STATE( ch, 15);
       return;
      }
      WAIT_STATE( ch, 15);
   }
   else
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

void do_fingerbeam( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;
   char buf[MAX_INPUT_LENGTH];
/*   if (IS_NPC(ch))
   return; */

   if ( !IS_NPC(ch) )
  {
   if (ch->pcdata->learned[gsn_fingerbeam] == 0 )
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

   if (IS_BIODROID(ch) || IS_ANDROID(ch) || IS_ICER(ch))
   {
    if ( ( victim = who_fighting( ch ) ) == NULL )
    {
     send_to_char( "You aren't fighting anyone.\n\r", ch );
     return;
    }
    if (can_use_skill(ch, number_percent(), gsn_fingerbeam ))
    {
     sprintf( buf, "%s points %s finger at you.\n\r%s launches an energy beam from %s finger.", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf , victim, NULL, ch, TO_CHAR );
     act( AT_RED, "You point your finger at $N.\n\rYou launch an energy beam off your finger.", ch, NULL, victim, TO_CHAR );
     sprintf( buf, "%s points %s finger at %s.\n\r%s launches an energy beam from %s finger." , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", victim->name, ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf, ch, NULL, victim, TO_NOTVICT );
     one_hit(ch, victim, TYPE_FINGER);
     learn_from_success( ch, gsn_fingerbeam );
    }
    else
    {
     sprintf( buf , "&R%s points %s finger at you.\n\r%s launches an energy beam from %s finger." , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf , victim, NULL, ch, TO_CHAR );
     act( AT_RED, "You point your finger at $N.\n\rYou launch an energy beam off your finger.", ch, NULL, victim, TO_CHAR );
     sprintf( buf , "&R%s points %s finger at %s.\n\r%s launches an energy beam from %s finger." , ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", victim->name, ch->name,ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf, ch, NULL, victim, TO_NOTVICT );
     damage(ch, victim, 0, TYPE_FINGER);
     learn_from_failure( ch, gsn_fingerbeam );
     WAIT_STATE( ch, 15);
     return;
    }
      WAIT_STATE( ch, 15);
   }
   else
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

void do_ctf( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    char arg[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];

   if(IS_NPC(ch))
    return;

   if ( IS_IMMORTAL(ch) )
   {

   if( !str_cmp(argument,"end") )
    {
      if( game_state != CTF_START )
       {
        send_to_char( "There isn't a CTF going for you to stop!\n\r", ch );
        return;
       }
       else
       {
        sprintf(buf, "&z[&WInfo&z]&W The CTF has ended! Final score, Blue:&B %d&W, Red&R %d&D", bluescore, redscore );
        talk_info( AT_BLUE, buf );
        game_state = CTF_NONE;
        return;
        }
     }

     else if ( !str_cmp(argument,"start") )
     {

      if( game_state == CTF_WAITING )
       {
        sprintf(buf, "&z[&WInfo&z]&W And the CTF begins!!" );
        talk_info( AT_BLUE, buf );
        game_state = CTF_START;
        return;
        }
       else if( game_state == CTF_START )
       {
        send_to_char( "A CTF has already been started!\n\r", ch );
     redscore = 0;
     bluescore = 0;
        return;
       }
       else
       {
        send_to_char( "You start a CTF!\n\r", ch );
        sprintf(buf, "&z[&WInfo&z]&W A CTF Has started, type &CCTF&W to join!" );
        talk_info( AT_BLUE, buf );
        game_state = CTF_WAITING;
        return;
       }


      }

}
else
{

        if ( xIS_SET(ch->act, PLR_GAMEBAN) )
        {
        send_to_char( "You are banned from entering. Better luck next time.\n\r", ch );
        return;
        }

        if ( game_state == CTF_START )
        {
        send_to_char( "You can't enter, the CTF has already started.\n\r", ch );
        return;
        }

        if ( game_state == CTF_NONE )
        {
        send_to_char( "There is no CTF currently taking place.\n\r", ch );
        return;
        }

        if ( xIS_SET(ch->in_room->room_flags, ROOM_CTF) )
        {
        send_to_char( "You're already inside the CTF.\n\r", ch );
        return;
        }

        if ( game_state == CTF_WAITING )
        {
        act(AT_BLUE, "$n has been sucked into a rift taking them to the Waiting Room", ch, NULL, NULL, TO_ROOM);
        char_from_room(ch);
        char_to_room(ch, get_room_index(3700) );
        act(AT_BLUE,"$n is dropped from the sky.", ch, NULL, NULL, TO_ROOM);
        do_look(ch, "auto");
        sprintf(buf, "&z[&WInfo&z]&C %s&W has joined Capture the Flag!", ch->name);
        talk_info( AT_BLUE, buf);
        ch->hit = ch->max_hit;
        ch->mana = ch->max_mana;
        ch->move = ch->max_move;
        xSET_BIT(ch->act, PLR_TOGGLE );
        return;
        }
}
}

void do_hbtc( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    char arg[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];


        if ( ch->in_room->vnum != 1107 )
       {
        send_to_char( "You must be inside the HBTC waiting room before you can enter.\n\r", ch );
        return;
       }

        if ( game_state == HBTC_2 )
       {
        send_to_char( "You can't enter the HBTC, a fight is already in progress\n\r", ch );
        return;
       }

        if ( game_state == HBTC_1 )
        {
        act(AT_BLUE, "$n walks through the doors into the HBTC.", ch, NULL, NULL, TO_ROOM);
        char_from_room(ch);
        char_to_room(ch, get_room_index(1109) );
        act(AT_BLUE,"$n walks through the doors as they slam shut.", ch, NULL, NULL, TO_ROOM);
        send_to_char("You have entered the Hyperbolic TimeChamber\r\n",ch);
        do_look(ch, "auto");
        ch->hit = ch->max_hit;
        ch->mana = ch->max_mana;
        ch->move = ch->max_move;
        game_state = HBTC_2;
        return;
        }

        act(AT_BLUE, "$n walks through the doors into the HBTC.", ch, NULL, NULL, TO_ROOM);
        char_from_room(ch);
        char_to_room(ch, get_room_index(1109) );
        act(AT_BLUE,"$n walks through the doors as they slam shut.", ch, NULL, NULL, TO_ROOM);
        send_to_char("You have entered the Hyperbolic TimeChamber\r\n",ch);
        do_look(ch, "auto");
        ch->hit = ch->max_hit;
        ch->mana = ch->max_mana;
        ch->move = ch->max_move;
        game_state = HBTC_1;
        return;

}

void do_koth( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    char arg[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];

   if(IS_NPC(ch))
    return;

   if ( IS_IMMORTAL(ch) )
   {

   if( !str_cmp(argument,"end") )
    {
      if( game_state != KOTH_START )
       {
        send_to_char( "There isn't a KOTH going for you to stop!\n\r", ch );
        return;
       }
       else
       {
        sprintf(buf, "&z[&WInfo&z]&W The KOTH has ended!" );
        talk_info( AT_BLUE, buf );
        game_state = KOTH_NONE;
        return;
        }
     }

/*   if( !str_cmp(argument,"tourny") )
    {
      if( game_state != TOURNAMENT )
       {
        sprintf(buf, "&z[&WInfo&z]&W The World Tournament has begun!" );
        talk_info( AT_BLUE, buf );
        game_state = TOURNAMENT;
        return;
       }
       else
       {
        sprintf(buf, "&z[&WInfo&z]&W The World Tournament has ended!" );
        talk_info( AT_BLUE, buf );
        game_state = KOTH_NONE;
        return;
        }
     } */

     if ( !str_cmp(argument,"start") )
     {

      if( game_state == KOTH_WAITING )
       {
        sprintf(buf, "&z[&WInfo&z]&W And the KOTH fighting begins!!" );
        talk_info( AT_BLUE, buf );
        game_state = KOTH_START;
        return;
       }

       else if( game_state == KOTH_START )
       {
        send_to_char( "A KOTH has already been started!\n\r", ch );
        return;
       }
       else
       {
        send_to_char( "You start a KOTH!\n\r", ch );
        sprintf(buf, "&z[&WInfo&z]&W A KOTH Has started, type &CKOTH&W to join!" );
        talk_info( AT_BLUE, buf );
        game_state = KOTH_WAITING;
        return;
       } 


      }

}
else
{

        if ( xIS_SET(ch->act, PLR_GAMEBAN) )
        {
        send_to_char( "You are banned from entering. Better luck next time.\n\r", ch );
        return;
        }

        if ( game_state == KOTH_START )
        {
        send_to_char( "You can't enter, the KOTH has already started.\n\r", ch );
        return;
        }

    if( xIS_SET(ch->in_room->room_flags, ROOM_ARENA) )
    {
        ch_printf(ch,"Sorry, you must leave the pkill zone before entering a KOTH.\n\r");
        return;
    }

        if ( game_state == KOTH_NONE )
        {
        send_to_char( "There is no KOTH currently taking place.\n\r", ch );
        return;
        }

        if ( xIS_SET(ch->in_room->room_flags, ROOM_KOTH) )
        {
        send_to_char( "You're already inside the KOTH.\n\r", ch );
        return;
        }

        if ( game_state == KOTH_WAITING )
        {
        act(AT_BLUE, "$n has been sucked into a rift taking them to the King of the Hill", ch, NULL, NULL, TO_ROOM);
        char_from_room(ch);
        char_to_room(ch, get_room_index(20) );
        act(AT_BLUE,"$n is dropped from the sky.", ch, NULL, NULL, TO_ROOM);
        send_to_char("You have entered the King of the Hill\r\n",ch);
        do_look(ch, "auto");
        sprintf(buf, "&z[&WInfo&z]&C %s&W has joined the King of the Hill!", ch->name);
        talk_info( AT_BLUE, buf);
        ch->hit = ch->max_hit;
        ch->mana = ch->max_mana;
        ch->move = ch->max_move;
        xSET_BIT(ch->act, PLR_TOGGLE );
        return;
        }
}
}


void do_kickoff( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    char arg[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];

    argument = one_argument( argument, arg );
    one_argument( argument, arg2 );
    if ( arg[0] == '\0' )
    {
        send_to_char( "Kickoff whom?\n\r", ch );
        return;
    }
    if ( ( victim = get_char_world( ch, arg ) ) == NULL )
    {
        send_to_char( "They aren't here.\n\r", ch );
        return;
    }
    if ( IS_NPC(victim))
    {
        send_to_char( "Can't do.\n\r", ch );
        return;
    }

    if ( !IS_NPC(victim) && get_trust( victim ) > get_trust( ch ) )
    {
        send_to_char( "You failed.\n\r", ch );
        return;
    }
    if ( !str_cmp( arg2, "baseball" ) )
    {
      sprintf( buf, "&w&G%s takes their baseball bat and hits %s off the MUD! HOME RUN!", ch->name,victim->name);
            talk_info( AT_BLUE, buf );
    }
    else if ( !str_cmp( arg2, "bungee" ) )
    {
      sprintf( buf, "&w&G%s ties %s to a bungee cord and pushes them off the MUD!",ch->name, victim->name);
            talk_info( AT_BLUE, buf );
    }
    else if ( !str_cmp( arg2, "gun" ) )
    {
       sprintf( buf, "&w&G%s takes a gun and shoots %s and watchs as their body falls lifelessly off the MUD!",ch->name,victim->name);
            talk_info( AT_BLUE, buf );
    }
    else if ( !str_cmp( arg2, "grenade" ) )
    {
       sprintf( buf, "&w&G%s takes a grenade and throws it at %s, watching %s explode in a million pieces.",ch->name,victim->name, victim->name);
            talk_info( AT_BLUE, buf );
    }
    else
    {
      sprintf( buf, "&w&G%s pimpsmacks %s off the MUD! C-E-L-L",ch->name,victim->name);
            talk_info( AT_BLUE, buf );
    }

    for ( d = first_descriptor; d; d = d->next )
    {
        if ( d == victim->desc )
        {
            close_socket( d, FALSE );
            send_to_char( "Ok.\n\r", ch );
            return;
        }
    }

    return;
}


void do_kick( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

   if (IS_NPC(ch))
   return;

   if ( !IS_NPC(ch) )
  {
   if (ch->pcdata->learned[gsn_kick] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

   if ( ( victim = who_fighting( ch ) ) == NULL )
   {
    send_to_char( "You aren't fighting anyone.\n\r", ch );
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_kick ))
   {
    one_hit(ch, victim, TYPE_KICK);
    learn_from_success( ch, gsn_kick );
   }
   else
   {
    damage(ch, victim, 0, TYPE_KICK);
    learn_from_failure( ch, gsn_kick );
    WAIT_STATE( ch, 12 );
    return;
   }
    WAIT_STATE( ch, 12 );
}

void do_punch( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

/*   if (IS_NPC(ch))
   return; */

   if ( !IS_NPC(ch) )
  {
   if (ch->pcdata->learned[gsn_punch] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
  }

   if ( ( victim = who_fighting( ch ) ) == NULL )
   {
    send_to_char( "You aren't fighting anyone.\n\r", ch );
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_punch ))
   {
    one_hit(ch, victim, TYPE_PUNCH);
    learn_from_success( ch, gsn_punch );
    WAIT_STATE( ch, 12 );
   }
   else
   {
    damage(ch, victim, 0, TYPE_PUNCH);
    learn_from_failure( ch, gsn_punch );
    WAIT_STATE( ch, 12 );
    return;
   }
    WAIT_STATE( ch, 12 );
}

void do_claw( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

   if (IS_NPC(ch))
   return;

   if ( !IS_NPC(ch) )
  {
   if (ch->pcdata->learned[gsn_claw] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

   if (IS_MUTANT(ch))
   {
    if ( ( victim = who_fighting( ch ) ) == NULL )
    {
     send_to_char( "You aren't fighting anyone.\n\r", ch );
     return;
    }
    if (can_use_skill(ch, number_percent(), gsn_claw ))
    {
     one_hit(ch, victim, TYPE_CLAW);
     learn_from_success( ch, gsn_claw );
    }
    else
    {
     damage(ch, victim, 0, TYPE_CLAW);
     learn_from_failure( ch, gsn_claw );
     WAIT_STATE( ch, 14 );
     return;
    }
      WAIT_STATE( ch, 14 );
   }
   else
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

void do_doublepunch( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

/*   if (IS_NPC(ch))
   return; */

   if ( !IS_NPC(ch) )
  {
   if ((ch->pcdata->learned[gsn_doublepunch] == 0) || !IS_HUMAN(ch) )
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
  }

   if ( ( victim = who_fighting( ch ) ) == NULL )
   {
    send_to_char( "You aren't fighting anyone.\n\r", ch );
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_doublepunch ))
   {
    one_hit(ch, victim, TYPE_DOUBLEPUNCH);
    learn_from_success( ch, gsn_doublepunch );
   }
   else
   {
    damage(ch, victim, 0, TYPE_DOUBLEPUNCH);
    learn_from_failure( ch, gsn_doublepunch );
    WAIT_STATE( ch, 15 );
    return;
   }
    WAIT_STATE( ch, 15 );
}

void do_doublekick( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;

/*   if (IS_NPC(ch))
   return; */

   if ( !IS_NPC(ch) )
  {
   if ((ch->pcdata->learned[gsn_doublekick] == 0) || !IS_HUMAN(ch) )
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
   }
   if ( ( victim = who_fighting( ch ) ) == NULL )
   {
    send_to_char( "You aren't fighting anyone.\n\r", ch );
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_doublekick ))
   {
    one_hit(ch, victim, TYPE_DOUBLEKICK);
    learn_from_success( ch, gsn_doublekick );
   }
   else
   {
    damage(ch, victim, 0, TYPE_KICK);
    damage(ch, victim, 0, TYPE_KICK);
    learn_from_failure( ch, gsn_doublekick );
    WAIT_STATE( ch, 15 );
    return;
   }
    WAIT_STATE( ch, 15 );
}

void do_destructo( CHAR_DATA *ch, char *argument )
{
   int pl, mod;

   pl = ch->exp;
   mod = ch->mod;

   if (IS_NPC(ch))
   return;

   if (ch->pcdata->learned[gsn_destructo] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
   if ( xIS_SET(ch->act, PLR_ESPHERE) || xIS_SET(ch->act, PLR_EBAR) || xIS_SET(ch->act, PLR_DDD) || xIS_SET(ch->act, PLR_DESTRUCTO))
   {
    send_to_char( "&RYou are already controlling an energy attack.\n\r", ch);
    return;
   }
   if (ch->mana < 1250)
   {
    send_to_char( "You need more ki to do that...", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_destructo ))
   {
    ch->charge = 0;
    xSET_BIT(ch->act, PLR_DESTRUCTO);
    ch->mana -= 1250;
    send_to_char( "&RYou stretch your hand out and create a Destructo Disk.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the Energy Disk has an attack power of %d.\n\r",  (mod * pl));
    act( AT_RED, "$n stretches $s hand out and creates a Destructo Disk.", ch, NULL, NULL, TO_ROOM );
    learn_from_success( ch, gsn_destructo );
    WAIT_STATE( ch, 6 );
   }
   else
   {
    send_to_char( "&RYou stretch your hand out and create an Destructo Disk, but you create nothing.\n\r", ch);
    act( AT_RED, "$n stretches $s hand out and tries to create a Destructo Disk...", ch, NULL, NULL, TO_ROOM );
    ch->mana -= 50;
    learn_from_failure( ch, gsn_destructo );
    return;
   }
}

void do_energyball( CHAR_DATA *ch, char *argument )
{
   int pl, mod;

   pl = ch->exp;
   mod = ch->mod;

   if (IS_NPC(ch))
   return;

   if (!IS_AWAKE(ch))
   {
    send_to_char( "You're sleeping!\n\r", ch);
    return;
   }

   if (ch->pcdata->learned[gsn_energyball] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
   if ( xIS_SET(ch->act, PLR_ESPHERE) || xIS_SET(ch->act, PLR_EBAR) || xIS_SET(ch->act, PLR_DESTRUCTO) || xIS_SET(ch->act, PLR_DDD) || xIS_SET(ch->act, PLR_EBALL ) )
   {
    send_to_char( "&RYou are already controlling an energy attack.\n\r", ch);
    return;
   }
   if (ch->mana < 250)
   {
    send_to_char( "You need more ki to do that...", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_energyball ))
   {
    ch->charge = 0;
    xSET_BIT(ch->act, PLR_EBALL);
    ch->mana -= 250;
    send_to_char( "&RYou close your hands and create an Energy Ball.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the Energy Ball has an attack power of %d.\n\r",  (mod * pl));
    act( AT_RED, "$n closes $s hands and creates an Energy Ball.", ch, NULL, NULL, TO_ROOM );
    learn_from_success( ch, gsn_energyball );
   }
   else
   {
    send_to_char( "&RYou close your to create an Energy Ball, but you create nothing.\n\r", ch);
    act( AT_RED, "$n closes $s hands and tries to create an Energy Ball...", ch, NULL, NULL, TO_ROOM );
    ch->mana -= 50;
    learn_from_failure( ch, gsn_energyball );
    return;
   }
}

void do_energysphere( CHAR_DATA *ch, char *argument )
{
   int pl, mod;

   pl = ch->exp;
   mod = ch->mod;

   if (IS_NPC(ch))
   return;

   if (!IS_AWAKE(ch))
   {
    send_to_char( "You're sleeping!\n\r", ch);
    return;
   }

   if (ch->pcdata->learned[gsn_energysphere] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
   if ( xIS_SET(ch->act, PLR_ESPHERE) || xIS_SET(ch->act, PLR_EBAR) || xIS_SET(ch->act, PLR_DESTRUCTO) || xIS_SET(ch->act, PLR_DDD) || xIS_SET(ch->act, PLR_EBALL ) )
   {
    send_to_char( "&RYou are already controlling an energy attack.\n\r", ch);
    return;
   }
   if (ch->mana < 250)
   {
    send_to_char( "You need more ki to do that...", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_energysphere ))
   {
    ch->charge = 0;
    xSET_BIT(ch->act, PLR_ESPHERE);
    ch->mana -= 250;
    send_to_char( "&RYou close your hands and create an Energy Sphere.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the Energy Sphere has an attack power of %d.\n\r",  (mod * pl));
    act( AT_RED, "$n closes $s hands and creates an Energy Sphere.", ch, NULL, NULL, TO_ROOM );
    WAIT_STATE( ch, 6 );
    learn_from_success( ch, gsn_energysphere );
   }
   else
   {
    send_to_char( "&RYou close your hands and create an Energy Sphere, but you create nothing.\n\r", ch);
    act( AT_RED, "$n closes $s hands and tries to create an Energy Sphere...", ch, NULL, NULL, TO_ROOM );
    ch->mana -= 50;
    learn_from_failure( ch, gsn_energysphere );
    return;
   }
}


void do_ddd( CHAR_DATA *ch, char *argument )
{
  int pl, mod;
  if ( !xIS_SET(ch->act, PLR_SUPPRESS))
  { pl = ch->exp;  mod = ch->mod; }
  else
  { pl = ch->suppress; mod = 1; }

/*  if (IS_NPC(ch))
  return; */

   if (!IS_NPC(ch) )
 {
   if (!IS_ICER(ch) && !xIS_SET(ch->act, PLR_PRIMARY_DDD) )
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

   if (!IS_NPC(ch) )
 {
   if (ch->pcdata->learned[gsn_ddd] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if ( xIS_SET(ch->act, PLR_BBARRIER) || xIS_SET(ch->act, PLR_DDD) || xIS_SET(ch->act, PLR_EBAR) || xIS_SET(ch->act, PLR_DESTRUCTO)|| xIS_SET(ch->act, PLR_EBALL) )
   {
    send_to_char( "&RYou are already controlling an energy attack.\n\r", ch);
    return;
   }
   if (ch->mana <= ch->max_mana/10 )
   {
    send_to_char( "You need more energy to perform this technique...\n\r", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_ddd ))
   {
    send_to_char( "&RYou raise your hand and create a Destructo Disk.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the disk has an attack power of %d\n\r", pl * mod);
    act( AT_RED, "$n raises $s hand and creates a Destructo Disk.", ch, NULL, NULL, TO_ROOM );
    ch->mana -= ch->max_mana/10;
    learn_from_success( ch, gsn_ddd );
    xSET_BIT(ch->act, PLR_DDD );
   }
   else
   {
    send_to_char( "&RYou raise your arms and you try to create a Destructo Disk with each hand, but you create nothing.\n\r", ch);
    act( AT_RED, "$n raises $s arms and tries to create a Destructo Disk with each hand, but fails to do so...", ch,NULL, NULL, TO_ROOM );
    ch->mana -= ch->max_mana/10;
    learn_from_failure( ch, gsn_ddd );
    return;
   }
   if (ch->mana == 0)
   {
    act( AT_GREY, "$n falls unconsious for the loss of ki.", ch, NULL, NULL, TO_ROOM );
    act( AT_GREY, "You fall unconsious for the loss of ki.", ch, NULL, NULL, TO_CHAR );
    if ( ch->position > POS_FIGHTING)
    {
     stop_fighting( ch, TRUE );
     return;
    }
    ch->hit = -1;
    update_pos( ch );
    xREMOVE_BIT(ch->act, PLR_BBARRIER);
    xREMOVE_BIT(ch->act, PLR_EBAR);
    xREMOVE_BIT(ch->act, PLR_DDD);
  }
 }

void do_eyebeam( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *victim;
   char buf[MAX_INPUT_LENGTH];

/*   if (IS_NPC(ch))
   return; */

  if ( !IS_NPC(ch) )
 {
   if (ch->pcdata->learned[gsn_eyebeam] == 0)
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}
   if (IS_ANDROID(ch))
   {
    if ( ( victim = who_fighting( ch ) ) == NULL )
    {
     send_to_char( "You aren't fighting anyone.\n\r", ch );
     return;
    }
    if (can_use_skill(ch, number_percent(), gsn_eyebeam ))
    {
     sprintf( buf, "%s looks at you and %s eyes glow up.\n\r%s launches two beams from %s eyes.", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf , victim, NULL, ch, TO_CHAR );
     act( AT_RED, "You look at $N and your eyes glow up.\n\r&RYou launch two energy beams from your eyes.", ch, NULL, victim, TO_CHAR );
     sprintf( buf, "&R%s looks at %s and %s eyes glow up.\n\r&R%s launches two energy beam from %s eyes.", ch->name, victim->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf, ch, NULL, victim, TO_NOTVICT );
     one_hit(ch, victim, TYPE_EYE);
     learn_from_success( ch, gsn_eyebeam );
    }
    else
    {
     sprintf( buf, "&R%s looks at you and %s eyes glow up.\n\r%s launches two beams from %s eyes.", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf , victim, NULL, ch, TO_CHAR );
     act( AT_RED, "&RYou look at $N and your eyes glow up.\n\rYou launch two energy beams from your eyes..", ch, NULL, victim, TO_CHAR);
     sprintf( buf, "&R%s looks at %s and %s eyes glow up.\n\r%s launches two energy beam from %s eyes.", ch->name, victim->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its", ch->name, ch->sex == 1 ? "his" : ch->sex == 2 ? "her" : "its" );
     act( AT_RED, buf, ch, NULL, victim, TO_NOTVICT );
     damage(ch, victim, 0, TYPE_EYE);
     learn_from_failure( ch, gsn_eyebeam );
      WAIT_STATE( ch, 15 );
     return;
    }
      WAIT_STATE( ch, 15 );
   }
   else
   {
    send_to_char("Huh?\n\r", ch);
    return;
   }
}

void do_shield( CHAR_DATA *ch, char *argument )
{

/*  if (ch->pcdata->learned[gsn_eshield] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  } */

   if ( !IS_AWAKE(ch) )
   {
      send_to_char("Not in your sleep...\n\r", ch);
      return;
   }

   if ( !IS_BIODROID(ch) )
   {
      send_to_char("Huh?\n\r", ch);
      return;
   }

  if (IS_BIODROID(ch) )
  {
    ch->pcdata->learned[gsn_eshield] = 100;

    if( get_timer(ch, TIMER_SHIELDCOOLDOWN) > 0 )
    {
        send_to_char( "You can't sacrifice enough energy to use that technique again for a while.\n\r", ch );
        return;
    }
 
    if (ch->position == POS_STUNNED)
    {
        send_to_char( "You are too stunned to do that.\n\r", ch );
        return;
    }

   if (ch->mana < ch->max_mana /15)
   {
    send_to_char( "You need more energy to perform this technique...", ch);
    return;
   }

   if (can_use_skill(ch, number_percent(), gsn_eshield ))
   {
    ch->mana -= ch->max_mana /15;
    send_to_char( "&PYou quickly spread your arms and create an Energy Shield, taunting your opponent from behind it.\n\r", ch);
    act( AT_RED, "&P$n quickly spreads $s arms and creates an Energy Shield, taunting $s opponents from behind it.", ch, NULL, NULL, TO_ROOM );
    add_timer(ch, TIMER_SHIELD, 5, NULL, 0);
    add_timer(ch, TIMER_SHIELDCOOLDOWN, 450, NULL, 0);
    return;
   }
    else
   {
    send_to_char( "&RYou spread your arms and try to create an Energy Barrier...\n\r", ch);
    act( AT_RED, "$n spreads $s arms and tries to create an Energy Barrier...", ch, NULL, NULL, TO_ROOM );
    ch->mana -= ch->max_mana /15;
    return;
   }

}

}

void do_barrier( CHAR_DATA *ch, char *argument )
{
  long int pl;
  int mod;

  pl = ch->exp;
  mod = ch->mod;

  if (IS_NPC(ch))
  return;

   if ( !IS_AWAKE(ch) )
   {
      send_to_char("Not in your sleep...\n\r", ch);
      return;
   }

  if (ch->pcdata->learned[gsn_ebar] == 0)
  {
   send_to_char("Huh?\n\r", ch);
   return;
  }
  if (IS_HALFBREED(ch) || IS_HUMAN(ch) || IS_NAMEK(ch) || IS_MUTANT (ch) || xIS_SET(ch->act, PLR_PRIMARY_BARRIER) )
  {
   if ( xIS_SET(ch->act, PLR_EBAR ) || xIS_SET(ch->act, PLR_ESPHERE) || xIS_SET(ch->act, PLR_DESTRUCTO) || xIS_SET(ch->act, PLR_EBALL) )
   {
    send_to_char( "&RYou are already controlling an energy attack.\n\r", ch);
    return;
   }
    if (ch->position == POS_STUNNED)
    {
        send_to_char( "You are too stunned to do that.\n\r", ch );
        return;
    }
   if (ch->mana < ch->max_mana /19)
   {
    send_to_char( "You need more energy to perform this technique...", ch);
    return;
   }
   if (can_use_skill(ch, number_percent(), gsn_ebar ))
   {
    xSET_BIT(ch->act, PLR_EBAR);
    if(!xIS_SET(ch->act, PLR_SUPPRESS)) 
    {
    ch->barrier = ch->exp * ch->mod;
    ch->maxbarrier = ch->exp * ch->mod;
    }
    else 
    {
    ch->barrier = ch->suppress;
    ch->maxbarrier = ch->suppress;
    }

    ch->mana -= ch->max_mana /19;
    send_to_char( "&RYou spread your arms and create an Energy Barrier.\n\r", ch);
    ch_printf(ch, "&RYou estimate that the Energy Barrier has a defense power of %d\n\r", ch->barrier );
    act( AT_RED, "$n spreads $s arms and creates an energy barrier.", ch, NULL, NULL, TO_ROOM );
    learn_from_success( ch, gsn_ebar );
   }
   else
   {
    send_to_char( "&RYou spread your arms and try to create an Energy Barrier...\n\r", ch);
    act( AT_RED, "$n spreads $s arms and tries to create an Energy Barrier...", ch, NULL, NULL, TO_ROOM );
    ch->mana -= ch->max_mana /19;
    learn_from_failure( ch, gsn_ebar );
    return;
   }
}
}

/* void do_crp( CHAR_DATA *ch, char *argument )
{
     if ( IS_NPC(ch) )
     return;

     if (xIS_SET(ch->act, PLR_NOCHAT))
     {
        send_to_char( "You must have an authorized biography to participate in the CRP!\n\r", ch );
        return;
     }

     if (xIS_SET(ch->act, PLR_IN_CRP))
     {
        send_to_char( "You are no longer part of the CRP!\n\r", ch );
        xREMOVE_BIT(ch->act, PLR_IN_CRP);
        return;
     }
   else
     {
        send_to_char( "You are now taking part in the CRP!\n\r", ch );
        xSET_BIT(ch->act, PLR_IN_CRP);
        return;
     }

} */

void do_pk( CHAR_DATA *ch, char *argument )
{
     if ( IS_NPC(ch) )
     return;

     if ( ch->exp < 5000000 )
     {
        send_to_char( "You aren't ready for that yet.\n\r", ch );
        return;
     }

     if (IS_SET(ch->pcdata->flags, PCFLAG_DEADLY))
     {
        send_to_char( "You are already a deadly player.\n\r", ch );
     }
     else
     {
        SET_BIT(ch->pcdata->flags, PCFLAG_DEADLY);
        send_to_char( "You are now a deadly player.\n\r", ch );
        act(AT_GREY,"$n is now a deadly player.", ch, NULL, NULL, TO_CANSEE);
        return;
     }

}

/* void do_gravset( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];

   argument = one_argument( argument, arg1 );

    if( !xIS_SET(ch->in_room->room_flags, ROOM_GRAVITY) )
    {
        ch_printf(ch,"&RYou must be in a gravity chamber to set the gravity.\n\r");
        return;
    }

     if ( arg1[0] == '\0' )
     {
       send_to_char("&RSyntax: gravset <#>.\n\r", ch);
       return;
     }
    
     if ( atoi(arg1) > 5000 )
     {
       send_to_char("&RGravity too high. Range 1-5000.\n\r", ch);
       return;
     }
     else
     ch->gravset = atoi(arg1);
     return;
  } */

void do_gravset( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   bool check=FALSE;
   int setgrav;

   argument = one_argument( argument, arg1 );

   setgrav = atoi(arg1);

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }
   if (ch->position == POS_RESTING || ch->position == POS_SITTING )
   {
    send_to_char("Stand up first.\n\r", ch);
    return;
   }

   if ( arg1[0] == '\0' )
   {
    send_to_char( "Set the Gravity to which level?\n\r", ch );
    return;
   }

   if (!xIS_SET(ch->in_room->room_flags, ROOM_GRAVITY) && !xIS_SET(ch->in_room->room_flags, ROOM_UGT))
   {
    send_to_char( "You aren't in a gravity room.\n\r", ch );
    return;
   }
   if ( !is_number(arg1))
   {
    send_to_char( "It must be a number.\n\r", ch);
    return;
   }
   if ( setgrav > 5000 )
   {
    send_to_char("The highest gravity is 5000.", ch);
    check = TRUE;
    return;
   }
   if (setgrav != ch->gravset)
   {
    ch->gravsucc = 0;
    ch->gravset = setgrav;
   }
    ch->gravset = setgrav;
    ch_printf(ch, "&zGravity set to&G %d&D.\n\r", ch->gravset);
    return;
}


void do_pushup( CHAR_DATA *ch, char *argument )
{
      int plcheck, success, chance, gravtotal, chance2, needed2, pl;

      char  logbuf[MAX_STRING_LENGTH];
      bool nogain=FALSE;


     int gainpl;
     double needed, charpl, setgrav;
     charpl = ch->exp;
     needed = sqrt(ch->gravset);
     needed2 = needed;
     plcheck = (ch->gravset * 10000);
     success = ch->gravsucc;
     setgrav = ch->gravset;
     gainpl = (sqrt(setgrav) * sqrt(charpl)) * 2;
     chance = number_range( 0, 2);
     gravtotal = ch->gravtotal;
     chance2 = number_range( 0, 1);
     if (needed > 100){needed = 100;}

     if (!xIS_SET(ch->in_room->room_flags, ROOM_GRAVITY) && !xIS_SET(ch->in_room->room_flags, ROOM_UGT))
     {
      send_to_char( "You aren't in a gravity room.\n\r", ch );
      return;
     }
 
     if (setgrav == 0)
     {
      send_to_char("You should probably set the gravity level, using setgrav <number>.\n\r", ch);
      return;
     }

     if (needed <= 0)
     needed = 1;
     if ( IS_NPC(ch) )
     return;
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if  ( get_timer(ch, TIMER_GRAVITY) > 0 && !IS_IMMORTAL(ch))
     {
      send_to_char("\n\rYou can't train again yet, your body needs to recover.\n\r", ch);
      return;
     }
     if ( plcheck > ch->exp && ch->gravset > 1)
     {
      if (chance2 == 1)
      {
       send_to_char( "\n\r&rAs you turn on the gravity... You feel that you are squashed like a pancake.&w\n\r", ch);
       act(AT_BLOOD,"\n\rAs $n turns on the gravity... $e gets squashed like a pancake.", ch, NULL, NULL, TO_CANSEE);
       raw_kill(ch, ch);
       sprintf(logbuf, "&O%s has died in the Gravity Chamber.", ch->name );
       log_string( logbuf );
      }
      else
      {
       ch->hit = -3;
       update_pos(ch);
      }
      return;
     }
     if ( ch->hit <= 9)
     {
      send_to_char("Your too tired to continue on with your gravity training.\n\r", ch);
      return;
     }
     if (ch->gravsucc >= 20) chance = 1;

     if (chance == 0 ) /*Unsuccessful*/
     {
      if (gravtotal == 0)
      act(AT_GREY,"$n starts $s gravity workout.", ch, NULL, NULL, TO_CANSEE);
      ch_printf(ch, "You turn on the gravity of the gravitron.\n\rYou drop to your hands and start doing some pushups.\n\r");
      ch_printf(ch, "Current workout stats for level &Y%d&w: success: &Y%d&w  needed: &Y%d&w.\n\r", ch->gravset,ch->gravsucc, needed2);
      ch_printf(ch, "Your workout is &Runsuccessful!\n\r");
      ch->gravtotal += 1;
      ch->hit -= number_range(2, 3);
     }
     else if (chance == 1 || chance == 2) /*Successful*/
     {
      if (gravtotal == 0)
      act(AT_GREY,"$n starts $s gravity workout.\n\r", ch, NULL, NULL, TO_CANSEE);
      ch->gravtotal += 1;
      ch->gravsucc += 1;
      ch_printf(ch, "You turn on the gravity of the gravitron.\n\rYou drop to your hands and start doing some pushups.\n\r");
      ch_printf(ch, "Current workout stats for level &Y%d&w: success: &Y%d&w  needed: &Y%d&w.\n\r", ch->gravset,ch->gravsucc, needed2);
      ch_printf(ch, "Your workout is &Gsuccessful!\n\r");
      ch->hit -= 1;
      if (success >= needed)
      {
      if (xIS_SET(ch->in_room->room_flags, ROOM_UGT))
        gainpl *= 1.8;
//       if ( game_state == GAME_DOUBLE )
//       gainpl *= 1.3;

        ch_printf(ch, "&YYou gained &G%d&Y Powerlevel!\n\r", gainpl);
        if ( ch->exp >= 5000000 && ch->exp < 25000000)  {pl = ch->pcdata->learned[gsn_chikone] * 250000;}
        else if ( ch->exp >= 25000000 && ch->exp < 55000000){pl = ch->pcdata->learned[gsn_chiktwo] * 550000; }
        else if ( ch->exp >= 55000000 && ch->exp < 75000000){pl = ch->pcdata->learned[gsn_chikthree] * 750000; }
       else if ( ch->exp >= 75000000 && ch->exp < 100000000){pl = ch->pcdata->learned[gsn_chikfour] *  1000000;}
//        else if ( ch->exp >= 90000000 && ch->exp < 100000000){pl = ch->pcdata->learned[gsn_chikfive] * 1000000;}
        if (ch->exp >= 5000000)
        {
         if (  pl < ch->exp) nogain = TRUE;
         }
        if ( nogain )
        send_to_char("Your powerlevel is too high, gravity training won't have any effect on you.\n\r",ch);

         if ( !nogain)
        ch->exp += gainpl;
          if (ch->exp > 100000000)
           ch->exp = 100005000;
        ch->gravsucc = 0;
        ch->gravtotal = 0;
        add_timer( ch, TIMER_GRAVITY, 120, NULL, 0 );
        }
     }
     return;
    }

void do_suppress( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];

   argument = one_argument( argument, arg1 );

     if ( IS_NPC(ch) )
     return;
     if (ch->pcdata->learned[gsn_suppress] == 0)
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (ch->exp < 1000000)
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if (ch->mana < 500)
     {
      send_to_char( "You don't have enough energy to suppress your power.\n\r", ch);
      return;
     }
     if ( arg1[0] == '\0' )
     {
       xREMOVE_BIT(ch->act, PLR_SUPPRESS);
       ch->suppress = 0;
       send_to_char("&BYou reveal your true powerlevel.\n\r", ch);
       act( AT_BLUE, "&B$n reveals $s true powerlevel.", ch, NULL, NULL, TO_CANSEE );
     }

   else if ( !str_cmp( arg1, "max" ))
   {
       xREMOVE_BIT(ch->act, PLR_SUPPRESS);
       ch->suppress = 0;
       send_to_char("&BYou reveal your true powerlevel.\n\r", ch);
       act( AT_BLUE, "&B$n reveals $s true powerlevel.", ch, NULL, NULL, TO_CANSEE );
     }

   else if ( !str_cmp( arg1, "0" ))
   {
       xREMOVE_BIT(ch->act, PLR_SUPPRESS);
       ch->suppress = 0;
       send_to_char("&BYou reveal your true powerlevel.\n\r", ch);
       act( AT_BLUE, "&B$n reveals $s true powerlevel.", ch, NULL, NULL, TO_CANSEE );
     }

     else if (atoi(arg1) > (ch->exp * ch->mod))
     {
      send_to_char( "How do you plan on suppressing to a powerlevel you can't even fathom, dumbass.\n\r", ch);
        return;
     }

     else if ( !is_number(arg1))
     {
      send_to_char( "It must be a number.\n\r", ch);
      return;
     }

     else if (atoi(arg1) < (ch->exp * ch->mod))
     {
       if (can_use_skill(ch, number_percent(), gsn_suppress ))
       {
       // ch->mana -= ch->max_mana /30;
        send_to_char("&BYou suppress your powerlevel.\n\r", ch);
        act( AT_BLUE, "&B$n suppresses $s powerlevel.", ch, NULL, NULL, TO_CANSEE );
        ch->suppress = atoi(arg1);
        if (ch->suppress < 5)
        ch->suppress = 5;
        xSET_BIT(ch->act, PLR_SUPPRESS);
        learn_from_success(ch, gsn_suppress);
       }
       else
       {
        send_to_char("&GYou try to suppress your powerlevel, but you fail.\n\r", ch);
        act( AT_BLUE, "&G$n tries to suppress $s powerlevel, but $e fails.", ch, NULL, NULL, TO_CANSEE );
        //ch->mana -= ch->max_mana /18;
        learn_from_failure(ch, gsn_suppress);
        return;
       }
     }
     else if (atoi(arg1) == (ch->exp * ch->mod))
     {
       send_to_char("What would be the point of that?",ch);
       return;
     }
}

void do_mystic( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];

   argument = one_argument( argument, arg1 );

     if ( IS_NPC(ch) )
     return;
     if (ch->pcdata->learned[gsn_mystic] == 0)
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_HALFBREED(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (IS_POWERUP(ch) || xIS_SET(ch->act, PLR_KAIOKEN ))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_SSJ1 ))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_SSJ2 ))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if (IS_POWERUP(ch))
     {
      send_to_char("Your already using another technique...\n\r", ch);
      return;
     }
     if (ch->exp < 20000000)
     {
      send_to_char("You able to control the power of Mystic? Wake up...\n\r", ch);
      return;
     }
     if (ch->mana < 501 )
     {
      send_to_char("You need more energy to use this technique.\n\r", ch);
      return;
     }

/*      if ( !str_cmp( arg1, "ssj" ))
      {

     if (!xIS_SET(ch->act, PLR_CAN_MSSJ ) )
     {
      send_to_char("Huh!?\n\r", ch);
      return;
     }

     if (xIS_SET(ch->act, PLR_MYSTICSSJ ))
     {
      send_to_char( "&WYou concentrate as the wite flames begin to fade away and they dissappear...\n\r", ch );
      act(AT_GREY,"$n concentrates as the white flames begin to fade away and they dissappear...", ch, NULL, NULL,TO_CANSEE);
      ch->mod = 1;
      ch->mod_str = 0;
      ch->mod_dex = 0;
      ch->mod_lck = 0;
      xREMOVE_BIT(ch->act, PLR_MYSTICSSJ);
      return;
     }

       xSET_BIT(ch->act, PLR_MYSTICSSJ);
       ch->mana -= 500;
       ch->mod = 9.9;
       ch->mod_str = -1;
       ch->mod_dex = 3;
      send_to_char( "&YYou scream as a blast of energy explodes away from you.\n\r&RYou concentrate trying to search all the power within your soul.\n\rYour hair turns yellow as your eyes turn green, a yellow aura soon surrounds you completely.\n\r&WYou have unleashed the power of Mystic SSJ.\n\r", ch);
      act( AT_RED, "&Y$n screams as a blast of energy explodes away from $m.\n\r&R$n concentrates trying to search all the power within $s soul.\n\r&W$n's hair turns yellow as $s eyes turns green and a yellow aura soon surrounds $m completely.\n\r&z$n has now unleashed the power of a Mystic SSJ.", ch, NULL, NULL, TO_ROOM );
      return;
      } */

     if (!xIS_SET(ch->act, PLR_MYSTIC))
     {
      if (can_use_skill(ch, number_percent(), gsn_mystic ))
      {
       xSET_BIT(ch->act, PLR_MYSTIC);
       ch->mana -= 500;
       ch->mod = 8.9;
       ch->mod_str = -4;
       ch->mod_dex = 6;
       ch->mod_lck = 4;
       send_to_char( "&RYou close your eyes as you concentrate on harvesting the energy inside of you.\n\r&WYou open your eyes as a white flame surrounds you comepletely.\n\r&YYou have now transformed into a Mystic Fighter.\n\r", ch);
       act( AT_RED, "$n closes $s eyes as $e concentrates on harvesting the energy inside of $m.\n\r&W$n opens $s eyes as a white flames explodes and surrounds his body completely.\n\r&Y$n has transformed into a Mystic Fighter.", ch, NULL, NULL, TO_ROOM );
       learn_from_success( ch, gsn_mystic );
      }
      else
      {
       send_to_char( "&RYou close your eyes as you concentrate on harvesting the energy inside of you.\n\r&WYou open your eyes but you are unable to unleash the power...\n\r", ch);
       act( AT_RED, "$n closes $s eyes as $e concentrates on harvesting the energy inside of $m.\n\r&W$n opens $s eyes as he is unable to unleash the power...", ch, NULL, NULL, TO_ROOM );
       ch->mana -= 50;
       learn_from_failure( ch, gsn_mystic );
       return;
      }
     }
     else if (xIS_SET(ch->act, PLR_MYSTIC ) )
     {
      xREMOVE_BIT(ch->act, PLR_MYSTIC);
      send_to_char( "&WYou concentrate as the wite flames begin to fade away and they dissappear...\n\r", ch );
      act(AT_GREY,"$n concentrates as the white flames begin to fade away and they dissappear...", ch, NULL, NULL, TO_CANSEE);
      ch->mod = 1;
      ch->mod_str = 0;
      ch->mod_lck = 0;
      ch->mod_dex = 0;
      return;
     }
}

void do_kaioken( CHAR_DATA *ch, char *argument )
{
   char              arg1[MAX_INPUT_LENGTH];
   int               pl;
   argument = one_argument( argument, arg1 );

     pl = (atoi(arg1) * 1000000);

     if ( IS_NPC(ch) )
     return;
     if (ch->pcdata->learned[gsn_kaioken] == 0)
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (!IS_HALFBREED(ch) && !IS_SAIYAN(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_MYSTIC) || xIS_SET(ch->act, PLR_SSJ1) || xIS_SET(ch->act, PLR_SSJ2) || xIS_SET(ch->act, PLR_SSJ3) || IS_POWERUP(ch))
     {
      send_to_char("You are already another powerup technique.\n\r", ch);
      return;
     }
     if (xIS_SET(ch->act, PLR_OOZARU))
     {
      send_to_char("Monkeys don't use Kaioken.\n\r", ch);
      return;
     }
     if (!IS_AWAKE(ch))
     {
      send_to_char("You aren't awake...\n\r", ch);
      return;
     }
     if ( arg1[0] == '\0' && !xIS_SET(ch->act, PLR_KAIOKEN))
     {
      send_to_char( "Kaioken at level what?\n\r", ch );
      return;
     }
     if ( arg1[0] == '\0' && xIS_SET(ch->act, PLR_KAIOKEN))
     {
      send_to_char( "&RYour red glowing and flaming aura dissappear as you descend from Kaioken.\n\r", ch );
      act( AT_RED, "$n's red glowing and flaming aura dissappear as $e descends from Kaioken.", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 1;
      ch->mod_str = 0;
      ch->mod_dex = 0;
      ch->mod_con = 0;
      xREMOVE_BIT(ch->act, PLR_KAIOKEN);
      return;
     }
     if ( ch->mana <= 200 )
     {
      send_to_char( "You don't have enough energy to use the Kaioken technique.\n\r", ch);
      return;
     }
     if ( !is_number(arg1))
     {
      send_to_char( "It must be a number.\n\r", ch);
      return;
     }
     if (atoi(arg1) > 16 )
     {
      send_to_char( "Invalid number.\n\r", ch);
      return;
     }
     if ( ch->exp < pl )
     {
      send_to_char("\n&RYou explode as your body tears in tiny pieces from using a high level of kaioken.\n\r\n\r", ch);
      act( AT_RED, "$n explodes as $s body tears into tiny pieces from using a high level of kaioken", ch, NULL, NULL, TO_CANSEE );
      raw_kill( ch, ch);
      ch->mod = 1;
      ch->mod_str = 0;
      ch->mod_dex = 0;
      ch->mod_con = 0;
      xREMOVE_BIT(ch->act, PLR_KAIOKEN);
      return;
     }
     if (can_use_skill(ch, number_percent(), gsn_kaioken ))
     {
      send_to_char("&RYou slowly glow up with a bright red and white aura.\n\r\n\r", ch);
      act( AT_RED, "$n slowly glows up with a bright red and white aura.\n\r", ch, NULL, NULL, TO_CANSEE );
      if ( !str_cmp( arg1, "1" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES ONE!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES ONE!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 1.45;
      }
      if ( !str_cmp( arg1, "2" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES TWO!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES TWO!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 1.9;
      }
      if ( !str_cmp( arg1, "3" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES THREE!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES THREE!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 2.35;
      }
      if ( !str_cmp( arg1, "4" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES FOUR!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES FOUR!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 2.8;
      }
      if ( !str_cmp( arg1, "5" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES FIVE!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES FIVE!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 3.25;
      }
      if ( !str_cmp( arg1, "6" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES SIX!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES SIX!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 3.7;
      }
      if ( !str_cmp( arg1, "7" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES SEVEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES SEVEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 4.15;
      }
      if ( !str_cmp( arg1, "8" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES EIGHT!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES EIGHT!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 4.6;
      }
      if ( !str_cmp( arg1, "9" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES NINE!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES NINE!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 5.05;
      }
      if ( !str_cmp( arg1, "10" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES TEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES TEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 5.5;
      }
      if ( !str_cmp( arg1, "11" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES ELEVEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES ELEVEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 5.95;
      }
      if ( !str_cmp( arg1, "12" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES TWELVE!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES TWELVE!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 6.4;
      }
      if ( !str_cmp( arg1, "13" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES THIRTEEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES THIRTEEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 6.85;
      }
      if ( !str_cmp( arg1, "14" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES FOURTEEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES FOURTEEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 7.3;
      }
      if ( !str_cmp( arg1, "15" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES FIFTEEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES FIFTEEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 7.75;
      }
      if ( !str_cmp( arg1, "16" ))
      {
      send_to_char("&RYou yell KAAAIIIOOO-KEEEENN TIMES SIXTEEN!!\n\r", ch);
      act( AT_RED, "$n yells KAAAIIIOOO-KEEEENN TIMES SIXTEEN!!\n\r", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 8.2;
      ch->mod_str = 6;
      ch->mod_dex = 6;
      }
      send_to_char("\n\r&RYou erupt in a red and white glowing flaming aura!\n\r", ch);
      act( AT_RED, "&R$n erupts in a red and white glowing flaming aura!", ch, NULL, NULL, TO_CANSEE );
      xSET_BIT(ch->act, PLR_KAIOKEN);
      ch->mana -= 200;
      learn_from_success(ch, gsn_kaioken);
      /* return; */
      ch->mod_str = 6;
      ch->mod_dex = 8;
//      ch->mod_con = -5;
      return;
     }
     else
     {
      send_to_char("\n\r&RYour aura flashes in red as you try to use the Kaioken technique.\n\r", ch);
      act( AT_RED, "$n's aura flashes in red as $e tries to use the Kaioken technique.", ch, NULL, NULL, TO_CANSEE );
      ch->mod = 1;
      ch->mana -= 150;
      ch->mod_str = 0;
      ch->mod_dex = 0;
//      ch->mod_con = 0;
      learn_from_failure(ch, gsn_kaioken);
      return;
     }
}

void do_superhuman( CHAR_DATA *ch, char *argument )
{
   if ( IS_NPC(ch) )
      return;

   if ( !IS_HUMAN(ch) || ch->pcdata->learned[gsn_superhuman] == 0 )
   {
      send_to_char("Huh?\n\r", ch);
      return;
   }
   if ( !IS_AWAKE(ch) )
   {
      send_to_char("Not in your sleep...\n\r", ch);
      return;
   }
   if ( xIS_SET(ch->act, PLR_SUPERHUMAN) )
   {
      send_to_char("&WYou slowly revert back to your previous level and your aura fades.\n\r", ch);
      act(AT_YELLOW, "$n slowly reverts back to $s previous level and $s aura fades.", ch, NULL, NULL, TO_CANSEE);
      xREMOVE_BIT(ch->act, PLR_SUPERHUMAN);
      ch->mod = 1;
      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;
   }
   if ( IS_POWERUP(ch) )
   {
      send_to_char("You're already using another technique...\n\r", ch);
      return;
   }
   if ( ch->exp >= 2500000 )
   {
      if ( can_use_skill(ch, number_percent(), gsn_superhuman ) )
      {
      send_to_char( "&wYou close your eyes as you search within you your hidden power.\n\r&WYour muscles begin to grow in size and your power raises as you feel your power being tapped.\n\r&zCrackles of energy explode from your body as you unlock your true potential!\n\r", ch );
      act(AT_GREY,"$n closes $s eyes as $e searches within $m for $s hidden power.\n\r&W$n's muscles begin to grow in size and power as you notice that $n is somewhat tapping $s power.\n\r&zCrackles of energy explode from $n's body as $n unlocks $s true potential!", ch, NULL, NULL, TO_CANSEE);
         //ch->mana -= 200;
         ch->mod = 8.5;
         ch->mod_dex = 6;
         ch->mod_lck = 3;
         xSET_BIT(ch->act, PLR_SUPERHUMAN);
         learn_from_success(ch, gsn_superhuman);
         return;
      }
      else
      {
         send_to_char("&WYour aura flashes white as you try to become a superhuman.\n\r", ch);
         act( AT_RED, "$n's aura flashes white as $e tries to become a superhuman.", ch, NULL, NULL, TO_CANSEE );
        // ch->mana -= 150;
         ch->mod = 1;
         ch->mod_str = 0;
         ch->mod_dex = 0;
         ch->mod_lck = 0;
         ch->mod_wis = 0;
         ch->mod_int = 0;
         ch->mod_con = 0;
         learn_from_failure(ch, gsn_superhuman);
         return;
      }
   }
}

void do_ssj( CHAR_DATA *ch, char *argument )
{
     char              arg1[MAX_INPUT_LENGTH];
     argument = one_argument( argument, arg1 );

     if ( IS_NPC(ch) )
     return;

     if (!IS_SAIYAN(ch) && !IS_HALFBREED(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     }

     if (xIS_SET(ch->act, PLR_MYSTIC))
          {
      send_to_char("You are already using another technique.\n\r", ch);
      return;
     }

     if (xIS_SET(ch->act, PLR_KAIOKEN))
     {
      send_to_char("You can't use Kaioken while transformed into a Super Saiyan!\n\r", ch);
      return;
     }

     if (xIS_SET(ch->act, PLR_OOZARU))
     {
      send_to_char("You can't use Kaioken while in your monkey state!\n\r", ch);
      return;
     }

     if (xIS_SET(ch->act, PLR_GOLDEN))
     {
      send_to_char("You can't use Kaioken while in your monkey state!\n\r", ch);
      return;
     }

     if (!IS_AWAKE(ch))
     {
      send_to_char("Not in your sleep...\n\r", ch);
      return;
     }
     if ( arg1[0] == '\0' && (xIS_SET(ch->act, PLR_SSJ1) || xIS_SET(ch->act, PLR_SSJ2) || ((xIS_SET(ch->act, PLR_SSJ3) || xIS_SET(ch->act, PLR_SSJ4)) && IS_SAIYAN(ch)) ))
     {
      send_to_char("&YYour hair falls and your golden aura fades...\n\r", ch);
      act(AT_YELLOW,"$n's hair falls and $s golden aura fades...", ch, NULL, NULL, TO_CANSEE);
      xREMOVE_BIT(ch->act, PLR_SSJ1);
      xREMOVE_BIT(ch->act, PLR_SSJ2);
      xREMOVE_BIT(ch->act, PLR_SSJ3);
      xREMOVE_BIT(ch->act, PLR_SSJ4);
        xREMOVE_BIT(ch->act, PLR_SUPPRESS);
      ch->mod = 1;
      ch->mod_str = 0;
      ch->mod_dex = 0;
      ch->mod_lck = 0;
      ch->mod_wis = 0;
      ch->mod_int = 0;
      ch->mod_con = 0;
      ch->suppress = 0;
      return;
     }
     else if ( arg1[0] == '\0' )
     {
      send_to_char("&YWhat level would you like to attempt?\n\r", ch);
      return;
     }             
     if ( !is_number(arg1) )
     {
      send_to_char( "SSJ 1, 2 or 3?.\n\r", ch);
      return;
     }
     if ( !str_cmp( arg1, "1" ) )
     {
      if (ch->exp <= 5000000)
      {
       send_to_char("&YYour aura flashes gold to no avail..\n\r", ch);
       return;
      }
      if (ch-> rage < 150)
      {
       send_to_char ("You, a Super Saiyan!? Yeah right!\n\r", ch);
       return;
      }
      if (xIS_SET(ch->act, PLR_SSJ1) )
      {
       send_to_char("&YYour already at that level!\n\r", ch);
       return;
      }
      else
      {
       send_to_char("&YYour hair rises up and a golden aura engulfs you\n\r&RYou turn into a mighty Super Saiya-Jin again!\n\r", ch);
       act(AT_YELLOW,"$n's hair rises up and a golden aura engulfs $m\n\r&R$n turns into a mighty Super Saiya-Jin again!.", ch, NULL, NULL, TO_CANSEE);
       xREMOVE_BIT(ch->act, PLR_SSJ2);
       xREMOVE_BIT(ch->act, PLR_SSJ3);
       xREMOVE_BIT(ch->act, PLR_SSJ4);
       xSET_BIT(ch->act, PLR_SSJ1);
        xREMOVE_BIT(ch->act, PLR_SUPPRESS);
       ch->mod = 4;
       ch->mod_str = 2;
       ch->mod_dex = 0;
       ch->mod_lck = 0;
       ch->mod_wis = 0;
       ch->mod_int = -1;
       ch->mod_con = 0;
       ch->suppress = 0;
       return;
       }
      }
      else if ( !str_cmp( arg1, "2" ) )
       {
       if (ch->exp <= 10000000)
       {
         send_to_char("&YYour Aura flashes gold to no avail..\n\r", ch);
         return;
       }
       if (ch->rage < 250)
       {
         send_to_char ("You a Super Saiyan 2!? Yeah right!\n\r", ch);
         return;
       }
       if (xIS_SET(ch->act, PLR_SSJ2) )
       {
         send_to_char("&YYour already at that level!.\n\r", ch);
         return;
       }
       else
       {
        send_to_char("&YYou glow with a golden aura and crackle with electricty.\n\r&RYou turn into a powerful Super Saiya-Jin level 2 again!\n\r", ch);
        act(AT_YELLOW,"$n glows with a golden aura and crackle with electricity.\n\r&R$n turns into a powerful Super Saiya-Jin level 2 again!", ch, NULL, NULL, TO_CANSEE);
        xREMOVE_BIT(ch->act, PLR_SSJ1);
        xREMOVE_BIT(ch->act, PLR_SSJ3);
        xREMOVE_BIT(ch->act, PLR_SSJ4);
        xSET_BIT(ch->act, PLR_SSJ2);
        xREMOVE_BIT(ch->act, PLR_SUPPRESS);
        ch->mod = 7;
        ch->mod_str = 4;
        ch->mod_dex = 2;
        ch->mod_lck = 0;
        ch->mod_wis = 0;
        ch->mod_int = 2;
        ch->mod_con = 0;
        ch->suppress = 0;
        return;
       }
      }
      else if ( !str_cmp( arg1, "3" ) && (!IS_HALFBREED(ch)))
      {
       if (ch->exp <= 25000000)
       {
         send_to_char("&YYour aura flashes gold to no avail..\n\r", ch);
         return;
       }
       if (ch->rage < 350)
       {
         send_to_char ("You a Super Saiyan 3!? Yeah right!\n\r", ch);
         return;
       }
       if (xIS_SET(ch->act, PLR_SSJ3) )
       {
         send_to_char("&YYour already at that level!\n\r", ch);
         return;
       }
       else
       {
        send_to_char("&YYou glow with a bright golden aura and your hair flows down your back.\n\r&YYour eyebrows vanish as you make the ultimate transformation\n\r&RYou turn into a vicious Super Saiya-Jin level 3 again!\n\r", ch);
        act(AT_YELLOW,"$n glows with a bright golden aura and $s hair flows down $s back.\n\r$n's eyebrows vanish as $e makes the ultimate transformation.\n\r&R$n turns into a vicious Super Saiya-Jin level 3 again!", ch, NULL, NULL, TO_CANSEE);
       }
       {
        xREMOVE_BIT(ch->act, PLR_SSJ1);
        xREMOVE_BIT(ch->act, PLR_SSJ2);
        xSET_BIT(ch->act, PLR_SSJ3);
        xREMOVE_BIT(ch->act, PLR_SSJ4);
        xREMOVE_BIT(ch->act, PLR_SUPPRESS);
        if ( IS_LEGENDARY(ch) )
       {
        ch->mod = 9.2;
        ch->mod_str = 8;
        ch->mod_dex = 1;
        ch->mod_lck = 0;
        ch->mod_wis = 0;
        ch->mod_int = -5;
        ch->mod_con = 0;
        ch->suppress = 0;
        return;
       }
        ch->mod = 9;
        ch->mod_str = 6;
        ch->mod_dex = 2;
        ch->mod_lck = 0;
        ch->mod_wis = 0;
        ch->mod_int = -3;
        ch->mod_con = 0;
        ch->suppress = 0;
        return;
       }
      }
     else if ( !str_cmp( arg1, "4" ) && !IS_HALFBREED(ch) )
      {
       if (ch->exp <= 90000000)
       {
         send_to_char("&YYour aura flashes gold to no avail..\n\r", ch);
         return;
       }
       if (ch->rage <= 2000)
       {
         send_to_char ("You a Super Saiyan 4!? Yeah right!\n\r", ch);
         return;
       }
       if (xIS_SET(ch->act, PLR_SSJ4) )
       {
         send_to_char("&YYour already at that level!\n\r", ch);
         return;
       }
       else
       {
        send_to_char("&YYour hair turns ash black and your skin gets covered with red fur.\n\r&YYou growl and look around, nobody can stop you now.\n\r&RYou turn into a vicious Super Saiya-Jin level 4 again!\n\r", ch );
        act(AT_YELLOW,"$n's muscles bulge enourmously and $s hair turns ash black.\n\r$n lets loose a loud growl as his entire body is covered in red fur.\n\r&R$n scowls wildly, and glares at you with $s ferocious red eyes.\n\r&RWithin a flash, the transformation is over, and $e stands here, in all $s glory, emenating tremendous power.",ch, NULL, NULL, TO_CANSEE);
       }
       {
        xREMOVE_BIT(ch->act, PLR_SSJ1);
        xREMOVE_BIT(ch->act, PLR_SSJ2);
        xREMOVE_BIT(ch->act, PLR_SSJ3);
        xSET_BIT(ch->act, PLR_SSJ4);
        xREMOVE_BIT(ch->act, PLR_SUPPRESS);
        ch->mod = 10;
        ch->mod_str = 6;
        ch->mod_dex = 2;
        ch->mod_lck = 0;
        ch->mod_wis = 0;
        ch->mod_int = -3;
        ch->mod_con = 0;
        ch->suppress = 0;
        return;
       }
      }
 }

void do_manufacture( CHAR_DATA *ch, char *argument )
{
    char arg1 [MAX_INPUT_LENGTH];
    char arg2 [MAX_INPUT_LENGTH];
  OBJ_DATA *pobj;
  OBJ_DATA *pobj2;
  OBJ_DATA *pobj3;
    OBJ_DATA *material;
   int cost;

   argument = one_argument(argument, arg1);
   argument = one_argument(argument, arg2);
   cost = 0;

   if (IS_NPC(ch))
   return;

   if (!IS_AWAKE(ch))
   {
    send_to_char("You aren't awake...\n\r", ch);
    return;
   }

   if ( !str_cmp( arg1, "list" )  )
   {
//     send_to_char( "A5 Chip      -  Android Final Transformation. - a Silicon Chip, a Metal Casing, A5 Blueprint\n\r150,000 gold required.\n\r\n\r", ch );
     send_to_char( "Gold Bullion -  Sells for a high price.       - a Chunk of Gold Ore\n\r5,000 gold required\n\r\n\r", ch );
     send_to_char( "Sensu Beans  - Eat them! - a Packet of Sensu Seeds\n\r500 gold required\n\r\n\r", ch );
     send_to_char("&RYou must be inside of a clan vault in order to manufacture these items.&D\n\r", ch);
     return;
   }

   if ( !xIS_SET(ch->in_room->room_flags, ROOM_CLANSTOREROOM ) )
   {
    send_to_char("You must be inside a clan vault in order to manufacture.\n\r", ch);
    return;
   }

   if ( arg1[0] == '\0' )
   {
     send_to_char( "Manufacture what? 'manufacture list' for a detailed list.\n\r", ch );
     return;
   }

/*   if ( !str_cmp( arg1, "A5" ) && !str_cmp( arg2, "Chip" ) )
   {
    cost = 150000;

    for ( pobj = ch->first_carrying; pobj; pobj = pobj->next_content )
    {
        if ( pobj->pIndexData->vnum == 3219 )
        break;
    } 

    for ( pobj2 = ch->first_carrying; pobj2; pobj2 = pobj2->next_content )
    {
        if ( pobj2->pIndexData->vnum == 2710 )
        break;
    }

    for ( pobj3 = ch->first_carrying; pobj3; pobj3 = pobj3->next_content )
    {
        if ( pobj3->pIndexData->vnum == 10402 )
        break;
    }

    if ( !pobj )
    {
        send_to_char( "You do not have the required materials.\n\r", ch );
        return;
    }

    if ( !pobj2 )
    {
        send_to_char( "You do not have the required materials.\n\r", ch );
        return;
    }

    if ( !pobj3 )
    {
        send_to_char( "You do not have the required materials.\n\r", ch );
        return;
    }

    if ( ch->gold < cost )
    {
        send_to_char( "Insufficient funds.\n\r", ch );
        return;
    }

        send_to_char( "You read over the blueprints.....\n\r", ch );
        send_to_char( "You manage to fit the peices together!\n\r", ch );
        send_to_char( "You have created an A5 Power Chip!\n\r", ch );
       separate_obj( pobj );
       extract_obj( pobj );
       separate_obj( pobj2 );
       extract_obj( pobj2 );
       separate_obj( pobj3 );
       extract_obj( pobj3 );
       material = create_object( get_obj_index( 49 ), 0 );
       obj_to_char( material, ch );
       xSET_BIT(ch->act, PLR_CAN_A5);
       return;
    
   } */

   if ( !str_cmp( arg1, "Gold" ) && !str_cmp( arg2, "Bullion" ) )
   {
    cost = 5000;

    for ( pobj = ch->first_carrying; pobj; pobj = pobj->next_content )
    {
        if ( pobj->pIndexData->vnum == 2506 )
        break;
    }

    if ( !pobj )
    {
        send_to_char( "You do not have the required materials.\n\r", ch );
        return;
    }

    if ( ch->gold < cost )
    {
        send_to_char( "Insufficient funds.\n\r", ch );
        return;
    }

       separate_obj( pobj );
       extract_obj( pobj );
       material = create_object( get_obj_index( 2507 ), 0 );
       obj_to_char( material, ch );
       send_to_char( "&wYou made some &YGold Bullion&w!\n\r", ch );
       return;

   }

   if ( !str_cmp( arg1, "Metal" ) && !str_cmp( arg2, "Armor" ) )
   {
    cost = 450000;

    for ( pobj = ch->first_carrying; pobj; pobj = pobj->next_content )
    {
        if ( pobj->pIndexData->vnum == 2506 )
        break;
    }

    if ( !pobj )
    {
        send_to_char( "You do not have the required materials.\n\r", ch );
        return;
    }

    if ( ch->gold < cost )
    {
        send_to_char( "Insufficient funds.\n\r", ch );
        return;
    }

       separate_obj( pobj );
       extract_obj( pobj );
       material = create_object( get_obj_index( 2507 ), 0 );
       obj_to_char( material, ch );
       send_to_char( "&wYou made some &YGold Bullion&w!\n\r", ch );
       return;
   }

   if ( !str_cmp( arg1, "Sensu" ) && !str_cmp( arg2, "Beans" ) )
   {
    cost = 500;

    for ( pobj = ch->first_carrying; pobj; pobj = pobj->next_content )
    {
        if ( pobj->pIndexData->vnum == 500 )
        break;
    }

    if ( !pobj )
    {
        send_to_char( "You do not have the required materials.\n\r", ch );
        return;
    }

    if ( ch->gold < cost )
    {
        send_to_char( "Insufficient funds.\n\r", ch );
        return;
    }

       separate_obj( pobj );
       extract_obj( pobj );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       material = create_object( get_obj_index( 1104 ), 0 );
       obj_to_char( material, ch );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       do_drop( ch, "bean" );
       send_to_char( "&wYou made some &YSensu Beans!\n\r", ch );
       return;
   }

}


void do_ussj( CHAR_DATA *ch, char *argument )
{
/*     if (!IS_SAIYAN(ch))
     {
      send_to_char("Huh?\n\r", ch);
      return;
     } */


       if (xIS_SET(ch->act, PLR_USSJ))
       {
         xREMOVE_BIT(ch->act, PLR_USSJ);
         ch->mod = 1;
         ch->mod_str = 0;
         ch->mod_dex = 0;
         ch->mod_lck = 0;
         ch->mod_wis = 0;
         ch->mod_int = 0;
         ch->mod_con = 0;
         send_to_char("&WYou grip your hands tightly and let out a feral scream.\n\rTime suddenly freezes momentarily, pure silence.\n\rYour hair starts glowing which quickly fades into silver.\n\rYour muscles", ch);
         act(AT_GREEN, "The world starts to shake as $n transforms out of USSJ", ch, NULL, NULL, TO_CANSEE);
         return;
       }
         send_to_char("&WYou growl as you unleash all of your power and you transform into a mighty USSJ!\n\r", ch);
         act(AT_GREY, "$n growls as $e unleashes all of $s power and transforms into a mighty USSJ!", ch, NULL, NULL, TO_CANSEE);
         xSET_BIT(ch->act, PLR_USSJ);
         ch->mod = 18;
         ch->mod_str = 35;
         ch->mod_dex = 35;
         ch->mod_lck = 35;
         ch->mod_wis = 35;
         ch->mod_int = 35;
         ch->mod_con = 35;
         return;
}

/* void do_pushup( CHAR_DATA *ch, char *argument )
{

    int  gain, pl;

    pl = ch->gravset * 10000;

     if ( ch->exp < pl )
     {
      send_to_char("\n&RSQUISH!!!!!!\n\rYour body explodes as your gravity setting was too high.\n\r",ch);
      act( AT_RED, "$n's body explodes as body parts fly everywhere.", ch, NULL, NULL,TO_CANSEE );
      raw_kill( ch, ch);
      return;
      }

    if  ( get_timer(ch, TIMER_GRAVITY) > 0)
    {
     send_to_char("You can't heal again yet, your body needs to recover.\n\r", ch);
     return;
    }

    gain = (ch->exp / 1000);
    if( ch->exp >= 5000000 && ch->pcdata->learned[gsn_chikone] != 101 )
    {
        send_to_char( "You can't gain anything from gravity training, go train Chikara.\n\r", ch );
        return;
    }

    if( ch->exp >= 5000000 && ch->pcdata->learned[gsn_chikone] != 100 )
    {
        send_to_char( "You can't gain anything from gravity training, go train Chikara.\n\r", ch );
        return;
    }

    if (!xIS_SET(ch->in_room->room_flags, ROOM_GRAVITY))
    {
        send_to_char( "You aren't in a gravity chamber.\n\r", ch );
        return;
    }
    if (ch->hit <= 0)
    {
        send_to_char( "&RYou can't gtrain in your current state!\n\r", ch);
        return;
    }
    if (ch->position == POS_SITTING || ch->position == POS_RESTING || ch->position == POS_SLEEPING)
    {
        send_to_char( "You should stand up before training.\n\r", ch );
        return;
    }
    if (ch->position == POS_STUNNED)
    {
        send_to_char( "You are too stunned to do that.\n\r", ch );
        return;
    }
    if (ch->exp >= 100000000)
    {
        send_to_char( "You are to strong to gain anything from training here.\n\r", ch);
        return;
    }
    if (ch->hit <= 0)
    {
        send_to_char( "&RYou fall to the ground in pain as you have overdone your training.\n\r", ch);
        ch->hit = -1;
        update_pos(ch);
        return;
    }
    send_to_char( "&CYou drop down to the ground and start doing pushups.\n\r", ch);
    act(AT_WHITE,"&C$n drops to the ground and starts doing pushups.", ch, NULL, NULL, TO_CANSEE);
    WAIT_STATE( ch, 2 * PULSE_VIOLENCE );
    ch_printf(ch, "&CYou gain %d PL for your training.\n\r", gain);
    ch->hit -= 10;
    ch->exp += gain;
    if (ch->hit <= 0)
    {
        send_to_char( "&RYou fall to the ground in pain as you have overdone your training.\n\r", ch);
        ch->hit = -1;
        update_pos(ch);
        return;
    }
}

*/

int pollyes;
int pollno;
bool poll_in_progress;
char *pollarg;

void save_votes(void)
{
  POLL_DATA *vote;
  FILE *fp;

  unlink( VOTE_LIST );

    if ( (fp=fopen( VOTE_LIST, "w" )) == NULL )
    {
        bug( "Cannot open vote.lst for writting", 0 );
        perror( VOTE_LIST );
        return;
    }

  for (vote = first_vote; vote; vote = vote->next)
    fprintf(fp, "%s~\n", vote->ip);
  fprintf(fp, "$~\n");
  fclose(fp);

  return;
}
void load_votes( void )
{
  POLL_DATA *vote;
  FILE *fp;

  if ( !(fp = fopen( VOTE_LIST, "r" )) )
    return;

  for ( ; ; )
  {
    if ( feof( fp ) )
    {
      bug( "Load_votes: no $ found." );
      fclose(fp);
      return;
    }
    CREATE(vote, POLL_DATA, 1);
    LINK( vote, first_vote, last_vote, next, prev );

    vote->ip = fread_string_nohash(fp);
    if (*vote->ip == '$')
      break;
  }
  DISPOSE(vote->ip);
  DISPOSE(vote);
  fclose(fp);
  return;
}
void do_poll( CHAR_DATA *ch, char *argument )
{
   char arg[MAX_STRING_LENGTH];

   argument = one_argument( argument, arg );
   if ( ch->level < 115 )
   {
      ch_printf (ch,"\n\r&WPoll: &C%s", pollarg ? pollarg : "None");
      send_to_char ("\n\r&G___________________________", ch );
      ch_printf(ch, "\n\r&wYes:  &z%d", pollyes );
      ch_printf(ch, "\n\r&wNo :  &z%d", pollno  );
      send_to_char ("\n\r&G___________________________", ch );
      send_to_char( "\n\r", ch);
      return;
   }
   if ( arg[0] == '\0' )
   {
      send_to_char("\n\rSyntax: poll new [argument]\n\r", ch);
      send_to_char("             close\n\r", ch);
      send_to_char("             score\n\r", ch);
      return;
   }
   if ( !str_cmp( arg, "score" ) )
   {
      ch_printf (ch,"\n\r&YPoll&O: &C%s", pollarg ? pollarg : "Null");
      send_to_char ("\n\r&z----------------------------", ch );
      ch_printf(ch, "\n\r&GYes&g: &W%d", pollyes );
      ch_printf(ch, "\n\r&RNo&g:  &W%d", pollno );
      send_to_char ("\n\r&z----------------------------", ch );
      ch_printf(ch, "\n\r&WStatus&O: %s", poll_in_progress == FALSE ? "&RClosed" : "&GOpen" );
      send_to_char( "\n\r", ch);
      return;
   }
   if ( !str_cmp( arg, "close" ) )
   {
      if ( poll_in_progress == FALSE )
      {
         send_to_char( "&RIts already closed.\n\r", ch);
         return;
      }
      send_to_char( "&RYou have closed the poll.\n\r", ch);
      command ( ch, do_echo, "&z[&WInfo]&W The current poll has been closed.&D" );
      poll_in_progress = FALSE;
   }
   if ( !str_cmp( arg, "new" ) )
   {
      if ( poll_in_progress == TRUE )
      {
         send_to_char( "&RThere is another poll in progress.\n\r", ch);
         return;
      }
      if ( argument[0] == '\0' )
      {
         send_to_char("&RYou need an argument for the poll.\n\r", ch);
         return;
      }
      pollno = pollyes = 0;
      pollarg = str_dup( argument );
      ch_printf( ch, "&CYou have opened a poll on&c: &Y%s\n\r", pollarg );
      poll_in_progress = TRUE;
      command ( ch, do_echo, "&z[&WInfo&z]&W New Poll:&C %s &D", pollarg );
   }

}

void do_vote( CHAR_DATA *ch, char *argument )
{
   POLL_DATA *vote;


   if ( argument[0] == '\0' )
   {
      send_to_char("&RIs your vote 'yes' or 'no'?.\n\r", ch);
     return;
   }

   if ( poll_in_progress == FALSE )
   {
     send_to_char( "There is no poll currently in progress.\n\r.", ch);
     return;
   }

   if ( str_cmp( argument, "no" ) && str_cmp( argument, "yes") )
   {
      send_to_char("&RIs your vote 'yes' or 'no'?.\n\r", ch);
      return;

   }
   for (vote = first_vote; vote; vote = vote->next)
   {
      if ( vote->ip == ch->desc->host )
      {
        send_to_char("&RYou have already voted on this poll!\n\r", ch);
        return;
      }
      continue;
   }
   if ( !str_cmp( argument, "yes" ) )
   {
      pollyes++;
      send_to_char("&RYou have cast your vote.\n\r", ch);
   }
   else if ( !str_cmp( argument, "no" ) )
   {
      pollno++;
      send_to_char("&RYou have cast your vote.\n\r", ch);
   }
   else
   return;
   CREATE(vote, POLL_DATA, 1);
   LINK( vote, first_vote, last_vote, next, prev );
   vote->ip = STRALLOC(ch->desc->host);
   save_votes();
}

void do_itlist( CHAR_DATA *ch, char *argument )
{
	ROOM_INDEX_DATA	*room;
       int vnum;
       int i,z;
    ch_printf(ch, "\n\r" );
    ch_printf(ch, "&RLocations List\n\r" );
    ch_printf(ch, "&z---------------------------\n\r" );
    for (  i = 0; i<6; i++ )
	{
		vnum = ch->itlist[i];
		//room = get_room_index(vnum);
	    if ( (room = get_room_index(vnum) ) == NULL )
		continue;
		ch_printf(ch, "&W#%d - &C%s\n\r", i+1, room->name);
	}
    ch_printf(ch, "&z----------------------------\n\r" );
}