RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

XmlPoints

sUpplier1

Wanderer
I tested these Challenge games with my players, first of all I was impressed by it. Arte you're still surprising me with such great work.

For the testing I didn't give acess lmschallenge & deathmatch commands to players.
The main problem that players aren't organised and they're killing each other before/or after the competitions.
I have some suggestions:
After execution the challenge command region should have AllowHarmful/OnDamage properties returning false.
The same thing should be after 1-2 minutes after competition end.
This will prevent some fighting and looting before/after competition.
When competition will start properties should be "normal"

But there's another problem - if players can run the command they will be able to make such regions in wrong places, such as dungeon and etc.
My suggestion to make some constant-fixed places/regions where players can ran competitions.

Also I found one small gump bug - it's seems to me that down scrolling arrow doesn't work on players gump that initiates the game. At least at LMS game.
 

ArteGordon

Wanderer
thanks for the suggestions. I really only get the chance to test them on my smaller user base of (reasonably) well-behaved friends, so getting real field-testing feedback is very helpful.

I like the idea of a delay following initiation of the match. I'm thinking of an explicit countdown that all of the participants could see.

As far as being able to limit the use of the commands, I personally like the idea of being able to hold the matches anywhere, but I can see how many might want to limit this. I can add in a region test that allows you to limit it to use in specific regions. Good idea.

The issue you mentioned about uncontrolled fighting I'm guessing involves matches between players that could fight with each other even outside of the match if they wanted to (like opposing guilds).

I like the idea of having a safe-zone, and I can see it working well following a match. I have to think about how to handle this prior to a match due to the potential for exploits (starting a challenge in the middle of a fight to protect yourself for example). Maybe coupling it with the regional control.

I'll check on the scrolling bug.

Thanks again for the feedback.
 

sUpplier1

Wanderer
I'm running shard with more PvP fights (no murder restrictions, low MurderCount time, kills in trammel and etc.).
Uncontrolled fighting isn't issue it's a feature of the current system :) I used RegionControl to control players.

In my opinion It should look like this:
There're Several Pre-defied regions with some names, any player can start the competition in this region. When he starts the competition, there're some announces like "xxxx competition is in xxxxx place" and region became AllowHarmful - false.
 

ArteGordon

Wanderer
yep, thats just how I'm putting it in. I have a region stone that will define a "Challenge game" region that will have AllowHarmful set to false when a challenge game is started in it. I also have a flag in the games themselves allowing you to restrict them so that they can only be started in those regions if that's how you want it.

You can setup as many of the challenge game region stones as you want. I like the naming and announcement idea.
 

Lumberman

Wanderer
Hello ArteGordon,
you make very fine scripts :)

But the last XMLpoints 1.10 cant play with XMLSPAWNER 2.67 at my shard. There are this errors at compile time:

- Error: Scripts\custom\DeathmatchGauntlet.cs: CS0117: (line 320, column 50) 'Server.Engines.XmlSpawner2.XmlAttach' enth„lt keine Definition fr 'FindAttachment'
- Error: Scripts\custom\DeathmatchGauntlet.cs: CS0117: (line 750, column 42) 'Server.Engines.XmlSpawner2.XmlAttach' enth„lt keine Definition fr 'FindAttachment'
- Error: Scripts\custom\DeathmatchGump.cs: CS0117: (line 302, column 42) 'Server.Engines.XmlSpawner2.XmlAttach' enth„lt keine Definition fr 'FindAttachment'
- Error: Scripts\custom\DeathmatchGump.cs: CS0117: (line 461, column 54) 'Server.Engines.XmlSpawner2.XmlAttach' enth„lt keine Definition

The s is at the end missing...

I haven't try this with your newest XMLSPAWNER at this time. I have used my backup.

Can I used your actual XMLSPAWNER without compile errors?

Many Thanks! Your scripts are greatfull!

Lumberman
 

ArteGordon

Wanderer
yes, you need to get the latest version. It requires at least version 2.70. Those errors will go away when you update it.
 

stormwolff

Knight
Great additions arte.

The only complaint I get is that the matches tend to last a long time and people are spending alot on item insurance in a deathmatch. If possible on your end it might be nice to add in a toggle for the region to make it so things are insured without added cost while in a deathmatch or last man standing event/region.
 

TurboABA

