Okay, so I've done it again. I've noticed I've had a few downloads for the
Immortal spellup command. Very cool. Now, I've turned it into something new
and it has it's own independent file because of the size. I'm sure there's
a better way to do this, and maybe even compress this, which I may do in the
future. But either way, I always try to outdo myself. :) And I've tried to
explain this in as much detail as possible. All I ask is that you leave the
header for the spellup.c file in there. Thanks!

Changes Included in Version 2:
- Spellup TYPES. Yay!
- Calls to the affect type changed. Now they're based on skill_lookup. More
  stable.
- Removed the spell = spell_blahblah; call. It was pointless with the skill_lookup.
- Jailed characters don't receive a spellup, OR a notification that spellup was done.
  Remove this if check and brackets if you don't have the spellup function.
- Mob versions of the spells. Can't be used by players, and mobs can't use any player
  argument OTHER than "all" (Otherwise they can ONLY use their designated arguments
  for players. This was designed on my MUD for certain newbie spellup level ranges)

***********************************************************************************
NOTES: This does not work in stock ROM. It is a higly modified code, and there
are things in here such as a PLR_JAILED flag for the jail system (room flags
we completely buggy and caused wierd things to happen.), in which the jailed
player does not receive spellups. I've commented out EVERYTHING that is not
stock ROM. On another note, this DOES require shieldspells (flameshield,
staticshield, forceshield) to have all of the arguments. I'm not commenting
that out. Sorry. Go to http://www.mudbytes.net/file-2135
and download the snippet and install it if you don't have it.
This does a LOT of different things, and has a lot of comments. Both for
your benefit, and as a reminder to myself because I'm not perfect either.
What does it do? It spells up a player, and if you are an immortal, sends
a custom message to the player receiving the spellup, and the immortal doing
the spellup. If the spellup type is not ALL, then it tells the TYPE of spellup
as well. Players cannot do MOB spellups however (these are for mob triggers).
If you don't have OLC for mob triggers, more power to  you, but these are originally
designed for the mpedit trigger. There is also a true sight snippet I've posted
which is at http://www.mudbytes.net/file-2901
This is a spell which allows pretty much ALL detects (invis, magic, good, evil, dark vision)
to be cast on the player at once in one handy spell (It's in detections in my MUD).
If you don't wish to install this snippet, leave the spell commented out.
***********************************************************************************
Also, if  you have OLC, I've included instructions on how to allow the mobs to use
this command as well. And if the mob is ABOVE the max level, the spell will be no higher
than the max level.

First off, to get mobs to be able to use it, open mob_cmds.c and add:
#include "interp.h"

to the includes under the line saying #include "mob_cmds.h" and now you can make mobs
use commands that are in interp.h (as long as they aren't player only things like AFK
which won't work).
Next, search for: {   "transfer",     do_mptransfer   },
And above it add:
    {   "spellup",      do_spellup      },
------------------- End mob_cmds.c ------------------------------------------------
Now the mob can use the spellup command in mobprogs by using mob spellup $n <type>
-----------------------------------------------------------------------------------

Now for the makefile, add "spellup.o" (without quotes) to the end of your .o file calls.

In interp.c:
Search for: do_slay,
And below that line add this one:
    {"spellup",         do_spellup,         POS_DEAD, IM, LOG_NORMAL, 0},

Changing the level to your liking. Mine is immortal level for my newb helpers.
------------------End interp.c   -----------------
Open interp.h:
Find: do_spells
And below that line add:
DECLARE_DO_FUN( do_spellup          );
(Or if you are using my "Shorten declares and clean" snippet at http://www.mudbytes.net/file-2904
use DF instead of DECLARE_DO_FUN)
------------------- End interp.h--------------------------------

NOTE: If you already have the OLD spellup snippet installed, you simply need to remove
void do_spellup function from magic.c, add the mobprog stuff, then just simply add the makefile
call for the spellup.c file, make the spellup.c file from the text below, and make
clean, then run. This should all work fine. 0.0
Any problems, message me on mudbytes.net

This is all! REMEMBER to use the text below to make the spellup.c file!
--Koqlb of Subversive Visions MUD
WEB: http://subversive.themudhost.net
MUD: subversive.themudhost.net 7500
"Try not to become a man of success, but rather try to become a man of value."
~Albert Einstein
++++++++++++++++++++++++ The text below is the actual spellup.c file *******************
/*************************************************************************
 *  Spellup command originally written by Koqlb for Subversive Visions	 *
 * as an mprog, and now it is a full blown command to reduce player spam.*
 * MUD 2006. Re-written in 2014, and re-written again in 2015.		 *
 * Spellup v2.0 now re-written by Koqlb to have more			 *
 * options. Now, you can choose "categories" of what 			 *
 * spells you want. Provided you have them installed, 			 *
 * You can choose the following based on spell "type".			 *
 * Since this is an Immortal spellup, it also restores the player.	 *
 * Also, since we have a spellup mprog that is level based, there are    *
 * arguments for the mob to use for certain levels.                      *
 * If you don't want them, comment them out.				 *
 * dispel:  completely removes all spells affects.		         *
 * defense: armor, shield, stone skin, protects (evil & good), sanctuary *
 * shields: flame shield, force shield, static shield			 *
 * battle:  haste, pass door, frenzy, bless, flameshield, giant strength *
 *          bless, frenzy						 *
 * enhance: flying, haste, giant strength, sanctuary, pass door, invis,	 *
 *	    true sight, force shield					 *
 * all:     all support spells that are on the MUD for the player.	 *
 *									 *
 * For the Mobs - Used on individual players only.			 *
 * They don't get a restore.						 *
 * fornoobs: Levels 1-10 get a complete spellup. 			 *
 * 10to20:   Levels 10-20, armor, shield, protects, sanc, bless/frenzy   *
 * 20to30:   Levels 20-30, armor, shield, sanctuary			 *
 * over30:   No spellup. Instead, send a message. 			 *
 * Subversive Visions MUD (c) 2007, 2018, 2014				 *
 * http://subversive.themudhost.net port 7500				 *
 *************************************************************************/
#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 "interp.h"
#include "magic.h"
#include "recycle.h"

void do_spellup(CHAR_DATA * ch, char *argument)
{
    CHAR_DATA *victim;
    DESCRIPTOR_DATA *d;
    char arg1[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    char buf[MAX_INPUT_LENGTH];
    SPELL_FUN *spell;
    bool found = FALSE;
    AFFECT_DATA af;
    int level;
    argument = one_argument( argument, arg1);
    argument = one_argument( argument, arg2 );

/* Makes the spell level the imm's or mob's level that is using
 * the command. No higher than MAX_LEVEL, even if mobs level is higher.
 */
   if (IS_NPC(ch))
   {
    ch->name = ch->short_descr;
   }

   if (ch->level <= MAX_LEVEL)
   {
    level = (ch->level); 
    }
   else
   {
    level = (MAX_LEVEL);
   }

    if ( arg1[0] == '\0' || arg2[0] =='\0' )
    {
        send_to_char( "{CSyntax: {Yspellup <char> <type>{x\n\r"
                      "{Y        spellup all  <type>{x\n\r"
                      "{CTypes:  {Ydispel{x, {Ydefense{x, {Yshields{x,\n\r"
                      "{x         {Ybattle{x, {Yenhance{x, or {Yall{x\n\r", ch );
        return;
    }
/* If invalid spellup type used, display syntax again */
   if ((!IS_NPC(ch))
      && (!is_exact_name (arg2, "dispel defense shields battle enhance all fornoobs")))
   {
   send_to_char("That is not a valid spellup type.{x\n\r", ch);
   do_function(ch, &do_spellup, "");
   return;
   }
  if ((IS_NPC(ch))
      && (is_exact_name (arg1, "all")))
    {
      return;
    }
 /* mobs can only use these three types. */
  if ((IS_NPC(ch))
     && (!is_exact_name (arg2, "all 10to20 20to30")))
     {
      return;
      }

/* Change the MAX_LEVEL - <num> to your liking.  */
    if ( get_trust( ch ) >= LEVEL_IMMORTAL && !str_cmp( arg1, "all" ) )
    {
        for ( d = descriptor_list; d != NULL; d = d->next )
        {
            victim = d->character;
/* With "all", you don't get spelled up and neither do other immortals. */
            if ( victim == NULL || IS_NPC(victim) || victim == ch || IS_IMMORTAL(victim))
	    continue;

if (!IS_SET(victim ->plr2, PLR2_JAILED))
{
/* Dispel */
   if (!str_cmp( arg2, "dispel"))
   {
    while (victim->affected)
        affect_remove (victim, victim->affected);
        STR_COPY_STR( victim->affected_by, race_table[victim->race].aff, AFF_FLAGS );
/*Remove actual AFF bits. Since above STILL DOESN'T take EVERYTHING OFF*/
	STR_REMOVE_BIT(victim->affected_by, AFF_INVISIBLE);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_INVIS);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_MAGIC);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_HIDDEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SANCTUARY);
	STR_REMOVE_BIT(victim->affected_by, AFF_FAERIE_FIRE);
	STR_REMOVE_BIT(victim->affected_by, AFF_INFRARED);
	STR_REMOVE_BIT(victim->affected_by, AFF_CURSE);
	STR_REMOVE_BIT(victim->affected_by, AFF_POISON);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLEEP);
	STR_REMOVE_BIT(victim->affected_by, AFF_CHARM);
	STR_REMOVE_BIT(victim->affected_by, AFF_FLYING);
	STR_REMOVE_BIT(victim->affected_by, AFF_PASS_DOOR);
	STR_REMOVE_BIT(victim->affected_by, AFF_HASTE);
	STR_REMOVE_BIT(victim->affected_by, AFF_CALM);
	STR_REMOVE_BIT(victim->affected_by, AFF_PLAGUE);
	STR_REMOVE_BIT(victim->affected_by, AFF_WEAKEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DARK_VISION);
	STR_REMOVE_BIT(victim->affected_by, AFF_BERSERK);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLOW);
	STR_REMOVE_BIT(victim->affected_by, AFF_TRUE_SIGHT);
        STR_REMOVE_BIT(victim->affected_by, AFF_FLAME_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_STATIC_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_FORCE_SHIELD);
/*Restore victim */
            affect_strip (victim, gsn_plague);
            affect_strip (victim, gsn_poison);
            affect_strip (victim, gsn_blindness);
            affect_strip (victim, gsn_sleep);
            affect_strip (victim, gsn_curse);
	/* Heal player*/
            victim->hit = victim->max_hit;
            victim->mana = victim->max_mana;
            victim->move = victim->max_move;
            update_pos (victim);

/* User is now not affected by ANYTHING and is restored.
 * Send messages. --Koqlb*/

   act( "{c$n exclaims '{CDispelitas!!!{c'{x", ch, NULL, victim, TO_VICT );
   }  /*End dispel */

 else
      while (victim->affected)
        affect_remove (victim, victim->affected);
        STR_COPY_STR( victim->affected_by, race_table[victim->race].aff, AFF_FLAGS );
/*Remove actual AFF bits. Since above STILL DOESN'T take EVERYTHING OFF*/
	STR_REMOVE_BIT(victim->affected_by, AFF_INVISIBLE);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_INVIS);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_MAGIC);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_HIDDEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SANCTUARY);
	STR_REMOVE_BIT(victim->affected_by, AFF_FAERIE_FIRE);
	STR_REMOVE_BIT(victim->affected_by, AFF_INFRARED);
	STR_REMOVE_BIT(victim->affected_by, AFF_CURSE);
	STR_REMOVE_BIT(victim->affected_by, AFF_POISON);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLEEP);
	STR_REMOVE_BIT(victim->affected_by, AFF_CHARM);
	STR_REMOVE_BIT(victim->affected_by, AFF_FLYING);
	STR_REMOVE_BIT(victim->affected_by, AFF_PASS_DOOR);
	STR_REMOVE_BIT(victim->affected_by, AFF_HASTE);
	STR_REMOVE_BIT(victim->affected_by, AFF_CALM);
	STR_REMOVE_BIT(victim->affected_by, AFF_PLAGUE);
	STR_REMOVE_BIT(victim->affected_by, AFF_WEAKEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DARK_VISION);
	STR_REMOVE_BIT(victim->affected_by, AFF_BERSERK);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLOW);
	STR_REMOVE_BIT(victim->affected_by, AFF_TRUE_SIGHT);
        STR_REMOVE_BIT(victim->affected_by, AFF_FLAME_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_STATIC_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_FORCE_SHIELD);
