legend/
legend/area/
legend/player/
/***************************************************************************
 *  God Wars Mud copyright (C) 1994, 1995, 1996 by Richard Woolcock        *
 *  									   *
 *  Legend of Chrystancia copyright (C) 1999, 2000, 2001 by Matthew Little *
 *  This mud is NOT to be copied in whole or in part, or to be run without *
 *  the permission of Matthew Little. Nobody else has permission to        *
 *  authorise the use of this code.                                        *
 ***************************************************************************/
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "player.h"
#include "warlock.h"

const char *dcolor[10] = {
   "", "#rRed",
   "#gGreen", "#bBlue",
   "#yYellow", "#nSilver",
   "#wWhite", "#eBlack",
   "#oGold", "#eS#wh#ea#wd#eo#ww"
};

/*
const char * dage [12] =
{
    "", 	   "Hatchling",
    "Young",	   "Juvenile",
    "Young Adult", "Adult",
    "Mature",      "Elder", 
    "Venerable",   "Ancient",
    "Lesser Wyrm", "Greater Wyrm",
    "Supreme"
};
*/


// See other Dragons Connected.
void do_horde (CHAR_DATA * ch, char *argument)
{
   char buf[MAX_STRING_LENGTH];
   char arg[MAX_INPUT_LENGTH];
   CHAR_DATA *gch;

   one_argument (argument, arg);

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

   sprintf (buf, "The Draconic Horde:\n\r");
   send_to_char (buf, ch);
   send_to_char
      ("[      Name      ] [ Colour ] [ Hits ] [ Mana ] [ Move ] [   Exp    ]\n\r",
       ch);
   for (gch = char_list; gch != NULL; gch = gch->next)
   {
      if (IS_NPC (gch))
	 continue;
      if (!IS_CLASS (gch, CLASS_DRAGON))
	 continue;
      if (IS_IMMORTAL (gch) && !can_see (ch, gch))
         continue;

      {
         sprintf (buf, "[%-16s] [%-8s] [%-6d] [%-6d] [%-6d] [%10lli]\n\r",
		  capitalize (gch->name),
		  bash_color (dcolor[gch->pcdata->disc_a[DRAGON_COLOR]]),
		  gch->hit, gch->mana, gch->move, gch->exp);
	 send_to_char (buf, ch);
      }
   }
   return;
}

