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!

[RunUO 2.0 RC1] Lucid's <<_Advanced Archery_>>

FooFaH

Wanderer
Heya, first off, I really like the sound of these scripts, and I'm a hardcore archer myself, but when I try to run my server with it I get this:

Code:
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Verifying...done (3078 items, 627 mobiles)
Regions: Loading...Invalid region type 'Xanthos.JailSystem.Jail' in regions.xml
Invalid region type 'Xanthos.JailSystem.Jail' in regions.xml
done
World: Loading...An error was encountered while loading a saved object
 - Type: Server.Items.RepeatingCrossbow
 - Serial: 0x40000941
Delete the object? (y/n)
Delete all objects of that type? (y/n)
After pressing return an exception will be thrown and the server will terminate

Error:
System.Exception: Load failed (items=True, mobiles=False, guilds=False, type=Ser
ver.Items.RepeatingCrossbow, serial=0x40000941) ---> System.Exception: ***** Bad
 serialize on Server.Items.RepeatingCrossbow *****
   at Server.World.Load()
   --- End of inner exception stack trace ---
   at Server.World.Load()
   at Server.ScriptCompiler.Compile(Boolean debug)
   at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

Now I have DAATS OWLTR system running as well, and at first there was a conflict with the BaseRunicTool.cs so I simply merged the old into the new.

But now I get these bow errors and they are pretty much fatal and I'm not sure what to do to get it right.
 

Attachments

  • BaseRunicTool MergeDaat.cs
    25.5 KB · Views: 47
FooFaH said:
Heya, first off, I really like the sound of these scripts, and I'm a hardcore archer myself, but when I try to run my server with it I get this:

Code:
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Verifying...done (3078 items, 627 mobiles)
Regions: Loading...Invalid region type 'Xanthos.JailSystem.Jail' in regions.xml
Invalid region type 'Xanthos.JailSystem.Jail' in regions.xml
done
World: Loading...An error was encountered while loading a saved object
 - Type: Server.Items.RepeatingCrossbow
 - Serial: 0x40000941
Delete the object? (y/n)
Delete all objects of that type? (y/n)
After pressing return an exception will be thrown and the server will terminate
 
Error:
System.Exception: Load failed (items=True, mobiles=False, guilds=False, type=Ser
ver.Items.RepeatingCrossbow, serial=0x40000941) ---> System.Exception: ***** Bad
 serialize on Server.Items.RepeatingCrossbow *****
   at Server.World.Load()
   --- End of inner exception stack trace ---
   at Server.World.Load()
   at Server.ScriptCompiler.Compile(Boolean debug)
   at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

Now I have DAATS OWLTR system running as well, and at first there was a conflict with the BaseRunicTool.cs so I simply merged the old into the new.

But now I get these bow errors and they are pretty much fatal and I'm not sure what to do to get it right.
The problem lies in the CBaseRanged serialization. Or lets say it is because the bows have been swithed to CBaseRanged. I am working on a fix for it but in the meantime use my old method of adding bows to the serialization of the CBaseRanged.cs.
 
north said:
i keep getting this error and i dont know what to change can anyone help me out?
Forget something?
Code:
[B][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#000000]    else if( obj is Spellbook )
    {
     AosAttributes attrs = ((Spellbook)obj).Attributes;[/COLOR][/SIZE][/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#000000]     if( attrs != null )
      value += attrs[attribute];[/COLOR][/SIZE][/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#000000] [SIZE=4][COLOR=blue]  }  <----[/COLOR][/SIZE]
    //--<<Advanced Archery Edit>>-----------[Start]    
      else if ( obj is BaseQuiver )
      {
        AosAttributes attrs = ((BaseQuiver)obj).Attributes;
 
        if( attrs != null )
        value += attrs[attribute];
      }[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]
[/COLOR][/SIZE][/COLOR][/SIZE][/B]
 
I am putting the finishing touches on v[3].0.1 (a).

Will be posting it shortly...................

Please see post #1 and 2 for details.
 
Attention:

Updated to v[3].0.1 (a)!

Please see posts #1 and #2 for details.
Note: You will need Central Memory for this update and it is provided in post #1.

Please report any issues you might find.
 

Desiree

Wanderer
Server Crash

Utilizing 3.0.1a, and replacing (as I guess they must be) the various standard items (BaseRanged, bow, etc), and I log in with a Grand Master Bowcrafter, and create a bow. This individual then tries to use the bow without stringing, and gets the arrow animation but the "You cannot fire a bow without a string" message. Double click bow and then target stringer, bow is strung. Doubleclick bow again to target arrows in quiver, bow now lists as being unstrung and when attempting to fire, the server crashes with
Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/20/2006 4:56:55 PM
Mobiles: 33756
Items: 170939
Clients:
- Count: 1
+ 127.0.0.1: (account = attiladehun) (mobile = 0x5F5 'Palfrey')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected()
   at Server.Items.Bow.get_AmmoType()
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender)
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender)
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
 
Desiree said:
Utilizing 3.0.1a, and replacing (as I guess they must be) the various standard items (BaseRanged, bow, etc), and I log in with a Grand Master Bowcrafter, and create a bow. This individual then tries to use the bow without stringing, and gets the arrow animation but the "You cannot fire a bow without a string" message. Double click bow and then target stringer, bow is strung. Doubleclick bow again to target arrows in quiver, bow now lists as being unstrung and when attempting to fire, the server crashes with
Code:
Server Crash Report
===================
 
RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/20/2006 4:56:55 PM
Mobiles: 33756
Items: 170939
Clients:
- Count: 1
+ 127.0.0.1: (account = attiladehun) (mobile = 0x5F5 'Palfrey')
 
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected()
   at Server.Items.Bow.get_AmmoType()
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender)
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender)
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
I need this crash report in debug mode.
 

Desiree

Wanderer
Debug crash report