/*Restore victim */
            affect_strip (victim, gsn_plague);
            affect_strip (victim, gsn_poison);
            affect_strip (victim, gsn_blindness);
            affect_strip (victim, gsn_sleep);
            affect_strip (victim, gsn_curse);
	/* Heal player*/
            victim->hit = victim->max_hit;
            victim->mana = victim->max_mana;
            victim->move = victim->max_move;
            update_pos (victim);

/* Defensive */
   if (!str_cmp( arg2, "defense"))
   {
/* Here we go. Bring on the spells! Using stock spells*/
            spell = spell_sanctuary;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 6;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
}

            spell = spell_armor;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "armor" );
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
}

      spell = spell_stone_skin;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup("stone skin");
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -40;
    af.bitvector = 0;
    affect_to_char (victim, &af);
}

            spell = spell_protection_evil;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection evil" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_EVIL;
    affect_to_char (victim, &af);
}

	    spell = spell_protection_good;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection good" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_GOOD;
    affect_to_char (victim, &af);
}

            spell = spell_shield;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = 8 + level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

   act( "{c$n exclaims '{CSpellicus Defensivus!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You feel much more protected!\n\r",victim);
   }  /* End defense spells */

/*Shields only */
if (!str_cmp( arg2, "shields"))
   {
            spell = spell_shield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

      	    spell = spell_forceshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "force shield" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_AC;
    af.modifier = (level / 5) * -1;
    af.bitvector = AFF_FORCE_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_staticshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "static shield" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_AC;
    af.modifier = (level / 4) * -1;
    af.bitvector = AFF_STATIC_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_flameshield;

  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "flame shield" );
    af.level = level;
    af.duration = (level / 4);
    af.location = APPLY_AC;
    af.modifier = (level / 2) * -1;
    af.bitvector = AFF_FLAME_SHIELD;
    affect_to_char (victim, &af);
  }

   act( "{c$n says '{CWe will protect you...{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("A {cd{Ci{Wvi{Cn{ce{x force field protects you.\n\r",victim);
   }  /*End shield spells */

/* Battle */
   if (!str_cmp( arg2, "battle"))
   {
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_bless;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "bless" );
    af.level = level;
    af.duration = 6 + level;
    af.location = APPLY_HITROLL;
    af.modifier = level / 8;
    af.bitvector = 0;
    affect_to_char (victim, &af);

    af.location = APPLY_SAVING_SPELL;
    af.modifier = 0 - level / 8;
    affect_to_char (victim, &af);
  }
            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

      	    spell = spell_flameshield;

  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "flame shield" );
    af.level = level;
    af.duration = (level / 4);
    af.location = APPLY_AC;
    af.modifier = (level / 2) * -1;
    af.bitvector = AFF_FLAME_SHIELD;
    affect_to_char (victim, &af);
  }

   act( "{c$n exclaims '{CBe strong and FIGHT!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("Your {Rb{rloo{Rd{x BoiLs!\n\r",victim);
   }  /*End battle spells */
/* Enhace */
if (!str_cmp( arg2, "enhance"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }

            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }
            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
            spell = spell_bless;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "bless" );
    af.level = level;
    af.duration = 6 + level;
    af.location = APPLY_HITROLL;
    af.modifier = level / 8;
    af.bitvector = 0;
    affect_to_char (victim, &af);

    af.location = APPLY_SAVING_SPELL;
    af.modifier = 0 - level / 8;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }

            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

      	    spell = spell_forceshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "force shield" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_AC;
    af.modifier = (level / 5) * -1;
    af.bitvector = AFF_FORCE_SHIELD;
    affect_to_char (victim, &af);
  }

    spell = spell_invis;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "invisibility");
    af.level = level;
    af.duration = level + 12;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_INVISIBLE;
    affect_to_char (victim, &af);
}

   act( "{c$n exclaims '{CManipulus!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You suddenly feel faster, stronger, and translucent!\n\r",victim);
   }  /*End enhance spells */

   if (!str_cmp( arg2, "all"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }
            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
}
            spell = spell_armor;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("armor");
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

      spell = spell_stone_skin;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("stone skin");;
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -40;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_bless;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "bless" );
    af.level = level;
    af.duration = 6 + level;
    af.location = APPLY_HITROLL;
    af.modifier = level / 8;
    af.bitvector = 0;
    affect_to_char (victim, &af);

    af.location = APPLY_SAVING_SPELL;
    af.modifier = 0 - level / 8;
    affect_to_char (victim, &af);
  }

            spell = spell_protection_evil;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection evil" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_EVIL;
    affect_to_char (victim, &af);
  }

	    spell = spell_protection_good;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection good" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_GOOD;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }

            spell = spell_shield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

      	    spell = spell_forceshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "force shield" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_AC;
    af.modifier = (level / 5) * -1;
    af.bitvector = AFF_FORCE_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_staticshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "static shield" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_AC;
    af.modifier = (level / 4) * -1;
    af.bitvector = AFF_STATIC_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_flameshield;

  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "flame shield" );
    af.level = level;
    af.duration = (level / 4);
    af.location = APPLY_AC;
    af.modifier = (level / 2) * -1;
    af.bitvector = AFF_FLAME_SHIELD;
    affect_to_char (victim, &af);
  }

   act( "{c$n exclaims '{CSpellicus MAXIMUS!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You feel a RUSH of power surge through you!\n\r",victim);
   }  /*End all spells */
  }/* End if not jailed */