Wanderer
Iam getting these errors when loading:
Scripts: Compiling C# scripts...failed (4 errors, 40 warnings)
- Error: Scripts\Custom Scripts\XmlPoints-v110\XmlPointsRewards.cs: CS0246: (li
ne 54, column 67) The type or namespace name 'XmlEnemyMastery' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom Scripts\XmlPoints-v110\XmlPointsRewards.cs: CS0246: (li
ne 55, column 67) The type or namespace name 'XmlStr' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Misc\Notoriety.cs: CS1502: (line 193, column 8) The best overl
oaded method match for 'Server.Engines.XmlSpawner2.XmlPoints.AreChallengers(Serv
er.Mobile, Server.Mobile)' has some invalid arguments
- Error: Scripts\Misc\Notoriety.cs: CS1503: (line 193, column 40) Argument '2':
cannot convert from 'Server.Items.Corpse' to 'Server.Mobile'
heres what my notoriety looks like:
Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Guilds;
using Server.Multis;
using Server.Mobiles;
using Server.Engines.PartySystem;
using Server.Engines.XmlSpawner2;

namespace Server.Misc
{
	public class NotorietyHandlers
	{
		public static void Initialize()
		{
			Notoriety.Hues[Notoriety.Innocent]		= 0x59;
			Notoriety.Hues[Notoriety.Ally]			= 0x3F;
			Notoriety.Hues[Notoriety.CanBeAttacked]	= 0x3B2;
			Notoriety.Hues[Notoriety.Criminal]		= 0x3B2;
			Notoriety.Hues[Notoriety.Enemy]			= 0x90;
			Notoriety.Hues[Notoriety.Murderer]		= 0x22;
			Notoriety.Hues[Notoriety.Invulnerable]	= 0x35;

			Notoriety.Handler = new NotorietyHandler( MobileNotoriety );

			Mobile.AllowBeneficialHandler = new AllowBeneficialHandler( Mobile_AllowBeneficial );
			Mobile.AllowHarmfulHandler = new AllowHarmfulHandler( Mobile_AllowHarmful );
		}

		private enum GuildStatus{ None, Peaceful, Waring }

		private static GuildStatus GetGuildStatus( Mobile m )
		{
			if ( m.Guild == null )
				return GuildStatus.None;
			else if ( ((Guild)m.Guild).Enemies.Count == 0 && m.Guild.Type == GuildType.Regular )
				return GuildStatus.Peaceful;

			return GuildStatus.Waring;
		}

		private static bool CheckBeneficialStatus( GuildStatus from, GuildStatus target )
		{
			if ( from == GuildStatus.Waring || target == GuildStatus.Waring )
				return false;

			return true;
		}

		/*private static bool CheckHarmfulStatus( GuildStatus from, GuildStatus target )
		{
			if ( from == GuildStatus.Waring && target == GuildStatus.Waring )
				return true;

			return false;
		}*/

		public static bool Mobile_AllowBeneficial( Mobile from, Mobile target )
		{
			if ( from == null || target == null )
				return true;

			Map map = from.Map;

			if ( map != null && (map.Rules & MapRules.BeneficialRestrictions) == 0 )
				return true; // In felucca, anything goes

			if ( !from.Player )
				return true; // NPCs have no restrictions

			if ( target is BaseCreature && !((BaseCreature)target).Controled )
				return false; // Players cannot heal uncontroled mobiles

			Guild fromGuild = from.Guild as Guild;
			Guild targetGuild = target.Guild as Guild;

			if ( fromGuild != null && targetGuild != null && (targetGuild == fromGuild || fromGuild.IsAlly( targetGuild )) )
				return true; // Guild members can be beneficial

			return CheckBeneficialStatus( GetGuildStatus( from ), GetGuildStatus( target ) );
		}

