This is my Godwars Version of Consecrate, this snippit
is being run on my Mindcloud mud. It will allow all 
weapons to level and be improved with levels. The 
elemental attacks were writen by Hutoshi for Mindcloud
three. This snippit is based off the Sigil code and my
Rom Consecrate Snippit.

The Elemental Attacks in multihit by Hutoshi
The rest by Xrakisis


fight.c
under void group_gain
  OBJ_DATA *wield;
  OBJ_DATA *wield2;
  OBJ_DATA *livingweap;
  int livingweap_exp = 0;
  int livingweap_needed = 0;


in group_gain under gain_exp

        wield = get_eq_char( ch, WEAR_WIELD );
        wield2 = get_eq_char( ch, WEAR_HOLD );

        if (wield != NULL)
        {
        livingweap_needed = (wield->weapon_level * 525000);

              if (wield->weapon_level >= 100) return;
              livingweap_exp = (xp * .1);
              xp -= (livingweap_exp);

              sprintf(buf, "#gYour Weapon receives #7%d #gexperience points.#n\n\r", livingweap_exp);
		  stc(buf, gch);
         
              wield->weapon_currentxp += livingweap_exp;
               
              if (wield->weapon_currentxp >= livingweap_needed )
		  {
              wield->weapon_level++;
              send_to_char("#7Your #Rweapon #7has gained a Level#n\n\r", gch);
		  wield->weapon_currentxp -= livingweap_needed;
		  wield->weapon_points++;
              }
         }

        if (wield2 != NULL)
        {
        livingweap_needed = (wield2->weapon_level * 525000);

              if (wield2->weapon_level >= 100) return;
              livingweap_exp = (xp * .1);
              xp -= (livingweap_exp);

              sprintf(buf, "#gYour Weapon receives #7%d #gexperience points.#n\n\r", livingweap_exp);
		  stc(buf, gch);
         
              wield2->weapon_currentxp += livingweap_exp;
               
              if (wield2->weapon_currentxp >= livingweap_needed )
		  {
              wield2->weapon_level++;
              send_to_char("#7Your #Rweapon #7has gained a Level#n\n\r", gch);
                  wield->weapon_currentxp -= livingweap_needed;
		  wield2->weapon_points++;		
	             }
		}

/* Fight.c Start of Elemental Attacks */
/* Place the below code above Golem Specials in multihit */

        if (wield1 != NULL)
        {
	    if (wield->item_type == ITEM_WEAPON)
	    {
                char      buf1[MAX_STRING_LENGTH];
                char      buf2[MAX_STRING_LENGTH];
                int       dam;
		int	  fire = wield->fire_level;
		int 	  water = wield->water_level;
		int	  electric = wield->lightning_level;
		int	  earth = wield->earth_level;
                
		if (fire > 0)
		{
			dam = (number_range(500,1000) * fire);
			if (!IS_SET(ch->act, PLR_BRIEF2))
			{
                	    sprintf(buf1, "#0Fire from your enflamed weapon strikes out at $N!  #0[#R%d#0]#n", dam);
                	    sprintf(buf2, "#0Fire from $n's enflamed weapon strikes you!  #0[#R%d#0]#n",dam);
                     	    act(buf1, ch, NULL, victim, TO_CHAR);
                	    act(buf2, ch, NULL, victim, TO_VICT);
			}
                	hurt_person(ch, victim, dam);
		}
                if (water > 0)
                {
                    dam = (number_range(500,1000) * water);
                    if (!IS_SET(ch->act, PLR_BRIEF2))
                    {
                    	sprintf(buf1, "#0Ice from your frozen weapon strikes out at $N!  #0[#R%d#0]#n", dam);
                    	sprintf(buf2, "#0Ice from $n's frozen weapon strikes you!  #0[#R%d#0]#n", dam);
                    	act(buf1, ch, NULL, victim, TO_CHAR);
                    	act(buf2, ch, NULL, victim, TO_VICT);
		    }
                    hurt_person(ch, victim, dam);
                }
                if (electric > 0)
                {
                    dam = (number_range(500,1000) * electric);
                    if (!IS_SET(ch->act, PLR_BRIEF2))
                    {
                    	sprintf(buf1,
                        "#0Lightning from your electric weapon strikes out at $N!  #0[#R%d#0]#n",
                        dam);
                    	sprintf(buf2,
                        "#0Lightning from $n's electric weapon strikes you!  #0[#R%d#0]#n",
                        dam);
                    	act(buf1, ch, NULL, victim, TO_CHAR);
                    	act(buf2, ch, NULL, victim, TO_VICT);
		    }
                    hurt_person(ch, victim, dam);
                }
                if (earth > 0)
                {
                    dam = (number_range(500,1000) * earth);
                    if (!IS_SET(ch->act, PLR_BRIEF2))
                    {

	                sprintf(buf1,
	                "#0Stones from your earthly weapon strikes out at $N!  #0[#R%d#0]#n",
			dam);
                    	sprintf(buf2,
                        "#0Stones from $n's earthly weapon strikes you!  #0[#R%d#0]#n",
                        dam);
			act(buf1, ch, NULL, victim, TO_CHAR);
                    	act(buf2, ch, NULL, victim, TO_VICT);
 		    }
                    hurt_person(ch, victim, dam);
                }
	    }
}       