I started server with -debug. Logged in, equipped UltimateQuiver, opened quiver via double-click, dropped 250 regular arrows in quiver. I then carved a normal bow, equipped it, doubleclicked to string it, then doubleclicked to choose normal arrows in quiver. I then took on a pair of trolls, killing the first and then after about six shots the server crashed. Crash report reads
Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/20/2006 6:56:00 PM
Mobiles: 33750
Items: 170863
Clients:
- Count: 1
+ 127.0.0.1: (account = attiladehun) (mobile = 0x5F5 'Palfrey')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected() in d:\RunUO\Scripts\Custom\Advanced Archery\BaseRanged.cs:line 621
   at Server.Items.Bow.get_AmmoType() in d:\RunUO\Scripts\Custom\Advanced Archery\Bows\Bow.cs:line 28
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced Archery\BaseRanged.cs:line 349
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced Archery\BaseRanged.cs:line 78
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
I hope this provides some light. On doubleclicking the bow to select another arrow type, the bow reported no string, and when doubleclicked to restring, it reported item was already strung. This was prior to crash on another bow.
 
Desiree said:
I started server with -debug. Logged in, equipped UltimateQuiver, opened quiver via double-click, dropped 250 regular arrows in quiver. I then carved a normal bow, equipped it, doubleclicked to string it, then doubleclicked to choose normal arrows in quiver. I then took on a pair of trolls, killing the first and then after about six shots the server crashed. Crash report reads
Code:
Server Crash Report
===================
 
RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/20/2006 6:56:00 PM
Mobiles: 33750
Items: 170863
Clients:
- Count: 1
+ 127.0.0.1: (account = attiladehun) (mobile = 0x5F5 'Palfrey')
 
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected() in d:\RunUO\Scripts\Custom\Advanced Archery\BaseRanged.cs:line 621
   at Server.Items.Bow.get_AmmoType() in d:\RunUO\Scripts\Custom\Advanced Archery\Bows\Bow.cs:line 28
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced Archery\BaseRanged.cs:line 349
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced Archery\BaseRanged.cs:line 78
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
I hope this provides some light. On doubleclicking the bow to select another arrow type, the bow reported no string, and when doubleclicked to restring, it reported item was already strung. This was prior to crash on another bow.
Please replace ALL scripts with the ones I have given you. You can prevent errors that way.
 

Desiree

Wanderer
Yet again the crash report.

