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!

Lucid Nagual's << Advanced Archery >>

dragonlady

Pre-AOS, I dont think i am, i have Samurai Empire Installed, I also tryed that too, Nothing, i must be doing something wrong
So you have AOS disabled? On your server end? Or do you have the AOS abilities enabled?
 

dragonlady

Sorceror
im not really sur about that, this is all new to me, i forget how to do it, but i know it has something to do with the AOS.cs but i'll show u mine and what it say's, :)
 

Attachments

  • AOS.cs
    28.1 KB · Views: 2
dragonlady

im not really sur about that, this is all new to me, i forget how to do it, but i know it has something to do with the AOS.cs but i'll show u mine and what it say's, :)
Ok that answers my question. Let me look over the scripts some more.
 

bryant

Sorceror
when wering quiver

ok for some resom my wepons are vry slow when using the quivers have any ideas what i might need to change to fix this?
 

kaiovas

Sorceror
Exception:
System.NullReferenceException: Object reference not set to an instance of an object
in <0x00087> Server.Items.CBaseRanged:OnFired (Server.Mobile attacker, Server.Mobile defender)
in <0x002f4> Server.Items.CBaseRanged:OnSwing (Server.Mobile attacker, Server.Mobile defender)
in <0x001c6> Server.Mobile+CombatTimer:OnTick ()
in <0x000bd> Server.Timer:Slice ()
in <0x008f6> Server.Core:Main (System.String[] args)

any suggestion?

------edit:----------

to be sure i put it on a fresh installation of runuo but is the same, (i had overwrite bows and crossbows, and put other scripts, overwrited trainingdummy and others scripts) when i attack someone or someelse server crash.

question: if i have no saves i have to do what is explained on isctructions?
i'll wait for an answer:) thank you:)
 

A_Li_N

Knight
kaiovas said:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object
in <0x00087> Server.Items.CBaseRanged:OnFired (Server.Mobile attacker, Server.Mobile defender)
in <0x002f4> Server.Items.CBaseRanged:OnSwing (Server.Mobile attacker, Server.Mobile defender)
in <0x001c6> Server.Mobile+CombatTimer:OnTick ()
in <0x000bd> Server.Timer:Slice ()
in <0x008f6> Server.Core:Main (System.String[] args)

any suggestion?

------edit:----------

to be sure i put it on a fresh installation of runuo but is the same, (i had overwrite bows and crossbows, and put other scripts, overwrited trainingdummy and others scripts) when i attack someone or someelse server crash.

question: if i have no saves i have to do what is explained on isctructions?
i'll wait for an answer:) thank you:)
If you can reproduce the crash, do so in debug mode, as it will provide the exact line that causes it.
 

Manu

Knight
Sorry man, completely forgot to mention this one. Armor piercing arrows are labeled wrong in their commodity deeds.

Code:
		string ICommodity.Description
		{
			get
			{
				return String.Format( Amount == 1 ? "{0} poisonarrow" : "{0} poisonarrows", Amount );
			}
		}

should be

Code:
		string ICommodity.Description
		{
			get
			{
				return String.Format( Amount == 1 ? "{0} armorpiercingarrow" : "{0} armorpiercingarrows", Amount );
			}
		}
 

kaiovas

Sorceror
after hours of work (i am totally newbie:p) i noticed that:
this code
Code:
public virtual bool OnFired( Mobile attacker, Mobile defender )
		{
			Container pack = attacker.Backpack;
			Container quiver = attacker.FindItemOnLayer(Layer.MiddleTorso) as Container;
			
			//dracana - chance to not consume ammo if quiver equipped
			if ( attacker.Player && (((BaseQuiver)quiver).LowerAmmoCost > Utility.Random( 100 )) )
				return true;
			
			if ( attacker.Player && ( quiver == null || !quiver.ConsumeTotal( AmmoType, 1 )))
				return false;
			
			if ( attacker.Player && ( pack == null || !pack.ConsumeTotal( AmmoType, 1 )))
				return false;
			
			attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
			
			return true;
		}

should be like this:

Code:
public virtual bool OnFired( Mobile attacker, Mobile defender )
		{
			Container pack = attacker.Backpack;
			Container quiver = attacker.FindItemOnLayer( Layer.Cloak ) as Container;
			
			if( quiver != null )
			{
				if( attacker.Player && (quiver == null || !quiver.ConsumeTotal( AmmoType, 1 )) )
					return false;
				
				if( attacker.Player && quiver != null )
					return true;
			}
			if ( attacker.Player && (pack == null || !pack.ConsumeTotal( AmmoType, 1 )) )
				return false;
				
			attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
				
			return true;
		}

i changed layer of quiver because inner torso doesn't work, i don't know if is correct or not, but it works niceli now:D
anyway thanks for sharing this system, my players will appreciate your work:)
 

dragonlady

Sorceror
I still having problems wearing the Quiver, i also just tried doing what Kaiovas had said, still nothing, man i wish i knew what the hell is wrong, :rolleyes:
 

