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!

Pre-AOS Spell Channeling Order/Chaos Sheilds!

Twice

Wanderer
Pre-AOS Spell Channeling Order/Chaos Sheilds!

Well, on my shard I wanted SC Order/Chaos sheilds (an corp teh parry mages) and it's Pre-AOS, so I thought I'd share how I did that.

1. Open up Scripts/Spells/Base/Spell.cs

2. Find
Code:
					TimeSpan castDelay = this.GetCastDelay();

					if ( m_Caster.Body.IsHuman )
					{
						int count = (int)Math.Ceiling( castDelay.TotalSeconds / AnimateDelay.TotalSeconds );

						if ( count != 0 )
						{
							m_AnimTimer = new AnimTimer( this, count );
							m_AnimTimer.Start();
						}

						if ( m_Info.LeftHandEffect > 0 )
							Caster.FixedParticles( 0, 10, 5, m_Info.LeftHandEffect, EffectLayer.LeftHand );

						if ( m_Info.RightHandEffect > 0 )
							Caster.FixedParticles( 0, 10, 5, m_Info.RightHandEffect, EffectLayer.RightHand );
					}

					if ( ClearHandsOnCast )
and right below it add
Code:
if( m_Caster.FindItemOnLayer( Layer.TwoHanded ) is ChaosShield || m_Caster.FindItemOnLayer( Layer.TwoHanded ) is OrderShield )
						{
							
						} 
						else 
						{
							m_Caster.ClearHands();
						}
NOTE: Replace your m_Caster.ClearHands(); with this.

3. Find
Code:
if ( m_Scroll is BaseWand )
				{
					bool m = m_Scroll.Movable;

					m_Scroll.Movable = false;

					if ( ClearHandsOnCast )
and replace the m_Caster.ClearHands(); with
Code:
if( m_Caster.FindItemOnLayer( Layer.TwoHanded ) is ChaosShield || m_Caster.FindItemOnLayer( Layer.TwoHanded ) is OrderShield )
						{
							
						} 
						else 
						{
							m_Caster.ClearHands();
						}

4. A little lower you'll find (like 3 lines down)
Code:
			m_Scroll.Movable = m;
				}
				else
				{
replace the m_Caster.ClearHands(); with
Code:
						if( m_Caster.FindItemOnLayer( Layer.TwoHanded ) is ChaosShield || m_Caster.FindItemOnLayer( Layer.TwoHanded ) is OrderShield )
						{
							
						} 
						else 
						{
							m_Caster.ClearHands();
						}

5. Save your script, and restart your server, and your Order/Chaos shields are SC!

Hope this helps some people, if you have any questions, just post em here, or PM me.
 

tejster24

Sorceror
There is a much saner way of doing this, by editing the item class instead. This avoids exceptionally long if statements, and means you don't have to edit Spell.cs every time.

Simply use the following in your item code.
Code:
		public override bool AllowEquipedCast( Mobile from ) 
		{ 
			return true;
		}
 
Top