public bool DoMagicResist(Mobile from) { double currentMagicResist = from.GetSpecialAbilityEntryValue(SpecialAbilityEffect.MagicResist); if (currentMagicResist < MagicResist) { from.FixedParticles(0x375A, 9, 40, 5027, 2500, 0, EffectLayer.Waist); from.PlaySound(0x20F); //0x3BD from.AddSpecialAbilityEffectEntry(new SpecialAbilityEffectEntry(SpecialAbilityEffect.MagicResist, from, MagicResist, DateTime.UtcNow + Duration)); double playerVsPlayerMagicResist = MagicResist * .5; if (from.Skills[SkillName.MagicResist].Value < playerVsPlayerMagicResist) { from.SendMessage("Your magical resistance has increased by " + MagicResist.ToString() + " and is now set to " + playerVsPlayerMagicResist.ToString() + " against other players."); } else { from.SendMessage("Your magical resistance has increased by " + MagicResist.ToString() + "."); } return(true); } from.SendLocalizedMessage(502173); // You are already under a similar effect. return(false); }