		public static bool Mobile_AllowHarmful( Mobile from, Mobile target )
		{
			if ( from == null || target == null )
				return true;

			Map map = from.Map;

			if ( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
				return true; // In felucca, anything goes

			if ( !from.Player && !(from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned)) )
				return true; // Uncontroled NPCs have no restrictions

			if(XmlPoints.AreChallengers(from,target))
                		return true;

			Guild fromGuild = GetGuildFor( from.Guild as Guild, from );
			Guild targetGuild = GetGuildFor( target.Guild as Guild, target );

			if ( fromGuild != null && targetGuild != null && (fromGuild == targetGuild || fromGuild.IsAlly( targetGuild ) || fromGuild.IsEnemy( targetGuild )) )
				return true; // Guild allies or enemies can be harmful

			if ( target is BaseCreature && (((BaseCreature)target).Controled || (((BaseCreature)target).Summoned && from != ((BaseCreature)target).SummonMaster)) )
				return false; // Cannot harm other controled mobiles

			if ( target.Player )
				return false; // Cannot harm other players

			if ( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
			{
				if ( Notoriety.Compute( from, target ) == Notoriety.Innocent )
					return false; // Cannot harm innocent mobiles
			}

			return true;
		}

		public static Guild GetGuildFor( Guild def, Mobile m )
		{
			Guild g = def;

			BaseCreature c = m as BaseCreature;

			if ( c != null && c.Controled && c.ControlMaster != null )
			{
				c.DisplayGuildTitle = false;

				if ( c.Map != Map.Internal && (c.ControlOrder == OrderType.Attack || c.ControlOrder == OrderType.Guard) )
					g = (Guild)(c.Guild = c.ControlMaster.Guild);
				else if ( c.Map == Map.Internal || c.ControlMaster.Guild == null )
					g = (Guild)(c.Guild = null);
			}

			return g;
		}

		public static int CorpseNotoriety( Mobile source, Corpse target )
		{
			if ( target.AccessLevel > AccessLevel.Player )
				return Notoriety.CanBeAttacked;

			Body body = (Body) target.Amount;

			BaseCreature cretOwner = target.Owner as BaseCreature;

			if ( cretOwner != null )
			{
				Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
				Guild targetGuild = GetGuildFor( target.Guild as Guild, target.Owner );

				if ( sourceGuild != null && targetGuild != null )
				{
					if ( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
						return Notoriety.Ally;
					else if ( sourceGuild.IsEnemy( targetGuild ) )
						return Notoriety.Enemy;
				}

				if ( CheckHouseFlag( source, target.Owner, target.Location, target.Map ) )
					return Notoriety.CanBeAttacked;

				int actual = Notoriety.CanBeAttacked;

				if ( target.Kills >= 5 || (body.IsMonster && IsSummoned( target.Owner as BaseCreature )) || (target.Owner is BaseCreature && (((BaseCreature)target.Owner).AlwaysMurderer || ((BaseCreature)target.Owner).IsAnimatedDead)) )
					actual = Notoriety.Murderer;

				if ( DateTime.Now >= (target.TimeOfDeath + Corpse.MonsterLootRightSacrifice) )
					return actual;

				Party sourceParty = Party.Get( source );

				ArrayList list = target.Aggressors;

				for ( int i = 0; i < list.Count; ++i )
				{
					if ( list[i] == source || (sourceParty != null && Party.Get( (Mobile)list[i] ) == sourceParty) )
						return actual;
				}

				return Notoriety.Innocent;
			}
			else
			{
				if ( target.Kills >= 5 || (body.IsMonster && IsSummoned( target.Owner as BaseCreature )) || (target.Owner is BaseCreature && (((BaseCreature)target.Owner).AlwaysMurderer || ((BaseCreature)target.Owner).IsAnimatedDead)) )
					return Notoriety.Murderer;

				if ( target.Criminal )
					return Notoriety.Criminal;

				if(XmlPoints.AreChallengers(source,target))
                			return Notoriety.Enemy;

				Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
				Guild targetGuild = GetGuildFor( target.Guild as Guild, target.Owner );

				if ( sourceGuild != null && targetGuild != null )
				{
					if ( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
						return Notoriety.Ally;
					else if ( sourceGuild.IsEnemy( targetGuild ) )
						return Notoriety.Enemy;
				}

				if ( target.Owner != null && target.Owner is BaseCreature && ((BaseCreature)target.Owner).AlwaysAttackable )
					return Notoriety.CanBeAttacked;

				if ( CheckHouseFlag( source, target.Owner, target.Location, target.Map ) )
					return Notoriety.CanBeAttacked;

				if ( !body.IsHuman && !body.IsGhost && !IsPet( target.Owner as BaseCreature ) )
					return Notoriety.CanBeAttacked;

				ArrayList list = target.Aggressors;

				for ( int i = 0; i < list.Count; ++i )
				{
					if ( list[i] == source )
						return Notoriety.CanBeAttacked;
				}

				return Notoriety.Innocent;
			}
		}

		public static int MobileNotoriety( Mobile source, Mobile target )
		{
			if ( Core.AOS && (target.Blessed || (target is BaseVendor && ((BaseVendor)target).IsInvulnerable) || target is PlayerVendor || target is TownCrier) )
				return Notoriety.Invulnerable;

			if ( target.AccessLevel > AccessLevel.Player )
				return Notoriety.CanBeAttacked;

			if ( source.Player && !target.Player && source is PlayerMobile && target is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)target;

				if ( !bc.Summoned && !bc.Controled && ((PlayerMobile)source).EnemyOfOneType == target.GetType() )
					return Notoriety.Enemy;
			}

			if ( target.Kills >= 5 || (target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !(target is BaseFamiliar) && !(target is Golem)) || (target is BaseCreature && (((BaseCreature)target).AlwaysMurderer || ((BaseCreature)target).IsAnimatedDead)) )
				return Notoriety.Murderer;

			if ( target.Criminal )
				return Notoriety.Criminal;

			Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
			Guild targetGuild = GetGuildFor( target.Guild as Guild, target );

			if ( sourceGuild != null && targetGuild != null )
			{
				if ( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
					return Notoriety.Ally;
				else if ( sourceGuild.IsEnemy( targetGuild ) )
					return Notoriety.Enemy;
			}

			if ( SkillHandlers.Stealing.ClassicMode && target is PlayerMobile && ((PlayerMobile)target).PermaFlags.Contains( source ) )
				return Notoriety.CanBeAttacked;

			if ( target is BaseCreature && ((BaseCreature)target).AlwaysAttackable )
				return Notoriety.CanBeAttacked;

			if ( CheckHouseFlag( source, target, target.Location, target.Map ) )
				return Notoriety.CanBeAttacked;

			if ( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
			{
				if ( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) )
					return Notoriety.CanBeAttacked;
			}

			if ( CheckAggressor( source.Aggressors, target ) )
				return Notoriety.CanBeAttacked;

			if ( CheckAggressed( source.Aggressed, target ) )
				return Notoriety.CanBeAttacked;

			if ( target is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)target;

				if ( bc.Controled && bc.ControlOrder == OrderType.Guard && bc.ControlTarget == source )
					return Notoriety.CanBeAttacked;
			}

			return Notoriety.Innocent;
		}

		public static bool CheckHouseFlag( Mobile from, Mobile m, Point3D p, Map map )
		{
			BaseHouse house = BaseHouse.FindHouseAt( p, map, 16 );

			if ( house == null || house.Public || !house.IsFriend( from ) )
				return false;

			if ( m != null && house.IsFriend( m ) )
				return false;

			BaseCreature c = m as BaseCreature;

			if ( c != null && !c.Deleted && c.Controled && c.ControlMaster != null )
				return !house.IsFriend( c.ControlMaster );

			return true;
		}

		public static bool IsPet( BaseCreature c )
		{
			return ( c != null && c.Controled );
		}

		public static bool IsSummoned( BaseCreature c )
		{
			return ( c != null && /*c.Controled &&*/ c.Summoned );
		}

		public static bool CheckAggressor( ArrayList list, Mobile target )
		{
			for ( int i = 0; i < list.Count; ++i )
				if ( ((AggressorInfo)list[i]).Attacker == target )
					return true;

			return false;
		}

		public static bool CheckAggressed( ArrayList list, Mobile target )
		{
			for ( int i = 0; i < list.Count; ++i )
			{
				AggressorInfo info = (AggressorInfo)list[i];

				if ( !info.CriminalAggression && info.Defender == target )
					return true;
			}

			return false;
		}
	}
}
 

ArteGordon

Wanderer
stormwolff said:
Great additions arte.

The only complaint I get is that the matches tend to last a long time and people are spending alot on item insurance in a deathmatch. If possible on your end it might be nice to add in a toggle for the region to make it so things are insured without added cost while in a deathmatch or last man standing event/region.
I've looked into that but havent added it in yet. It's a good idea. I just have to make sure that people cant exploit it.
 

ArteGordon

Wanderer
TurboABA said:
Iam getting these errors when loading:
Scripts: Compiling C# scripts...failed (4 errors, 40 warnings)
- Error: Scripts\Custom Scripts\XmlPoints-v110\XmlPointsRewards.cs: CS0246: (li
ne 54, column 67) The type or namespace name 'XmlEnemyMastery' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom Scripts\XmlPoints-v110\XmlPointsRewards.cs: CS0246: (li
ne 55, column 67) The type or namespace name 'XmlStr' could not be found (are you missing a using directive or an assembly reference?)
- Error: Scripts\Misc\Notoriety.cs: CS1502: (line 193, column 8) The best overl
oaded method match for 'Server.Engines.XmlSpawner2.XmlPoints.AreChallengers(Serv
er.Mobile, Server.Mobile)' has some invalid arguments
- Error: Scripts\Misc\Notoriety.cs: CS1503: (line 193, column 40) Argument '2':
cannot convert from 'Server.Items.Corpse' to 'Server.Mobile'
heres what my notoriety looks like:
Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Guilds;
using Server.Multis;
using Server.Mobiles;
using Server.Engines.PartySystem;
using Server.Engines.XmlSpawner2;

namespace Server.Misc
{
	public class NotorietyHandlers
	{
		public static void Initialize()
		{
			Notoriety.Hues[Notoriety.Innocent]		= 0x59;
			Notoriety.Hues[Notoriety.Ally]			= 0x3F;
			Notoriety.Hues[Notoriety.CanBeAttacked]	= 0x3B2;
			Notoriety.Hues[Notoriety.Criminal]		= 0x3B2;
			Notoriety.Hues[Notoriety.Enemy]			= 0x90;
			Notoriety.Hues[Notoriety.Murderer]		= 0x22;
			Notoriety.Hues[Notoriety.Invulnerable]	= 0x35;

			Notoriety.Handler = new NotorietyHandler( MobileNotoriety );

			Mobile.AllowBeneficialHandler = new AllowBeneficialHandler( Mobile_AllowBeneficial );
			Mobile.AllowHarmfulHandler = new AllowHarmfulHandler( Mobile_AllowHarmful );
		}