Using THIS BaseRanged.cs (which comes from the 3.0.1a package on the first message here, and replacing yumi, magicshortbow, elvencompositebow, crossbow, heavycrossbow, repeatingcrossbow, compositebow, bow, baseranged, trainingdummies, archerybuttaddon, baserunictool with the ones in the package, making the change to (lowercase) aos.cs as also recommended in the first message
Code:
using System;
using Server.Items;
using Server.Network;
using Server.Spells;
using Server.Mobiles;
using Server.Targeting;
using System.Collections;
using Server.Enums;
using Server.ACC.CM;


namespace Server.Items
{
	public abstract class BaseRanged : BaseMeleeWeapon
	{
		internal Mobile m_Mobile;
		private static BaseRanged m_This;
		
		public static readonly TimeSpan PlayerFreezeDuration = TimeSpan.FromSeconds( 3.0 );
		public static readonly TimeSpan NPCFreezeDuration = TimeSpan.FromSeconds( 6.0 );
		
		public abstract int EffectID{ get; }
		public abstract Type AmmoType{ get; }
		public abstract Item Ammo{ get; }
		
		public override int DefHitSound{ get{ return 0x234; } }
		public override int DefMissSound{ get{ return 0x238; } }
		
		public override SkillName DefSkill{ get{ return SkillName.Archery; } }
		public override WeaponType DefType{ get{ return WeaponType.Ranged; } }
		public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootXBow; } }
		
		public override SkillName AccuracySkill{ get{ return SkillName.Archery; } }
		
		public BaseRanged( int itemID ) : base( itemID )
		{
			m_This = this;
		}
		
		public BaseRanged( Serial serial ) : base( serial )
		{
			m_This = this;
		}
		
		public override bool OnEquip( Mobile from )
		{
			m_Mobile = from;
			
			return true;
		}
		
		public override TimeSpan OnSwing( Mobile attacker, Mobile defender )
		{
			WeaponAbility a = WeaponAbility.GetCurrentAbility( attacker );
			
			// Make sure we've been standing still for .25/.5/1 second depending on Era
			if ( DateTime.Now > ( attacker.LastMoveTime + TimeSpan.FromSeconds( Core.SE ? 0.25 : (Core.AOS ? 0.5 : 1.0) )) || (Core.AOS && WeaponAbility.GetCurrentAbility( attacker ) is MovingShot) )
			{
				bool canSwing = true;
				
				if ( Core.AOS )
				{
					canSwing = ( !attacker.Paralyzed && !attacker.Frozen );
					
					if ( canSwing )
					{
						Spell sp = attacker.Spell as Spell;
						
						canSwing = ( sp == null || !sp.IsCasting || !sp.BlocksMovement );
					}
				}
				
				if ( canSwing && attacker.HarmfulCheck( defender ) )
				{
					attacker.DisruptiveAction();
					attacker.Send( new Swing( 0, attacker, defender ) );
					
					if ( OnFired( attacker, defender ) )
					{
						if ( CheckHit( attacker, defender ) )
							OnHit( attacker, defender );
						else
							OnMiss( attacker, defender );
					}
				}
				
				attacker.RevealingAction();
				
				return GetDelay( attacker );
			}
			else
			{
				attacker.RevealingAction();
				
				return TimeSpan.FromSeconds( 0.25 );
			}
		}
		
		private static bool ModuleCheck( Mobile from )
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null )
			{
				CentralMemory.AppendModule( m_This.Serial, new BaseRangedModule( m_This.Serial ), true );
				return true;
			}
			
			return true;
		}
		
		public override void OnHit( Mobile attacker, Mobile defender )
		{
			if ( attacker == null || defender == null )
				return;
			
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( attacker ); }
			
			if ( CheckString( attacker, defender ) == false )
				return;
			
			if ( AmmoType == typeof( PoisonArrow ) )
			{
				switch ( Utility.Random( 4 ) )
				{
						case 0: defender.ApplyPoison( defender, Poison.Deadly );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
						case 1: defender.ApplyPoison( defender, Poison.Greater );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
						case 2: defender.ApplyPoison( defender, Poison.Regular );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
						case 3: defender.ApplyPoison( defender, Poison.Lesser );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
				}
			}
			else if ( AmmoType == typeof( PoisonBolt ) )
			{
				switch ( Utility.Random( 4 ) )
				{
						case 0: defender.ApplyPoison( defender, Poison.Deadly );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
						case 1: defender.ApplyPoison( defender, Poison.Greater );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
						case 2: defender.ApplyPoison( defender, Poison.Regular );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
						case 3: defender.ApplyPoison(defender, Poison.Lesser );
						defender.FixedParticles( 0x3728, 200, 25, 69, EffectLayer.Waist ); break;
				}
			}
			else if ( AmmoType == typeof( ExplosiveArrow ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
						defender.PlaySound( 0x307 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 0, 100, 0, 0, 0 ); break;
						
						case 1: defender.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
						defender.PlaySound( 0x307 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 0, 100, 0, 0, 0 ); break;
						
						case 2: defender.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Waist );
						defender.PlaySound( 0x307 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 0, 100, 0, 0, 0 ); break;
				}
				
			}
			else if ( AmmoType == typeof( ExplosiveBolt ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
						defender.PlaySound( 0x307 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 0, 100, 0, 0, 0 ); break;
						
						case 1: defender.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
						defender.PlaySound( 0x307 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 0, 100, 0, 0, 0 ); break;
						
						case 2: defender.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist );
						defender.PlaySound( 0x307 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 0, 100, 0, 0, 0 ); break;
				}
				
			}
			else if ( AmmoType == typeof( ArmorPiercingArrow ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.PlaySound( 0x56 );
						defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 100, 0, 0, 0, 0 ); break;
						
						case 1: defender.PlaySound(0x56);
						defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 100, 0, 0, 0, 0 ); break;
						
						case 2: defender.PlaySound( 0x56 );
						defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 100, 0, 0, 0, 0 ); break;
				}
			}
			else if ( AmmoType == typeof( ArmorPiercingBolt ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.PlaySound( 0x56 );
						defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 100, 0, 0, 0, 0 ); break;
						
						case 1: defender.PlaySound( 0x56 );
						defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 100, 0, 0, 0, 0 ); break;
						
						case 2: defender.PlaySound( 0x56 );
						defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 100, 0, 0, 0, 0 ); break;
				}
			}
			else if ( AmmoType == typeof( FreezeArrow ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.PlaySound( 0x204 );
						defender.Freeze( defender.Player ? PlayerFreezeDuration : NPCFreezeDuration );
						defender.FixedEffect( 0x376A, 9, 32 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 0, 0, 100, 0, 0 ); break;
						
						case 1: defender.PlaySound( 0x204 );
						defender.Freeze( defender.Player ? PlayerFreezeDuration : NPCFreezeDuration );
						defender.FixedEffect( 0x376A, 9, 32 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 0, 0, 100, 0, 0 ); break;
						
						case 2: defender.PlaySound( 0x204 );
						defender.Freeze( defender.Player ? PlayerFreezeDuration : NPCFreezeDuration );
						defender.FixedEffect( 0x376A, 9, 32 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 0, 0, 100, 0, 0 ); break;
				}
			}
			else if ( AmmoType == typeof( FreezeBolt ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.PlaySound( 0x204 );
						defender.Freeze( defender.Player ? PlayerFreezeDuration : NPCFreezeDuration );
						defender.FixedEffect( 0x376A, 9, 32 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 0, 0, 100, 0, 0 ); break;
						
						case 1: defender.PlaySound( 0x204 );
						defender.Freeze( defender.Player ? PlayerFreezeDuration : NPCFreezeDuration );
						defender.FixedEffect( 0x376A, 9, 32 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 0, 0, 100, 0, 0 ); break;
						
						case 2: defender.PlaySound( 0x204 );
						defender.Freeze( defender.Player ? PlayerFreezeDuration : NPCFreezeDuration );
						defender.FixedEffect( 0x376A, 9, 32 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 0, 0, 100, 0, 0 ); break;
				}
			}
			else if ( AmmoType == typeof( LightningArrow ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.PlaySound( 1471 );
						defender.BoltEffect( 0 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 100, 0, 0, 0, 0 ); break;
						
						case 1: defender.PlaySound( 1471 );
						defender.BoltEffect( 0 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 100, 0, 0, 0, 0 ); break;
						
						case 2: defender.PlaySound( 1471 );
						defender.BoltEffect( 0 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 100, 0, 0, 0, 0 ); break;
				}
			}
			else if ( AmmoType == typeof( LightningBolt ) )
			{
				switch ( Utility.Random( 3 ) )
				{
						case 0: defender.PlaySound( 1471 );
						defender.BoltEffect( 0 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 10, 50 ), 100, 0, 0, 0, 0 ); break;
						
						case 1: defender.PlaySound( 1471 );
						defender.BoltEffect( 0 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 30, 70 ), 100, 0, 0, 0, 0 ); break;
						
						case 2: defender.PlaySound( 1471 );
						defender.BoltEffect( 0 );
						attacker.DoHarmful( defender );
						AOS.Damage( defender, attacker, Utility.RandomMinMax( 50, 100 ), 100, 0, 0, 0, 0 ); break;
				}
			}
			
			else if ( Ammo == null )
				attacker.SendMessage( "You are out of arrows, or may have to choose a different type of arrow by double clicking the bow." );
			
			if ( attacker.Player && !defender.Player && ( defender.Body.IsAnimal || defender.Body.IsMonster ) && 0.4 >= Utility.RandomDouble() )
				defender.AddToBackpack( Ammo );
			
			base.OnHit( attacker, defender );
		}
		
		public override void OnMiss( Mobile attacker, Mobile defender )
		{
			if ( attacker.Player && 0.4 >= Utility.RandomDouble() )
				Ammo.MoveToWorld( new Point3D( defender.X + Utility.RandomMinMax( -1, 1 ), defender.Y + Utility.RandomMinMax( -1, 1 ), defender.Z ), defender.Map );
			
			base.OnMiss( attacker, defender );
		}
		
		public virtual bool OnFired( Mobile attacker, Mobile defender )
		{
			Container pack = attacker.Backpack;
			BaseQuiver quiver = attacker.FindItemOnLayer( Layer.MiddleTorso ) as BaseQuiver;
			
			if( attacker.Player && quiver != null && quiver.LowerAmmoCost > Utility.Random( 100 ) )
			{
				attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
				return true;
			}
			
			if( attacker.Player &&
			   ( quiver == null || !quiver.ConsumeTotal( AmmoType, 1 ) ) &&
			   (   pack == null ||   !pack.ConsumeTotal( AmmoType, 1 ) ) )
				return false;
			
			attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
			return true;
		}
		
		public override void OnDoubleClick( Mobile from )
		{
			if ( from == null )
				return;
			
			if ( IsChildOf( from.Backpack ) || Parent == from )
			{
				if ( from != null && this is Bow || this is CompositeBow || this is ElvenCompositeLongbow ||
				    this is MagicalShortbow || this is Yumi )
				{
					from.SendMessage( "Please choose which type of arrows you wish to use." );
					from.Target = new BowInternalTarget( this );
				}
				
				if ( from != null && this is Crossbow || this is HeavyCrossbow || this is RepeatingCrossbow )
				{
					from.SendMessage( "Please choose which type of bolts you wish to use." );
					from.Target = new CrossbowInternalTarget( this );
				}
			}
			
			else
				return;
		}
		
		/*		public override void OnDelete()
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module != null )
			{
				module.Delete();
			}
			
			base.OnDelete();
		}*/
		
		public virtual bool CheckString( Mobile attacker, Mobile defender )
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( attacker ); return false; }
			
			if ( module.m_HasBowString )
			{
				if ( module.StringStrengthSelection == StringStrength.VeryWeak )
				{
					if ( .05 > Utility.Random( 100 ) )
					{
						BonusDamage( attacker, defender );
						return true;
					}
					if ( .10 > Utility.Random( 1000 ) ) //1 in a 100 chances of breaking.
					{
						module.HasBowString = false;
						module.StringStrengthSelection = StringStrength.NoString;
						attacker.SendMessage( "Your string just broke." );
					}
					return true;
				}
				else if ( module.StringStrengthSelection == StringStrength.Weak )
				{
					if ( .10 > Utility.Random( 100 ) )
					{
						BonusDamage( attacker, defender );
						return true;
					}
					if ( .09 > Utility.Random( 1000 ) ) //1 in a 110 chances of breaking.
					{
						module.HasBowString = false;
						module.StringStrengthSelection = StringStrength.NoString;
						attacker.SendMessage( "Your string just broke." );
					}
					return true;
				}
				else if ( module.StringStrengthSelection == StringStrength.Sturdy )
				{
					if ( .15 > Utility.Random( 100 ) ) 
					{ 
						BonusDamage( attacker, defender );
						return true; 
					}
					if ( .08 > Utility.Random( 1000 ) ) //1 in a 125 chances of breaking.
					{
						module.HasBowString = false;
						module.StringStrengthSelection = StringStrength.NoString;
						attacker.SendMessage( "Your string just broke." );
					}
					return true;
				}
				else if ( module.StringStrengthSelection == StringStrength.Strong )
				{
					if ( .20 > Utility.Random( 100 ) ) 
					{ 
						BonusDamage( attacker, defender ); 
						return true; 
					}
					if ( .05 > Utility.Random( 1000 ) ) //1 in a 200 chances of breaking.
					{
						module.HasBowString = false;
						module.StringStrengthSelection = StringStrength.NoString;
						attacker.SendMessage( "Your string just broke." );
					}
				}
				else if ( module.StringStrengthSelection == StringStrength.Dependable )
				{
					if ( .25 > Utility.Random( 100 ) ) 
					{ 
						BonusDamage( attacker, defender ); 
						return true; 
					}
					if ( .03 > Utility.Random( 1000 ) ) //1 in a 333 chances of breaking.
					{
						module.HasBowString = false;
						module.StringStrengthSelection = StringStrength.NoString;
						attacker.SendMessage( "Your string just broke." );
					}
					return true;
				}
				else if ( module.StringStrengthSelection == StringStrength.Indestructable )
				{
					if ( .33 > Utility.Random( 100 ) ) 
					{ 
						BonusDamage( attacker, defender ); 
						return true; 
					}
					//No chance of breaking.
					return true;
				}
				else
				{
					return false;
				}
			}
			else
			{
				attacker.SendMessage( "You cannot shoot a bow without a string." );
				return false;
			}
			
			return false;
		}
		
		public virtual bool BonusDamage( Mobile attacker, Mobile defender )
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( attacker ); }
			
			attacker.SendMessage( "" );
			attacker.SendMessage( 0x35, "** Bonus Hit **" );
			attacker.SendMessage( "" );
			attacker.SendMessage( 0x35, "The strength of your bow and your immpecable skill have given you a perfect hit." );
			attacker.SendMessage( "" );
			
			defender.Say( "* Ouch, that hurt! *" );
			defender.PlaySound( 315 );
			
			if ( module.HasBowString )
			{
				if ( module.m_PullWeight == PoundsPerPull.Fourty )
				{
					attacker.DoHarmful( defender );
					AOS.Damage( defender, attacker, Utility.RandomMinMax( 2, 5 ), 100, 0, 0, 0, 0 );
					return true;
				}
				else if ( module.m_PullWeight == PoundsPerPull.Sixty )
				{
					attacker.DoHarmful( defender );
					AOS.Damage( defender, attacker, Utility.RandomMinMax( 6, 10 ), 100, 0, 0, 0, 0 );
					return true;
				}
				else if ( module.m_PullWeight == PoundsPerPull.Eighty )
				{
					attacker.DoHarmful( defender );
					AOS.Damage( defender, attacker, Utility.RandomMinMax( 11, 15 ), 100, 0, 0, 0, 0 );
					return true;
				}
				else if ( module.m_PullWeight == PoundsPerPull.Hundred )
				{
					attacker.DoHarmful( defender );
					AOS.Damage( defender, attacker, Utility.RandomMinMax( 16, 20 ), 100, 0, 0, 0, 0 );
					return true;
				}
				else
				{
					return false;
				}
			}
			else
				return true;
		}
		
		public virtual bool OnModification( Mobile from, BaseRangedModule module )
		{
			if ( from.Skills[SkillName.Fletching].Base < 100.0 )
			{
				from.SendMessage( "Only a grandmaster bowcrafter can modify this weapon." );
				return false;
			}
			else
			{
				if ( from.Skills[SkillName.Fletching].Base >= 105.0 )
				{
					module.PullWeightSelection = PoundsPerPull.Sixty;
					m_This.InvalidateProperties();
					return true;
				}
				else if ( from.Skills[SkillName.Fletching].Base >= 112.0 )
				{
					module.PullWeightSelection = PoundsPerPull.Eighty;
					m_This.InvalidateProperties();
					return true;
				}
				else if ( from.Skills[SkillName.Fletching].Base >= 119.9 )
				{
					module.PullWeightSelection = PoundsPerPull.Hundred;
					m_This.InvalidateProperties();
					return true;
				}
				else
				{
					module.PullWeightSelection = PoundsPerPull.Fourty;
					m_This.InvalidateProperties();
					return true;
				}
			}
			
			return false;
		}
		
		public virtual Item AmmoArrowSelected()
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( m_Mobile ); }
			
			switch ( module.m_ArrowType )
			{
				case ArrowType.Normal:
					return new Arrow();
				case ArrowType.Poison:
					return new PoisonArrow();
				case ArrowType.Explosive:
					return new ExplosiveArrow();
				case ArrowType.ArmorPiercing:
					return new ArmorPiercingArrow();
				case ArrowType.Freeze:
					return new FreezeArrow();
				case ArrowType.Lightning:
					return new LightningArrow();
					
				default:
					return new Arrow();
			}
		}
		
		public virtual Type GetArrowSelected()
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( m_Mobile ); }
			
			switch ( module.m_ArrowType )
			{
				case ArrowType.Normal:
					return typeof( Arrow );
				case ArrowType.Poison:
					return typeof( PoisonArrow );
				case ArrowType.Explosive:
					return typeof( ExplosiveArrow );
				case ArrowType.ArmorPiercing:
					return typeof( ArmorPiercingArrow );
				case ArrowType.Freeze:
					return typeof( FreezeArrow );
				case ArrowType.Lightning:
					return typeof( LightningArrow );
					
				default:
					return typeof(Arrow);
			}
		}
		
		public virtual Item AmmoBoltSelected()
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( m_Mobile ); }
			
			switch ( module.m_BoltType )
			{
				case BoltType.Normal:
					return new Bolt();
				case BoltType.Poison:
					return new PoisonBolt();
				case BoltType.Explosive:
					return new ExplosiveBolt();
				case BoltType.ArmorPiercing:
					return new ArmorPiercingBolt();
				case BoltType.Freeze:
					return new FreezeBolt();
				case BoltType.Lightning:
					return new LightningBolt();
					
				default:
					return new Bolt();
			}
		}
		
		public virtual Type GetBoltSelected()
		{
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module == null ) { ModuleCheck( m_Mobile ); }
			
			switch ( module.m_BoltType )
			{
				case BoltType.Normal:
					return typeof( Bolt );
				case BoltType.Poison:
					return typeof( PoisonBolt );
				case BoltType.Explosive:
					return typeof( ExplosiveBolt );
				case BoltType.ArmorPiercing:
					return typeof( ArmorPiercingBolt );
				case BoltType.Freeze:
					return typeof( FreezeBolt );
				case BoltType.Lightning:
					return typeof( LightningBolt );
					
				default:
					return typeof( Bolt );
			}
		}
		
		private class BowInternalTarget : Target
		{
			private BaseRanged it_Ranged;
			
			public BowInternalTarget( BaseRanged ranged ) : base(1, false, TargetFlags.None)
			{
				it_Ranged = ranged;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( it_Ranged.Serial, typeof( BaseRangedModule ) );
				
				if ( module == null )
				{
					CentralMemory.AppendModule( it_Ranged.Serial, new BaseRangedModule( it_Ranged.Serial ), true );
					from.SendMessage( "A module has been created for you. Please try again." );
				}
				else
				{
					if ( targeted is Item && targeted is Arrow )
					{
						Item item = ( Item )targeted;
						
						if ( item.GetType() == typeof( Arrow ) )
						{
							module.ArrowSelection = ArrowType.Normal;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( PoisonArrow ) )
						{
							module.ArrowSelection = ArrowType.Poison;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( ExplosiveArrow ) )
						{
							module.ArrowSelection = ArrowType.Explosive;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( ArmorPiercingArrow ) )
						{
							module.ArrowSelection = ArrowType.ArmorPiercing;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( FreezeArrow ) )
						{
							module.ArrowSelection = ArrowType.Freeze;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( LightningArrow ) )
						{
							module.ArrowSelection = ArrowType.Lightning;
							it_Ranged.InvalidateProperties();
						}
						else
							from.SendMessage( "You must select a arrow." );
					}
					else if ( targeted is Item && targeted is BaseStringer )
					{
						Item item = ( Item )targeted;
						
						if ( it_Ranged.OnModification( from, module ) == false )
							return;
						
						if ( module.HasBowString )
						{
							from.SendMessage( "This item is already strung." );
						}
						/*else if ( !IsChildOf( from.Backpack ) )
						{
							from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
						}*/
						else
						{
							if ( item.GetType() == typeof( LinenThreadStringer ) )
							{
								module.m_Strength = StringStrength.VeryWeak;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( CottonStringer ) )
							{
								module.m_Strength = StringStrength.Weak;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( SilkStringer ) )
							{
								module.m_Strength = StringStrength.Sturdy;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( HorseHairStringer ) )
							{
								module.m_Strength = StringStrength.Strong;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( HempStringer ) )
							{
								module.m_Strength = StringStrength.Dependable;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( AngelHairStringer ) )
							{
								module.m_Strength = StringStrength.Indestructable;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else
								from.SendMessage( "Can Only Target Stringer Items!" );
						}
					}
					else
						from.SendMessage( "You can only target a bolt or bow stringer." );
				}
			}
		}
		
		private class CrossbowInternalTarget : Target
		{
			private BaseRanged it_Ranged;
			
			public CrossbowInternalTarget( BaseRanged ranged ) : base(1, false, TargetFlags.None)
			{
				it_Ranged = ranged;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( it_Ranged.Serial, typeof( BaseRangedModule ) );
				
				if ( module == null )
				{
					CentralMemory.AppendModule( it_Ranged.Serial, new BaseRangedModule( it_Ranged.Serial ), true );
					from.SendMessage( "A module has been created for you. Please try again." );
				}
				else
				{
					if ( targeted is Item && targeted is Bolt )
					{
						Item item = ( Item )targeted;
						
						if ( item.GetType() == typeof( Bolt ) )
						{
							module.BoltSelection = BoltType.Normal;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( PoisonBolt ) )
						{
							module.BoltSelection = BoltType.Poison;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( ExplosiveBolt ) )
						{
							module.BoltSelection = BoltType.Explosive;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( ArmorPiercingBolt ) )
						{
							module.BoltSelection = BoltType.ArmorPiercing;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( FreezeBolt ) )
						{
							module.BoltSelection = BoltType.Freeze;
							it_Ranged.InvalidateProperties();
						}
						else if ( item.GetType() == typeof( LightningBolt ) )
						{
							module.BoltSelection = BoltType.Lightning;
							it_Ranged.InvalidateProperties();
						}
						else
							from.SendMessage( "You must select a bolt." );
					}
					else if ( targeted is Item && targeted is BaseStringer )
					{
						Item item = ( Item )targeted;
						
						if ( it_Ranged.OnModification( from, module ) == false )
							return;
						
						if ( module.HasBowString )
						{
							from.SendMessage( "This item is already strung." );
						}
						/*else if ( !IsChildOf( from.Backpack ) )
						{
							from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
						}*/
						else
						{
							if ( item.GetType() == typeof( LinenThreadStringer ) )
							{
								module.m_Strength = StringStrength.VeryWeak;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( CottonStringer ) )
							{
								module.m_Strength = StringStrength.Weak;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( SilkStringer ) )
							{
								module.m_Strength = StringStrength.Sturdy;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( HorseHairStringer ) )
							{
								module.m_Strength = StringStrength.Strong;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( HempStringer ) )
							{
								module.m_Strength = StringStrength.Dependable;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else if ( item.GetType() == typeof( AngelHairStringer ) )
							{
								module.m_Strength = StringStrength.Indestructable;
								module.m_HasBowString = true;
								it_Ranged.InvalidateProperties();
								item.Delete();
							}
							else
								from.SendMessage( "Can Only Target Stringer Items!" );
						}
					}
					else
						from.SendMessage( "You can only target a bolt or bow stringer." );
				}
			}
		}
		
		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties(list);
			
			ArrayList strings = new ArrayList();
			
			BaseRangedModule module = ( BaseRangedModule )CentralMemory.GetModule( m_This.Serial, typeof( BaseRangedModule ) );
			
			if ( module != null )
			{
				strings.Add( ( "---------------" ) );
				
				if ( this is Bow || this is CompositeBow || this is ElvenCompositeLongbow ||
				    this is MagicalShortbow || this is Yumi )
					strings.Add( ( "Quiver Using: " + module.m_ArrowType ) );
				
				if ( this is Crossbow || this is HeavyCrossbow || this is RepeatingCrossbow )
					strings.Add( ( "Quiver Using: " + module.m_BoltType ) );
				
				strings.Add( ( "lbs per Pull: " + module.m_PullWeight ) );
				strings.Add( ( "String Str: "  + module.m_Strength ) );
				
				string toAdd = "";
				int amount = strings.Count;
				int current = 1;
				
				foreach ( string str in strings )
				{
					toAdd += str;
					
					if ( current != amount )
						toAdd += "\n";
					
					++current;
				}
				
				if ( toAdd != "" )
					list.Add( 1070722, toAdd );
			}
			else
			{
				ModuleCheck( m_Mobile );
			}
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 2 ); // version
		}
		
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			
			switch ( version )
			{
				case 2:
				case 1:
					{
						break;
					}
				case 0:
					{
						/*m_EffectID =*/ reader.ReadInt();
						break;
					}
			}
			
			if ( version < 2 )
			{
				WeaponAttributes.MageWeapon = 0;
				WeaponAttributes.UseBestSkill = 0;
			}
		}
	}
}
I started the server in debug mode. I logged in, added hempstringer, ultimatequiver, carved a new bow, equipped it, doubleclicked to target stringer, strung the bow, and fired away for six whole arrows. THEN the firing arrows animation continued, but the message to the effect of "You can't shoot an unstrung bow" appeared. Arrow count decreased, but no damage done. I then attempted to restring the bow using the doubleclick method, which told me it was already strung. I discarded that one, carved another, then strung it, and doubleclicked it to use normal arrows in backpack. It then refused to work, telling me it was already strung, but the string attributes reported no string and 0 ppp. So, I discarded that one, carved a third, equipped and strung it, then equipped the ultimate quiver, and added some arrows to it after opening it. Doubleclicked the arrows, got off five shots and the server crashed with the following report
Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/20/2006 11:21:41 PM
Mobiles: 33760
Items: 171257
Clients:
- Count: 1
+ 127.0.0.1: (account = attiladehun) (mobile = 0x5F5 'Palfrey')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 621
   at Server.Items.Bow.get_AmmoType() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\Bows\Bow.cs:line 28
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 349
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 78
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
ALL bow files are replaced, trainingdummies, baseranged, baserunictool, archerybuttaddon, all are provided from your package. Alien's central memory is also as provided in message one. On doubleclick to string a bow, or choose an arrow, with arrows in backpack, I get a message about "Module has been created for you. Try again" in game. What should be the course of use for this? Is the quiver required to be equipped before ANY use, must arrows be in it, does the bow have to be strung, and so on. I am not having any luck so far. The character is GM bowcraft/fletching, str of 90.
 