/* End arguments send chars the message*/
    if (!str_cmp( arg2, "all"))
   {
   if (!IS_SET(victim->plr2, PLR2_JAILED))
   {
   send_to_char( "{WYou've been given a full spellup!{x\n\r", victim);
   }
   send_to_char("All mortals given a full spellup.\n\r", ch);  
   }
   else if (!str_cmp( arg2, "dispel"))
   {
   if (!IS_SET(victim->plr2, PLR2_JAILED))
   {
   send_to_char("You have been fully dispelled and healed!", victim);
   }
   send_to_char("All mortals have been dispelled.\n\r",ch);
   }
  else
   {
   if (!IS_SET(victim->plr2, PLR2_JAILED))
   {
   sprintf(buf, "{WYou've been given a %s spellup!{x\n\r", arg2);
   }
   send_to_char(buf, victim);
   sprintf(buf, "All mortals given a {G%s{x spellup.\n\r", arg2);
   send_to_char(buf,ch);
   }
 
        return;
     }
   }/* end if all players*/


/* Now for if you choose an individual character to spellup by name */
    if ( ( victim = get_char_world( ch, arg1 ) ) == NULL )
    {
        send_to_char( "No such player on right now.\n\r", ch );
        return;
    }
   else if (IS_SET(victim->plr2, PLR2_JAILED))
    {
	send_to_char( "That player can't be spelled up. They're in jail.\n\r", ch);
	return;
    }