		private enum GuildStatus{ None, Peaceful, Waring }

		private static GuildStatus GetGuildStatus( Mobile m )
		{
			if ( m.Guild == null )
				return GuildStatus.None;
			else if ( ((Guild)m.Guild).Enemies.Count == 0 && m.Guild.Type == GuildType.Regular )
				return GuildStatus.Peaceful;

			return GuildStatus.Waring;
		}

		private static bool CheckBeneficialStatus( GuildStatus from, GuildStatus target )
		{
			if ( from == GuildStatus.Waring || target == GuildStatus.Waring )
				return false;

			return true;
		}

		/*private static bool CheckHarmfulStatus( GuildStatus from, GuildStatus target )
		{
			if ( from == GuildStatus.Waring && target == GuildStatus.Waring )
				return true;

			return false;
		}*/

		public static bool Mobile_AllowBeneficial( Mobile from, Mobile target )
		{
			if ( from == null || target == null )
				return true;

			Map map = from.Map;

			if ( map != null && (map.Rules & MapRules.BeneficialRestrictions) == 0 )
				return true; // In felucca, anything goes

			if ( !from.Player )
				return true; // NPCs have no restrictions

			if ( target is BaseCreature && !((BaseCreature)target).Controled )
				return false; // Players cannot heal uncontroled mobiles

			Guild fromGuild = from.Guild as Guild;
			Guild targetGuild = target.Guild as Guild;

			if ( fromGuild != null && targetGuild != null && (targetGuild == fromGuild || fromGuild.IsAlly( targetGuild )) )
				return true; // Guild members can be beneficial

			return CheckBeneficialStatus( GetGuildStatus( from ), GetGuildStatus( target ) );
		}

