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!

Sorious' WoW OnSite Dueling System

slyker12

Wanderer
error

RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 12 warnings)
- Error: Scripts\My Customs\dueling\OnSiteCore.cs: CS0117: (line 748, column 25
) 'Server.Item' does not contain a definition for 'Add'
 
P

PoolMan

Guest
Is the NotorietyAdditions.txt updated ? Its seems different then that one in the zip.
this is my Notoriety.cs
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.Factions;

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;
///////////*Duel System*///////////

			if( Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( from ) || Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
                return false;
///////////*Duel System*///////////
			#region Factions
			Faction targetFaction = Faction.Find( target, true );

			if ( targetFaction != null )
			{
				if ( Faction.Find( from, true ) != targetFaction )
					return false;
			}
			#endregion

			Map map = from.Map;

			if ( map != null && (map.Rules & MapRules.BeneficialRestrictions) == 0 )
				{
  ////////*** new PvPBracelet code *** 
            if (from != null && target != null) 
            { 
               bool fromPvPSafe = (from.Player && from.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo); 
               bool targetPvPSafe = (target.Player && target.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo); 
               if (from.Player && target.Player) 
               { 
                  if ((fromPvPSafe == true) && (targetPvPSafe == false)) 
                     return false; //non pvp player cannot help pvp player. 
               } 
               else if (from.Player && !target.Player) 
               { 
                  if ((targetPvPSafe == true) && (from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned)) ) 
                  { 
                     Mobile m_Player = ((BaseCreature)from).ControlMaster; 
                     if (m_Player != null && m_Player.Player && (m_Player.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo == false)) 
                     { 
                        return false; //non pvp player cannot help creatures controlled by pvp players. 
                     } 
                  } 
               } 
            } 
    ///////////*** end new code *** 

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

			if ( from is PlayerMobile && ((PlayerMobile)from).Young && ( !(target is PlayerMobile) || !((PlayerMobile)target).Young ) )
				return false; // Young players cannot perform beneficial actions towards older players

			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
///////FSGov
			if ( PlayerGovernmentSystem.CheckIfBanned( from, target ) )
				return false;

			if ( PlayerGovernmentSystem.CheckAtWarWith( from, target ) )
				return false;

			if ( PlayerGovernmentSystem.CheckCityAlly( from, target ) )
				return true;
///////FSGov
			return CheckBeneficialStatus( GetGuildStatus( from ), GetGuildStatus( target ) );
		}

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

			if( Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( from ) && Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
            {
                Duel duel = Customs.OnSiteDueling.OnSiteCore.GetDuel( from );

                if( duel != null )
                {
                    if( duel.Started )
                        return true;
                }

                return false;
            }

            if( Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( from ) && !Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
                return false;

            if( !Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( from ) && Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
                return false;
///////////*Duel System*///////////

			Map map = from.Map;

			if ( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
         { 
  ///////////*** new PvPBracelet code ********************************
            if (from != null && target != null) 
            { 
               bool fromPvPSafe = (from.Player && from.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo); 
               bool targetPvPSafe = (target.Player && target.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo); 
               if (from.Player && target.Player) 
               { 
                  if (fromPvPSafe == true) 
                     return false; //non-pvp player cannot attack any player. 
                
                  if(( fromPvPSafe == false) && ( targetPvPSafe == true)) 
                     return false; //pvp player cannot attack non-pvp player. 
               } 
               else if (from.Player && !target.Player) 
               { 
                  if ((fromPvPSafe == true) && (target is BaseCreature && (((BaseCreature)target).Controled || ((BaseCreature)target).Summoned)) ) 
                  { 
                     return false; //non-pvp player cannot attack controlled creatures. 
                  } 
                  if ((fromPvPSafe == false) && (target is BaseCreature && (((BaseCreature)target).Controled || ((BaseCreature)target).Summoned)) ) 
                  { 
                     Mobile m_Player = ((BaseCreature)target).ControlMaster; 
                     if (m_Player != null && m_Player.Player && m_Player.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo) 
                     { 
                        return false; //pvp players cannot attack non-pvp players controlled creatures. 
                     } 
                  }                
               } 
               else if (!from.Player && target.Player) 
               { 
                  if ((targetPvPSafe == true) && (from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned)) ) 
                  { 
                     return false; //controlled creatures cannot attack non-pvp players. 
                  } 
                  if ((targetPvPSafe == false) && (from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned)) ) 
                  { 
                     Mobile m_Player = ((BaseCreature)from).ControlMaster; 
                     if (m_Player != null && m_Player.Player && m_Player.FindItemOnLayer( Layer.Bracelet ) is IDontWantTo) 
                     { 
                        return false; //Creatures controlled by non-pvp player cannot attack pvp players. 
                     } 
                  }             
               } 
            } 
 //////////////*** end new code *****************

				
				return true; // In felucca, anything goes
		 }        
			if ( !from.Player && !(from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned)) )
			{
				if ( !CheckAggressor( from.Aggressors, target ) && !CheckAggressed( from.Aggressed, target ) && target is PlayerMobile && ((PlayerMobile)target).CheckYoungProtection( from ) )
					return false;

				return true; // Uncontroled NPCs are only restricted by the young system
			}

			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
			}
