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!

holy water script

devil6

Wanderer
awesome Idea, however the goal is that there are three vamprie types, lesser, Vamp, and Greater. each having STR ranging from 125 for teh lesser, and 500 for the greather.
THe holy water will kill the lesser and greater yet will do very little damage tot eh greater vampire.
:)...........
 

daat99

Moderator
Staff member
devil6 said:
awesome Idea, however the goal is that there are three vamprie types, lesser, Vamp, and Greater. each having STR ranging from 125 for teh lesser, and 500 for the greather.
THe holy water will kill the lesser and greater yet will do very little damage tot eh greater vampire.
:)...........
Code:
OnHit
{
   if vampire is lesser
      vampire.kill
   else if vampire is normal                              //do 50% damage to normal vampires
       if vampire.hits > (int)vampire.maxhits/2     //if he have more than 50% hp from the total
          vampire.hits = (int)vampire.maxhits/2     //do 50% hp from the total
       else                                                    //he doesn't have over 50% hp so kill it
          vampire.kill
   else if vampire is greater                              //do 10% damage to greater vampires
       if vampire.hits > (int)vampire.maxhits/10    //10% hp
          vampire.hits = (int)vampire.maxhits/10
       else
          vampire.kill
}

What about this?
 

daat99

Moderator
Staff member
devil6 said:
hmmm not sure on that one...lol looks a little advanced for me LOL
I'm not going to give you the code you need.
I gave you the idea on what the code should do it's up to you to try to write it in c#.
If you give it a try and get errors than feel free to post the full script and the errors so we could help you fix them.

Let me suggest that you read basic c# tutorials and "if than else c# tutorial" as well.
If you realy want to script for RunUO than you'll have to read those tutorials sooner or later (sooner means a lot less time will be spent on errors and a lot better scripts, later means more errors and a lot less advanced stuff).
 

devil6

Wanderer
true, yea need to do some more reading on c#, howevery right now i have a bioChemisty exam coming up so when i get some time ill read up on that stuff. So thanks for the help and i will work on this as soon as i can. Again thanks for the help
 

daat99

Moderator
Staff member
devil6 said:
true, yea need to do some more reading on c#, howevery right now i have a bioChemisty exam coming up so when i get some time ill read up on that stuff. So thanks for the help and i will work on this as soon as i can. Again thanks for the help
Glad I can help ;)
 

devil6

Wanderer
lol, ok i put something togeather fairly quike, its a little off what you said, however it works with one exciption, when the poistion explodes i die also....lol here is the line that i changed ]

PHP:
                   if  ( m is LesserVampire || m is Vampire || m is GreaterVampire );
		m.Damage( Utility.Random( 100, 200 ) );
 

daat99

Moderator
Staff member
devil6 said:
lol, ok i put something togeather fairly quike, its a little off what you said, however it works with one exciption, when the poistion explodes i die also....lol here is the line that i changed ]

PHP:
                   if  ( m is LesserVampire || m is Vampire || m is GreaterVampire );
		m.Damage( Utility.Random( 100, 200 ) );
Full script?
 

devil6

Wanderer
PHP:
using System; 
using System.Collections; 
using Server; 
using Server.Network; 
using Server.Targeting; 
using Server.Spells; 
using Server.Mobiles; 

namespace Server.Items 
{ 
    public abstract class BaseHolyWater : BasePotion 
    { 
        public abstract int MinDamage { get; } 
        public abstract int MaxDamage { get; } 

        public override bool RequireFreeHand{ get{ return false; } } 

        private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions? 
        private static bool InstantExplosion = false; // Should explosion potions explode on impact? 
        private const int   ExplosionRange   = 8;     // How long is the blast radius? 

        public BaseHolyWater( PotionEffect effect ) : base( 0xF0D, effect ) 
        { 
        } 

        public BaseHolyWater( 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(); 
        } 

        public virtual object FindParent( Mobile from ) 
        { 
            Mobile m = this.HeldBy; 

            if ( m != null && m.Holding == this ) 
                return m; 

            object obj = this.RootParent; 

            if ( obj != null ) 
                return obj; 

            if ( Map == Map.Internal ) 
                return from; 

            return this; 
        } 

        private Timer m_Timer; 

        private ArrayList m_Users; 

        public override void Drink( Mobile from ) 
        { 
            if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) ) 
            { 
                from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed. 
                return; 
            } 

            ThrowTarget targ = from.Target as ThrowTarget; 

            if ( targ != null && targ.Potion == this ) 
                return; 

            from.RevealingAction(); 

            if ( m_Users == null ) 
                m_Users = new ArrayList(); 

            if ( !m_Users.Contains( from ) ) 
                m_Users.Add( from ); 

            from.Target = new ThrowTarget( this ); 