		public static bool Mobile_AllowHarmful( Mobile from, Mobile target )
		{
			if ( from == null || target == null )
				return true;

			Map map = from.Map;

			if ( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
				return true; // In felucca, anything goes

			if ( !from.Player && !(from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned)) )
				return true; // Uncontroled NPCs have no restrictions

			if(XmlPoints.AreChallengers(from,target))
                		return true;

			Guild fromGuild = GetGuildFor( from.Guild as Guild, from );
			Guild targetGuild = GetGuildFor( target.Guild as Guild, target );

			if ( fromGuild != null && targetGuild != null && (fromGuild == targetGuild || fromGuild.IsAlly( targetGuild ) || fromGuild.IsEnemy( targetGuild )) )
				return true; // Guild allies or enemies can be harmful

			if ( target is BaseCreature && (((BaseCreature)target).Controled || (((BaseCreature)target).Summoned && from != ((BaseCreature)target).SummonMaster)) )
				return false; // Cannot harm other controled mobiles

			if ( target.Player )
				return false; // Cannot harm other players

			if ( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
			{
				if ( Notoriety.Compute( from, target ) == Notoriety.Innocent )
					return false; // Cannot harm innocent mobiles
			}

			return true;
		}

		public static Guild GetGuildFor( Guild def, Mobile m )
		{
			Guild g = def;

			BaseCreature c = m as BaseCreature;

			if ( c != null && c.Controled && c.ControlMaster != null )
			{
				c.DisplayGuildTitle = false;

				if ( c.Map != Map.Internal && (c.ControlOrder == OrderType.Attack || c.ControlOrder == OrderType.Guard) )
					g = (Guild)(c.Guild = c.ControlMaster.Guild);
				else if ( c.Map == Map.Internal || c.ControlMaster.Guild == null )
					g = (Guild)(c.Guild = null);
			}

			return g;
		}

		public static int CorpseNotoriety( Mobile source, Corpse target )
		{
			if ( target.AccessLevel > AccessLevel.Player )
				return Notoriety.CanBeAttacked;

			Body body = (Body) target.Amount;

			BaseCreature cretOwner = target.Owner as BaseCreature;

			if ( cretOwner != null )
			{
				Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
				Guild targetGuild = GetGuildFor( target.Guild as Guild, target.Owner );

				if ( sourceGuild != null && targetGuild != null )
				{
					if ( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
						return Notoriety.Ally;
					else if ( sourceGuild.IsEnemy( targetGuild ) )
						return Notoriety.Enemy;
				}

				if ( CheckHouseFlag( source, target.Owner, target.Location, target.Map ) )
					return Notoriety.CanBeAttacked;

				int actual = Notoriety.CanBeAttacked;

				if ( target.Kills >= 5 || (body.IsMonster && IsSummoned( target.Owner as BaseCreature )) || (target.Owner is BaseCreature && (((BaseCreature)target.Owner).AlwaysMurderer || ((BaseCreature)target.Owner).IsAnimatedDead)) )
					actual = Notoriety.Murderer;

				if ( DateTime.Now >= (target.TimeOfDeath + Corpse.MonsterLootRightSacrifice) )
					return actual;

				Party sourceParty = Party.Get( source );

				ArrayList list = target.Aggressors;

				for ( int i = 0; i < list.Count; ++i )
				{
					if ( list[i] == source || (sourceParty != null && Party.Get( (Mobile)list[i] ) == sourceParty) )
						return actual;
				}

				return Notoriety.Innocent;
			}
			else
			{
				if ( target.Kills >= 5 || (body.IsMonster && IsSummoned( target.Owner as BaseCreature )) || (target.Owner is BaseCreature && (((BaseCreature)target.Owner).AlwaysMurderer || ((BaseCreature)target.Owner).IsAnimatedDead)) )
					return Notoriety.Murderer;

				if ( target.Criminal )
					return Notoriety.Criminal;

				if(XmlPoints.AreChallengers(source,target))
                			return Notoriety.Enemy;

				Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
				Guild targetGuild = GetGuildFor( target.Guild as Guild, target.Owner );

				if ( sourceGuild != null && targetGuild != null )
				{
					if ( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
						return Notoriety.Ally;
					else if ( sourceGuild.IsEnemy( targetGuild ) )
						return Notoriety.Enemy;
				}

				if ( target.Owner != null && target.Owner is BaseCreature && ((BaseCreature)target.Owner).AlwaysAttackable )
					return Notoriety.CanBeAttacked;

				if ( CheckHouseFlag( source, target.Owner, target.Location, target.Map ) )
					return Notoriety.CanBeAttacked;

				if ( !body.IsHuman && !body.IsGhost && !IsPet( target.Owner as BaseCreature ) )
					return Notoriety.CanBeAttacked;

				ArrayList list = target.Aggressors;

				for ( int i = 0; i < list.Count; ++i )
				{
					if ( list[i] == source )
						return Notoriety.CanBeAttacked;
				}

				return Notoriety.Innocent;
			}
		}

		public static int MobileNotoriety( Mobile source, Mobile target )
		{
			if ( Core.AOS && (target.Blessed || (target is BaseVendor && ((BaseVendor)target).IsInvulnerable) || target is PlayerVendor || target is TownCrier) )
				return Notoriety.Invulnerable;

			if ( target.AccessLevel > AccessLevel.Player )
				return Notoriety.CanBeAttacked;

			if ( source.Player && !target.Player && source is PlayerMobile && target is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)target;

				if ( !bc.Summoned && !bc.Controled && ((PlayerMobile)source).EnemyOfOneType == target.GetType() )
					return Notoriety.Enemy;
			}

			if ( target.Kills >= 5 || (target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !(target is BaseFamiliar) && !(target is Golem)) || (target is BaseCreature && (((BaseCreature)target).AlwaysMurderer || ((BaseCreature)target).IsAnimatedDead)) )
				return Notoriety.Murderer;

			if ( target.Criminal )
				return Notoriety.Criminal;

			Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
			Guild targetGuild = GetGuildFor( target.Guild as Guild, target );

			if ( sourceGuild != null && targetGuild != null )
			{
				if ( sourceGuild == targetGuild || sourceGuild.IsAlly( targetGuild ) )
					return Notoriety.Ally;
				else if ( sourceGuild.IsEnemy( targetGuild ) )
					return Notoriety.Enemy;
			}

			if ( SkillHandlers.Stealing.ClassicMode && target is PlayerMobile && ((PlayerMobile)target).PermaFlags.Contains( source ) )
				return Notoriety.CanBeAttacked;

			if ( target is BaseCreature && ((BaseCreature)target).AlwaysAttackable )
				return Notoriety.CanBeAttacked;

			if ( CheckHouseFlag( source, target, target.Location, target.Map ) )
				return Notoriety.CanBeAttacked;

			if ( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
			{
				if ( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) )
					return Notoriety.CanBeAttacked;
			}

			if ( CheckAggressor( source.Aggressors, target ) )
				return Notoriety.CanBeAttacked;

			if ( CheckAggressed( source.Aggressed, target ) )
				return Notoriety.CanBeAttacked;

			if ( target is BaseCreature )
			{
				BaseCreature bc = (BaseCreature)target;

				if ( bc.Controled && bc.ControlOrder == OrderType.Guard && bc.ControlTarget == source )
					return Notoriety.CanBeAttacked;
			}

			return Notoriety.Innocent;
		}

		public static bool CheckHouseFlag( Mobile from, Mobile m, Point3D p, Map map )
		{
			BaseHouse house = BaseHouse.FindHouseAt( p, map, 16 );

			if ( house == null || house.Public || !house.IsFriend( from ) )
				return false;

			if ( m != null && house.IsFriend( m ) )
				return false;

			BaseCreature c = m as BaseCreature;

			if ( c != null && !c.Deleted && c.Controled && c.ControlMaster != null )
				return !house.IsFriend( c.ControlMaster );

			return true;
		}

		public static bool IsPet( BaseCreature c )
		{
			return ( c != null && c.Controled );
		}

		public static bool IsSummoned( BaseCreature c )
		{
			return ( c != null && /*c.Controled &&*/ c.Summoned );
		}

		public static bool CheckAggressor( ArrayList list, Mobile target )
		{
			for ( int i = 0; i < list.Count; ++i )
				if ( ((AggressorInfo)list[i]).Attacker == target )
					return true;

			return false;
		}

		public static bool CheckAggressed( ArrayList list, Mobile target )
		{
			for ( int i = 0; i < list.Count; ++i )
			{
				AggressorInfo info = (AggressorInfo)list[i];

				if ( !info.CriminalAggression && info.Defender == target )
					return true;
			}

			return false;
		}
	}
}

the first couple of errors are because you didnt install the optional attachments in the xmlspawner2 package. You can either install them or just comment out the references to those attachments in xmpointsreward.cs

The last error in notoriety.cs is because you put the second mod from step 5 in the CorpseNotoriety method instead of the MobileNotoriety method.
 

TurboABA

Wanderer
I dont understand when you mean

ArteGordon said:
the last error in notoriety.cs is because you put the second mod from step 5 in the CorpseNotoriety method instead of the MobileNotoriety method.
Is this in notoriety.cs?
 

ArteGordon

Wanderer
yes, in the notoriety.cs file you performed this part of installation step 5 incorrectly

and in the MobileNotoriety method around line 240 change
Code:
	if ( target.Criminal )
		return Notoriety.Criminal;
to
Code:
	if ( target.Criminal )
		return Notoriety.Criminal;