///////FSGov
			if ( PlayerGovernmentSystem.CheckIfBanned( from, target ) )
				return true;

			if ( PlayerGovernmentSystem.CheckAtWarWith( from, target ) )
				return true;

			if ( PlayerGovernmentSystem.CheckCityAlly( from, target ) )
				return true;
///////FSGov
			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;
				}

				Faction srcFaction = Faction.Find( source, true, true );
				Faction trgFaction = Faction.Find( target.Owner, true, true );

				if ( srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet )
					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;
				}
///////FSGov
				if ( PlayerGovernmentSystem.CheckBanLootable( source, target.Owner ) )
					return Notoriety.Enemy;

				if ( PlayerGovernmentSystem.CheckAtWarWith( source, target.Owner ) )
					return Notoriety.Enemy;

				if ( PlayerGovernmentSystem.CheckCityAlly( source, target.Owner ) )
					return Notoriety.Ally;
///////FSGov
				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;

				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;
				}

				Faction srcFaction = Faction.Find( source, true, true );
				Faction trgFaction = Faction.Find( target.Owner, true, true );

				if ( srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet )
				{
					ArrayList secondList = target.Aggressors;

					for ( int i = 0; i < secondList.Count; ++i )
					{
						if ( secondList[i] == source || secondList[i] is BaseFactionGuard )
							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 ( !(target.Owner is PlayerMobile) && !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;
				}
///////FSGov
				if ( PlayerGovernmentSystem.CheckBanLootable( source, target.Owner ) )
					return Notoriety.Enemy;

				if ( PlayerGovernmentSystem.CheckAtWarWith( source, target.Owner ) )
					return Notoriety.Enemy;

				if ( PlayerGovernmentSystem.CheckCityAlly( source, target.Owner ) )
					return Notoriety.Ally;
///////FSGov
				return Notoriety.Innocent;
			}
		}

		public static int MobileNotoriety( Mobile source, Mobile target )
		{
///////////*Duel System*///////////

            if( Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( source ) && Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
            {
                Duel duel1 = Server.Customs.OnSiteDueling.OnSiteCore.GetDuel( source );
                Duel duel2 = Server.Customs.OnSiteDueling.OnSiteCore.GetDuel( target );

                if( duel1 == duel2 )
                    return Notoriety.Enemy;
                else
                    return Notoriety.Invulnerable;
            }
            else if( Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( source ) && !Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
                return Notoriety.Invulnerable;
            else if( !Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( source ) && Server.Customs.OnSiteDueling.OnSiteCore.IsInDuel( target ) )
                return Notoriety.Invulnerable;
///////////*Duel System*///////////

			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;
			}

			Faction srcFaction = Faction.Find( source, true, true );
			Faction trgFaction = Faction.Find( target, true, true );

			if ( srcFaction != null && trgFaction != null && srcFaction != trgFaction && source.Map == Faction.Facet )
				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 ) && !Server.Spells.Necromancy.TransformationSpell.UnderTransformation( target ) )
					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;
			}

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

				Mobile master = bc.GetMaster();
				if( master != null && CheckAggressor( master.Aggressors, target ))
					return Notoriety.CanBeAttacked;
			}
///////FSGov
			if ( PlayerGovernmentSystem.CheckIfBanned( source, target ) )
				return Notoriety.Enemy;

			if ( PlayerGovernmentSystem.CheckAtWarWith( source, target ) )
				return Notoriety.Enemy;

			if ( PlayerGovernmentSystem.CheckCityAlly( source, target ) )
				return Notoriety.Ally;