else
/* Dispel */
   if (!str_cmp( arg2, "dispel"))
   {
    while (victim->affected)
        affect_remove (victim, victim->affected);
        STR_COPY_STR( victim->affected_by, race_table[victim->race].aff, AFF_FLAGS );
/*Remove actual AFF bits. Since above STILL DOESN'T take EVERYTHING OFF*/
	STR_REMOVE_BIT(victim->affected_by, AFF_INVISIBLE);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_INVIS);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_MAGIC);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_HIDDEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SANCTUARY);
	STR_REMOVE_BIT(victim->affected_by, AFF_FAERIE_FIRE);
	STR_REMOVE_BIT(victim->affected_by, AFF_INFRARED);
	STR_REMOVE_BIT(victim->affected_by, AFF_CURSE);
	STR_REMOVE_BIT(victim->affected_by, AFF_POISON);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLEEP);
	STR_REMOVE_BIT(victim->affected_by, AFF_CHARM);
	STR_REMOVE_BIT(victim->affected_by, AFF_FLYING);
	STR_REMOVE_BIT(victim->affected_by, AFF_PASS_DOOR);
	STR_REMOVE_BIT(victim->affected_by, AFF_HASTE);
	STR_REMOVE_BIT(victim->affected_by, AFF_CALM);
	STR_REMOVE_BIT(victim->affected_by, AFF_PLAGUE);
	STR_REMOVE_BIT(victim->affected_by, AFF_WEAKEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DARK_VISION);
	STR_REMOVE_BIT(victim->affected_by, AFF_BERSERK);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLOW);
	STR_REMOVE_BIT(victim->affected_by, AFF_TRUE_SIGHT);
        STR_REMOVE_BIT(victim->affected_by, AFF_FLAME_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_STATIC_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_FORCE_SHIELD);
