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!

Druid Spells

Miles84

Wanderer
I have found a huge bug in the druid spell stuff that causes shards to crash....it seems that if your shard is using region controlers when players try to use spells in the regions or if you go to restrict spell gump it will crash shard...i do not know how to fix

Thanks
Miles
 

Tru

Knight
Miles84 said:
I have found a huge bug in the druid spell stuff that causes shards to crash....it seems that if your shard is using region controlers when players try to use spells in the regions or if you go to restrict spell gump it will crash shard...i do not know how to fix

Thanks
Miles
You need to be more specific as I use Regions in a Box and disallow druid spells (as well as other systems that have been released) and have yet to have my shard crash from it....
Maybe post your crash log.
 

Miles84

Wanderer
Yes I use regions in a box....it crashes my shard when someone uses a druid spell in the regions...for now I have got rid of the regions to fix the problem...
 

Ostien

Wanderer
OK this has probably been answered but i cant find it. I can cast spells from the scrolls and they work just fine but when i add them to the book they add in just fine but when I try to open the spellbook gump none of the spells are there.
 

Darsden

Wanderer
I love the Druid spells but the one thing lacking was an easy way to cast them so i put together this script. It is a full set of commands for players to cast the spells so they can set up macro keys. eg a player sets up a macro key to say [summontreefellow it will cast that spell as long as they have the spell, regs, and mana needed.

Code:
using System;
using Server;
using Server.Items;
using System.Text;
using Server.Mobiles;
using Server.Network;
using Server.Spells;
using Server.Spells.Druid;


namespace Server.Scripts.Commands
{
	public class CastDruidSpells
	{
		public static void Initialize()
		{
			Server.Commands.CommandPrefix = "[";

			Properties.Register();

			Register( "SheildOfEarth", AccessLevel.Player, new CommandEventHandler( SheildOfEarth_OnCommand ) );

			Register( "HollowReed", AccessLevel.Player, new CommandEventHandler( HollowReed_OnCommand ) );

			Register( "PackOfBeasts", AccessLevel.Player, new CommandEventHandler( PackOfBeasts_OnCommand ) );

			Register( "SpringOfLife", AccessLevel.Player, new CommandEventHandler( SpringOfLife_OnCommand ) );

			Register( "GraspingRoots", AccessLevel.Player, new CommandEventHandler( GraspingRoots_OnCommand ) );

			Register( "BlendWithForest", AccessLevel.Player, new CommandEventHandler( BlendWithForest_OnCommand ) );

			Register( "SwarmOfInsects", AccessLevel.Player, new CommandEventHandler( SwarmOfInsects_OnCommand ) );

			Register( "VolcanicEruption", AccessLevel.Player, new CommandEventHandler( VolcanicEruption_OnCommand ) );

			Register( "SummonTreefellow", AccessLevel.Player, new CommandEventHandler( SummonTreefellow_OnCommand ) );

			Register( "StoneCircle", AccessLevel.Player, new CommandEventHandler( StoneCircle_OnCommand ) );

			Register( "EnchantedGrove", AccessLevel.Player, new CommandEventHandler( EnchantedGrove_OnCommand ) );

			Register( "LureStone", AccessLevel.Player, new CommandEventHandler( LureStone_OnCommand ) );

			Register( "NaturesPassage", AccessLevel.Player, new CommandEventHandler( NaturesPassage_OnCommand ) );

			Register( "MushroomGateway", AccessLevel.Player, new CommandEventHandler( MushroomGateway_OnCommand ) );

			Register( "RestorativeSoil", AccessLevel.Player, new CommandEventHandler( RestorativeSoil_OnCommand ) );

			Register( "SummonFirefly", AccessLevel.Player, new CommandEventHandler( SummonFirefly_OnCommand ) );
		}

		public static void Register( string command, AccessLevel access, CommandEventHandler handler )
		{
			Server.Commands.Register( command, access, handler );
		}

		public static bool HasSpell( Mobile from, int spellID )
		{
			Spellbook book = Spellbook.Find( from, spellID );

			return ( book != null && book.HasSpell( spellID ) );
		}

		[Usage( "SheildOfEarth" )]
		[Description( "Casts SheildOfEarth spell." )]
		public static void SheildOfEarth_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 301 ) )
					{

					new SheildOfEarthSpell( e.Mobile, null ).Cast();
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 

		}

		[Usage( "HollowReed" )]
		[Description( "Casts HollowReed spell." )]
		public static void HollowReed_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;
			
         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 302 ) )
					{
					new HollowReedSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "PackOfBeasts" )]
		[Description( "Casts PackOfBeasts spell." )]
		public static void PackOfBeasts_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 303 ) )
					{
					new PackOfBeastSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "SpringOfLife" )]
		[Description( "Casts SpringOfLife spell." )]
		public static void SpringOfLife_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 304 ) )
					{
					new SpringOfLifeSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "GraspingRoots" )]
		[Description( "Casts GraspingRoots spell." )]
		public static void GraspingRoots_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 305 ) )
					{
					new GraspingRootsSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "BlendWithForest" )]
		[Description( "Casts BlendWithForest spell." )]
		public static void BlendWithForest_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 306 ) )
					{
					new  BlendWithForestSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "SwarmOfInsects" )]
		[Description( "Casts SwarmOfInsects spell." )]
		public static void SwarmOfInsects_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 307 ) )
					{
					new SwarmOfInsectsSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "VolcanicEruption" )]
		[Description( "Casts VolcanicEruption spell." )]
		public static void VolcanicEruption_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 308 ) )
					{
					new VolcanicEruptionSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "SummonTreefellow" )]
		[Description( "Casts SummonTreefellow spell." )]
		public static void SummonTreefellow_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 309 ) )
					{
					new TreefellowSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "StoneCircle" )]
		[Description( "Casts StoneCircle spell." )]
		public static void StoneCircle_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 310 ) )
					{
					new StoneCircleSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "EnchantedGrove" )]
		[Description( "Casts EnchantedGrove spell." )]
		public static void EnchantedGrove_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 311 ) )
					{
					new EnchantedGroveSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "LureStone" )]
		[Description( "Casts LureStone spell." )]
		public static void LureStone_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 312 ) )
					{
					new LureStoneSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "NaturesPassage" )]
		[Description( "Casts NaturesPassage spell." )]
		public static void NaturesPassage_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 313 ) )
					{
					new NaturesPassageSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "MushroomGateway" )]
		[Description( "Casts MushroomGateway spell." )]
		public static void MushroomGateway_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 314 ) )
					{
					new MushroomGatewaySpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "RestorativeSoil" )]
		[Description( "Casts RestorativeSoil spell." )]
		public static void RestorativeSoil_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 315 ) )
					{
					new RestorativeSoilSpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}

		[Usage( "SummonFirefly" )]
		[Description( "Casts SummonFirefly spell." )]
		public static void SummonFirefly_OnCommand( CommandEventArgs e )
		{
				Mobile from = e.Mobile;

         			if ( !Multis.DesignContext.Check( e.Mobile ) )
            				return; // They are customizing

				if ( HasSpell( from, 316 ) )
					{
					new FireflySpell( e.Mobile, null ).Cast(); 
					}
				else
					{
									from.SendLocalizedMessage( 500015 ); // You do not have that spell!
					} 			

		}
	}
}
 
Top