Go Back   RunUO - Ultima Online Emulation > RunUO > FAQ Forum

FAQ Forum A place to find answers to the most frequently asked questions, and a place to post said answers. Do NOT use this forum to ask questions.

Reply
 
Thread Tools Display Modes
Old 03-05-2006, 02:08 PM   #1 (permalink)
Forum Novice
 
Join Date: Jan 2006
Location: Illinios
Age: 25
Posts: 162
Send a message via ICQ to viront
Default No reagent consumed for Gamemaster/Admin

I didn't see anything about this when I was searching and I thought it was kinda useful. If you want your Gamemasters and GMs to cast spells without having to carry regs you need to find Spell.cs, default is RunUO 1.0\Scripts\Spells\Base\Spell.cs

scroll down to line 157 in unmodified Spell.cs and add the code in red
Code:
		public virtual bool ConsumeReagents()
		{
			if ( m_Caster.AccessLevel >= AccessLevel.GameMaster )
				return true;

			if ( m_Scroll != null || !m_Caster.Player )
				return true;

			if ( AosAttributes.GetValue( m_Caster, AosAttribute.LowerRegCost ) > Utility.Random( 100 ) )
				return true;

			Container pack = m_Caster.Backpack;

			if ( pack == null )
				return false;

			if ( pack.ConsumeTotal( m_Info.Reagents, m_Info.Amounts ) == -1 )
				return true;

			if ( GetType().BaseType == typeof( Spell ) )
			{
				if ( ArcaneGem.ConsumeCharges( m_Caster, 1 + (int)Circle ) )
					return true;
			}

			return false;
		}
__________________
Meh.
viront is offline   Reply With Quote
Reply

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 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5