/*Restore victim */
            affect_strip (victim, gsn_plague);
            affect_strip (victim, gsn_poison);
            affect_strip (victim, gsn_blindness);
            affect_strip (victim, gsn_sleep);
            affect_strip (victim, gsn_curse);
	/* Heal player*/
            victim->hit = victim->max_hit;
            victim->mana = victim->max_mana;
            victim->move = victim->max_move;
            update_pos (victim);

/* User is now not affected by ANYTHING and is restored.
 * Send messages. --Koqlb*/

   act( "{cYou hear $n exclaim '{CDispelitas!!!{c' from the heavens.{x", ch, NULL, victim, TO_VICT );
   }  /*End dispel */
/* Now for the other arguments */
 else
      while (victim->affected)
        affect_remove (victim, victim->affected);
        STR_COPY_STR( victim->affected_by, race_table[victim->race].aff, AFF_FLAGS );
/*Remove actual AFF bits. Since above STILL DOESN'T take EVERYTHING OFF*/
	STR_REMOVE_BIT(victim->affected_by, AFF_INVISIBLE);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_INVIS);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_MAGIC);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_HIDDEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DETECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SANCTUARY);
	STR_REMOVE_BIT(victim->affected_by, AFF_FAERIE_FIRE);
	STR_REMOVE_BIT(victim->affected_by, AFF_INFRARED);
	STR_REMOVE_BIT(victim->affected_by, AFF_CURSE);
	STR_REMOVE_BIT(victim->affected_by, AFF_POISON);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_EVIL);
	STR_REMOVE_BIT(victim->affected_by, AFF_PROTECT_GOOD);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLEEP);
	STR_REMOVE_BIT(victim->affected_by, AFF_CHARM);
	STR_REMOVE_BIT(victim->affected_by, AFF_FLYING);
	STR_REMOVE_BIT(victim->affected_by, AFF_PASS_DOOR);
	STR_REMOVE_BIT(victim->affected_by, AFF_HASTE);
	STR_REMOVE_BIT(victim->affected_by, AFF_CALM);
	STR_REMOVE_BIT(victim->affected_by, AFF_PLAGUE);
	STR_REMOVE_BIT(victim->affected_by, AFF_WEAKEN);
	STR_REMOVE_BIT(victim->affected_by, AFF_DARK_VISION);
	STR_REMOVE_BIT(victim->affected_by, AFF_BERSERK);
	STR_REMOVE_BIT(victim->affected_by, AFF_SLOW);
	STR_REMOVE_BIT(victim->affected_by, AFF_TRUE_SIGHT);
        STR_REMOVE_BIT(victim->affected_by, AFF_FLAME_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_STATIC_SHIELD);
	STR_REMOVE_BIT(victim->affected_by, AFF_FORCE_SHIELD);