///////FSGov
			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;
		}
	}
}
When a player types [onsiteduel the server crashes
Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Customs.OnSiteDueling.OnSiteCore.OnSiteDuel_Command(CommandEventArgs args)
   at Server.Commands.Handle(Mobile from, String text)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
 

blueocean

Wanderer
Code:
            if( pm.FactionPlayerState.Faction != null )
            {
                Container b = pm.Backpack;
                foreach( Item i in b.Items )
                {
                    if( i is Sigil )
                    {
                        m.SendMessage( "You may not challenge someone while you have a faction sigil." );
                        return;
                    }
                }
            }

here it's the bug but i don't know how to fix it (i don't have factions enabled but just in case... )
 

Seven

Sorceror
Server Crashes using [onsitduel

Confirmed on Ryst & New Distro (another user of RunUO was telling me it also crashes when using [onsiteduel)

Code:
Server Crash Report
===================

RunUO Version 1.0.0, Build 36918
Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 3/5/2006 1:03:27 AM
Mobiles: 12694
Items: 117125
Clients:
- Count: 2
+ IPAddress: (account = AccountName) (mobile = 0x1DD5 'PlayerName')
+ IPAddress: (account = AccountName) (mobile = 0x6 'PlayerName')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Customs.OnSiteDueling.OnSiteCore.OnSiteDuel_Command(CommandEventArgs args)
   at Server.Commands.Handle(Mobile from, String text)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)
 

DevXLX

Sorceror
I can also confirm our TC crashed when we used [onsiteduel.

I attacked the player (we were both using player chars), then i tried to challenge him and it denied me as I was in combat.
I then asked him to see if he could challenge me (he shouldnt be able to since I attacked him), but when he used the command the crash occured.

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Customs.OnSiteDueling.OnSiteCore.OnSiteDuel_Command(CommandEventArgs args)
   at Server.Commands.Handle(Mobile from, String text)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)

/
 

Jeff

Lord
if you guys dont start duplicating this problem in debug mode and posting those crashlogs from debug mode, its gonna be very hard for me to fix this issue, i got 4 crash logs that are all the same and not one is in debug mode, Please i will say it again, I need a crash log in debug mode please!!
 

Johabius

Knight
Well I'm sure Sorious would still like to see a debug crash report so he can see for himself what the error is and fix it on his end as well.
 

Jeff

Lord
blueocean said:
i already said where is the error, i deleted that part of code and all runs fine now
lol damn dude, not to be rude, but that may fix it for you cause you dont have factions but i would still like to fix it for others...Thanks for being selfish.
 

Greystar

Wanderer
Sorious said:
lol damn dude, not to be rude, but that may fix it for you cause you dont have factions but i would still like to fix it for others...Thanks for being selfish.

I will try to install 1.1.5 today and since the all say it is WHEN they do the command I should be able to give you a debug mode crashlog. I always start my shard in debugmode anyway just for testing my scripts. If someone else does it first then I wont bother :)
 

Kamron

Knight
I dunno if you have the checks... but the checks should be the same as going through a moongate and public moongate. You cannot be recently in war, you cannot be a criminal (evade guards), you cannot be a sigil carrier, you cannot be under curses/stat modifiers (becuase if you remove them, you could remove a curse or poison which alters PvP), you cannot engage the same person more than once in 10 minutes (same as factions for killing, becuase a 30 second timer still allows someone to take advantage of the system). And lastly, I dunno if you do this, but prevent the players from being able to exit the arena bounds (if its on site), and prevent people from creating another duel overlapping the previous one (or else you will get region confliction). Another thing which I dunno if you have, is check for gump exploits, because depending on how its set up, people could make double duels, and keep the gumps open to do duels in other locations from where they started the command... (the reason this is needed is because if you make a non-duel location, and someone does the command outside of that region, and then goes into it, you need a check AFTER they select a person to duel with).

Just some food for thought, and for the ones already implimented, good job :)
 

blueocean

Wanderer
Code:
Server Crash Report
===================

RunUO Version 1.0.0, Build 42037
Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 06/03/2006 0.04.50
Mobiles: 1
Items: 37
Clients:
- Count: 1
+ 87.0.217.250: (account = admin) (mobile = 0x1 'Toxic')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Customs.OnSiteDueling.OnSiteCore.OnSiteDuel_Command(CommandEventArgs args) in c:\lostmemories\Scripts\Customs\OnSiteDuel System\OnSiteCore.cs:line 73
   at Server.Commands.Handle(Mobile from, String text)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)


