/* Vicegrip - Players can't be disarmed */
/* Forgive me if there is bad formating */
/* I tossed this together in notepad    */
/* Stick the following code in magic2.h */
/* And change the IS_AFFECTED2 to the   */
/* old IS_AFFECTED if you don't have the*/
/* extended AFF2 flags on your mud      */
/* Version 1                            */


/* By Luke of Secret Destroyer MUD */
void spell_vicegrip(int sn, int level, CHAR_DATA *ch, void *vo, int target)
{

CHAR_DATA *victim = (CHAR_DATA *) vo;
AFFECT_DATA af;

if (victim != ch)
{
send_to_char("You may only cast this on yourself.\n\r", ch);
return;
}

if (IS_AFFECTED2(victim, sn))
{
if (victim == ch)
send_to_char("You already have a vicegrip on your weapon.\n\r",
ch);
else
act("$N already has a vicegrip on their weapon.",ch, NULL, victim,
TO_CHAR);
return;
}

af.where  = TO_AFFECTS2;
af.type = sn;
af.level     = level;
af.duration  = 20;
af.location  = APPLY_AC; /* Change this to whatever. */
af.modifier  = -5;
af.bitvector = AFF_VICEGRIP;

affect_to_char(victim, &af);
act("$n's hands grip their weapon with an iron hold.",victim, NULL,NULL,
TO_ROOM);
send_to_char("You hold on to your weapon with all your
might.\n\r",victim);
return;
}



Okay, After that, stick this somewhere logical in fight.c in do_disarm.

/* No disarmy when the victim has vicegrip, silly! - Luke */
if (IS_AFFECTED2(victim, AFF_VICEGRIP))
{
send_to_char ("Your opponent has an iron grip on their weapon! You
have no chance!\n\r", ch);
return;
}


Then, stick this in merc.h in your #define aff's.

#define AFF_VICEGRIP    (C)

Then define the vicegrip spell in magic.h and put an entry for it
in const.c and you're good to go!