            if ( m_Timer == null ) 
            { 
                from.SendLocalizedMessage( 500236 ); // You should throw it now! 
                m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); 
            } 
        } 

        private void Detonate_OnTick( object state ) 
        { 
            if ( Deleted ) 
                return; 

            object[] states = (object[])state; 
            Mobile from = (Mobile)states[0]; 
            int timer = (int)states[1]; 

            object parent = FindParent( from ); 

            if ( timer == 0 ) 
            { 
                Point3D loc; 
                Map map; 

                if ( parent is Item ) 
                { 
                    Item item = (Item)parent; 

                    loc = item.GetWorldLocation(); 
                    map = item.Map; 
                } 
                else if ( parent is Mobile ) 
                { 
                    Mobile m = (Mobile)parent; 

                    loc = m.Location; 
                    map = m.Map; 
                } 
                else 
                { 
                    return; 
                } 

                Explode( from, true, loc, map ); 
            } 
            else 
            { 
                if ( parent is Item ) 
                    ((Item)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() ); 
                else if ( parent is Mobile ) 
                    ((Mobile)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() ); 

                states[1] = timer - 1; 
            } 
        } 

        private void Reposition_OnTick( object state ) 
        { 
            if ( Deleted ) 
                return; 

            object[] states = (object[])state; 
            Mobile from = (Mobile)states[0]; 
            IPoint3D p = (IPoint3D)states[1]; 
            Map map = (Map)states[2]; 

            Point3D loc = new Point3D( p ); 

            if ( InstantExplosion ) 
                Explode( from, true, loc, map ); 
            else 
                MoveToWorld( loc, map ); 
        } 

        private class ThrowTarget : Target 
        { 
            private BaseHolyWater m_Potion; 

            public BaseHolyWater Potion 
            { 
                get{ return m_Potion; } 
            } 

            public ThrowTarget( BaseHolyWater potion ) : base( 12, true, TargetFlags.None ) 
            { 
                m_Potion = potion; 
            } 

            protected override void OnTarget( Mobile from, object targeted ) 
            { 
                if ( m_Potion.Deleted || m_Potion.Map == Map.Internal ) 
                    return; 

                IPoint3D p = targeted as IPoint3D; 

                if ( p == null ) 
                    return; 

                Map map = from.Map; 

                if ( map == null ) 
                    return; 

                SpellHelper.GetSurfaceTop( ref p ); 

                from.RevealingAction(); 

                IEntity to; 

                if ( p is Mobile ) 
                    to = (Mobile)p; 
                else 
                    to = new Entity( Serial.Zero, new Point3D( p ), map ); 

                Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 ); 

                m_Potion.Internalize(); 
                Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } ); 
            } 
        } 


        public void Explode( Mobile from, bool direct, Point3D loc, Map map ) 
        { 
            if ( Deleted ) 
                return; 
             
            Delete(); 
             
            for ( int i = 0; m_Users != null && i < m_Users.Count; ++i ) 
            { 
                Mobile m = (Mobile)m_Users[i]; 
                ThrowTarget targ = m.Target as ThrowTarget; 
                 
                if ( targ != null && targ.Potion == this ) 
                    Target.Cancel( m ); 
            } 
             
            if ( map == null ) 
                return; 
             
            Effects.PlaySound( loc, map, 0x207 ); 
            Effects.SendLocationEffect( loc, map, 0x36BD, 20 ); 
             
            int alchemyBonus = 0; 
            int vampireBonus = 100; 
             
            if ( direct ) 
                alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10)); 
             
            IPooledEnumerable eable = LeveledExplosion ? map.GetObjectsInRange( loc, ExplosionRange ) : map.GetMobilesInRange( loc, ExplosionRange ); 
            ArrayList toExplode = new ArrayList(); 
             
            int toDamage = 0; 
             
            foreach ( object o in eable ) 
            { 
                if ( o is Mobile ) 
                { 
                    toExplode.Add( o ); 
                    ++toDamage; 
                } 
            } 
             
            eable.Free(); 
             
            int min = Scale( from, MinDamage ); 
            int max = Scale( from, MaxDamage ); 
             
            for ( int i = 0; i < toExplode.Count; ++i ) 
            { 
                object o = toExplode[i]; 
                 
                if ( o is Mobile ) 
                { 
                    Mobile m = (Mobile)o; 
                     
		if  ( m is LesserVampire || m is Vampire || m is GreaterVampire ); 
        	m.Damage( Utility.Random( 100, 200 ) ); 
	       { 

                      int damage = Utility.RandomMinMax( 9000, 10000 ); 
                         
                        damage += vampireBonus;
    
                        if ( !Core.AOS && damage > 40 ) 
                            damage = 40; 
                        else if ( Core.AOS && toDamage > 2 ) 
                            damage /= toDamage - 1; 
                         
                        AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 ); 
                    } 
         
             
         
                    if ( from == null || (SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false )) ) 
                    { 
                        if ( from != null ) 
                            from.DoHarmful( m ); 
                         
                        int damage = Utility.RandomMinMax( min, max ); 
                         
                        damage += alchemyBonus; 
                } 
                else if ( o is BaseHolyWater ) 
                { 
                    BaseHolyWater pot = (BaseHolyWater)o; 

                    pot.Explode( from, false, pot.GetWorldLocation(), pot.Map ); 
                     

                    } 
                } 
            } 
        } 
    } 
 }
 