/*Restore victim */
            affect_strip (victim, gsn_plague);
            affect_strip (victim, gsn_poison);
            affect_strip (victim, gsn_blindness);
            affect_strip (victim, gsn_sleep);
            affect_strip (victim, gsn_curse);
	/* Heal player*/
            victim->hit = victim->max_hit;
            victim->mana = victim->max_mana;
            victim->move = victim->max_move;
            update_pos (victim);

/* Defensive */
   if (!str_cmp( arg2, "defense"))
   {
            spell = spell_sanctuary;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 6;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
}

            spell = spell_armor;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "armor" );
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
}

      spell = spell_stone_skin;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup("stone skin");
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -40;
    af.bitvector = 0;
    affect_to_char (victim, &af);
}

            spell = spell_protection_evil;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection evil" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_EVIL;
    affect_to_char (victim, &af);
}

	    spell = spell_protection_good;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection good" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_GOOD;
    affect_to_char (victim, &af);
}

            spell = spell_shield;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = 8 + level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

   act( "{cYou hear $n exclaim '{CSpellicus Defensivus!!!{c' from the heavens.{x", ch, NULL, victim, TO_VICT );
   send_to_char("You feel much more protected!\n\r",victim);
   }  /* End defense spells */

/*Shields only */
if (!str_cmp( arg2, "shields"))
   {
            spell = spell_shield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

      	    spell = spell_forceshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "force shield" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_AC;
    af.modifier = (level / 5) * -1;
    af.bitvector = AFF_FORCE_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_staticshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "static shield" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_AC;
    af.modifier = (level / 4) * -1;
    af.bitvector = AFF_STATIC_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_flameshield;

  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "flame shield" );
    af.level = level;
    af.duration = (level / 4);
    af.location = APPLY_AC;
    af.modifier = (level / 2) * -1;
    af.bitvector = AFF_FLAME_SHIELD;
    affect_to_char (victim, &af);
  }

   act( "{cYou hear $n exclaim '{CWe will protect you...{c' from the heavens.{x", ch, NULL, victim, TO_VICT );
   send_to_char("A {cd{Ci{Wvi{Cn{ce{x force field protects you.\n\r",victim);
   }  /*End shield spells */