/* End of Elemental Attack code */

/* place the below code in do_decapitate */
/* decap soul code untested, should work though */

  OBJ_DATA *wield;

	wield = get_eq_char( ch, WEAR_WIELD );

	if (wield != NULL)
	{
	wield->soul_level++;
	wield->value[1] += 2;
	wield->value[2] += 2;
	}
	

interp.c:    { "consecrate",        do_consecrate,       POS_DEAD,       0,  LOG_NORMAL, 0,0,0  },
interp.h:DECLARE_DO_FUN( do_consecrate  );


void do_consecrate(CHAR_DATA *ch, char *argument)
{
	OBJ_DATA *obj;
	char arg1[MAX_INPUT_LENGTH];
	char arg2[MAX_INPUT_LENGTH];
	char buf[MAX_STRING_LENGTH];
	int livingweap_needed = 0;

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

	if (arg1[0] == '\0')
	{
	send_to_char("Which item do you wish to consecrate?\n\r", ch);
	return;
	}
	if ( (obj = get_obj_carry(ch, arg1, ch)) == NULL)
	{
	send_to_char("You are not carrying that item.\n\r", ch);
	return;
	}
	if (obj->item_type != ITEM_WEAPON)
	{
	send_to_char("You may only Consecrate weapons.\n\r",ch);
	return;
	}
      else if (obj->item_type == ITEM_WEAPON)
	{
	sprintf( buf, "Weapon Name: %s \n\r", obj->short_descr );
	send_to_char( buf, ch );
      sprintf(buf, "Weapon is of type %s.\n\r", flag_string(weapon_flags, obj->value[3]));
	send_to_char( buf, ch );
	sprintf( buf, "Weapon Damage Min: %d  Max: %d \n\r", obj->value[1], obj->value[2] );
	send_to_char( buf, ch );
	sprintf( buf, "Weapon Level: %d, Weapon Points: %d \n\r", obj->weapon_level, obj->weapon_points);
	send_to_char( buf, ch );
	livingweap_needed = (obj->weapon_level * 100);
	sprintf( buf, "Weapon Experiance: %d, EXP til next Level: %d \n\r", obj->weapon_currentxp, 
	(livingweap_needed - obj->weapon_currentxp));
	send_to_char( buf, ch );
	sprintf( buf, "Earth Level: %d \n\r", obj->earth_level );
	send_to_char( buf, ch );
	sprintf( buf, "Lightning Level: %d \n\r", obj->lightning_level );
	send_to_char( buf, ch );
	sprintf( buf, "Fire Level: %d \n\r", obj->fire_level );
	send_to_char( buf, ch );
	sprintf( buf, "Water Level: %d \n\r", obj->water_level );
	send_to_char( buf, ch );
	sprintf( buf, "Souls obtained With %s: %d \n\r",obj->short_descr, obj->soul_level );
	send_to_char( buf, ch );
	send_to_char("Cost of Advancing weapon: 10 Weapon Points\n\r",ch);
	send_to_char("Cost of Min Damage Increase: 1 Cost of Max Damage Increase: 1 \n\r"ch);
	}
	
	if (!str_cmp(arg2,"earth"))
	{
		if (obj->weapon_points < 10)
		{
		send_to_char("You dont have enough weapon points.\n\r",ch);
		return;
		}
		else
		{
		sprintf(buf,"%s earth raised by one.\n\r",obj->short_descr);
		send_to_char(buf,ch);
		obj->earth_level++;
		obj->weapon_points -= 10;
		return;
		}
	}
	if (!str_cmp(arg2,"lightning"))
	{
		if (obj->weapon_points < 10)
		{
		send_to_char("You dont have enough weapon points.\n\r",ch);
		return;
		}
		else
		{
		sprintf(buf,"%s lightning raised by one.\n\r",obj->short_descr);
		send_to_char(buf,ch);
		obj->lightning_level++;
		obj->weapon_points -= 10;
		return;
		}
	}
	if (!str_cmp(arg2,"fire"))
	{
		if (obj->weapon_points < 10)
		{
		send_to_char("You dont have enough weapon points.\n\r",ch);
		return;
		}
		else
		{
		sprintf(buf,"%s fire raised by one.\n\r",obj->short_descr);
		send_to_char(buf,ch);
		obj->fire_level++;
		obj->weapon_points -= 10;
		return;
		}
	}
	if (!str_cmp(arg2,"water"))
	{
		if (obj->weapon_points < 10)
		{
		send_to_char("You dont have enough weapon points.\n\r",ch);
		return;
		}
		else
		{
		sprintf(buf,"%s water raised by one.\n\r",obj->short_descr);
		send_to_char(buf,ch);
		obj->water_level++;
		obj->weapon_points -= 10;
		return;
		}
	}
	if (!str_cmp(arg2,"min"))
	{
		if (obj->weapon_points < 5)
		{
		send_to_char("You dont have enough weapon points.\n\r",ch);
		return;
		}
		else
		{
		sprintf(buf,"%s Min Damage increases!\n\r",obj->short_descr);
		send_to_char(buf,ch);
		obj->value[1]++;
		obj->weapon_points -= 1;
		return;
		}
	}
	if (!str_cmp(arg2,"max"))
	{
		if (obj->weapon_points < 1)
		{
		send_to_char("You dont have enough weapon points.\n\r",ch);
		return;
		}
		else
		{
		sprintf(buf,"%s's Max Damage increases!\n\r",obj->short_descr);
		send_to_char(buf,ch);
		obj->value[2]++;
		obj->weapon_points -= 1;
		return;
		}
	}

}	