Packer898

Knight
Huh? Try something like this...
Code:
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Targeting;
using Server.Spells;
using Server.Mobiles;

namespace Server.Items
{
	public abstract class BaseHolyWater : BasePotion
	{
		public abstract int MinDamage { get; }
		public abstract int MaxDamage { get; }
		
		public override bool RequireFreeHand{ get{ return false; } }
		
		private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions?
		private static bool InstantExplosion = false; // Should explosion potions explode on impact?
		private const int   ExplosionRange   = 8;     // How long is the blast radius?
		
		public BaseHolyWater( PotionEffect effect ) : base( 0xF0D, effect )
		{
		}
		
		public BaseHolyWater( 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();
		}
		
		public virtual object FindParent( Mobile from )
		{
			Mobile m = this.HeldBy;
			
			if ( m != null && m.Holding == this )
				return m;
			
			object obj = this.RootParent;
			
			if ( obj != null )
				return obj;
			
			if ( Map == Map.Internal )
				return from;
			
			return this;
		}
		
		private Timer m_Timer;
		
		private ArrayList m_Users;
		
		public override void Drink( Mobile from )
		{
			if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
			{
				from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
				return;
			}
			
			ThrowTarget targ = from.Target as ThrowTarget;
			
			if ( targ != null && targ.Potion == this )
				return;
			
			from.RevealingAction();
			
			if ( m_Users == null )
				m_Users = new ArrayList();
			
			if ( !m_Users.Contains( from ) )
				m_Users.Add( from );
			
			from.Target = new ThrowTarget( this );
			
			if ( m_Timer == null )
			{
				from.SendLocalizedMessage( 500236 ); // You should throw it now!
				m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } );
			}
		}
		
		private void Detonate_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			int timer = (int)states[1];
			
			object parent = FindParent( from );
			
			if ( timer == 0 )
			{
				Point3D loc;
				Map map;
				
				if ( parent is Item )
				{
					Item item = (Item)parent;
					
					loc = item.GetWorldLocation();
					map = item.Map;
				}
				else if ( parent is Mobile )
				{
					Mobile m = (Mobile)parent;
					
					loc = m.Location;
					map = m.Map;
				}
				else
				{
					return;
				}
				
				Explode( from, true, loc, map );
			}
			else
			{
				if ( parent is Item )
					((Item)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				else if ( parent is Mobile )
					((Mobile)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				
				states[1] = timer - 1;
			}
		}
		
		private void Reposition_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			IPoint3D p = (IPoint3D)states[1];
			Map map = (Map)states[2];
			
			Point3D loc = new Point3D( p );
			
			if ( InstantExplosion )
				Explode( from, true, loc, map );
			else
				MoveToWorld( loc, map );
		}
		
		private class ThrowTarget : Target
		{
			private BaseHolyWater m_Potion;
			
			public BaseHolyWater Potion
			{
				get{ return m_Potion; }
			}
			
			public ThrowTarget( BaseHolyWater potion ) : base( 12, true, TargetFlags.None )
			{
				m_Potion = potion;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
					return;
				
				IPoint3D p = targeted as IPoint3D;
				
				if ( p == null )
					return;
				
				Map map = from.Map;
				
				if ( map == null )
					return;
				
				SpellHelper.GetSurfaceTop( ref p );
				
				from.RevealingAction();
				
				IEntity to;
				
				if ( p is Mobile )
					to = (Mobile)p;
				else
					to = new Entity( Serial.Zero, new Point3D( p ), map );
				
				Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
				
				m_Potion.Internalize();
				Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } );
			}
		}
		
		public void Explode( Mobile from, bool direct, Point3D loc, Map map )
		{
			if ( Deleted )
				return;
			
			Delete();
			
			for ( int i = 0; m_Users != null && i < m_Users.Count; ++i )
			{
				Mobile m = (Mobile)m_Users[i];
				ThrowTarget targ = m.Target as ThrowTarget;
				
				if ( targ != null && targ.Potion == this )
					Target.Cancel( m );
			}
			
			if ( map == null )
				return;
			
			Effects.PlaySound( loc, map, 0x207 );
			Effects.SendLocationEffect( loc, map, 0x36BD, 20 );
			
			int alchemyBonus = 0;
			
			if ( direct )
				alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
			
			IPooledEnumerable eable = LeveledExplosion ? map.GetObjectsInRange( loc, ExplosionRange ) : map.GetMobilesInRange( loc, ExplosionRange );
			ArrayList toExplode = new ArrayList();
			
			int toDamage = 0;
			
			foreach ( object o in eable )
			{
				if ( o is Mobile )
				{
					toExplode.Add( o );
					++toDamage;
				}
			}
			
			eable.Free();
			
			int min = Scale( from, MinDamage );
			int max = Scale( from, MaxDamage );
			
			for ( int i = 0; i < toExplode.Count; ++i )
			{
				object o = toExplode[i];
				
				if ( o is Mobile )
				{
					Mobile m = (Mobile)o;
					
					if  ( m is LesserVampire );
					{
						DoHarmful( m );
						
						int damage = m.HitsMax + 10;//Just kills them
						
						m.Damage( damage, this );
						m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
						m.PlaySound( 0x231 );
					}
					if ( m is Vampire || m is GreaterVampire );
					{
						DoHarmful( m );
						
						int damage = m.HitsMax * .8;//Damage does 80% of their Max Hit Points...
						
						m.Damage( damage, this );
						m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
						m.PlaySound( 0x231 );
					}
					else
					{
						//Catch all here incase they use on something other then a Vampire...
					}
				}
				else if ( o is BaseHolyWater )
				{
					BaseHolyWater pot = (BaseHolyWater)o;
					
					pot.Explode( from, false, pot.GetWorldLocation(), pot.Map );
				}
			}
		}
	}
}
 