	// XmlPoints challenge mod
	if(XmlPoints.AreChallengers(source,target))
                return Notoriety.Enemy;

you made the change around line 193 in the CorpseNotoriety method instead of around line 240 in the Mobile Notoriety method.
It is because the code in those two methods looks similar so you probably just did a search and found the context lines that I mentioned, but they were in the wrong spot.

So just find the spot in CorpseNotoriety where you added this (where the error message is being generated)

Code:
				if(XmlPoints.AreChallengers(source,target))
                			return Notoriety.Enemy;

and get rid of it, and then add it to the right spot about 50 lines further down.
 

sUpplier1

Wanderer
I noticed that LeaderboardSave options aren't saving after the server restart. You have to enable the LeaderboardSave once again after the restart.
 

ArteGordon

Wanderer
thanks, I'll check it out.

(edit)

Because those are statically maintained variables and dont get serialized/deserialized (they are associated with the entire class, not any particular instance), I'll just put in a leaderboard stone that you can set the properties on and that will take care of it.
 

ArteGordon

Wanderer
updated to version 1.11

from the changelog

New to version 1.11
updated 12/19/04

- added a new leaderboardsave stone that will allow you to preserve leaderboard save settings across server restarts. (thanks to sUpplier1 for the suggestion). Just do an "[add lbsstone" and you are done. Note, you can only have one stone at a time. Making another will cause any existing one to be removed. Double clicking the stone will report the current leaderboard save settings. I may add some gumpwork to this.

- added a new ChallengeGameRegion feature that allows you to define a region in which challenge games can be setup. In this guarded region, no harmful acts will be allowed while a game is being prepared or following a game (basically, as long as a gauntlet is present and no game is in progress, no harmful acts are allowed). Only one challenge game is allowed at a time within a region. You can also configure each game so that it can only be setup in a ChallengeGameRegion. Just change the static flag "OnlyInChallengeGameRegion" which is false by default (thanks to sUpplier1 for the suggestion).

- added a ChallengeRegionStone that allows staff to define ChallengeGameRegions. It can either be setup as a simple single rectangular region by double clicking the stone and defining a bounding box, or you can give it the name of an existing region in the CopyRegion property and it will copy that regions bounding areas. That way you can use other tools to make more complicated regions and then just put the ChallengeGame on top of them. Note, this doesnt have any effect on the region that you copy. I may add some gumpwork to this in the future, but for now just set things via [props.

- added a new installation step 6 to support overriding insurance penalties in games.

- added a new override method in each game "public virtual bool InsuranceIsFree(Mobile from, Mobile awardto)" that allows insurance penalties to be turned off for challenge games. To support this feature you must go through the new installation step 6. Insurance will only be ignored for deaths during a game that are a result of damage by another participant in the game. Deaths by any other means, even during a game, still incur normal insurance costs. (thanks to stormwolff for the suggestion) You could also add additional tests into the method to allow more advanced conditions under which insurance could still be applied.

- fixed a bug that prevented non-participants from scrolling the participants list in the game gumps.
 

ArteGordon

Wanderer
sorry, a quick little update. After a server restart it wasnt restoring the challenge game check info that it needed to block multiple games in a region, so it was possible to start a game in the region, do a restart and have someone else start a second game in the same region. That is fixed now.
 

Rl-2

Wanderer
Im getting the errors:
Code:
Scripts: Compiling C# scripts...failed (3 errors, 0 warnings)
 - Error: Scripts\customs\XmlPoints-v111\XmlAttachments\XmlPoints.cs: CS0246: (l
ine 185, column 30) The type or namespace name 'XmlAttachment' could not be foun
d (are you missing a using directive or an assembly reference?)
 - Error: Scripts\customs\XmlPoints-v111\XmlAttachments\XmlPoints.cs: CS0246: (l
ine 1169, column 26) The type or namespace name 'ASerial' could not be found (ar
e you missing a using directive or an assembly reference?)
 - Error: Scripts\customs\XmlPoints-v111\XmlAttachments\XmlPoints.cs: CS0246: (l
ine 1173, column 10) The type or namespace name 'Attachable' could not be found
(are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
Any suggestions?
 

Guadah

Wanderer
A nice addition that I am adding to the package for our server.

A Bulletin Board that once it is opened will open your "TopPlayersGump".

Name = "Current PvP Standings"
 
Top