save.c
fwrite_obj

    fprintf( fp, "WeaponCurrentXP %d\n", obj->weapon_currentxp		);
    fprintf( fp, "WeaponLevel  %d\n",   obj->weapon_level	     );
    fprintf( fp, "WeaponPoints %d\n",   obj->weapon_points           );
    fprintf(fp, "FireLvL      %d\n", obj->fire_level);
    fprintf(fp, "WaterLvL     %d\n", obj->water_level);
    fprintf(fp, "LightningLvL %d\n", obj->lightning_level);
    fprintf(fp, "EarthLvL     %d\n", obj->earth_level);
    fprintf(fp, "SoulLvL      %d\n", obj->soul_level);

fread_obj

    obj->fire_level     = 0;
    obj->water_level    = 0;
    obj->lightning_level = 0;
    obj->earth_level    = 0;
    obj->soul_level     = 0;
    obj->weapon_level   = 0;
    obj->weapon_points  = 0;


	    KEY( "EarthLvL",    obj->earth_level,       fread_number( fp ) );
	    KEY( "FireLvL",     obj->fire_level,        fread_number( fp ) );
          KEY( "LightningLvL",obj->lightning_level,   fread_number(fp));
          KEY( "SoulLvL",     obj->soul_level,        fread_number(fp));
          KEY( "WaterLvL",    obj->water_level,       fread_number(fp));
  	    KEY( "WeaponCurrentXP", obj->weapon_currentxp, fread_number( fp ) );
          KEY( "WeaponLevel", obj->weapon_level,      fread_number( fp ) );
          KEY( "WeaponPoints",obj->weapon_points,     fread_number( fp ) );


merc.h
obj_data
    int         fire_level;
    int         water_level;
    int         lightning_level;
    int         earth_level;
    int         soul_level;
    int         weapon_level;
    int         weapon_points;
    int		weapon_currentxp;