devil6

Wanderer
here are teh errror

RunUO - [www.runuo.com] Version 1.0.0, Build 1337
Scripts: Compiling C# scripts...failed (7 errors, 14 warnings)
- Warning: Scripts\Commands\motd.cs: CS0183: (line 322, column 47) The given ex
pression is always of the provided ('Server.Mobiles.PlayerMobile') type
- Warning: Scripts\Commands\motd.cs: CS0219: (line 369, column 8) The variable
'line' is assigned but its value is never used
- Warning: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0642: (line 263, column 3
2) Possible mistaken null statement
- Warning: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0642: (line 273, column 4
8) Possible mistaken null statement
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0103: (line 265, column 7)
The name 'DoHarmful' does not exist in the class or namespace 'Server.Items.Base
HolyWater'
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS1502: (line 269, column 7)
The best overloaded method match for 'Server.Mobile.Damage(int, Server.Mobile)'
has some invalid arguments
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS1503: (line 269, column 25)
Argument '2': cannot convert from 'Server.Items.BaseHolyWater' to 'Server.Mobil
e'
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0103: (line 275, column 7)
The name 'DoHarmful' does not exist in the class or namespace 'Server.Items.Base
HolyWater'
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0029: (line 277, column 20)
Cannot implicitly convert type 'double' to 'int'
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS1502: (line 279, column 7)
The best overloaded method match for 'Server.Mobile.Damage(int, Server.Mobile)'
has some invalid arguments
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS1503: (line 279, column 25)
Argument '2': cannot convert from 'Server.Items.BaseHolyWater' to 'Server.Mobil
e'

- Press return to exit, or R to try again.
 

Packer898

Knight
Hrmm shooting in the dark here but...
Code:
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Targeting;
using Server.Spells;
using Server.Mobiles;

namespace Server.Items
{
	public abstract class BaseHolyWater : BasePotion
	{
		public abstract int MinDamage { get; }
		public abstract int MaxDamage { get; }
		
		public override bool RequireFreeHand{ get{ return false; } }
		
		private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions?
		private static bool InstantExplosion = false; // Should explosion potions explode on impact?
		private const int   ExplosionRange   = 8;     // How long is the blast radius?
		
		public BaseHolyWater( PotionEffect effect ) : base( 0xF0D, effect )
		{
		}
		
		public BaseHolyWater( 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();
		}
		
		public virtual object FindParent( Mobile from )
		{
			Mobile m = this.HeldBy;
			
			if ( m != null && m.Holding == this )
				return m;
			
			object obj = this.RootParent;
			
			if ( obj != null )
				return obj;
			
			if ( Map == Map.Internal )
				return from;
			
			return this;
		}
		
		private Timer m_Timer;
		
		private ArrayList m_Users;
		