/* Battle */
   if (!str_cmp( arg2, "battle"))
   {
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_bless;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "bless" );
    af.level = level;
    af.duration = 6 + level;
    af.location = APPLY_HITROLL;
    af.modifier = level / 8;
    af.bitvector = 0;
    affect_to_char (victim, &af);

    af.location = APPLY_SAVING_SPELL;
    af.modifier = 0 - level / 8;
    affect_to_char (victim, &af);
  }
            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

      	    spell = spell_flameshield;

  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "flame shield" );
    af.level = level;
    af.duration = (level / 4);
    af.location = APPLY_AC;
    af.modifier = (level / 2) * -1;
    af.bitvector = AFF_FLAME_SHIELD;
    affect_to_char (victim, &af);
  }

   act( "{c$n exclaims '{CBe strong and FIGHT!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("Your {Rb{rloo{Rd{x BoiLs!\n\r",victim);
   }  /*End battle spells */

if (!str_cmp( arg2, "enhance"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }

            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }
            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
            spell = spell_bless;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "bless" );
    af.level = level;
    af.duration = 6 + level;
    af.location = APPLY_HITROLL;
    af.modifier = level / 8;
    af.bitvector = 0;
    affect_to_char (victim, &af);

    af.location = APPLY_SAVING_SPELL;
    af.modifier = 0 - level / 8;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }

            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

      	    spell = spell_forceshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "force shield" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_AC;
    af.modifier = (level / 5) * -1;
    af.bitvector = AFF_FORCE_SHIELD;
    affect_to_char (victim, &af);
  }


    spell = spell_invis;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "invisibility");
    af.level = level;
    af.duration = level + 12;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_INVISIBLE;
    affect_to_char (victim, &af);
}

   act( "{c$n exclaims '{CManipulus!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You suddenly feel faster, stronger, and translucent!\n\r",victim);
   }  /*End enhance spells */

   if (!str_cmp( arg2, "all"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }
            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
{
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
}

            spell = spell_armor;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("armor");
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

      spell = spell_stone_skin;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("stone skin");;
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -40;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_bless;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "bless" );
    af.level = level;
    af.duration = 6 + level;
    af.location = APPLY_HITROLL;
    af.modifier = level / 8;
    af.bitvector = 0;
    affect_to_char (victim, &af);

    af.location = APPLY_SAVING_SPELL;
    af.modifier = 0 - level / 8;
    affect_to_char (victim, &af);
  }

            spell = spell_protection_evil;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection evil" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_EVIL;
    affect_to_char (victim, &af);
  }

	    spell = spell_protection_good;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "protection good" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_SAVING_SPELL;
    af.modifier = -1;
    af.bitvector = AFF_PROTECT_GOOD;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }

            spell = spell_shield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

      	    spell = spell_forceshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "force shield" );
    af.level = level;
    af.duration = level / 2;
    af.location = APPLY_AC;
    af.modifier = (level / 5) * -1;
    af.bitvector = AFF_FORCE_SHIELD;
    affect_to_char (victim, &af);
  }

      	    spell = spell_staticshield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "static shield" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_AC;
    af.modifier = (level / 4) * -1;
    af.bitvector = AFF_STATIC_SHIELD;
    affect_to_char (victim, &af);
  }if (!str_cmp( arg2, "10to20"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }
            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);

            spell = spell_armor;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("armor");
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

      spell = spell_stone_skin;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("stone skin");;
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -40;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }
   act( "{c$n says '{CFree spellup to go!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You see a {Wblinding{x {Ylight{x.\n\r",victim);
   }  /*End 10to20 spells */

      	    spell = spell_flameshield;

  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "flame shield" );
    af.level = level;
    af.duration = (level / 4);
    af.location = APPLY_AC;
    af.modifier = (level / 2) * -1;
    af.bitvector = AFF_FLAME_SHIELD;
    affect_to_char (victim, &af);
  }

   act( "{c$n exclaims '{CSpellicus MAXIMUS!!!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You feel a RUSH of power surge through you!\n\r",victim);
   }  /*End all spells */