Code:
            if( [B]pm.FactionPlayerState.Faction[/B] != null )
            {
                Container b = m.Backpack;
                foreach( Item i in b.Items )
                {
                    if( i is Sigil )
                    {
                        m.SendMessage( "You may not challenge someone while you have a faction sigil." );
                        return;
                    }
                }
            }

to:

Code:
            if( [B]pm.FactionPlayerState[/B] != null )
            {
                Container b = m.Backpack;
                foreach( Item i in b.Items )
                {
                    if( i is Sigil )
                    {
                        m.SendMessage( "You may not challenge someone while you have a faction sigil." );
                        return;
                    }
                }
            }
 

Jeff

Lord
XxSP1DERxX said:
I dunno if you have the checks... but the checks should be the same as going through a moongate and public moongate. You cannot be recently in war, you cannot be a criminal (evade guards), you cannot be a sigil carrier, you cannot be under curses/stat modifiers (becuase if you remove them, you could remove a curse or poison which alters PvP),
Yes i check for most of these, the criminal thing, i should add, the sigil carrier is a problem atm and seems to be crashing the server, im currently looking into it, curse and stat mods/poison, i dont care about since it removes all of those upon dueling anyway.
XxSP1DERxX said:
you cannot engage the same person more than once in 10 minutes (same as factions for killing, becuase a 30 second timer still allows someone to take advantage of the system).
This one works, you cannot duel if you are engaged in combat but i believe it works the other way around.
XxSP1DERxX said:
And lastly, I dunno if you do this, but prevent the players from being able to exit the arena bounds (if its on site), and prevent people from creating another duel overlapping the previous one (or else you will get region confliction).
This doesnt matter, there are no limits as to where you can go while dueling, the only thing is by default if one attacker is 30 tiles away from another the duel ends in a draw.
XxSP1DERxX said:
Another thing which I dunno if you have, is check for gump exploits, because depending on how its set up, people could make double duels, and keep the gumps open to do duels in other locations from where they started the command... (the reason this is needed is because if you make a non-duel location, and someone does the command outside of that region, and then goes into it, you need a check AFTER they select a person to duel with).
This is accounted for. I do a check for the gump already existing on both thte challenger and the targeted player.

Just some food for thought, and for the ones already implimented, good job :)[/QUOTE]
 

Jeff

Lord
blueocean said:
Code:
Server Crash Report
===================

RunUO Version 1.0.0, Build 42037
Operating System: Microsoft Windows NT 5.1.2600.0
.NET Framework: 1.1.4322.573
Time: 06/03/2006 0.04.50
Mobiles: 1
Items: 37
Clients:
- Count: 1
+ 87.0.217.250: (account = admin) (mobile = 0x1 'Toxic')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Customs.OnSiteDueling.OnSiteCore.OnSiteDuel_Command(CommandEventArgs args) in c:\lostmemories\Scripts\Customs\OnSiteDuel System\OnSiteCore.cs:line 73
   at Server.Commands.Handle(Mobile from, String text)
   at Server.Mobile.DoSpeech(String text, Int32[] keywords, MessageType type, Int32 hue)
   at Server.Network.PacketHandlers.UnicodeSpeech(NetState state, PacketReader pvSrc)
   at Server.Network.MessagePump.HandleReceive(NetState ns)
   at Server.Network.MessagePump.Slice()
   at Server.Core.Main(String[] args)


Code:
            if( [B]pm.FactionPlayerState.Faction[/B] != null )
            {
                Container b = m.Backpack;
                foreach( Item i in b.Items )
                {
                    if( i is Sigil )
                    {
                        m.SendMessage( "You may not challenge someone while you have a faction sigil." );
                        return;
                    }
                }
            }

to:

Code:
            if( [B]pm.FactionPlayerState[/B] != null )
            {
                Container b = m.Backpack;
                foreach( Item i in b.Items )
                {
                    if( i is Sigil )
                    {
                        m.SendMessage( "You may not challenge someone while you have a faction sigil." );
                        return;
                    }
                }
            }
Will do thanks blueocean.
 
Top