		public override void Drink( Mobile from )
		{
			if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
			{
				from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
				return;
			}
			
			ThrowTarget targ = from.Target as ThrowTarget;
			
			if ( targ != null && targ.Potion == this )
				return;
			
			from.RevealingAction();
			
			if ( m_Users == null )
				m_Users = new ArrayList();
			
			if ( !m_Users.Contains( from ) )
				m_Users.Add( from );
			
			from.Target = new ThrowTarget( this );
			
			if ( m_Timer == null )
			{
				from.SendLocalizedMessage( 500236 ); // You should throw it now!
				m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } );
			}
		}
		
		private void Detonate_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			int timer = (int)states[1];
			
			object parent = FindParent( from );
			
			if ( timer == 0 )
			{
				Point3D loc;
				Map map;
				
				if ( parent is Item )
				{
					Item item = (Item)parent;
					
					loc = item.GetWorldLocation();
					map = item.Map;
				}
				else if ( parent is Mobile )
				{
					Mobile m = (Mobile)parent;
					
					loc = m.Location;
					map = m.Map;
				}
				else
				{
					return;
				}
				
				Explode( from, true, loc, map );
			}
			else
			{
				if ( parent is Item )
					((Item)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				else if ( parent is Mobile )
					((Mobile)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				
				states[1] = timer - 1;
			}
		}
		
		private void Reposition_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			IPoint3D p = (IPoint3D)states[1];
			Map map = (Map)states[2];
			
			Point3D loc = new Point3D( p );
			
			if ( InstantExplosion )
				Explode( from, true, loc, map );
			else
				MoveToWorld( loc, map );
		}
		
		private class ThrowTarget : Target
		{
			private BaseHolyWater m_Potion;
			
			public BaseHolyWater Potion
			{
				get{ return m_Potion; }
			}
			
			public ThrowTarget( BaseHolyWater potion ) : base( 12, true, TargetFlags.None )
			{
				m_Potion = potion;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
					return;
				
				IPoint3D p = targeted as IPoint3D;
				
				if ( p == null )
					return;
				
				Map map = from.Map;
				
				if ( map == null )
					return;
				
				SpellHelper.GetSurfaceTop( ref p );
				
				from.RevealingAction();
				
				IEntity to;
				
				if ( p is Mobile )
					to = (Mobile)p;
				else
					to = new Entity( Serial.Zero, new Point3D( p ), map );
				
				Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
				
				m_Potion.Internalize();
				Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } );
			}
		}
		
		public void Explode( Mobile from, bool direct, Point3D loc, Map map )
		{
			if ( Deleted )
				return;
			
			Delete();
			
			for ( int i = 0; m_Users != null && i < m_Users.Count; ++i )
			{
				Mobile m = (Mobile)m_Users[i];
				ThrowTarget targ = m.Target as ThrowTarget;
				
				if ( targ != null && targ.Potion == this )
					Target.Cancel( m );
			}
			
			if ( map == null )
				return;
			
			Effects.PlaySound( loc, map, 0x207 );
			Effects.SendLocationEffect( loc, map, 0x36BD, 20 );
			
			int alchemyBonus = 0;
			
			if ( direct )
				alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
			
			IPooledEnumerable eable = LeveledExplosion ? map.GetObjectsInRange( loc, ExplosionRange ) : map.GetMobilesInRange( loc, ExplosionRange );
			ArrayList toExplode = new ArrayList();
			
			int toDamage = 0;
			
			foreach ( object o in eable )
			{
				if ( o is Mobile )
				{
					toExplode.Add( o );
					++toDamage;
				}
			}
			
			eable.Free();
			
			int min = Scale( from, MinDamage );
			int max = Scale( from, MaxDamage );
			
			for ( int i = 0; i < toExplode.Count; ++i )
			{
				object o = toExplode[i];
				
				if ( o is Mobile )
				{
					Mobile m = (Mobile)o;
					
					if ( from == null || (SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false )) )
					{
						if  ( m is LesserVampire );
						{
							if ( from != null )
								from.DoHarmful( m );
							
							int damage = (int)m.HitsMax + 10;//Just kills them
							
							AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
							m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
							m.PlaySound( 0x231 );
						}
						if ( m is Vampire || m is GreaterVampire );
						{
							if ( from != null )
								from.DoHarmful( m );
							
							int damage = (int)m.HitsMax * .8;//Damage does 80% of their Max Hit Points...
							
							AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
							m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
							m.PlaySound( 0x231 );
						}
						else
						{
							//Catch all here incase they use on something other then a Vampire...
						}
					}
					else if ( o is BaseHolyWater )
					{
						BaseHolyWater pot = (BaseHolyWater)o;
						
						pot.Explode( from, false, pot.GetWorldLocation(), pot.Map );
					}
				}
			}
		}
	}
}
 

devil6

Wanderer
getting there...lol ....