Desiree said:
Would a PlayerMobile.cs from FallenSouls Taming (for RC1) cause this problem?
I have been trying to create the same crash as you got and it doesn't happen. All null references seem to be in place. There is an issue with a non-strung bow. And even seems to be a problem with the modules.

Here is the fix for the unstrung bow issue. I will look further into the modules to see if there is a problem and how to solve it. thanks.

Sorry I couldn't help with the crash.
 

Attachments

  • BaseRanged.cs
    33.3 KB · Views: 66

Desiree

Wanderer
Crash again.

I took the new BaseRanged.cs, dropped it into the directory in place of the former one. I then started with 20 of each type of arrow made by dipping into the various diptubs. Added a bow and stringer, and this time, I couldn't equip the bow without stringing it, since I got a message "you cannot use that before stringing it." I then strung it, got the additional info line about stringtype, ppp, and something about Quiver:Normal. I then added all the arrows to the quiver (UltimateQuiver). I targetted 20 armorpiercing arrows, and the info line about the type of string, Quiver:Normal and ppp disappeared and I had a normal item description as I hovered over the bow. I then headed to a local monster spawn, shot several arrows and didn't get the "armorpierce" effect when they hit. I then chose explosive arrows, targetted another monster, and the additional bow message came back, but this time, had the Nostring line in place of the dependable and 0 ppp. The bow continued to use the previously selected arrows until they ran out (still without the "armorpierce" effect, and as soon as last armorpiercing arrow disappeared, crash.
I then tried another approach, placing seventy-five normal arrows, and 20 poisoned arrows in the quiver, after restarting the server. This time, I selected the normal arrows and the additional string information message again disappeared leaving a normal bow info on hover. Went hunting and targetted a monster and started firing, and the quiver took from the poisoned arrow stack, but not poisoning. When the poisoned arrows ran out, crash again. I am running the FS Animal Taming, Knive's Chat, and Vhaerun's CRL Homesteading in addition to trying to get this implemented. Could any of these have an effect on the scripts? Crash report in debug mode follows:
Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/22/2006 9:11:37 AM
Mobiles: 33739
Items: 171032
Clients:
- Count: 1
+ 127.0.0.1: (account = jean) (mobile = 0x4 'Desiree')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 662
   at Server.Items.Bow.get_AmmoType() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\Bows\Bow.cs:line 28
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 393
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 127
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
 
Desiree said:
I took the new BaseRanged.cs, dropped it into the directory in place of the former one. I then started with 20 of each type of arrow made by dipping into the various diptubs. Added a bow and stringer, and this time, I couldn't equip the bow without stringing it, since I got a message "you cannot use that before stringing it." I then strung it, got the additional info line about stringtype, ppp, and something about Quiver:Normal. I then added all the arrows to the quiver (UltimateQuiver). I targetted 20 armorpiercing arrows, and the info line about the type of string, Quiver:Normal and ppp disappeared and I had a normal item description as I hovered over the bow. I then headed to a local monster spawn, shot several arrows and didn't get the "armorpierce" effect when they hit. I then chose explosive arrows, targetted another monster, and the additional bow message came back, but this time, had the Nostring line in place of the dependable and 0 ppp. The bow continued to use the previously selected arrows until they ran out (still without the "armorpierce" effect, and as soon as last armorpiercing arrow disappeared, crash.
I then tried another approach, placing seventy-five normal arrows, and 20 poisoned arrows in the quiver, after restarting the server. This time, I selected the normal arrows and the additional string information message again disappeared leaving a normal bow info on hover. Went hunting and targetted a monster and started firing, and the quiver took from the poisoned arrow stack, but not poisoning. When the poisoned arrows ran out, crash again. I am running the FS Animal Taming, Knive's Chat, and Vhaerun's CRL Homesteading in addition to trying to get this implemented. Could any of these have an effect on the scripts? Crash report in debug mode follows:
Code:
Server Crash Report
===================
 
RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 11/22/2006 9:11:37 AM
Mobiles: 33739
Items: 171032
Clients:
- Count: 1
+ 127.0.0.1: (account = jean) (mobile = 0x4 'Desiree')
 
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Items.BaseRanged.GetArrowSelected() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 662
   at Server.Items.Bow.get_AmmoType() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\Bows\Bow.cs:line 28
   at Server.Items.BaseRanged.OnFired(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 393
   at Server.Items.BaseRanged.OnSwing(Mobile attacker, Mobile defender) in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\BaseRanged.cs:line 127
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
Hum I'm surprised I didn't notice that before..........
Again! Use ALL OF THE SCRIPTS I GAVE YOU!!!!!!!!!!!!!!!!!!
Including the bows. And I don't appreciate you lying to my like that.
Using THIS BaseRanged.cs (which comes from the 3.0.1a package on the first message here, and replacing yumi, magicshortbow, elvencompositebow, crossbow, heavycrossbow, repeatingcrossbow, compositebow, bow, baseranged, trainingdummies, archerybuttaddon, baserunictool with the ones in the package, making the change to (lowercase) aos.cs as also recommended in the first message
You told me right here that you replaced the bows when you didn't. I don't have the time for this stupid crap.
 

Desiree

Wanderer
Honesty called into question

What am I supposed to do with the replacements? Upon starting the server, the usual complaints about duplicate references in Server.Items, et al, so I go to the Scripts directory, and remove the original distro files, figuring that those provided by your collection will replace them. Server again starts, this time no complaints about duplicates. Am I supposed to drop them into the original subdirectories? The entire litany of bows, the addons, the baserunic and baseranged are in your own subdirectory under Custom, and the originals are all deleted from their original locations. What more is required?
 

Desiree

Wanderer
Changes to install method

This time, I took a copy of the running server, removed all the bows, addons, baseranged, baserunic by overwriting IN the directories that the files reside. So, after this, the Bows section has been transferred into Scripts,Items, Weapons, Ranged, SL, ME, the Addons, and Tools. I started the server with the new items in place, forced a save so that the new bow values should initialize, then shut down and restarted. With that done, the bow now is strung, reports on the info line under the regular values, and ALSO reports type of arrow chosen via Quiver:Explosive. I go hunting mobs, and the explosions go off, the exploding arrow count goes down. HOWEVER, when I then switch to normal arrows, the info line reports Quiver:Normal, but the exploding count still goes down but the effect is normal arrow strike. I then shift to poison arrows, and I once again got the info line Quiver:Normal Nostring ppp:0. Dropped that bow, added another, restrung, targetted poison arrows, they fire normally. Target normal arrows, the normal fires, but the poison count goes down. Switch to exploding arrows, the bow reports unstrung again. No crash this time
 

Desiree

Wanderer
Latest

I just did a fresh open on a completely stock RC1, added ONLY the Advanced Archery and Alien's CC, and logged in. The bow worked, the quiver worked, but the arrows were wonky. Used freeze arrows, okay, used exploding arrows, okay, switched to normal arrows, the normal arrow count did not decrease, but the freeze arrow count did. I removed all but two arrows from the quiver, then fired on a large mob, using normal arrows. When the normal in the quiver ran out, it took from the freeze arrows until they ran out, but kept using the normal animation/effects (in other words, no freeze, just normal arrow hit). Now, I have to find out WHAT it is that is different twixt a stock and our server that causes the Archery to go awry. We have Knive's Chat, Townhouses, FS Taming, and Vhaerun's CRL Homestead enabled as well as trying to enable this one. None of the others have any conflicts or affect anything obvious, save that the FSTaming includes a modified PlayerMobile.cs to include the taming BOD. Would any of those ring a bell in your mind as to a possible conflict?
 
Desiree said:
I just did a fresh open on a completely stock RC1, added ONLY the Advanced Archery and Alien's CC, and logged in. The bow worked, the quiver worked, but the arrows were wonky. Used freeze arrows, okay, used exploding arrows, okay, switched to normal arrows, the normal arrow count did not decrease, but the freeze arrow count did. I removed all but two arrows from the quiver, then fired on a large mob, using normal arrows. When the normal in the quiver ran out, it took from the freeze arrows until they ran out, but kept using the normal animation/effects (in other words, no freeze, just normal arrow hit). Now, I have to find out WHAT it is that is different twixt a stock and our server that causes the Archery to go awry. We have Knive's Chat, Townhouses, FS Taming, and Vhaerun's CRL Homestead enabled as well as trying to enable this one. None of the others have any conflicts or affect anything obvious, save that the FSTaming includes a modified PlayerMobile.cs to include the taming BOD. Would any of those ring a bell in your mind as to a possible conflict?

You don't need to remove and add anything. Just install ALL the scripts I provided for you. Once you do that we will be on the right track. I addressed to you that there are issues with the modules not working proper. That is what causes the bow to lose it's properties when another one is created. But at least we can keep your server from crashing. I have got the next 4 days off work and hope to have a fix for this 2nite. Unfortunately, this is the first time I have used a module for an item and it's gonna take a while to resolve the issue. I am brain storming on a way I can create modules for every bow without adding a ton of code to each bow/crossbow.

And keep in mind that when you alter the scripts and install some and leave out others....you are causing me to chase after problems that are non-existant. This keeps me from getting to the real issues and wastes a lot of time.

BTW it is best that you don't challenge me on the fact that you lied to me. I have proof right here with the debug log that you provided me with. This is the reason why your shard was crashing and mine wasn't. It also made me chase after a non-existant problem for a while before it went noticed:
at Server.Items.Bow.get_AmmoType() in d:\RunUO\Scripts\Custom\Advanced_Archery_v[3].0.1_(a)\Advanced Archery v[3].0.1 (a)\Bows\Bow.cs:line 28
If you d/l and open my package and then open Bow.cs you will see that AmmoType doesn't exist in line #28. That only exists in your distro Bow.cs.

-----------------------------------------------------------
Edit:
[RunUO 2.0 RC1] Lucid's...11-22-2006 01:39 PM Dude. Take some prozak or something. Geeze.
Go die in a fire.
 
Top