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!

Bug in SerpentArrow.cs

starlazer

Wanderer
Bug in SerpentArrow.cs

Highlighted in red below, prevents poisoning
Code:
  //----------------------------------------------------------------------------------//
 // Created by Vano. Email: [email protected]      //
//---------------------------------------------------------------------------------//
using System;
using Server;
using System.Collections;

namespace Server.Items
{
	public class SerpentArrow : WeaponAbility
	{
		public SerpentArrow()
		{
		}

		public override int BaseMana { get { return 40; } }

		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );


			attacker.SendMessage( "You poisoning target" ); 
			defender.SendMessage( "You are poisoned" );

			int level;

					if ( Core.AOS )
					{
						if ( attacker.InRange( defender, 2 ) )
						{
							int total = (attacker.Skills.Poisoning.Fixed)[COLOR="Red"] / 2[/COLOR];

							if ( total >= 1000 )
								level = 3;
							else if ( total > 850 )
								level = 2;
							else if ( total > 650 )
								level = 1;
							else
								level = 0;
						}
						else
						{
							level = 0;
						}
					}
					else
					{
						double total = attacker.Skills[SkillName.Poisoning].Value;

						double dist = attacker.GetDistanceToSqrt( defender );

						if ( dist >= 3.0 )
							total -= (dist - 3.0) * 10.0;

						if ( total >= 200.0 && 1 > Utility.Random( 10 ) )
							level = 3;
						else if ( total > (Core.AOS ? 170.1 : 170.0) )
							level = 2;
						else if ( total > (Core.AOS ? 130.1 : 130.0) )
							level = 1;
						else
							level = 0;
					}

				defender.ApplyPoison( attacker, Poison.GetPoison( level ) );

				defender.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
				defender.PlaySound( 0x474 );
		}
	}
}
 

LuxoR

Sorceror
I don't believe that SerpentArrow ability is a part of the SVN package. It is a script created by a third party.
 
Top