**************************************************************
* _______ _______ _______ _______ _______ *
* ( ____ )( ____ )( ____ \ |\ /|( ___ )( ____ ) *
* | ( )|| ( )|| ( \/ | ) ( || ( ) || ( )| *
* | (____)|| (____)|| (__ _____ | | | || | | || (____)| *
* | _____)| __)| __)(_____)| | | || | | || __) *
* | ( | (\ ( | ( | | | || | | || (\ ( *
* | ) | ) \ \__| (____/\ | (___) || (___) || ) \ \__ *
* |/ |/ \__/(_______/ (_______)(_______)|/ \__/ *
* _____ _ _ _ _ ___ *
* __|_ _| |_ ___ | |_ _ _ _ _ ___ | | | |/ _ \ *
* |___|| | | ' \/ -_) | _| '_| || / -_) | |_| | (_) | *
* |_| |_||_\___| \__|_| \_,_\___| \___/ \___/ *
* *
**************************************************************
RunUO - [www.runuo.com] Version 1.0.0, Build 1337
Scripts: Compiling C# scripts...failed (2 errors, 14 warnings)
- Warning: Scripts\Commands\motd.cs: CS0183: (line 322, column 47) The given ex
pression is always of the provided ('Server.Mobiles.PlayerMobile') type
- Warning: Scripts\Commands\motd.cs: CS0219: (line 369, column 8) The variable
'line' is assigned but its value is never used
- Warning: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0642: (line 265, column 3
3) Possible mistaken null statement
- Warning: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0642: (line 276, column 4
9) Possible mistaken null statement
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS1525: (line 287, column 7)
Invalid expression term 'else'
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS1002: (line 287, column 11)
; expected
- Warning: Scripts\Custom\XmlSpawner2-v281-3of3\XmlMobiles\TalkingBaseEscortabl
e.cs: CS0219: (line 361, column 10) The variable 'gainedPath' is assigned but it
s value is never used
- Warning: Scripts\Mobiles\Vendors\BaseVendor.cs: CS0162: (line 355, column 4)
Unreachable code detected
- Warning: Scripts\Engines\Craft\Core\CraftItem.cs: CS0219: (line 1496, column
11) The variable 'endquality' is assigned but its value is never used
- Warning: Scripts\Engines\Craft\Core\CraftItem.cs: CS0219: (line 1627, column
11) The variable 'endquality' is assigned but its value is never used
- Warning: Scripts\Engines\Craft\DefBlacksmithy.cs: CS0219: (line 219, column 8
) The variable 'index' is assigned but its value is never used
- Warning: Scripts\Items\Weapons\BaseWeapon.cs: CS0219: (line 2699, column 8) T
he variable 'oreType' is assigned but its value is never used
- Warning: Scripts\Items\Wands\BaseWand.cs: CS0219: (line 184, column 8) The va
riable 'number' is assigned but its value is never used
- Warning: Scripts\Mobiles\Townfolk\BaseEscortable.cs: CS0219: (line 324, colum
n 10) The variable 'gainedPath' is assigned but its value is never used
- Warning: Scripts\Mobiles\PlayerMobile.cs: CS0219: (line 1526, column 11) The
variable 'gainedPath' is assigned but its value is never used
- Warning: Scripts\Online-Chat\OnlineClientGump.cs: CS0219: (line 185, column 8
) The variable 'line' is assigned but its value is never used
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Packer898

Knight
Code:
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Targeting;
using Server.Spells;
using Server.Mobiles;

namespace Server.Items
{
	public abstract class BaseHolyWater : BasePotion
	{
		public abstract int MinDamage { get; }
		public abstract int MaxDamage { get; }
		
		public override bool RequireFreeHand{ get{ return false; } }
		
		private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions?
		private static bool InstantExplosion = false; // Should explosion potions explode on impact?
		private const int   ExplosionRange   = 8;     // How long is the blast radius?
		
		public BaseHolyWater( PotionEffect effect ) : base( 0xF0D, effect )
		{
		}
		
		public BaseHolyWater( 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();
		}
		
		public virtual object FindParent( Mobile from )
		{
			Mobile m = this.HeldBy;
			
			if ( m != null && m.Holding == this )
				return m;
			
			object obj = this.RootParent;
			
			if ( obj != null )
				return obj;
			
			if ( Map == Map.Internal )
				return from;
			
			return this;
		}
		
		private Timer m_Timer;
		
		private ArrayList m_Users;
		
		public override void Drink( Mobile from )
		{
			if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
			{
				from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
				return;
			}
			
			ThrowTarget targ = from.Target as ThrowTarget;
			
			if ( targ != null && targ.Potion == this )
				return;
			
			from.RevealingAction();
			
			if ( m_Users == null )
				m_Users = new ArrayList();
			
			if ( !m_Users.Contains( from ) )
				m_Users.Add( from );
			
			from.Target = new ThrowTarget( this );
			
			if ( m_Timer == null )
			{
				from.SendLocalizedMessage( 500236 ); // You should throw it now!
				m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } );
			}
		}
		
		private void Detonate_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			int timer = (int)states[1];
			
			object parent = FindParent( from );
			
			if ( timer == 0 )
			{
				Point3D loc;
				Map map;
				
				if ( parent is Item )
				{
					Item item = (Item)parent;
					
					loc = item.GetWorldLocation();
					map = item.Map;
				}
				else if ( parent is Mobile )
				{
					Mobile m = (Mobile)parent;
					
					loc = m.Location;
					map = m.Map;
				}
				else
				{
					return;
				}
				
				Explode( from, true, loc, map );
			}
			else
			{
				if ( parent is Item )
					((Item)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				else if ( parent is Mobile )
					((Mobile)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				
				states[1] = timer - 1;
			}
		}
		
		private void Reposition_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			IPoint3D p = (IPoint3D)states[1];
			Map map = (Map)states[2];
			
			Point3D loc = new Point3D( p );
			
			if ( InstantExplosion )
				Explode( from, true, loc, map );
			else
				MoveToWorld( loc, map );
		}
		
		private class ThrowTarget : Target
		{
			private BaseHolyWater m_Potion;
			
			public BaseHolyWater Potion
			{
				get{ return m_Potion; }
			}
			
			public ThrowTarget( BaseHolyWater potion ) : base( 12, true, TargetFlags.None )
			{
				m_Potion = potion;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
					return;
				
				IPoint3D p = targeted as IPoint3D;
				
				if ( p == null )
					return;
				
				Map map = from.Map;
				
				if ( map == null )
					return;
				
				SpellHelper.GetSurfaceTop( ref p );
				
				from.RevealingAction();
				
				IEntity to;
				
				if ( p is Mobile )
					to = (Mobile)p;
				else
					to = new Entity( Serial.Zero, new Point3D( p ), map );
				
				Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
				
				m_Potion.Internalize();
				Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } );
			}
		}
		
		public void Explode( Mobile from, bool direct, Point3D loc, Map map )
		{
			if ( Deleted )
				return;
			
			Delete();
			
			for ( int i = 0; m_Users != null && i < m_Users.Count; ++i )
			{
				Mobile m = (Mobile)m_Users[i];
				ThrowTarget targ = m.Target as ThrowTarget;
				
				if ( targ != null && targ.Potion == this )
					Target.Cancel( m );
			}
			
			if ( map == null )
				return;
			
			Effects.PlaySound( loc, map, 0x207 );
			Effects.SendLocationEffect( loc, map, 0x36BD, 20 );
			
			int alchemyBonus = 0;
			
			if ( direct )
				alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
			
			IPooledEnumerable eable = LeveledExplosion ? map.GetObjectsInRange( loc, ExplosionRange ) : map.GetMobilesInRange( loc, ExplosionRange );
			ArrayList toExplode = new ArrayList();
			
			int toDamage = 0;
			
			foreach ( object o in eable )
			{
				if ( o is Mobile )
				{
					toExplode.Add( o );
					++toDamage;
				}
			}
			
			eable.Free();
			
			int min = Scale( from, MinDamage );
			int max = Scale( from, MaxDamage );
			
			for ( int i = 0; i < toExplode.Count; ++i )
			{
				object o = toExplode[i];
				
				if ( o is Mobile )
				{
					Mobile m = (Mobile)o;
					
					if ( from == null || (SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false )) )
					{
						if  ( m is LesserVampire );
						{
							if ( from != null )
								from.DoHarmful( m );
							
							int damage = (int)m.HitsMax + 10;//Just kills them
							
							AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
							m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
							m.PlaySound( 0x231 );
						}
						if ( m is Vampire || m is GreaterVampire );
						{
							if ( from != null )
								from.DoHarmful( m );
							
							int damage = (int)m.HitsMax * .8;//Damage does 80% of their Max Hit Points...
							
							AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
							m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
							m.PlaySound( 0x231 );
						}
					}
					else if ( o is BaseHolyWater )
					{
						BaseHolyWater pot = (BaseHolyWater)o;
						
						pot.Explode( from, false, pot.GetWorldLocation(), pot.Map );
					}
				}
			}
		}
	}
}