kaiovas

Sorceror
i changed layer of quivers also in basequiver and others quivers (elven quiver still doesn't work, tomorrow i'll try to do something:))
hi^_^
 
i changed layer of quivers also in basequiver and others quivers (elven quiver still doesn't work, tomorrow i'll try to do something:))
hi^_^
Works for me but not when I am wearing a cloak. I have to take the cloak off and then add the quiver and then put the cloak back on.
-------------------------------------------------
Sorry man, completely forgot to mention this one. Armor piercing arrows are labeled wrong in their commodity deeds.

after hours of work (i am totally newbie:p) i noticed that:
this code

Code:
public virtual bool OnFired( Mobile attacker, Mobile defender ) { Container pack = attacker.Backpack; Container quiver = attacker.FindItemOnLayer(Layer.MiddleTorso) as Container; //dracana - chance to not consume ammo if quiver equipped if ( attacker.Player && (((BaseQuiver)quiver).LowerAmmoCost > Utility.Random( 100 )) ) return true; if ( attacker.Player && ( quiver == null || !quiver.ConsumeTotal( AmmoType, 1 ))) return false; if ( attacker.Player && ( pack == null || !pack.ConsumeTotal( AmmoType, 1 ))) return false; attacker.MovingEffect( defender, EffectID, 18, 1, false, false ); return true; }​


should be like this:


Code:
public virtual bool OnFired( Mobile attacker, Mobile defender ) { Container pack = attacker.Backpack; Container quiver = attacker.FindItemOnLayer( Layer.Cloak ) as Container; if( quiver != null ) { if( attacker.Player && (quiver == null || !quiver.ConsumeTotal( AmmoType, 1 )) ) return false; if( attacker.Player && quiver != null ) return true; } if ( attacker.Player && (pack == null || !pack.ConsumeTotal( AmmoType, 1 )) ) return false; attacker.MovingEffect( defender, EffectID, 18, 1, false, false ); return true; }​
Thank you guys for informing me of these issues. I will try and get to them soon and update. I have been working on AS and haven't had the time. Ohhh and BTW I got the job :)
 

bryant

Sorceror
maj=king items o weight

im trying to make arrows and bolt have 0 weight in the quiver any ideas/?
 

dragonlady

Sorceror
I have no idea what i did to fix it but ty to everyone that helped me with this, & To Lucid sorry im such a newb at this, ty for ur help :):p, i have no idea where i be without you around on these forums lol :)
 

bryant

Sorceror
attributes

i am trying to give my quivers some extra atributes and have done so but they dont seem to work they show up on item but dont go to player stats like luck and bonus strength and such any ideas?
 
bryant

i am trying to give my quivers some extra atributes and have done so but they dont seem to work they show up on item but dont go to player stats like luck and bonus strength and such any ideas?
Post it so I can see what you did wrong. Did you figure out the zero weight?
 

bryant

Sorceror
the base quiver

Code:
using System;


namespace Server.Items
{
	public class BaseQuiver : BaseContainer, IDyable
	{
		public override int DefaultGumpID{ get{ return 65; } }
		public override int DefaultDropSound{ get{ return 0x48; } }
		public override int MaxWeight{ get{ return 0; } }

		private Mobile m_Owner;
		private AosAttributes m_AosAttributes;
		private AosSkillBonuses m_AosSkillBonuses;
		private Mobile m_Crafter;
		private int m_LowerAmmoCost; //Lower Ammo Cost Mod