void do_dragonpowers (CHAR_DATA * ch, char *argument)
{
   int count = 0;

   if (IS_NPC (ch))
      return;

   if (!IS_CLASS (ch, CLASS_DRAGON))
   {
      do_rand_typo (ch);
      return;
   }
   stc ("#g================================================================================#n\n\r", ch);
   cent_to_char ("#w-[ Dragon Powers ]-#n", ch);
   stc ("#g================================================================================#n\n\r", ch);
   stc ("#w   Hatchling: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_SCRY))
   {
      stc ("Scry ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_PEER))
   {
      stc ("Dpeer ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_TRUESIGHT))
   {
      stc ("Truesight ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_FANGS))
   {
      stc ("Fangs ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_LICK))
   {
      stc ("Dlick ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
   {
      stc ("Gasbreath ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_TERROR))
   {
      stc ("Terror ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
   {
      stc ("Dconfuse ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_MAGIC))
   {
      stc ("Magic", ch);
      count += 1;
   }
   if (count == 0)
   {
      stc ("None", ch);
   }
   stc ("\n\r", ch);
   count = 0;
   stc ("#w       Young: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_TAIL))
   {
      stc ("Tail", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#w   Juvenille: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_WINGS))
   {
      stc ("Wings", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#w Young Adult: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
   {
      stc ("Frostbreath", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#w       Adult: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH))
   {
      stc ("Dpolymorph", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#w      Mature: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_LUCK))
   {
      stc ("Luck ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_FLY))
   {
      stc ("Dfly", ch);
      count += 1;
   }
   if (count == 0)
   {
      stc ("None", ch);
   }
   stc ("\n\r", ch);
   count = 0;
   stc ("#w       Elder: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
   {
      stc ("Lightningbreath", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#w   Venerable: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_MASK))
   {
      stc ("Mask", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#w     Ancient: #nNo powers related to this age", ch);
   stc ("\n\r", ch);
   stc ("#w Lesser Wyrm: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
   {
      stc ("Firebreath", ch);
   }
   else
      stc ("None", ch);
   stc ("\n\r", ch);
   stc ("#wGreater Wyrm: #nNo powers related to this age", ch);
   stc ("\n\r", ch);
   stc ("#w     Supreme: #n", ch);
   if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
   {
      stc ("Acidbreath ", ch);
      count += 1;
   }
   if (IS_SET (ch->pcdata->dragonaff, DRA_TOUGHNESS))
   {
      stc ("Scales", ch);
      count += 1;
   }
   if (count == 0)
   {
      stc ("None", ch);
   }
   count = 0;
   if (GET_AGE(ch) > YOUNG)
   {
      stc ("\n\r\n\rYou can use drackform to become stronger", ch);
   }
   stc ("\n\rTo use the different breath types:", ch);
   stc ("\n\rType 'dbreath acid gas lightning frost fire' <can use any 5>\n\r", ch);
   stc ("#g================================================================================#n\n\r", ch);
   return;
}

// Dragon Channel
void do_dragtalk (CHAR_DATA * ch, char *argument)
{
   char buf[MSL];
   CHAR_DATA *vch;

   if (!IS_CLASS (ch, CLASS_DRAGON) && !IS_IMMORTAL (ch))
   {
      do_huh (ch, "");
      return;
   }

   if (argument[0] == '\0')
   {
      stc ("Roar what??\n\r", ch);
      return;
   }
   if (IS_SET (ch->extra2, DEAF_ROAR))
      REMOVE_BIT (ch->extra2, DEAF_ROAR);
   if (!IS_NPC (ch) && IS_SET (ch->act, PLR_SILENCE))
   {
      sprintf (buf, "You can't roar because you are silenced.\n\r");
      send_to_char (buf, ch);
      return;
   }
   if (is_advertisement(argument))
adv_alert(ch, "roar", argument);
   for (vch = char_list; vch; vch = vch->next)
   {
      if (IS_NPC (vch) || !vch->desc
	  || (!IS_IMMORTAL (vch) && !IS_CLASS (vch, CLASS_DRAGON)))
	 continue;
      if (IS_SET (vch->extra2, DEAF_ROAR))
	 continue;
      sprintf (buf, "#g(#w=#g)#gROAR#g(#w=#g)#w %s: #g%s#n\n\r",
	       PERS2 (ch, vch), bash_color (argument));
      stc (buf, vch);
   }
}
void do_drackform (CHAR_DATA * ch, char *argument)
{
   char arg[MAX_INPUT_LENGTH];
   char buf[MAX_STRING_LENGTH];

   argument = one_argument (argument, arg);

   if (IS_NPC (ch))
      return;
   if (!IS_CLASS (ch, CLASS_DRAGON))
   {
      stc ("Huh?\n\r", ch);
      return;
   }
   if (GET_AGE(ch) < YOUNG)
   {
      stc ("You need to be at least a young dragon to use this.\n\r", ch);
      return;
   }

   if (IS_SET (ch->extra, EXTRA_DRAGON))
   {
      stc ("You only can get outa vampire dragon form with dragon.\n\r", ch);
      return;
   }

   if (IS_POLYAFF (ch, POLY_DRAGON))
   {
      REMOVE_BIT (ch->polyaff, POLY_DRAGON);
      REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
      act ("You transform into human form.", ch, NULL, NULL, TO_CHAR);
      act ("$n's shrinks back into human form.", ch, NULL, NULL, TO_ROOM);

      //      ch->damroll -= GET_AGE(ch) * 40;
      //      ch->hitroll -= GET_AGE(ch) * 40;
      //      clear_stats(ch);
      free_string (ch->morph);
      ch->morph = str_dup ("");
      return;
   }
   else if (IS_AFFECTED (ch, AFF_POLYMORPH))
   {
      send_to_char ("You cant drackform when changed.\n\r", ch);
      return;
   }
   if (ch->stance[0] != -1)
      do_stance (ch, "");
   if (ch->mounted == IS_RIDING)
      do_dismount (ch, "");

/*
    switch(ch->pcdata->disc_a[DRAGON_COLOR])
    {
	case 1:
		sprintf(buf, "%s the huge #rred#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 2:
		sprintf(buf, "%s the huge #ggreen#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 3:
		sprintf(buf, "%s the huge #bblue#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 4:
		sprintf(buf, "%s the huge #yyellow#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 5:
		sprintf(buf, "%s the huge #esilver#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 6:
		sprintf(buf, "%s the huge #wwhite#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 7:
		sprintf(buf, "%s the huge #eblack#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 8:
 		sprintf(buf, "%s the huge #Ogold#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
	case 9:
		sprintf(buf, "%s the huge #es#wh#ea#wd#eo#ww#n dragon", ch->name);
		free_string( ch->morph );
		ch->morph = str_dup( buf );
		break;
    }
*/
   sprintf (buf, "%s the huge %s Dragon#n", ch->name,
	    dcolor[ch->pcdata->disc_a[DRAGON_COLOR]]);
   free_string (ch->morph);
   ch->morph = str_dup (buf);
   act ("You transform into a huge dragon.", ch, NULL, NULL, TO_CHAR);
   act ("$n's body grows and distorts into a huge dragon.", ch, NULL, NULL,
	TO_ROOM);
   SET_BIT (ch->polyaff, POLY_DRAGON);
   SET_BIT (ch->affected_by, AFF_POLYMORPH);

   //ch->damroll += GET_AGE(ch) * 40;
   //ch->hitroll += GET_AGE(ch) * 40;

   return;
}

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

   argument = one_argument (argument, arg);

   if (IS_NPC (ch))
      return;

   if (!IS_IMMORTAL (ch))
   {
      if (!IS_CLASS (ch, CLASS_DRAGON))
      {
	 send_to_char ("Huh?\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < SUPREME)
      {
	 send_to_char
	    ("You must be a supreme dragon to create hatchlings.\n\r", ch);
	 return;
      }
      if (ch->pcdata->hatch > 2 && ch->pcdata->stats[UNI_GEN] > 2)
      {
	 send_to_char ("You have already created 2 hatchlings.\n\r", ch);
	 return;
      }
   }

   if (arg[0] == '\0')
   {
      send_to_char ("Hatch 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))
   {
      send_to_char ("Not on NPC's.\n\r", ch);
      return;
   }

   if (ch == victim)
   {
      send_to_char ("You cannot hatch yourself.\n\r", ch);
      return;
   }

   if (!IS_IMMUNE (victim, IMM_DEMON))
   {
      send_to_char ("Not on an unwilling person.\n\r", ch);
      return;
   }

   if (victim->level != LEVEL_AVATAR && !IS_IMMORTAL (victim))
   {
      send_to_char ("You can only hatch a dragon from avatars.\n\r", ch);
      return;
   }
   clear_stats(victim);
   if (victim->max_hit < 20000)
   {
      stc("They Dont have enough HIT POINTS (20k Required)\n\r", ch);
      return;
   }
   if ((victim->mkill < 10000) && !IS_NPC (victim))
   {
      stc ("You cannot hatch them until they have killed 10,000 mobs.\n\r",ch);
      stc ("You cannot be hatched until you have 10,000 mkills.\n\r",victim);
      return;
   }   
   if (victim->class != 0)
   {
      stc ("They already have a class!\n\r", ch);
      return;
   }
   act ("You consume $N's essence and hatch a new egg!", ch, NULL, victim,
	TO_CHAR);
   act ("$n consume $N's essence and hatch a new egg!", ch, NULL, victim,
	TO_NOTVICT);
   act ("$n consumes your essence and makes you a dragon!", ch, NULL, victim,
	TO_VICT);

   victim->class = 0;
   victim->class = CLASS_DRAGON;
   victim->pcdata->dragonage = 1;
   victim->special = 0;
   victim->level = LEVEL_AVATAR;
   victim->pcdata->disc_a[DRAGON_COLOR] = number_range (1, 9);
   ch->pcdata->hatch += 1;
   save_char_obj (ch);
   save_char_obj (victim);
   return;
}

void do_dgain (CHAR_DATA * ch, char *argument)
{
   char arg[MAX_INPUT_LENGTH];
   char buf[MAX_INPUT_LENGTH];
   int count = 1;

   argument = one_argument (argument, arg);

   if (IS_SET (ch->pcdata->dragonaff, DRA_WINGS))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_FANGS))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_LICK))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_TAIL))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_TERROR))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_MASK))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_MAGIC))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_LUCK))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_FLY))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_SCRY))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_PEER))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_TRUESIGHT))
      count += 1;
   if (IS_SET (ch->pcdata->dragonaff, DRA_TOUGHNESS))
      count += 1;

   if (IS_NPC (ch))
      return;

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

   if (arg[0] == '\0')
   {
      int x = 0;

      send_to_char ("Valid choices are:  ALL(shows skills learned)\n\r", ch);
      if ((!IS_SET (ch->pcdata->dragonaff, DRA_WINGS))
          && GET_AGE(ch) >= JUVENILE)
      {
	 send_to_char ("Wings,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_SCRY))
      {
	 send_to_char (" Scry,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TRUESIGHT))
      {
	 send_to_char (" Sight,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_PEER))
      {
	 send_to_char (" Peer,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FANGS))
      {
	 send_to_char (" Fangs,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LICK))
      {
	 send_to_char (" Lick,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH)
          && GET_AGE(ch) >= YOUNG_ADULT)
      {
	 send_to_char (" FrostBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH)
          && GET_AGE(ch) >= LESSER_WYRM)
      {
	 send_to_char (" FireBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH)
          && GET_AGE(ch) >= ELDER)
      {
	 send_to_char (" LightningBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH)
          && GET_AGE(ch) >= SUPREME)
      {
	 send_to_char (" AcidBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
      {
	 send_to_char (" GasBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TAIL)
          && GET_AGE(ch) >= YOUNG)
      {
	 send_to_char (" Tail,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TERROR))
      {
	 send_to_char (" Terror,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
      {
	 send_to_char (" Confuse,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_MASK)
          && GET_AGE(ch) >= VENERABLE)
      {
	 send_to_char (" Mask,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_MAGIC))
      {
	 send_to_char (" Magic,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH)
          && GET_AGE(ch) >= ADULT)
      {
	 send_to_char (" Polymorph,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LUCK)
          && GET_AGE(ch) >= MATURE)
      {
	 send_to_char (" Luck,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FLY)
          && GET_AGE(ch) >= MATURE)
      {
	 send_to_char (" Fly,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TOUGHNESS)
          && GET_AGE(ch) >= SUPREME)
      {
	 send_to_char (" Scales,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      send_to_char ("\n\r", ch);
      send_to_char
	 ("Some are only avaiable after a certain age. Check helps for ages.\n\r",
	  ch);
      return;
   }
   else if (!str_cmp (arg, "all"))
   {
      int x = 0;

      send_to_char ("You have the folowing dragon powers:\n\r", ch);
      if (IS_SET (ch->pcdata->dragonaff, DRA_WINGS))
      {
	 send_to_char ("Wings,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_FLY))
      {
	 send_to_char (" Fly,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_TRUESIGHT))
      {
	 send_to_char (" Truesight,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_PEER))
      {
	 send_to_char (" Peer,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_FANGS))
      {
	 send_to_char (" Fangs,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_SCRY))
      {
	 send_to_char (" Scry,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_LICK))
      {
	 send_to_char (" Lick,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
      {
	 send_to_char (" FrostBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
      {
	 send_to_char (" FireBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
      {
	 send_to_char (" LightningBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
      {
	 send_to_char (" AcidBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
      {
	 send_to_char (" GasBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_TAIL))
      {
	 send_to_char (" Tail,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_TERROR))
      {
	 send_to_char (" Terror,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
      {
	 send_to_char (" Confuse,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_MASK))
      {
	 send_to_char (" Mask,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_MAGIC))
      {
	 send_to_char (" Magic,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH))
      {
	 send_to_char (" Polymorph,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (IS_SET (ch->pcdata->dragonaff, DRA_LUCK))
      {
	 send_to_char (" Luck,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TOUGHNESS))
      {
	 send_to_char (" Scales,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      send_to_char ("\n\r", ch);
      return;
   }
   else if (!str_cmp (arg, "wings"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_WINGS))
      {
	 send_to_char ("You already have your wings.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < JUVENILE)
      {
	 send_to_char
	    ("You must be a juvenile dragon to learn this power.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now have your wings.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_WINGS);
      return;
   }
   else if (!str_cmp (arg, "sight"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_TRUESIGHT))
      {
	 send_to_char ("You already have sight beyond sight.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now have sight beyond sight.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_TRUESIGHT);
      return;
   }
   else if (!str_cmp (arg, "fangs"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_FANGS))
      {
	 send_to_char ("You already have your fangs.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now have your fangs.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_FANGS);
      return;
   }
   else if (!str_cmp (arg, "lick"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_LICK))
      {
	 send_to_char
	    ("You already can can heal your wounds by licking 'em.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can heal your wounds by licking them.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_LICK);
      return;
   }
   else if (!str_cmp (arg, "frostbreath"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
      {
         send_to_char ("You already can breathe frost.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < YOUNG_ADULT)
      {
	 send_to_char
	    ("You must be a young adult dragon to learn this skill.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can breathe frost.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_FROST_BREATH);
      return;
   }
   else if (!str_cmp (arg, "firebreath"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
      {
         send_to_char ("You already can breathe fire.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < LESSER_WYRM)
      {
	 send_to_char ("You must be a lesser wyrm to learn this power.\n\r",
		       ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can breathe fire.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_FIRE_BREATH);
      return;
   }
   else if (!str_cmp (arg, "lightningbreath"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
      {
         send_to_char ("You already can breathe lightning.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < ELDER)
      {
	 send_to_char
	    ("You mus be a mature dragon adult to learn this power.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can breathe lightning.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH);
      return;
   }
   else if (!str_cmp (arg, "acidbreath"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
      {
         send_to_char ("You already can breathe acid.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < SUPREME)
      {
	 send_to_char ("You mus be a supreme dragon to learn this power.\n\r",
		       ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can breathe acid.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_ACID_BREATH);
      return;
   }
   else if (!str_cmp (arg, "gasbreath"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
      {
         send_to_char ("You already can breathe gas.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can breathe gas.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_GAS_BREATH);
      return;
   }
   else if (!str_cmp (arg, "tail"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_TAIL))
      {
	 send_to_char ("You already can use your tail to attack.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < YOUNG)
      {
	 send_to_char ("You must be a young dragon to learn this power.\n\r",
		       ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can use your tail to attack.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_TAIL);
      return;
   }
   else if (!str_cmp (arg, "terror"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_TERROR))
      {
	 send_to_char ("You already inspire terror in mobs.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now inspire terror in mobs.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_TERROR);
      return;
   }
   else if (!str_cmp (arg, "confuse"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
      {
	 send_to_char ("You already can confuse your targets.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can confuse your targets.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_CONFUSE);
      return;
   }
   else if (!str_cmp (arg, "mask"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_MASK))
      {
	 send_to_char ("You already can mask people.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < VENERABLE)
      {
	 send_to_char
	    ("You must be a venerable dragon to learn this power.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can mask other people.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_MASK);
      return;
   }
   else if (!str_cmp (arg, "scry"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_SCRY))
      {
	 send_to_char ("You already can see people who are far away.\n\r",
		       ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You can now see people who are far away.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_SCRY);
      return;
   }
   else if (!str_cmp (arg, "polymorph"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH))
      {
	 send_to_char ("You already can polymorph.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < ADULT)
      {
	 send_to_char ("You must be an adult dragon to learn this power.\n\r",
		       ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can polymorph.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_POLYMORPH);
      return;
   }
   else if (!str_cmp (arg, "luck"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_LUCK))
      {
	 send_to_char ("You already have extra luck.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < MATURE)
      {
	 send_to_char ("You must be a mature dragon to learn this power.\n\r",
		       ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now have extra luck.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_LUCK);
      return;
   }
   else if (!str_cmp (arg, "fly"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_FLY))
      {
	 send_to_char ("You already can fly to targets.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < MATURE)
      {
	 send_to_char
	    ("You have to be at least a mature dragon to get this power.\n\r",
	     ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now can fly to people.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_FLY);
      return;
   }
   else if (!str_cmp (arg, "scales"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_TOUGHNESS))
      {
	 send_to_char ("Your scales are already very tough.\n\r", ch);
	 return;
      }
      if (GET_AGE(ch) < SUPREME)
      {
	 send_to_char
	    ("You have to be at least a supreme dragon to get this power.\n\r",
	     ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("Your scales now are tougher than ever.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_TOUGHNESS);
      return;
   }
   else if (!str_cmp (arg, "peer"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_PEER))
      {
	 send_to_char ("You already can see people's stats.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      SET_BIT (ch->pcdata->dragonaff, DRA_PEER);
      send_to_char ("You now can see other people's stats.\n\r", ch);
      return;
   }
   else if (!str_cmp (arg, "magic"))
   {
      if (IS_SET (ch->pcdata->dragonaff, DRA_MAGIC))
      {
	 send_to_char ("You already have magic control.\n\r", ch);
	 return;
      }
      if (ch->exp < count * 50000)
      {
	 sprintf (buf, "You need %d exp.\n\r", count * 50000);
	 send_to_char (buf, ch);
	 return;
      }
      ch->exp -= count * 50000;
      send_to_char ("You now have great magical control.\n\r", ch);
      SET_BIT (ch->pcdata->dragonaff, DRA_MAGIC);
      return;
   }
   else
   {
      int x = 0;

      send_to_char ("Valid choices are:\n\r", ch);
      if (!IS_SET (ch->pcdata->dragonaff, DRA_WINGS)
          && GET_AGE(ch) >= JUVENILE)
      {
	 send_to_char ("Wings,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FLY)
          && GET_AGE(ch) >= MATURE)
      {
	 send_to_char (" Fly,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TRUESIGHT))
      {
	 send_to_char (" Truesight,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_SCRY))
      {
	 send_to_char (" Scry,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FANGS))
      {
	 send_to_char (" Fangs,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LICK))
      {
	 send_to_char (" Lick,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH)
          && GET_AGE(ch) >= SUPREME)
      {
	 send_to_char (" FrostBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH)
          && GET_AGE(ch) >= LESSER_WYRM)
      {
	 send_to_char (" FireBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH)
          && GET_AGE(ch) >= ADULT)
      {
	 send_to_char (" LightningBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH)
          && GET_AGE(ch) >= YOUNG)
      {
	 send_to_char (" AcidBreath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
      {
	 send_to_char (" Gas Breath,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_PEER))
      {
	 send_to_char (" Peer,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TAIL)
          && GET_AGE(ch) >= YOUNG)
      {
	 send_to_char (" Tail,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TERROR))
      {
	 send_to_char (" Terror,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
      {
	 send_to_char (" Confuse,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_MASK)
          && GET_AGE(ch) >= VENERABLE)
      {
	 send_to_char ("Mask,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_MAGIC))
      {
	 send_to_char (" Magic,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH)
          && GET_AGE(ch) >= ADULT)
      {
	 send_to_char (" Polymorph,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LUCK)
          && GET_AGE(ch) >= MATURE)
      {
	 send_to_char (" Luck,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_TOUGHNESS)
          && GET_AGE(ch) >= SUPREME)
      {
	 send_to_char (" Scales,", ch);
	 x++;
	 if (x > 5)
	 {
	    send_to_char ("\n\r", ch);
	    x = 0;
	 }
      }
      send_to_char ("\n\r", ch);
      send_to_char
	 ("Some are only avaiable after a certain age. Check helps for ages.\n\r",
	  ch);
      return;
   }

   return;
}

void do_dbreath (CHAR_DATA * ch, char *argument)
{
   char arg1[MAX_INPUT_LENGTH];
   char arg2[MAX_INPUT_LENGTH];
   char arg3[MAX_INPUT_LENGTH];
   char arg4[MAX_INPUT_LENGTH];
   char arg5[MAX_INPUT_LENGTH];
   char buf[MAX_INPUT_LENGTH];

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

   argument = one_argument (argument, arg1);
   argument = one_argument (argument, arg2);
   argument = one_argument (argument, arg3);
   argument = one_argument (argument, arg4);
   argument = one_argument (argument, arg5);

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

   if (arg1[0] == '\0')
   {
      send_to_char ("You can breathe the following types:\n\r", ch);
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
	 strcat (buf, "gas ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
	 strcat (buf, "lightning ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
	 strcat (buf, "frost ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
	 strcat (buf, "fire ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
	 strcat (buf, "acid");
      strcat (buf, "\n\r");
      send_to_char (buf, ch);
      sprintf (buf, "Your breaths are set to %s %s %s %s %s.\n\r",
	       ch->pcdata->breath[0], ch->pcdata->breath[1],
	       ch->pcdata->breath[2], ch->pcdata->breath[3],
	       ch->pcdata->breath[4]);
      stc (buf, ch);

      return;
   }

   else if (!str_cmp (arg1, "gas")
	    && IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
   {
      free_string (ch->pcdata->breath[0]);
      ch->pcdata->breath[0] = str_dup ("gas");
      send_to_char ("You now breathe gas in battle.\n\r", ch);
   }
   else if (!str_cmp (arg1, "lightning")
	    && IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
   {
      free_string (ch->pcdata->breath[0]);
      ch->pcdata->breath[0] = str_dup ("lightning");
      send_to_char ("You now breathe lightning in battle.\n\r", ch);
   }
   else if (!str_cmp (arg1, "frost")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
   {
      free_string (ch->pcdata->breath[0]);
      ch->pcdata->breath[0] = str_dup ("frost");
      send_to_char ("You now breathe frost in battle.\n\r", ch);
   }
   else if (!str_cmp (arg1, "fire")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
   {
      free_string (ch->pcdata->breath[0]);
      ch->pcdata->breath[0] = str_dup ("fire");
      send_to_char ("You now breathe fire in battle.\n\r", ch);
   }
   else if (!str_cmp (arg1, "acid")
	    && IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
   {
      free_string (ch->pcdata->breath[0]);
      ch->pcdata->breath[0] = str_dup ("acid");
      send_to_char ("You now breathe acid in battle.\n\r", ch);
   }
   else
   {
      send_to_char ("You can breathe the following types:\n\r", ch);
      buf[0] = '\0';
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
	 strcat (buf, "gas ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
	 strcat (buf, "lightning ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
	 strcat (buf, "frost ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
	 strcat (buf, "fire ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
	 strcat (buf, "acid");
      strcat (buf, "\n\r");
      send_to_char (buf, ch);
      return;
   }
   if (arg2[0] == '\0')
   {
      free_string (ch->pcdata->breath[1]);
      free_string (ch->pcdata->breath[2]);
      free_string (ch->pcdata->breath[3]);
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[1] = str_dup ("");
      ch->pcdata->breath[2] = str_dup ("");
      ch->pcdata->breath[3] = str_dup ("");
      ch->pcdata->breath[4] = str_dup ("");
      return;
   }
   else if (!str_cmp (arg2, "gas")
	    && IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
   {
      free_string (ch->pcdata->breath[1]);
      ch->pcdata->breath[1] = str_dup ("gas");
      send_to_char ("You now breathe gas in battle.\n\r", ch);
   }
   else if (!str_cmp (arg2, "lightning")
	    && IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
   {
      free_string (ch->pcdata->breath[1]);
      ch->pcdata->breath[1] = str_dup ("lightning");
      send_to_char ("You now breathe lightning in battle.\n\r", ch);
   }
   else if (!str_cmp (arg2, "frost")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
   {
      free_string (ch->pcdata->breath[1]);
      ch->pcdata->breath[1] = str_dup ("frost");
      send_to_char ("You now breathe frost in battle.\n\r", ch);
   }
   else if (!str_cmp (arg2, "fire")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
   {
      free_string (ch->pcdata->breath[1]);
      ch->pcdata->breath[1] = str_dup ("fire");
      send_to_char ("You now breathe fire in battle.\n\r", ch);
   }
   else if (!str_cmp (arg2, "acid")
	    && IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
   {
      free_string (ch->pcdata->breath[1]);
      ch->pcdata->breath[1] = str_dup ("acid");
      send_to_char ("You now breathe acid in battle.\n\r", ch);
   }
   else
   {
      send_to_char ("You can breathe the following types:\n\r", ch);
      buf[0] = '\0';
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
	 strcat (buf, "gas ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
	 strcat (buf, "lightning ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
	 strcat (buf, "frost ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
	 strcat (buf, "fire ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
	 strcat (buf, "acid");
      strcat (buf, "\n\r");
      send_to_char (buf, ch);
      return;
   }
   if (arg3[0] == '\0')
   {
      free_string (ch->pcdata->breath[2]);
      free_string (ch->pcdata->breath[3]);
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[2] = str_dup ("");
      ch->pcdata->breath[3] = str_dup ("");
      ch->pcdata->breath[4] = str_dup ("");
      return;
   }
   else if (!str_cmp (arg3, "gas")
	    && IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
   {
      free_string (ch->pcdata->breath[2]);
      ch->pcdata->breath[2] = str_dup ("gas");
      send_to_char ("You now breathe gas in battle.\n\r", ch);
   }
   else if (!str_cmp (arg3, "lightning")
	    && IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
   {
      free_string (ch->pcdata->breath[2]);
      ch->pcdata->breath[2] = str_dup ("lightning");
      send_to_char ("You now breathe lightning in battle.\n\r", ch);
   }
   else if (!str_cmp (arg3, "frost")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
   {
      free_string (ch->pcdata->breath[2]);
      ch->pcdata->breath[2] = str_dup ("frost");
      send_to_char ("You now breathe frost in battle.\n\r", ch);
   }
   else if (!str_cmp (arg3, "fire")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
   {
      free_string (ch->pcdata->breath[2]);
      ch->pcdata->breath[2] = str_dup ("fire");
      send_to_char ("You now breathe fire in battle.\n\r", ch);
   }
   else if (!str_cmp (arg3, "acid")
	    && IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
   {
      free_string (ch->pcdata->breath[2]);
      ch->pcdata->breath[2] = str_dup ("acid");
      send_to_char ("You now breathe acid in battle.\n\r", ch);
   }
   else
   {
      send_to_char ("You can breathe the following types:\n\r", ch);
      buf[0] = '\0';
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
	 strcat (buf, "gas ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
	 strcat (buf, "lightning ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
	 strcat (buf, "frost ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
	 strcat (buf, "fire ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
	 strcat (buf, "acid");
      strcat (buf, "\n\r");
      send_to_char (buf, ch);
      return;
   }
   if (arg4[0] == '\0')
   {
      free_string (ch->pcdata->breath[3]);
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[3] = str_dup ("");
      ch->pcdata->breath[4] = str_dup ("");
      return;
   }
   else if (!str_cmp (arg4, "gas")
	    && IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
   {
      free_string (ch->pcdata->breath[3]);
      ch->pcdata->breath[3] = str_dup ("gas");
      send_to_char ("You now breathe gas in battle.\n\r", ch);
   }
   else if (!str_cmp (arg4, "lightning")
	    && IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
   {
      free_string (ch->pcdata->breath[3]);
      ch->pcdata->breath[3] = str_dup ("lightning");
      send_to_char ("You now breathe lightning in battle.\n\r", ch);
   }
   else if (!str_cmp (arg4, "frost")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
   {
      free_string (ch->pcdata->breath[3]);
      ch->pcdata->breath[3] = str_dup ("frost");
      send_to_char ("You now breathe frost in battle.\n\r", ch);
   }
   else if (!str_cmp (arg4, "fire")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
   {
      free_string (ch->pcdata->breath[3]);
      ch->pcdata->breath[3] = str_dup ("fire");
      send_to_char ("You now breathe fire in battle.\n\r", ch);
   }
   else if (!str_cmp (arg4, "acid")
	    && IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
   {
      free_string (ch->pcdata->breath[3]);
      ch->pcdata->breath[3] = str_dup ("acid");
      send_to_char ("You now breathe acid in battle.\n\r", ch);
   }
   else
   {
      send_to_char ("You can breathe the following types:\n\r", ch);
      buf[0] = '\0';
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
	 strcat (buf, "gas ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
	 strcat (buf, "lightning ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
	 strcat (buf, "frost ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
	 strcat (buf, "fire ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
	 strcat (buf, "acid");
      strcat (buf, "\n\r");
      send_to_char (buf, ch);
      return;
   }
   if (arg5[0] == '\0')
   {
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[4] = str_dup ("");
      return;
   }
   else if (!str_cmp (arg5, "gas")
	    && IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
   {
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[4] = str_dup ("gas");
      send_to_char ("You now breathe gas in battle.\n\r", ch);
   }
   else if (!str_cmp (arg5, "lightning")
	    && IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
   {
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[4] = str_dup ("lightning");
      send_to_char ("You now breathe lightning in battle.\n\r", ch);
   }
   else if (!str_cmp (arg5, "frost")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
   {
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[4] = str_dup ("frost");
      send_to_char ("You now breathe frost in battle.\n\r", ch);
   }
   else if (!str_cmp (arg5, "fire")
	    && IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
   {
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[4] = str_dup ("fire");
      send_to_char ("You now breathe fire in battle.\n\r", ch);
   }
   else if (!str_cmp (arg5, "acid")
	    && IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
   {
      free_string (ch->pcdata->breath[4]);
      ch->pcdata->breath[4] = str_dup ("acid");
      send_to_char ("You now breathe acid in battle.\n\r", ch);
   }
   else
   {
      send_to_char ("You can breathe the following types:\n\r", ch);
      buf[0] = '\0';
      if (IS_SET (ch->pcdata->dragonaff, DRA_GAS_BREATH))
	 strcat (buf, "gas ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_LIGHTNING_BREATH))
	 strcat (buf, "lightning ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FROST_BREATH))
	 strcat (buf, "frost ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_FIRE_BREATH))
	 strcat (buf, "fire ");
      if (IS_SET (ch->pcdata->dragonaff, DRA_ACID_BREATH))
	 strcat (buf, "acid");
      strcat (buf, "\n\r");
      send_to_char (buf, ch);
      return;
   }
}

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

   one_argument (argument, arg);

   if (!IS_IMMORTAL (ch))
   {
      if (!IS_CLASS (ch, CLASS_DRAGON))
      {
	 send_to_char ("Huh?!?\n\r", ch);
	 return;
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_LICK))
      {
	 send_to_char ("You haven't learned this skill yet.\n\r", ch);
	 return;
      }
   }

   if (ch->fight_timer > 0)
   {
      stc ("Not until your fight timer has cleared.\n\r", ch);
      return;
   }

   if (ch->pcdata->condition[COND_FULL] < 30)
   {
      stc ("You need to eat more before you can use this.\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->fight_timer > 0)
   {
      stc ("You are unable to lick them\n\r", ch);
      return;
   }
   if (victim->position == POS_FIGHTING)
   {
      stc ("You are unable to lick them\n\r", ch);
      return;
   }

   if (arg[0] == '\0')
   {
      send_to_char ("Who's wounds do you want to heal?\n\r", ch);
      return;
   }

   victim->hit +=
      number_range ((100 * GET_AGE(ch)),
                    (200 * GET_AGE(ch)));
   victim->move +=
      number_range ((100 * GET_AGE(ch)),
                    (200 * GET_AGE(ch)));
   if (victim->hit > victim->max_hit)
      victim->hit = victim->max_hit;
   if (victim->move > victim->max_move)
      victim->move = victim->max_move;

   update_pos (victim);
/*
   if (ch == victim)
      stc ("You heal your wounds!\n\r", ch);
   else 
   act ("$n licks your wounds and heals you.", ch, NULL, victim, TO_VICT);
   act ("$n licks $N's wounds and heals $M.", ch, NULL,victim, TO_ROOM);
   act ("You lick $N's wounds and heal $M.", victim, NULL, victim, TO_CHAR);
*/
   if ( victim == ch )
   {
       send_to_char( "You heal your wounds.\n\r", ch );
       act("$n heals $s wounds.",ch,NULL,NULL,TO_ROOM);
   }  
   else
   {
   	act ("You lick $N's wounds and $E is healed.", ch, NULL, victim, TO_CHAR);
   	act ("$n licks your wounds and heals you.", ch, NULL, victim, TO_VICT);
   	act ("$n licks $N's wounds and heals $M.", ch, NULL, victim, TO_ROOM);
   }
   gain_condition (ch, COND_FULL, -(number_range (10, 30)));
   WAIT_STATE (ch, 9);
   return;
}

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

   one_argument (argument, arg);

   if (!IS_IMMORTAL (ch))
   {
      if (!IS_CLASS (ch, CLASS_DRAGON))
      {
	 send_to_char ("Huh?!?\n\r", ch);
	 return;
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_CONFUSE))
      {
	 send_to_char ("You haven't learned this skill yet.\n\r", ch);
	 return;
      }
   }

   if (ch->pcdata->condition[COND_FULL] < 50)
   {
      stc ("You need to eat more before you can use this skill.\n\r", ch);
      return;
   }

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

   if ((victim = get_char_room (ch, arg)) == NULL)
   {
      send_to_char ("They aren't here.\n\r", ch);
      return;
   }

   act ("A look of concentration crosses $n face.", ch, NULL, victim,
	TO_ROOM);
   send_to_char ("You confuse them.\n\r", ch);
   act ("$n becomes confused.", victim, NULL, victim, TO_NOTVICT);

   af.type = gsn_curse;
   af.duration = 5;
   af.location = APPLY_HITROLL;
   af.modifier = -50;
   af.bitvector = 0;
   affect_to_char (victim, &af);

   af.location = APPLY_DAMROLL;
   af.modifier = -50;
   affect_to_char (victim, &af);
   gain_condition (ch, COND_FULL, -(number_range (40, 50)));
   WAIT_STATE (ch, 12);

   return;
}

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

   /*AFFECT_DATA af; */
   char buf[MAX_INPUT_LENGTH];
   OBJ_DATA *obj;

   one_argument (argument, arg);

   if (!IS_IMMORTAL (ch))
   {
      if (!IS_CLASS (ch, CLASS_DRAGON))
      {
	 send_to_char ("Huh?!?\n\r", ch);
	 return;
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_POLYMORPH))
      {
	 send_to_char ("You haven't learned this skill yet.\n\r", ch);
	 return;
      }
   }

   if (arg[0] == '\0')
   {
      send_to_char ("You can polymorph into the following forms:\n\r", ch);
      send_to_char ("Normal, Frog, Fish, Raven, Lizard, Stone.\n\r", ch);
      return;
   }
   else if (!str_cmp (arg, "normal"))
   {
      if (IS_SET (ch->extra, EXTRA_OSWITCH))
      {
	 if ((obj = ch->pcdata->chobj) == NULL)
	 {
	    send_to_char ("You are already in human form.\n\r", ch);
	    return;
	 }

	 ch->pcdata->obj_vnum = 0;
	 obj->chobj = NULL;
	 ch->pcdata->chobj = NULL;
	 REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
	 REMOVE_BIT (ch->extra, EXTRA_OSWITCH);
	 free_string (ch->morph);
	 ch->morph = str_dup ("");
	 act ("$p transforms into $n.", ch, obj, NULL, TO_ROOM);
	 act ("You reform your human body.", ch, obj, NULL, TO_CHAR);
	 extract_obj (obj);
	 if (ch->in_room->vnum == ROOM_VNUM_IN_OBJECT)
	 {
	    char_from_room (ch);
	    char_to_room (ch, get_room_index (ch->home));
	 }
	 return;
      }
      else
      {
	 act ("$n changes back to normal.", ch, NULL, NULL, TO_ROOM);
	 send_to_char ("You polymorph back to normal.\n\r", ch);
	 REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
//    REMOVE_BIT(ch->extra,EXTRA_OSWITCH);
	 free_string (ch->morph);
	 ch->morph = str_dup ("");
      }
   }
   else if (!str_cmp (arg, "frog"))
   {
      if (!IS_NPC (ch) && ch->stance[0] != -1)
	 do_stance (ch, "");
      send_to_char ("You polymorph into a frog!\n\r", ch);
      sprintf (buf, "%s the frog", ch->name);
      SET_BIT (ch->affected_by, AFF_POLYMORPH);
      free_string (ch->morph);
      ch->morph = str_dup (buf);
      return;
   }
   else if (!str_cmp (arg, "fish"))
   {
      act ("$n polymorphs into a fish!", ch, NULL, NULL, TO_ROOM);
      send_to_char ("You polymorph into a fish!\n\r", ch);
      SET_BIT (ch->affected_by, AFF_POLYMORPH);
      sprintf (buf, "%s the fish", ch->name);
      free_string (ch->morph);
      ch->morph = str_dup (buf);
      return;
   }
   else if (!str_cmp (arg, "raven"))
   {
      act ("$n polymorphs into a raven!", ch, NULL, NULL, TO_ROOM);
      send_to_char ("You polymorph into a raven!\n\r", ch);
      SET_BIT (ch->affected_by, AFF_POLYMORPH);
      sprintf (buf, "%s the raven", ch->name);
      free_string (ch->morph);
      ch->morph = str_dup (buf);
      return;
   }
   else if (!str_cmp (arg, "lizard"))
   {
      act ("$n polymorphs into a lizard!", ch, NULL, NULL, TO_ROOM);
      send_to_char ("You polymorph into a lizard!\n\r", ch);
      SET_BIT (ch->affected_by, AFF_POLYMORPH);
      sprintf (buf, "%s the lizard", ch->name);
      free_string (ch->morph);
      ch->morph = str_dup (buf);
      return;
   }
   else if (!str_cmp (arg, "stone"))
   {
      if ((obj = create_object (get_obj_index (5234), 60)) == NULL)
      {
	 send_to_char ("Bug - Please inform an immortal.\n\r", ch);
	 return;
      }
      if (ch->in_room->vnum == ROOM_VNUM_ALTAR)
      {
	 stc ("Not in this room sorry!\n\r", ch);
	 return;
      }
      if (IS_SET (ch->war, WARRING))
      {
         stc ("Not while in a war!\n\r", ch);
         return;
      }
      if (IS_SET (ch->flag2, AFF2_INARENA))
      {
         stc ("Not while you're in the arena.#n\n\r", ch);
         return;
      }
      if (ch->in_room->area->owned > 0
	  && ch->in_room->area->owned != ch->pcdata->kingdom)
      {
	 stc ("Not in someone elses HQ\n\r", ch);
	 return;
      }
      if (IS_SET (ch->polyaff, POLY_DRAGON))
      {
	 stc ("Not while you are in Drackform\n\r", ch);
	 return;
      }
      if (ch->position == POS_FIGHTING)
      {
	 stc ("NO way you are still fighting.\n\r", ch);
	 return;
      }
      if (ch->fight_timer > 0)
      {
	 stc ("Wait for your fight timer to clear first!\n\r", ch);
	 return;
      }
      if (IS_SET (ch->extra, EXTRA_OSWITCH))
      {
	 stc ("You are already in stone form!\n\r", ch);
	 return;
      }
      obj_to_room (obj, ch->in_room);
      act ("$n transforms into $p and falls to the ground.", ch, obj, NULL,
	   TO_ROOM);
      act ("You transform into $p and fall to the ground.", ch, obj, NULL,
	   TO_CHAR);
      ch->pcdata->obj_vnum = 5234;
      obj->chobj = ch;
      ch->pcdata->chobj = obj;
      SET_BIT (ch->affected_by, AFF_POLYMORPH);
      SET_BIT (ch->extra, EXTRA_OSWITCH);
      free_string (ch->morph);
      ch->morph = str_dup (obj->short_descr);
      return;
   }
   else
   {
      send_to_char ("You can polymorph into the following forms:\n\r", ch);
      send_to_char ("Normal, Frog, Fish, Raven, Lizard, Stone.\n\r", ch);
      return;
   }
   return;
}

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

   one_argument (argument, arg);

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

      if (!IS_SET (ch->pcdata->dragonaff, DRA_FLY))
      {
	 send_to_char ("You haven't learned this skill yet.\n\r", ch);
	 return;
      }
   }

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

   if (ch->move < 500)
   {
      stc ("You are too exhausted.\n\r", ch);
      return;
   }
   if (ch->fight_timer > 0)
   {
      stc ("Wait for your fight timer to expire first!!\n\r", ch);
      return;
   }

   if (ch->position == POS_FIGHTING)
   {
      send_to_char ("No way! You are fighting.\n\r", ch);
      return;
   }

   if ((victim = get_char_world (ch, arg)) == NULL)
   {
      send_to_char ("Nobody by that name.\n\r", ch);
      return;
   }
   if IS_SET
      (victim->in_room->room_flags, ROOM_CCHAMBER)
   {
      stc ("You failed.\n\r", ch);
      return;
   }
   if (IS_NPC (victim) && IS_SET (victim->in_room->area->aflags, AFLAG_HQ))
   {
      stc ("You failed.\n\r", ch);
      return;
   }
   if (victim->in_room == NULL)
   {
      stc ("You are already there!\n\r", ch);
      return;
   }

   if (victim == ch)
   {
      stc ("Not to yourself.\n\r", ch);
      return;
   }
/* This code really does Suck --Matt 
	if (number_range(1, 100) > 75)
	{
		send_to_char("You couldn't see your target.\r\n", ch);
		return;
	}
*/
   if ((!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
       || IS_SET (ch->in_room->room_flags, ROOM_PRIVATE)
       || IS_SET (ch->in_room->room_flags, ROOM_SOLITARY)
       || IS_SET (ch->in_room->room_flags, ROOM_NO_RECALL)
       || victim->level > 150
       || IS_SET (victim->in_room->room_flags, ROOM_PRIVATE)
       || IS_SET (victim->in_room->room_flags, ROOM_SOLITARY)
       || IS_SET (victim->in_room->room_flags, ROOM_NO_RECALL)
       || victim->in_room->vnum == ch->in_room->vnum)
   {
      send_to_char ("You failed.\n\r", ch);
      return;
   }

   act ("You disappear up into the sky.", ch, NULL, NULL, TO_CHAR);
   act ("$n disappears up into the sky.", ch, NULL, NULL, TO_ROOM);
   char_from_room (ch);
   char_to_room (ch, get_room_index (victim->in_room->vnum));
   act ("You swoop down and land infront of $N", ch, NULL, victim, TO_CHAR);
   act ("$n swoops down and lands infront of $N.", ch, NULL, victim, TO_ROOM);

   ch->move -= 500;
   do_look (ch, "auto");
   if ((mount = victim->mount) == NULL)
      return;
   char_from_room (mount);
   char_to_room (mount, get_room_index (victim->in_room->vnum));
   do_look (mount, "auto");
   return;
}

void do_peer (CHAR_DATA * ch, char *argument)
{
   CHAR_DATA *victim;
   OBJ_DATA *obj;
   char arg[MAX_INPUT_LENGTH];
   char buf[MAX_INPUT_LENGTH];

   one_argument (argument, arg);

   if (IS_NPC (ch))
      return;

   if (!IS_IMMORTAL (ch))
   {
      if (!IS_CLASS (ch, CLASS_DRAGON))
      {
	 send_to_char ("Huh?!?\n\r", ch);
	 return;
      }
      if (!IS_SET (ch->pcdata->dragonaff, DRA_PEER))
      {
	 send_to_char
	    ("You don't have the ability to know people's stats.\n\r", ch);
	 return;
      }
   }

   if (arg[0] == '\0')
   {
      send_to_char ("Peer at who?\n\r", ch);
      return;
   }
   if ((victim = get_char_room (ch, arg)) == NULL)
   {
      if ((obj = get_obj_carry (ch, arg)) == NULL)
      {
	 send_to_char ("Peer at what?\n\r", ch);
	 return;
      }
     // act ("$n examines $p intently.", ch, obj, NULL, TO_ROOM);
      spell_identify (skill_lookup ("identify"), ch->level, ch, obj);
      return;
   }
   act ("$n examines $N intently.", ch, NULL, victim, TO_NOTVICT);
   act ("$n examines you intently.", ch, NULL, victim, TO_VICT);
   if (IS_NPC (victim))
      sprintf (buf, "%s is an NPC.\n\r", victim->short_descr);
   else
   {
      if (victim->level == 12)
	 sprintf (buf, "%s is an Implementor.\n\r", victim->name);
      else if (victim->level == 11)
	 sprintf (buf, "%s is a High Judge.\n\r", victim->name);
      else if (victim->level == 10)
	 sprintf (buf, "%s is a Judge.\n\r", victim->name);
      else if (victim->level == 9)
	 sprintf (buf, "%s is an Enforcer.\n\r", victim->name);
      else if (victim->level == 8)
	 sprintf (buf, "%s is a Quest Maker.\n\r", victim->name);
      else if (victim->level == 7)
	 sprintf (buf, "%s is a Builder.\n\r", victim->name);
      else if (victim->level >= 3)
	 sprintf (buf, "%s is an Avatar.\n\r", victim->name);
      else
	 sprintf (buf, "%s is a Mortal.\n\r", victim->name);
   }
   send_to_char (buf, ch);

   if (!IS_NPC (victim))
   {
      if (IS_CLASS (victim, CLASS_DEMON))
	 sprintf (buf, "%s is a Demon.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_MAGE))
	 sprintf (buf, "%s is a Mage.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_WEREWOLF))
	 sprintf (buf, "%s is a Werewolf.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_VAMPIRE))
	 sprintf (buf, "%s is a Vampire.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_HIGHLANDER))
	 sprintf (buf, "%s is a Highlander.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_DROW))
	 sprintf (buf, "%s is a Drow.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_NINJA))
	 sprintf (buf, "%s is a Ninja.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_MONK))
	 sprintf (buf, "%s is a Monk.\n\r", victim->name);
      if (IS_CLASS (victim, CLASS_DRAGON))
	 sprintf (buf, "%s is a Dragon.\n\r", victim->name);
      send_to_char (buf, ch);
   }
   if (!IS_NPC (victim))
   {
      sprintf (buf, "Str:%d, Int:%d, Wis:%d, Dex:%d, Con:%d.\n\r",
	       get_curr_str (victim), get_curr_int (victim),
	       get_curr_wis (victim), get_curr_dex (victim),
	       get_curr_con (victim));
      send_to_char (buf, ch);
   }

   sprintf (buf, "Hp:%d/%d, Mana:%d/%d, Move:%d/%d.\n\r", victim->hit,
	    victim->max_hit, victim->mana, victim->max_mana, victim->move,
	    victim->max_move);

   send_to_char (buf, ch);
   sprintf (buf, "Hitroll:%d, Damroll:%d, AC:%d.\n\r",
	    char_hitroll (victim), char_damroll (victim), char_ac (victim));

   send_to_char (buf, ch);
   if (!IS_NPC (victim))
   {
      sprintf (buf, "Status:%d, ", victim->race);
      send_to_char (buf, ch);
      if (IS_CLASS (victim, CLASS_VAMPIRE))
      {
	 sprintf (buf, "Blood:%d, ", victim->pcdata->condition[COND_THIRST]);
	 send_to_char (buf, ch);
      }
   }
   sprintf (buf, "Alignment:%d.\n\r", victim->alignment);
   send_to_char (buf, ch);
   if (!IS_NPC (victim) && IS_EXTRA (victim, EXTRA_PREGNANT)
       && victim->sex == SEX_FEMALE)
      act ("$N is pregnant.", ch, NULL, victim, TO_CHAR);
   if (!IS_NPC (victim) && IS_CLASS (victim, CLASS_VAMPIRE))
   {
      send_to_char ("Disciplines:", ch);
      if (IS_VAMPAFF (victim, VAM_PROTEAN))
	 send_to_char (" Protean", ch);
      if (IS_VAMPAFF (victim, VAM_VICISSITUDE))
	 send_to_char (" vicissitude", ch);
      if (IS_VAMPAFF (victim, VAM_CELERITY))
	 send_to_char (" Celerity", ch);
      if (IS_VAMPAFF (victim, VAM_FORTITUDE))
	 send_to_char (" Fortitude", ch);
      if (IS_VAMPAFF (victim, VAM_POTENCE))
	 send_to_char (" Potence", ch);
      if (IS_VAMPAFF (victim, VAM_OBFUSCATE))
	 send_to_char (" Obfuscate", ch);
      if (IS_VAMPAFF (victim, VAM_OBTENEBRATION))
	 send_to_char (" Obtenebration", ch);
      if (IS_VAMPAFF (victim, VAM_SERPENTIS))
	 send_to_char (" Serpentis", ch);
      if (IS_VAMPAFF (victim, VAM_AUSPEX))
	 send_to_char (" Auspex", ch);
      if (IS_VAMPAFF (victim, VAM_DOMINATE))
	 send_to_char (" Dominate", ch);
      if (IS_VAMPAFF (victim, VAM_PRESENCE))
	 send_to_char (" Presence", ch);
      send_to_char (".\n\r", ch);
   }

   return;
}

void do_consume (CHAR_DATA * ch, char *argument)
{
   OBJ_DATA *corpse;
//   OBJ_DATA *c_next;
   OBJ_DATA *obj;
   OBJ_DATA *obj_next;
   char arg[MAX_INPUT_LENGTH];
   char buf[MAX_INPUT_LENGTH];
   int points;

   one_argument (argument, arg);

   if (!IS_CLASS (ch, CLASS_DRAGON))
      return;

   corpse = get_obj_list (ch, arg, ch->in_room->contents);
   if (corpse == NULL) return;
//   for (corpse = ch->in_room->contents; corpse != NULL; corpse = c_next)
//   {
//      c_next = corpse->next_content;
      if (corpse->item_type != ITEM_CORPSE_NPC)
// && corpse->item_type != ITEM_CORPSE_PC)
//         continue;
         return;
      points = number_range (5, 50 * (GET_AGE(ch) + 1));
      ch->pcdata->stats[DEMON_CURRENT] += points;
      ch->pcdata->stats[DEMON_TOTAL] += points;
      act ("$n savagely devours a corpse.", ch, NULL, NULL, TO_ROOM);
      sprintf (buf, "You gain %d dragon points.\n\r", points);
      send_to_char (buf, ch);
      for (obj = corpse->contains; obj; obj = obj_next)
      {
	 obj_next = obj->next_content;
	 obj_from_obj (obj);
	 obj_to_room (obj, ch->in_room);
      }

      if (corpse != NULL)
	 extract_obj (corpse);
//   }
   return;
}

void do_gem (CHAR_DATA * ch, char *argument)
{
   char buf[MAX_STRING_LENGTH];
   OBJ_INDEX_DATA *pObjIndex;
   OBJ_DATA *obj;

   if (!IS_CLASS (ch, CLASS_DRAGON))
   {
      stc ("Huh?\n\r", ch);
      return;
   }

   if (IS_NPC (ch) || (ch->pcdata->stats[DEMON_CURRENT] < 100))
   {
      send_to_char ("You are unable to make a gem.\n\r", ch);
      return;
   }

   if ((pObjIndex = get_obj_index (OBJ_VNUM_PROTOPLASM)) == NULL)
   {
      send_to_char ("Error...missing object, please inform a coder.\n\r", ch);
      return;
   }

   ch->pcdata->stats[DEMON_CURRENT] -= 100;
   ch->pcdata->stats[DEMON_TOTAL] -= 100;
   if (ch->pcdata->stats[DEMON_CURRENT] < 0)
      ch->pcdata->stats[DEMON_CURRENT] = 0;
   obj = create_object (pObjIndex, 100);
   obj->value[0] = 100;
   obj->level = 1;
   obj->cost = 100 * 1000;
   obj->item_type = ITEM_DRAGONGEM;
   obj_to_char (obj, ch);
   if (obj->questmaker != NULL)
      free_string (obj->questmaker);
   obj->questmaker = str_dup (ch->name);
   free_string (obj->name);
   obj->name = str_dup ("dragon gem");
   sprintf (buf, "a dragon #rgem#n");
   free_string (obj->short_descr);
   obj->short_descr = str_dup (buf);
   sprintf (buf, "A #wsparkling #rgem#n lies on the floor.");
   free_string (obj->description);
   obj->description = str_dup (buf);

   act ("You snap your fingers and reveal $p.", ch, obj, NULL, TO_CHAR);
   act ("$n snaps $s fingers and reveals $p.", ch, obj, NULL, TO_ROOM);

   return;
}

void dragon_sleep (CHAR_DATA * ch)
{
   OBJ_DATA *obj;
   OBJ_DATA *obj_next;

   if (ch->pcdata->tick_timer[TIMER_DSLEEP] != 0)
      return;
   for (obj = ch->carrying; obj != NULL; obj = obj_next)
   {
      obj_next = obj->next_content;

      if (obj->item_type == ITEM_DRAGONGEM)
	 break;
   }
   if (obj != NULL)
   {
      do_eat (ch, obj->name);
      return;
   }
   else
   {
      do_sleep (ch, "");

      send_to_char
	 ("You fall into a deep sleep since you became so hungry.\n\r", ch);
      SET_TIMER (ch, TIMER_DSLEEP, 5);
   }
   return;
}
void do_dragonarmour (CHAR_DATA * ch, char *argument)
{
   OBJ_INDEX_DATA *pObjIndex;
   OBJ_DATA *obj;
   char buf[MAX_STRING_LENGTH];
   char arg1[MAX_INPUT_LENGTH];

   argument = one_argument (argument, arg1);

   if (IS_NPC (ch))
      return;

   if (!IS_CLASS (ch, CLASS_DRAGON))
   {
      do_rand_typo (ch);
      return;
   }

   if (arg1[0] == '\0')
   {
      stc ("Syntax: Dragonarmour (Piece)\n\r", ch);
      stc ("Piece being one of:  Ring Collar Jerkin Helmet\n\r", ch);
      stc ("                     Leggings Boots Gloves Armplates\n\r", ch);
      stc ("                     Cape Belt Bracer Visor Sword Dagger\n\r",
	   ch);
      return;
   }

   if (ch->pcdata->stats[DEMON_CURRENT] < 5000 || ch->pcdata->quest < 1500)
   {
      stc ("You need 5000 power and 1500 quest points to create dragon armour\n\r", ch);
      return;
   }

   if ((pObjIndex = get_obj_index (OBJ_VNUM_PROTOPLASM)) == NULL)
   {
      send_to_char ("Error loading object.  Please inform an Imp.\n\r", ch);
      return;
   }
   obj = create_object (pObjIndex, 60);
   obj->weight = 1;
   obj->condition = 100;
   obj->toughness = 100;
   SET_BIT (obj->quest, QUEST_RELIC);
   SET_BIT (obj->quest, QUEST_SPELLPROOF);
   SET_BIT (obj->extra_flags, ITEM_LOYAL);
   SET_BIT (obj->spectype, SITEM_DRAGON);
   FILL_STRING (obj->questmaker, ch->name);
   FILL_STRING (obj->questowner, ch->name);
   affect_to_obj (obj, -1, APPLY_HITROLL, 20);
   affect_to_obj (obj, -1, APPLY_DAMROLL, 20);

   if (!str_cmp (arg1, "ring"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_FINGER;
      FILL_STRING (obj->name, "ring dragon");
      FILL_STRING (obj->short_descr, "a draconic ring");
      FILL_STRING (obj->description,
		   "A ring made from draconscales lies here.");
      obj->value[0] = 25;
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "collar"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_NECK;
      FILL_STRING (obj->name, "collar dragon");
      FILL_STRING (obj->short_descr, "a draconic collar");
      FILL_STRING (obj->description,
		   "A collar made from draconscales lies here.");
      obj->value[0] = 25;
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "bracer"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_WRIST;
      FILL_STRING (obj->name, "bracer dragon");
      FILL_STRING (obj->short_descr, "a draconic bracer");
      FILL_STRING (obj->description,
		   "A bracer made from draconscales lies here.");
      obj->value[0] = 25;
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "visor"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_FACE;
      FILL_STRING (obj->name, "visor dragon");
      FILL_STRING (obj->short_descr, "a draconic visor");
      FILL_STRING (obj->description,
		   "A visor made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 5;	/* Invisible */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "boots"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_FEET;
      FILL_STRING (obj->name, "boots dragon");
      FILL_STRING (obj->short_descr, "a pair of draconic boots");
      FILL_STRING (obj->description,
		   "A pair of boots made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 12;	/* Iceshield */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "jerkin"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_BODY;
      FILL_STRING (obj->name, "jerkin dragon");
      FILL_STRING (obj->short_descr, "a draconic jerkin");
      FILL_STRING (obj->description,
		   "A jerkin made from draconscales lies here.");
      obj->value[0] = 25;
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "helmet"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_HEAD;
      FILL_STRING (obj->name, "helmet dragon");
      FILL_STRING (obj->short_descr, "a draconic helmet");
      FILL_STRING (obj->description,
		   "A helmet made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 13;	/* Acidshield */

      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "gloves"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_HANDS;
      FILL_STRING (obj->name, "gloves dragon");
      FILL_STRING (obj->short_descr, "a pair of draconic gloves");
      FILL_STRING (obj->description,
		   "A a pair of gloves made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 7;	/* Protection */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "belt"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_WAIST;
      FILL_STRING (obj->name, "belt dragon");
      FILL_STRING (obj->short_descr, "a draconic belt");
      FILL_STRING (obj->description,
		   "A belt made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 10;	/* Shockshield */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "cape"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_ABOUT;
      FILL_STRING (obj->name, "cape dragon");
      FILL_STRING (obj->short_descr, "a draconic cape");
      FILL_STRING (obj->description,
		   "A cape made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 3;	/* Fly */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "armplates"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_ARMS;
      FILL_STRING (obj->name, "armplates dragon");
      FILL_STRING (obj->short_descr, "a pair of draconic armplates");
      FILL_STRING (obj->description,
		   "A pair of armplates  made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 11;	/* Fireshield */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "leggings"))
   {
      obj->item_type = ITEM_ARMOR;
      obj->wear_flags = ITEM_TAKE + ITEM_WEAR_LEGS;
      FILL_STRING (obj->name, "leggings dragon");
      FILL_STRING (obj->short_descr, "a pair of draconic leggings");
      FILL_STRING (obj->description,
		   "A pair of leggings  made from draconscales lies here.");
      obj->value[0] = 25;
      obj->value[3] = 8;	/* Sanctuary */
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "sword"))
   {
      obj->item_type = ITEM_WEAPON;
      obj->wear_flags = ITEM_TAKE + ITEM_WIELD;
      FILL_STRING (obj->name, "sword dragon");
      FILL_STRING (obj->short_descr, "a draconic sword");
      FILL_STRING (obj->description, "A draconic sword lies here.");
      obj->value[0] = 18000;	/* vorpal */
      obj->value[1] = 75;
      obj->value[2] = 150;
      obj->value[3] = 1;
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }
   else if (!str_cmp (arg1, "dagger"))
   {
      obj->item_type = ITEM_WEAPON;
      obj->wear_flags = ITEM_TAKE + ITEM_WIELD;
      FILL_STRING (obj->name, "dagger dragon");
      FILL_STRING (obj->short_descr, "a draconic dagger");
      FILL_STRING (obj->description, "A draconic dagger lies here.");
      obj->value[1] = 75;
      obj->value[2] = 150;
      obj->value[3] = 11;
      ch->pcdata->stats[DEMON_TOTAL] -= 5000;
      ch->pcdata->stats[DEMON_CURRENT] -= 5000;
      ch->pcdata->quest -= 1500;
      obj->points += 1500;
   }

   else

   {
      do_dragonarmour (ch, "");
      return;
   }
   sprintf (buf, "#r%s appears in your hands with a roar.\n\r",
	    obj->short_descr);
   send_to_char (buf, ch);
   sprintf (buf, "#r%s appears in %s hands in with a roar.", obj->short_descr,
	    ch->name);
   act (buf, ch, NULL, NULL, TO_ROOM);
   obj_to_char (obj, ch);
   WAIT_STATE (ch, 6);
   return;

}

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

   char arg1[MAX_STRING_LENGTH];
   char arg2[MAX_STRING_LENGTH];
   OBJ_INDEX_DATA *pObjIndex;
   OBJ_DATA *obj;
   int vnum = 0;
   int cost = 0;

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

   if (!IS_CLASS (ch, CLASS_DRAGON))
   {
      stc ("Huh?\n\r", ch);
      return;
   }
   if (arg1[0] == '\0')
   {
      stc ("Usage: dragonarmor <green, black, blue, red> <piece>\n\r", ch);
      stc ("piece = Ring, Collar, Shirt, Helmet, Leggings, Boots, Gloves, Armblades, Cape, Belt, Bracer, Mask\n\r", ch);
      stc ("green costs 5,000 dps, black = 10,000 dps, blue = 15,000 dps, red = 20,000 dps.\n\r", ch);
      return;
   }
   if (arg2[0] == '\0')
   {
      stc ("Usage: dragonarmor <green, black, blue, red> <piece>\n\r", ch);
      stc ("piece = Ring, Collar, Shirt, Helmet, Leggings, Boots, Gloves, Armblades, Cape, Belt, Bracer, Mask\n\r", ch);
      stc ("green costs 5,000 dps, black = 10,000 dps, blue = 15,000 dps, red = 20,000 dps.\n\r", ch);
      return;
   }

   if (!str_cmp (arg1, "green") && !str_cmp (arg2, "ring"))
   {
      cost = 5000;
      vnum = 29724;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "collar"))
   {
      cost = 5000;
      vnum = 29725;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "shirt"))
   {
      cost = 5000;
      vnum = 29726;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "helmet"))
   {
      cost = 5000;
      vnum = 29727;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "leggings"))
   {
      cost = 5000;
      vnum = 29728;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "boots"))
   {
      cost = 5000;
      vnum = 29729;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "gloves"))
   {
      cost = 5000;
      vnum = 29730;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "armblades"))
   {
      cost = 5000;
      vnum = 29731;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "cape"))
   {
      cost = 5000;
      vnum = 29732;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "belt"))
   {
      cost = 5000;
      vnum = 29733;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "bracer"))
   {
      cost = 5000;
      vnum = 29734;
   }
   else if (!str_cmp (arg1, "green") && !str_cmp (arg2, "mask"))
   {
      cost = 5000;
      vnum = 29735;
   }

   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "ring"))
   {
      cost = 10000;
      vnum = 29736;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "collar"))
   {
      cost = 10000;
      vnum = 29737;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "shirt"))
   {
      cost = 10000;
      vnum = 29738;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "helmet"))
   {
      cost = 10000;
      vnum = 29739;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "leggings"))
   {
      cost = 10000;
      vnum = 29740;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "boots"))
   {
      cost = 10000;
      vnum = 29741;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "gloves"))
   {
      cost = 10000;
      vnum = 29742;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "armblades"))
   {
      cost = 10000;
      vnum = 29743;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "cape"))
   {
      cost = 10000;
      vnum = 29744;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "belt"))
   {
      cost = 10000;
      vnum = 29745;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "bracer"))
   {
      cost = 10000;
      vnum = 29746;
   }
   else if (!str_cmp (arg1, "black") && !str_cmp (arg2, "mask"))
   {
      cost = 10000;
      vnum = 29747;
   }

   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "ring"))
   {
      cost = 15000;
      vnum = 29748;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "collar"))
   {
      cost = 15000;
      vnum = 29749;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "shirt"))
   {
      cost = 15000;
      vnum = 29750;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "helmet"))
   {
      cost = 15000;
      vnum = 29751;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "leggings"))
   {
      cost = 15000;
      vnum = 29752;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "boots"))
   {
      cost = 15000;
      vnum = 29753;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "gloves"))
   {
      cost = 15000;
      vnum = 29754;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "armblades"))
   {
      cost = 15000;
      vnum = 29755;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "cape"))
   {
      cost = 15000;
      vnum = 29756;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "belt"))
   {
      cost = 15000;
      vnum = 29757;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "bracer"))
   {
      cost = 15000;
      vnum = 29758;
   }
   else if (!str_cmp (arg1, "blue") && !str_cmp (arg2, "mask"))
   {
      cost = 15000;
      vnum = 29759;
   }

   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "ring"))
   {
      cost = 20000;
      vnum = 29760;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "collar"))
   {
      cost = 20000;
      vnum = 29761;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "shirt"))
   {
      cost = 20000;
      vnum = 29762;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "helmet"))
   {
      cost = 20000;
      vnum = 29763;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "leggings"))
   {
      cost = 20000;
      vnum = 29764;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "boots"))
   {
      cost = 20000;
      vnum = 29765;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "gloves"))
   {
      cost = 20000;
      vnum = 29766;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "armblades"))
   {
      cost = 20000;
      vnum = 29767;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "cape"))
   {
      cost = 20000;
      vnum = 29768;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "belt"))
   {
      cost = 20000;
      vnum = 29769;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "bracer"))
   {
      cost = 20000;
      vnum = 29770;
   }
   else if (!str_cmp (arg1, "red") && !str_cmp (arg2, "mask"))
   {
      cost = 20000;
      vnum = 29771;
   }
   else
   {
      stc ("Usage: dragonarmor <green, black, blue, red> <piece>\n\r", ch);
      stc ("piece = Ring, Collar, Shirt, Helmet, Leggings, Boots, Gloves, Armblades, Cape, Belt, Bracer, Mask\n\r", ch);
      stc ("green costs 5,000 dps, black = 10,000 dps, blue = 15,000 dps, red = 20,000 dps.\n\r", ch);
      return;
   }

   if (ch->pcdata->stats[DEMON_CURRENT] < cost)
   {
      stc ("You don't have enough dragon points.\n\r", ch);
      return;
   }
   if (vnum == 0 || (pObjIndex = get_obj_index (vnum)) == NULL)
   {
      send_to_char ("Missing object, please inform an Imp.\n\r", ch);
      return;
   }
   ch->pcdata->stats[DEMON_CURRENT] -= cost;
   ch->pcdata->stats[DEMON_TOTAL] -= cost;
   obj = create_object (pObjIndex, 50);
   obj_to_char (obj, ch);
   act ("$p appears in your hands.", ch, obj, NULL, TO_CHAR);
   act ("$p appears in $n's hands.", ch, obj, NULL, TO_ROOM);

   return;
}

/*
void do_staredown( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *victim;
    char arg[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];

    argument = one_argument( argument, arg );

    if ( IS_NPC(ch) ) return;

    if ( !IS_CLASS(ch, CLASS_DRAGON) )
    {
	stc("Huh?\n\r",ch);
	return;
    }

    if ( ( victim = get_char_room( ch, arg) ) == NULL )
    {
      stc("They aren't here.\n\r",ch);
      return;
    }

    arg[0] = UPPER(arg[0]);    

    if ( ch->fighting == NULL )
    {
      stc("You must be fighting to use the gift of Staredown.\n\r",ch);
      return;
    }

    if ( victim->fighting == NULL )
    {
      sprintf(buf, "%s is not fighting anyone.", arg);
      stc(buf, ch);
      return;
    }  

    WAIT_STATE( ch, 16 );

    if ( IS_NPC(victim) )
    {
	if ( number_range( 1, 3 ) != 1 )
        {
          act("You stare deeply into $N's eyes, but nothing happens.",ch,NULL,victim,TO_CHAR);
          act("$n stares deeply into your eyes.",ch,NULL,victim,TO_VICT);
          act("$n stares deeply into $N's eyes, but nothing happens.",ch,NULL,victim,TO_NOTVICT);
	    return;
        }

      act("You stare into $N's eyes, and $E flees in terror.",ch,NULL,victim,TO_CHAR);
      act("$n stares deeply into your eyes, and you are filled with terror.",ch,NULL,victim,TO_VICT);
      act("$n stares deeply into $N's eyes, and $E flees in terror.",ch,NULL,victim,TO_NOTVICT);
      do_flee( victim, "" );
      return;
    }
    else
    {
        if ( number_range( 1, 4 ) != 2 )
        {
          act("You stare deeply into $N's eyes, but nothing happens.",ch,NULL,victim,TO_CHAR);
          act("$n stares deeply into your eyes.",ch,NULL,victim,TO_VICT);
          act("$n stares deeply into $N's eyes, but nothing happens.",ch,NULL,victim,TO_NOTVICT);
	    return;
        }

      act("You stare into $N's eyes, and $E flees in terror.",ch,NULL,victim,TO_CHAR);
      act("$n stares deeply into your eyes, and you are filled with terror.",ch,NULL,victim,TO_VICT);
      act("$n stares deeply into $N's eyes, and $E flees in terror.",ch,NULL,victim,TO_NOTVICT);
      do_flee( victim, "" );
      return;
    }

  return;

}

*/