I left that last else in there hoping you would attempt to finish it yourself... Just take it out since your not going to do anything with it. Use the above script...
 

devil6

Wanderer
yea, i'll fill that line in there to soon, have to do more ready on c# :) anyways i did as instructed, here are the new error.


RunUO - [www.runuo.com] Version 1.0.0, Build 1337
Scripts: Compiling C# scripts...failed (1 errors, 14 warnings)
- Warning: Scripts\Commands\motd.cs: CS0183: (line 322, column 47) The given ex
pression is always of the provided ('Server.Mobiles.PlayerMobile') type
- Warning: Scripts\Commands\motd.cs: CS0219: (line 369, column 8) The variable
'line' is assigned but its value is never used
- Warning: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0642: (line 265, column 3
3) Possible mistaken null statement
- Warning: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0642: (line 276, column 4
9) Possible mistaken null statement
- Error: Scripts\Custom\Vampire\BaseHolyWater.cs: CS0029: (line 281, column 22)
Cannot implicitly convert type 'double' to 'int'
 

devil6

Wanderer
lol... i do that everytime.. mybad :( here is the script

PHP:
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Targeting;
using Server.Spells;
using Server.Mobiles;

namespace Server.Items
{
	public abstract class BaseHolyWater : BasePotion
	{
		public abstract int MinDamage { get; }
		public abstract int MaxDamage { get; }
		
		public override bool RequireFreeHand{ get{ return false; } }
		
		private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions?
		private static bool InstantExplosion = false; // Should explosion potions explode on impact?
		private const int   ExplosionRange   = 8;     // How long is the blast radius?
		
		public BaseHolyWater( PotionEffect effect ) : base( 0xF0D, effect )
		{
		}
		
		public BaseHolyWater( 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();
		}
		
		public virtual object FindParent( Mobile from )
		{
			Mobile m = this.HeldBy;
			
			if ( m != null && m.Holding == this )
				return m;
			
			object obj = this.RootParent;
			
			if ( obj != null )
				return obj;
			
			if ( Map == Map.Internal )
				return from;
			
			return this;
		}
		
		private Timer m_Timer;
		
		private ArrayList m_Users;
		
		public override void Drink( Mobile from )
		{
			if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
			{
				from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
				return;
			}
			
			ThrowTarget targ = from.Target as ThrowTarget;
			
			if ( targ != null && targ.Potion == this )
				return;
			
			from.RevealingAction();
			
			if ( m_Users == null )
				m_Users = new ArrayList();
			
			if ( !m_Users.Contains( from ) )
				m_Users.Add( from );
			
			from.Target = new ThrowTarget( this );
			
			if ( m_Timer == null )
			{
				from.SendLocalizedMessage( 500236 ); // You should throw it now!
				m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } );
			}
		}
		
		private void Detonate_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			int timer = (int)states[1];
			
			object parent = FindParent( from );
			
			if ( timer == 0 )
			{
				Point3D loc;
				Map map;
				
				if ( parent is Item )
				{
					Item item = (Item)parent;
					
					loc = item.GetWorldLocation();
					map = item.Map;
				}
				else if ( parent is Mobile )
				{
					Mobile m = (Mobile)parent;
					
					loc = m.Location;
					map = m.Map;
				}
				else
				{
					return;
				}
				
				Explode( from, true, loc, map );
			}
			else
			{
				if ( parent is Item )
					((Item)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				else if ( parent is Mobile )
					((Mobile)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
				
				states[1] = timer - 1;
			}
		}
		
		private void Reposition_OnTick( object state )
		{
			if ( Deleted )
				return;
			
			object[] states = (object[])state;
			Mobile from = (Mobile)states[0];
			IPoint3D p = (IPoint3D)states[1];
			Map map = (Map)states[2];
			
			Point3D loc = new Point3D( p );
			
			if ( InstantExplosion )
				Explode( from, true, loc, map );
			else
				MoveToWorld( loc, map );
		}
		
		private class ThrowTarget : Target
		{
			private BaseHolyWater m_Potion;
			
			public BaseHolyWater Potion
			{
				get{ return m_Potion; }
			}
			
			public ThrowTarget( BaseHolyWater potion ) : base( 12, true, TargetFlags.None )
			{
				m_Potion = potion;
			}
			
			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
					return;
				
				IPoint3D p = targeted as IPoint3D;
				
				if ( p == null )
					return;
				
				Map map = from.Map;
				
				if ( map == null )
					return;
				
				SpellHelper.GetSurfaceTop( ref p );
				
				from.RevealingAction();
				
				IEntity to;
				
				if ( p is Mobile )
					to = (Mobile)p;
				else
					to = new Entity( Serial.Zero, new Point3D( p ), map );
				
				Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
				
				m_Potion.Internalize();
				Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } );
			}
		}
		
		public void Explode( Mobile from, bool direct, Point3D loc, Map map )
		{
			if ( Deleted )
				return;
			
			Delete();
			
			for ( int i = 0; m_Users != null && i < m_Users.Count; ++i )
			{
				Mobile m = (Mobile)m_Users[i];
				ThrowTarget targ = m.Target as ThrowTarget;
				
				if ( targ != null && targ.Potion == this )
					Target.Cancel( m );
			}
			
			if ( map == null )
				return;
			
			Effects.PlaySound( loc, map, 0x207 );
			Effects.SendLocationEffect( loc, map, 0x36BD, 20 );
			
			int alchemyBonus = 0;
			
			if ( direct )
				alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
			
			IPooledEnumerable eable = LeveledExplosion ? map.GetObjectsInRange( loc, ExplosionRange ) : map.GetMobilesInRange( loc, ExplosionRange );
			ArrayList toExplode = new ArrayList();
			
			int toDamage = 0;
			
			foreach ( object o in eable )
			{
				if ( o is Mobile )
				{
					toExplode.Add( o );
					++toDamage;
				}
			}
			
			eable.Free();
			
			int min = Scale( from, MinDamage );
			int max = Scale( from, MaxDamage );
			
			for ( int i = 0; i < toExplode.Count; ++i )
			{
				object o = toExplode[i];
				
				if ( o is Mobile )
				{
					Mobile m = (Mobile)o;
					
					if ( from == null || (SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false )) )
					{
						if  ( m is LesserVampire );
						{
							if ( from != null )
								from.DoHarmful( m );
							
							int damage = (int)m.HitsMax + 10;//Just kills them
							
							AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
							m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
							m.PlaySound( 0x231 );
						}
						if ( m is Vampire || m is GreaterVampire );
						{
							if ( from != null )
								from.DoHarmful( m );
							
							int damage = (int)m.HitsMax * .8;//Damage does 80% of their Max Hit Points...
							
							AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
							m.FixedParticles( 0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist );
							m.PlaySound( 0x231 );
						}
					}
					else if ( o is BaseHolyWater )
					{
						BaseHolyWater pot = (BaseHolyWater)o;
						
						pot.Explode( from, false, pot.GetWorldLocation(), pot.Map );
					}
				}
			}
		}
	}
}
 

Packer898

Knight
That cant be the right error with the last script you posted. m.MaxHits is declared as an int... Retry and make sure you got the right script in your runuo folder.
 
Top