/* Following arguments are for mprogs only, which is why they aren't listed, though
 * they are allowed.
 */
if (!str_cmp( arg2, "10to20"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }
            spell = spell_frenzy;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("frenzy");
    af.level = level;
    af.duration = level;
    af.modifier = level / 6;
    af.bitvector = 0;
    af.location = APPLY_HITROLL;
    affect_to_char (victim, &af);
    af.location = APPLY_DAMROLL;
    affect_to_char (victim, &af);
    af.modifier = 10 * (level / 12);
    af.location = APPLY_AC;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
   {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
  }

            spell = spell_armor;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("armor");
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

      spell = spell_stone_skin;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("stone skin");;
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -40;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_haste;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "haste" );
    af.level = level;
    if (victim == ch)
    af.duration = level / 2;
    af.location = APPLY_DEX;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = AFF_HASTE;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }
   act( "{c$n says '{CFree spellup to go!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You see a {Wblinding{x {Ylight{x.\n\r",victim);
   }  /*End 10to20 spells */

if (!str_cmp( arg2, "20to30"))
   {
      	    spell = spell_true_sight;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "true sight" );
    af.level = level;
    af.duration = level;
    af.modifier = 0;
    af.location = APPLY_NONE;
    af.bitvector = AFF_TRUE_SIGHT;
    affect_to_char(victim, &af);
    af.bitvector = AFF_DETECT_MAGIC;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_INVIS;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_HIDDEN;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_GOOD;
    affect_to_char (victim, &af);
    af.bitvector = AFF_DETECT_EVIL;
    affect_to_char (victim, &af);
   }
            spell = spell_giant_strength;  /*changes the spell being called to */
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("giant strength");
    af.level = level;
    af.duration = level;
    af.location = APPLY_STR;
    af.modifier = 1 + (level >= 18) + (level >= 25) + (level >= 32);
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

           spell = spell_fly;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "fly" );
    af.level = level;
    af.duration = level + 3;
    af.location = 0;
    af.modifier = 0;
    af.bitvector = AFF_FLYING;
    affect_to_char (victim, &af);
  }

            spell = spell_sanctuary;
   {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "sanctuary" );
    af.level = level;
    af.duration = level / 3;
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_SANCTUARY;
    affect_to_char (victim, &af);
   }
            spell = spell_shield;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "shield" );
    af.level = level;
    af.duration = level;
    af.location = APPLY_AC;
    af.modifier = -20;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_armor;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup("armor");
    af.level = level;
    af.duration = level;
    af.modifier = -20;
    af.location = APPLY_AC;
    af.bitvector = 0;
    affect_to_char (victim, &af);
  }

            spell = spell_pass_door;
  {
    af.where = TO_AFFECTS;
    af.type = skill_lookup( "pass door" );
    af.level = level;
    af.duration = number_fuzzy (level / 2);
    af.location = APPLY_NONE;
    af.modifier = 0;
    af.bitvector = AFF_PASS_DOOR;
    affect_to_char (victim, &af);
  }

   act( "{c$n says '{CFree spellup to go!{c'{x", ch, NULL, victim, TO_VICT );
   send_to_char("You see a {Wblinding{x {Ylight{x.\n\r",victim);
   }  /*End 20to30 spells */

/*Messages */
    if (!str_cmp( arg2, "all"))
   {
   send_to_char( "{WYou've been given a free full spellup!{x\n\r", victim);
   sprintf(buf, "You have given {C%s{x a full spellup.\n\r",victim->name);
   send_to_char(buf, ch);  
   }
    else if (!str_cmp( arg2, "dispel"))
   {
   send_to_char("You have been fully dispelled and healed!\n\r", victim);
   sprintf(buf, "{C%s{x has been dispelled.\n\r",victim->name);
   send_to_char(buf, ch);  
   }
  else
{
   if (IS_NPC(ch)) /* Different mesg from mob as compared to a player */
  {
      send_to_char("You have received a free spellup!\n\r",victim);
  }  
  else
   {
   sprintf(buf, "{WYou've been given a %s spellup!{x\n\r", arg2);
   send_to_char(buf, victim);
   sprintf(buf, "You have given {C%s{x a {G%s{x spellup.\n\r",victim->name, arg2);
   send_to_char(buf,ch);
   }
 }
    return;
 }

/* End Spellup function AND spellup.c */