		[CommandProperty( AccessLevel.GameMaster )]
		public AosAttributes Attributes
		{
			get{ return m_AosAttributes; }
			set{}
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public AosSkillBonuses SkillBonuses
		{
			get{ return m_AosSkillBonuses; }
			set{}
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public Mobile Crafter
		{
			get{ return m_Crafter; }
			set{ m_Crafter = value; InvalidateProperties(); }
		}

		//Lower Ammo Cost Mod
		[CommandProperty( AccessLevel.GameMaster )]
		public int LowerAmmoCost
		{
			get{ return m_LowerAmmoCost; }
			set{ m_LowerAmmoCost = value; InvalidateProperties(); }
		}
		//End Lower Ammo Cost Mod

		public BaseQuiver( int itemID ) : base( itemID )
		{
			Name = "Quiver";
			Weight = 0.0;
			Layer = Layer.MiddleTorso;
			m_AosAttributes = new AosAttributes( this );
			m_AosSkillBonuses = new AosSkillBonuses( this );
		}

		public override bool OnDragDropInto( Mobile from, Item item, Point3D p )
		{
			if( from != null && item is Arrow || item is PoisonArrow
			   || item is Bolt || item is Bullet || item is FukiyaDart )
			{
				this.TotalWeight = this.TotalWeight * 70 / 100;
				return base.OnDragDropInto( from, item, p );
			}
			else
			{
				from.SendMessage("That is not an arrow, bullet,posion arrow or bolt!");
				return false;
			}
		}

		public override bool TryDropItem( Mobile from, Item dropped, bool sendFullMessage )
		{
			if( from != null && dropped is Arrow || dropped is PoisonArrow
			   || dropped is Bolt || dropped is Bullet || dropped is FukiyaDart )
			{
				this.TotalWeight = this.TotalWeight * 70 / 100;
				return base.TryDropItem( from, dropped, sendFullMessage );
			}

			else
			{
				from.SendMessage("That is not an arrow, bullet, poison arrow or bolt!");
				return false;
			}
		}

		public override void OnItemRemoved( Item item )
		{
			base.OnItemRemoved( item );
			if ( TotalItems == 0 )
				TotalWeight = 0;
		}


		public bool Dye( Mobile from, DyeTub sender )
		{
			if ( Deleted )
				return false;

			Hue = sender.DyedHue;

			return true;
		}

		public override bool OnEquip( Mobile from )
		{
			if ( Core.AOS )
				m_AosSkillBonuses.AddTo( from );

			return base.OnEquip( from );
		}

		public override void OnRemoved( object parent )
		{
			if ( Core.AOS )
			        m_AosSkillBonuses.Remove();

			return;
		}

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );
			m_AosSkillBonuses.GetProperties( list );
			int prop;

			if ( m_Crafter != null )
				list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~

			if ( (prop = m_AosAttributes.DefendChance) != 0 )
				list.Add( 1060408, prop.ToString() ); //Defend Chance ~1_val~%

			if ( (prop = m_AosAttributes.WeaponDamage) != 0 )
				list.Add( 1060401, prop.ToString() ); //Weapon Damage ~1_val~

			if ( (prop = ( m_AosAttributes.Luck)) != 0 )
				list.Add( 1060436, prop.ToString() ); // luck ~1_val~

			if ( (prop = m_AosAttributes.BonusDex) != 0 )
				list.Add( 1060409, prop.ToString() ); // dexterity bonus ~1_val~

			if ( (prop = m_AosAttributes.BonusStr) != 0 )
				list.Add( 1060485, prop.ToString() ); // strength bonus ~1_val~

			if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
				list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%

			if(TotalWeight != 0) 
				Timer.DelayCall( TimeSpan.Zero, new TimerCallback( InvalidateProperties ) );

			TotalWeight = 0;
		}

		public override void OnSingleClick( Mobile from )
		{
			this.LabelTo( from, Name );
		}

		public BaseQuiver( Serial serial ) : base( serial )
		{
		}

		public override void UpdateTotals()
		{
			base.UpdateTotals();

			SetTotalWeight( 0 );
                }

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 1 ); // version

			writer.Write( (int) m_LowerAmmoCost ); //Lower Ammo Cost Mod

			writer.Write( m_Crafter );
			m_AosAttributes.Serialize( writer );
			m_AosSkillBonuses.Serialize( writer );
			writer.Write( (Mobile) m_Owner );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch ( version )
			{
				//Lower Ammo Cost Mod
				case 1:
				{
					m_LowerAmmoCost = reader.ReadInt();
					goto case 0;
				}
				case 0:
				{
					m_Crafter = reader.ReadMobile();
					m_AosAttributes = new AosAttributes( this, reader );
					m_AosSkillBonuses = new AosSkillBonuses( this, reader );
					m_Owner = (Mobile) reader.ReadMobile();

					break;
                                }
                        }
                 }
         }
}

Code:
using System;


namespace Server.Items
{
	[Flipable( 0x2B02, 0x2B03 )]
	public class UltimateQuiver : BaseQuiver
	{
		public override int MaxWeight{ get{ return 999999; } }

		[Constructable]
		public UltimateQuiver() : base( 0x2B03 )
		{
			Name = "Ultimate Quiver";
			Attributes.DefendChance = 30; //Defense Chance 15%
			Attributes.WeaponDamage = 60; //Weapon Damage 15%
			Attributes.Luck = 300;
			Attributes.BonusDex = 50;
			Attributes.BonusStr = 50;
                        Attributes.WeaponSpeed = 75;

			SkillBonuses.SetValues( 0, SkillName.Archery, 20.0 ); /*= Utility.Random( 0,4 );*/
		}

		public override bool OnEquip( Mobile from )
		{
			Name = from.Name + "'s Quiver";
                        //if ( Core.AOS )
	                //m_AosSkillBonuses.AddTo( from );

			return base.OnEquip(from);
		}

		public override void OnRemoved( object parent )
		{
			base.OnRemoved(parent);

			Name = "Ultimate Quiver";
                        //if ( Core.AOS )
	                //m_AosSkillBonuses.Remove();

			return;
		}


		public UltimateQuiver( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			if ( Layer != Layer.MiddleTorso )
				Layer = Layer.MiddleTorso;
		}
	}
}

here they are attributes just simply dont work but they do show on the quiver
 
Top