比如DF和Despise禁止PvP,修改脚本为:
\Scripts\Misc\Notoriety.cs
public static bool Mobile_AllowHarmful( Mobile from, Mobile target ) if( from.Player && ( from.Region.IsPartOf( "Doom Gauntlet" ) ) && target.Player ) if( from.Player && ( from.Region.Name == "Despise" ) && target.Player ) Map map = from.Map; if( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 ) if( !from.Player && !(from is BaseCreature && (((BaseCreature)from).Controlled || ((BaseCreature)from).Summoned)) ) return true; // Uncontrolled NPCs are only restricted by the young system Guild fromGuild = GetGuildFor( from.Guild as Guild, from ); if( fromGuild != null && targetGuild != null && (fromGuild == targetGuild || fromGuild.IsAlly( targetGuild ) || fromGuild.IsEnemy( targetGuild )) ) if( target is BaseCreature && (((BaseCreature)target).Controlled || (((BaseCreature)target).Summoned && from != ((BaseCreature)target).SummonMaster)) ) if( target.Player ) if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) ) return true; |