Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 12-01-2005, 01:03 PM   #1 (permalink)
Forum Expert
 
Join Date: Dec 2003
Age: 36
Posts: 462
Send a message via ICQ to dstarz20 Send a message via AIM to dstarz20
Default Removal Of Spell Books

If you're like me and you die alot, I hate moving all the spell books to find my rings, and bracelets, etc. Well, I made a small change to Spellbook.cs to eliminate this, kinda. Allow me to explain. When a cast is requested, Spellbook.cs looks through all of your spellbooks in your pack and sees what spells you have. Of course, the book has to exist in your pack, and the spell has to exist in your book, obviously. With this small change to Spellbook.cs, it will assume you have all spells and attempt to cast it. Therefore, no need to have the book in your pack. Make sense? Well, here it is:

Just replace:

Code:
private static void EventSink_CastSpellRequest( CastSpellRequestEventArgs e )
		{
			Mobile from = e.Mobile;

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

			Spellbook book = e.Spellbook as Spellbook;
			int spellID = e.SpellID;

			if ( book == null || !book.HasSpell( spellID ) )
				book = Find( from, spellID );

			if ( book != null && book.HasSpell( spellID ) )
			{
				Spell spell = SpellRegistry.NewSpell( spellID, from, null );

				if ( spell != null )
					spell.Cast();
				else
					from.SendLocalizedMessage( 502345 ); // This spell has been temporarily disabled.
			}
			else
			{
				from.SendLocalizedMessage( 500015 ); // You do not have that spell!
			}
		}
WITH:

Code:
//Edit To Eliminate SpellBooks
		private static void EventSink_CastSpellRequest( CastSpellRequestEventArgs e )
		{
			Mobile from = e.Mobile;

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

				int spellID = e.SpellID;

			
				Spell spell = SpellRegistry.NewSpell( spellID, from, null );

				if ( spell != null )
					spell.Cast();
				else
					from.SendLocalizedMessage( 502345 ); // This spell has been temporarily disabled.
			
		}
	//End Edit To Eliminate SpellBooks
dstarz20 is offline  
Old 12-02-2005, 06:21 AM   #2 (permalink)
 
Join Date: Dec 2004
Location: Sweden
Posts: 117
Default

Sounds like a realy good idea!
Tobbe371 is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5