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!

Spellcrafting v2.2

Lorryn

Wanderer
I am making a npc that will exchange a New spellbook for a BookOfSpellCrafts, however when I add it in the script it gives me an error.
Even if I just put it in as a PackItem

PackItem( new BookOfSpellCrafts() );

I get this error:
Code:
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Unreachable code detected
 - Error: Scripts\OsanCustom\SpellScribe.cs: CS0246: (line 60, column 17) The ty
pe or namespace name 'BookOfSpellCrafts' could not be found (are you missing a u
sing directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.


any help appreciated.
Req.
 

nix4

Wanderer
stacking stats

smoksalot said:
Question;

How do I put a cap on the Resist because if you "say take the spellcraft and add energy then do it again it keeps stacking" I have gone all 100+ resist with a 35 % chance breakage but I dont mind the stacking I would like it to stop at say 25 or something.

Any word on whent his might get done? Otherwise this script will just get abused by players.
 
nix4 said:
Any word on whent his might get done? Otherwise this script will just get abused by players.

Sorry I can't implement this request at a moment's notice but I've been BUSY with OTHER projects. So please, wait or do it yourself. I'll do it when I and finished with my other projects.
 

BloodStoned

Wanderer
Ok, looking and working with the spellcrafting, it seems it gives attributes according to skill totals in both alchemy and inscription, with the max skill of a total of 200.0 to possibly get max properties of the craft.

What line would I edit to possibly make it so you would need GM inscription and Alchemy to attempt this craft, and also make it scaleable in skill to 120.0 in both skills?

If it cannot be made scaleable, how about if I set the callbacks at 0 minimum and leave the max alone, so I can change total skill to equal say 260.0 points. Making the items crafted to have a chance at max properties, could only be crafted by someone with 120 alchemy and inscription and also say, possesing a magic skill necklace and/or bracelet that would add to your alchemy and inscription to give you the extra 10 points needed in each skill. What line could i edit and how to do either one? Or possibly what one would be eisier to implement? :confused:
 

smoksalot

Wanderer
TheOutkastDev said:
Sorry I can't implement this request at a moment's notice but I've been BUSY with OTHER projects. So please, wait or do it yourself. I'll do it when I and finished with my other projects.


OK cool man I'll continue to try and figure it out my self, But please do Post your recommendations when ever you get the chance dude no rush, I would like to know what I have to do is all.
 

Lorryn

Wanderer
Here is the BookOfSpellCrafts.cs I used. I used one that was in the Distro and also use the one post in the zip. I added it to the CharacterCreation.cs
using PackItem( new BookOfSpellCrafts() );
and i still get the error . As for npc that exchanges a spellbook for another Item all other things work. Just having trouble adding the spellcrafting book.

- Error: Scripts\Misc\CharacterCreation.cs: CS0246: (line 33, column 18) The ty
pe or namespace name 'BookOfSpellCrafts' could not be found (are you missing a u
sing directive or an assembly reference?)

Which makes me think the script isn't being found ?

BookOfSpallCrafts.cs
Code:
using System;
using Server;
using Server.Targeting;
using Server.Mobiles;
using Server.SpellCrafting.Gumps;

namespace Server.SpellCrafting.Items
{	
	public class BookOfSpellCrafts : Item
	{
		public static void Initialize() 
		{ 
           		Server.Commands.Register( "AllCrafts", AccessLevel.GameMaster, new CommandEventHandler( AllCrafts_OnCommand ) );
			Server.Commands.Register( "AddCraft", AccessLevel.GameMaster, new CommandEventHandler( AddCraft_OnCommand ) );
	       	}

		private static void AllCrafts_OnCommand( CommandEventArgs e )
		{
			e.Mobile.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( AllCrafts_OnTarget ) );
			e.Mobile.SendMessage( "Select the book of spellcrafts to fill." );
		}

		[Usage( "AddCraft <num>" )]
		private static void AddCraft_OnCommand( CommandEventArgs e )
		{
			if ( e.GetInt32(0) < 0 || e.GetInt32(0) > 66 )
			{
				e.Mobile.SendMessage( "Craft number must be between 0 and 66." );
			}
			else
			{
				e.Mobile.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( AddCraft_OnTarget ), e.GetInt32(0) );
				e.Mobile.SendMessage( "Select the book of spellcrafts to add this craft to." );
			}
		}

		private static void AllCrafts_OnTarget( Mobile from, object target )
		{
			if ( target is BookOfSpellCrafts )
			{
				BookOfSpellCrafts book = target as BookOfSpellCrafts;

				book.Content = ulong.MaxValue;

				from.SendMessage( "Book filled." );
			}
			else
			{
				from.SendMessage( "That is not a Book of Spellcrafts." );
			}
		}

		private static void AddCraft_OnTarget( Mobile from, object target, object state )
		{
			int num = (int)state;

			if ( target is BookOfSpellCrafts )
			{
				BookOfSpellCrafts book = target as BookOfSpellCrafts;

				if ( book.HasCraft( num ) )
				{
					from.SendMessage( "This book already has this craft." );
				}
				else
				{
					book.Content |= (ulong)1 << num;
					book.InvalidateProperties();
					from.SendMessage( "The spellcraft has been added to this book." );
				}
			}
			else
			{
				from.SendMessage( "This is not a Book of Spellcrafts." );
			}
		}
					
		private ulong m_Content;

		public int Count
		{
			get
			{
				return GetCraftCount();
			}
		}

		public ulong Content
		{
			get
			{ 
				return m_Content;
			}
			set
			{
				m_Content = value;
			}
		}

		[Constructable]
		public BookOfSpellCrafts() : base( 0x2254 )
		{
			Name = "Book Of SpellCrafts";
			Hue = 0x461;
		}

		public BookOfSpellCrafts( Serial serial ) : base( serial )
		{
		}

		public bool HasCraft( int CraftID )
		{
			return ( CraftID >= 0 && CraftID < 67 && (m_Content & ((ulong)1 << CraftID)) != 0 );
		}

		private int GetCraftCount()
		{
			int count = 0;

			if ( Core.AOS )
			{
				for( int i = 0; i < 47; ++i )
				{
					if ( HasCraft( i ) ) ++count;
				}
			}
			else
			{
				for( int i = 47; i < 67; ++i )
				{
					if ( HasCraft( i ) ) ++count;
				}
			}

			return count;
		}

		public override void OnDoubleClick( Mobile from )
		{
			from.SendGump( new SpellCraftBook( from, this ) );
		}

		public override bool OnDragDrop( Mobile from, Item dropped )
		{
			if ( dropped is BaseSpellCraft && dropped.Amount == 1 )
			{
				BaseSpellCraft craft = (BaseSpellCraft)dropped;

				if ( HasCraft( craft.CraftID ) )
				{
					from.SendMessage( "This spellcraft is already present in that book." );
					return false;
				}
				else if ( Core.AOS && craft.CraftID > 46 )
				{
					from.SendMessage( "This type of spellcraft cannot be placed in that book." );
					return false;
				}
				else if ( !Core.AOS && craft.CraftID < 47 )
				{
					from.SendMessage( "This type of spellcraft cannot be placed in that book." );
					return false;
				}
				else
				{
					int val = craft.CraftID;

					if ( val >= 0 && val < 67 )
					{
						m_Content |= (ulong)1 << val;

						InvalidateProperties();

						craft.Delete();
						from.CloseGump( typeof( SpellCraftBook ) );
						from.SendGump( new SpellCraftBook( from, this ) );
						return true;
					}
					return false;
				}
			}
			return false;
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch( version )
			{
				// version 0 reads second integer, version 1 no longer
				// needs it. No going to case 0 or serialization error
				// will occur!!
				case 1:
					m_Content = reader.ReadULong(); break;
				case 0:
					m_Content = reader.ReadULong();
					int m_Count = reader.ReadInt(); break;
			}
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int)1 ); // version
			writer.Write( m_Content );
		}
	}
}
 

Crack177

Wanderer
Add this to the top of your CharacterCreation.cs.
Code:
using Server.SpellCrafting.Gumps;
using Server.SpellCrafting.Items;
It worked like that with mine.
 

Lorryn

Wanderer
thanks heaps Crack177

Also made it work on my npc, he now gives out a Boof of Spell Crafting when you give him a spelbook :)

cheers
L
 

kennylassard

Wanderer
umm i have a question, when i try to add damage increase with this script instead of stacking it removes the old damage increase and sets it instead of stacking. how would i change this to stack? it may also do this with a few others but i havent tested yet
 

KillerBeeZ

Knight
kennylassard said:
umm i have a question, when i try to add damage increase with this script instead of stacking it removes the old damage increase and sets it instead of stacking. how would i change this to stack? it may also do this with a few others but i havent tested yet

Trust me, you do NOT want that to stack, if it did, any player with low skill can do max damage with any weapon.

I have been trying to get the resistances on armor to NOT stack for the longest time because just that will unbalance a shard.

To get more damage increase, get more skill
 

dnew2

Wanderer
fc stackable too

I also have notice that for some reason FC will stack. ive been able to get fc6 before explosion with a 100/100 alch/scribe char. FCR will not stack though it will redo the "roll". I have looked both of the scripts and they seam the same. but one stacks and the other re does the prop. i believe FC12 with 2 pieces of jewlery is far more overpowered than all 70 suit.
 

Protius73

Sorceror
You can disable the ones you do not wish players to use and ive noticed a stack effect on the resists and the fc...
so i went ahead and disabled them so players cannot use them.. i figure it this way they can find jewelry with fc on it and modify those of course whether or not they succeed is another story as ive gone ahead and increased the likelihood of blowing themselves up as well as the item ... its a great system and i love the flexibility ... Great work man totally kewl :D
 

ultimaIX

Wanderer
Cool!

Lorryn said:
thanks heaps Crack177

Also made it work on my npc, he now gives out a Boof of Spell Crafting when you give him a spelbook :)

cheers
L

If you wanted to upload your NPC script, I would be happy to use it on my small Shard! This is a great idea!

G.
 

phoo

Sorceror
New Craft ID

I am trying to accomplish adding a spellcraft of ItemName
this will allow the crafter to add a name to his/her custom crafted item

what I have so far is this:

BaseSpellCraft.cs became:

Code:
using System;
using Server;
using Server.Mobiles;
using Server.Targeting;

namespace Server.SpellCrafting.Items
{
	public class BaseSpellCraft : Item
	{
		private int m_CraftID;

		[CommandProperty( AccessLevel.GameMaster )]
		public int CraftID
		{
			get { return m_CraftID; } 
			set { m_CraftID = value; InvalidateProperties(); }
		}

		public BaseSpellCraft( int amount, int craft ) : base( 0xF26 )
		{
			Name = "Spellcraft Jewel";
			Stackable = false;
			Weight = 0.1;
			Amount = amount;
			CraftID = craft;
		}

		public BaseSpellCraft( Serial serial ) : base( serial )
		{
		}

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties(list);

			if ( m_CraftID > 48 )
				list.Add( 1050045," \tNon Aos Only Craft\t " );

			if ( m_CraftID == 0 )
				list.Add( 1050045," \tStrength Bonus\t " );

			if ( m_CraftID == 1 )
				list.Add( 1050045," \tDexterity Bonus\t " );

			if ( m_CraftID == 2 )
				list.Add( 1050045," \tIntelligence Bonus\t " );

			if ( m_CraftID == 3 )
				list.Add( 1050045," \tHit Point Bonus\t " );

			if ( m_CraftID == 4 )
				list.Add( 1050045," \tStamina Bonus\t " );

			if ( m_CraftID == 5 )
				list.Add( 1050045," \tMana Bonus\t " );

			if ( m_CraftID == 6 )
				list.Add( 1050045," \tPhysical Resist Bonus\t " );

			if ( m_CraftID == 7 )
				list.Add( 1050045," \tFire Resist Bonus\t " );

			if ( m_CraftID == 8 )
				list.Add( 1050045," \tCold Resist Bonus\t " );

			if ( m_CraftID == 9 )
				list.Add( 1050045," \tPoison Resist Bonus\t " );

			if ( m_CraftID == 10 )
				list.Add( 1050045," \tEnergy Resist Bonus\t " );

			if ( m_CraftID == 11 )
				list.Add( 1050045," \tHit Point Rengeration\t " );

			if ( m_CraftID == 12 )
				list.Add( 1050045," \tMana Regeneration\t " );

			if ( m_CraftID == 13 )
				list.Add( 1050045," \tStamina Regeneration\t " );

			if ( m_CraftID == 14 )
				list.Add( 1050045," \tFaster Cast Recovery\t " );

			if ( m_CraftID == 15 )
				list.Add( 1050045," \tFaster Cast Speed\t " );

			if ( m_CraftID == 16 )
				list.Add( 1050045," \tLower Mana Cost\t " );

			if ( m_CraftID == 17 )
				list.Add( 1050045," \tLower Reagent Cost\t " );

			if ( m_CraftID == 18 )
				list.Add( 1050045," \tMage Armor\t " );

			if ( m_CraftID == 19 )
				list.Add( 1050045," \tMage Weapon\t " );

			if ( m_CraftID == 20 )
				list.Add( 1050045," \tSpell Channeling\t " );

			if ( m_CraftID == 21 )
				list.Add( 1050045," \tSpell Damage Increase\t " );

			if ( m_CraftID == 22 )
				list.Add( 1050045," \tHit Cold Area\t " );

			if ( m_CraftID == 23 )
				list.Add( 1050045," \tHit Energy Area\t " );

			if ( m_CraftID == 24 )
				list.Add( 1050045," \tHit Fire Area\t " );

			if ( m_CraftID == 25 )
				list.Add( 1050045," \tHit Physical Area\t " );

			if ( m_CraftID == 26 )
				list.Add( 1050045," \tHit Poison Area\t " );

			if ( m_CraftID == 27 )
				list.Add( 1050045," \tHit Dispel\t " );

			if ( m_CraftID == 28 )
				list.Add( 1050045," \tHit Fireball\t " );

			if ( m_CraftID == 29 )
				list.Add( 1050045," \tHit Harm\t " );

			if ( m_CraftID == 30 )
				list.Add( 1050045," \tHit Lightning\t " );

			if ( m_CraftID == 31 )
				list.Add( 1050045," \tHit Magic Arrow\t " );

			if ( m_CraftID == 32 )
				list.Add( 1050045," \tHit Lower Attack\t " );

			if ( m_CraftID == 33 )
				list.Add( 1050045," \tHit Lower Defense\t " );

			if ( m_CraftID == 34 )
				list.Add( 1050045," \tHit Leech Hits\t " );

			if ( m_CraftID == 35 )
				list.Add( 1050045," \tHit Leech Mana\t " );

			if ( m_CraftID == 36 )
				list.Add( 1050045," \tHit Leech Stamina\t " );

			if ( m_CraftID == 37 )
				list.Add( 1050045," \tUse Best Weapon Skill\t " );

			if ( m_CraftID == 38 )
				list.Add( 1050045," \tWeapon Damage Increase\t " );

			if ( m_CraftID == 39 )
				list.Add( 1050045," \tSwing Speed Increase\t " );

			if ( m_CraftID == 40 )
				list.Add( 1050045," \tHit Chance Increase\t " );

			if ( m_CraftID == 41 )
				list.Add( 1050045," \tDefense Chance Increase\t " );

			if ( m_CraftID == 42 )
				list.Add( 1050045," \tEnhance Potions\t " );

			if ( m_CraftID == 43 )
				list.Add( 1050045," \tLower Stat Requirements\t " );

			if ( m_CraftID == 44 )
				list.Add( 1050045," \tLuck\t " );

			if ( m_CraftID == 45 )
				list.Add( 1050045," \tReflect Physical\t " );

			if ( m_CraftID == 46 )
				list.Add( 1050045," \tSelf Repair\t " );

			if ( m_CraftID == 47 )
				list.Add( 1050045," \tItem Name\t " );
		}

		public override void OnSingleClick( Mobile from )
		{
			string prop = "";

			if ( m_CraftID < 48 )
				prop = "Aos Only Craft";

			if ( m_CraftID == 48 )
				prop = "Durable";

			if ( m_CraftID == 49 )
				prop = "Substantial";

			if ( m_CraftID == 50 )
				prop = "Massive";

			if ( m_CraftID == 51 )
				prop = "Fortified";

			if ( m_CraftID == 52 )
				prop = "Indestructible";

			if ( m_CraftID == 53 )
				prop = "Ruin";

			if ( m_CraftID == 54 )
				prop = "Might";

			if ( m_CraftID == 55 )
				prop = "Force";

			if ( m_CraftID == 56 )
				prop = "Power";

			if ( m_CraftID == 57 )
				prop = "Vanquishing";

			if ( m_CraftID == 58 )
				prop = "Accurate";

			if ( m_CraftID == 59 )
				prop = "Surpassingly Accurate";

			if ( m_CraftID == 60 )
				prop = "Eminently Accurate";

			if ( m_CraftID == 61 )
				prop = "Exceedingly Accurate";

			if ( m_CraftID == 62 )
				prop = "Supremely Accurate";

			if ( m_CraftID == 63 )
				prop = "Defense";

			if ( m_CraftID == 64 )
				prop = "Guarding";

			if ( m_CraftID == 65 )
				prop = "Hardening";

			if ( m_CraftID == 66 )
				prop = "Fortification";

			if ( m_CraftID == 67 )
				prop = "Invulnerability";

			this.LabelTo( from, "Spellcraft Jewel : {0}", prop );
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
			writer.Write( m_CraftID );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			m_CraftID = reader.ReadInt();
		}
	}
}

In this change CraftID 47 was added and all values above that were increased accordingly.

SpellCraft.cs became:

Code:
using System;
using Server;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.SpellCrafting.Items;

namespace Server.SpellCrafting
{
	public class SpellCraft
	{
		public static readonly bool ArtifactCraftable = true;
		public static readonly bool BraceletsRingsOnly = false;
		public static readonly int MaxPropsAllowed = 6; // 5
		public static readonly double ExplodeChance = 0.0005; // .35
		public static readonly double DestroyChance = 0.0005; // .45
		public static readonly int ExplodeMinDmg = 20;
		public static readonly int ExplodeMaxDmg = 40;

		public static readonly bool[] Enabled = new bool[]
		{
			// true if the spellcraft is enabled
			true,// str bonus = 0,
			true,// dex bonus = 1,
			true,// int bonus = 2,
			true,// hp bonus = 3,
			true,// stam bonus = 4,
			true,// mana bonus = 5,
			true,// physical resist = 6,
			true,// fire resist = 7,
			true,// cold resist = 8,
			true,// poison resist = 9,
			true,// energy resist = 10,
			true,// hit point regeneration = 11,
			true,// mana regeneration = 12,
			true,// stamina regeneration = 13,
			true,// faster cast recovery = 14,
			true,// faster cast speed = 15,
			true,// lower mana cost = 16,
			true,// lower reagent cost = 17,
			true,// mage armor = 18,
			true,// mage weapon = 19,
			true,// spell channeling = 20,
			true,// spell damage increase = 21,
			true,// hit cold area = 22,
			true,// hit energy area = 23,
			true,// hit fire area = 24,
			true,// hit physical area = 25,
			true,// hit poison area = 26,
			true,// hit dispel = 27,
			true,// hit fireball = 28,
			true,// hit harm = 29,
			true,// hit lightning = 30,
			true,// hit magic arrow = 31,
			true,// hit lower attack = 32,
			true,// hit lower defense = 33,
			true,// hit leech hits = 34,
			true,// hit leech mana = 35,
			true,// hit leech stamina = 36,
			true,// use best weapon skill = 37,
			true,// weapon damage increase = 38,
			true,// swing speed increase = 39,
			true,// hit chance increase = 40,
			true,// defense chance increase = 41,
			true,// enhance potions = 42,
			true,// lower stat requirements = 43,
			true,// luck = 44,
			true,// reflect physical = 45,
			true,// self repair = 46,
			true,// Item Name = 47
			true,// durable = 48,
			true,// substantial = 49,
			true,// massive = 50,
			true,// fortified = 51,
			true,// indestructible = 52,
			true,// ruin = 53,
			true,// might = 54,
			true,// force = 55,
			true,// power = 56,
			true,// vanquishing = 57,
			true,// accurate = 58,
			true,// surpassingly accurate = 59,
			true,// eminently accurate = 60,
			true,// exceedingly accurate = 61,
			true,// supremely accurate = 62,
			true,// defense = 63,
			true,// guarding = 64,
			true,// hardening = 65,
			true,// fortification = 66,
			true,// invulnerability = 67,
		};

		public static Type[] m_Loot = new Type[]
		{
			typeof( BonusStrJewel ), 	typeof( BonusDexJewel ), 	typeof( BonusIntJewel ),
			typeof( BonusHitsJewel ),	typeof( BonusStamJewel ),	typeof( BonusManaJewel ),
			typeof( PhysicalResistJewel ),	typeof( FireResistJewel ),	typeof( ColdResistJewel ),
			typeof( PoisonResistJewel ),	typeof( EnergyResistJewel ),	typeof( RegenHitsJewel ),
			typeof( RegenManaJewel ),	typeof( RegenStamJewel ),	typeof( CastRecoveryJewel ),
			typeof( CastSpeedJewel ),	typeof( LowerManaCostJewel ),	typeof( LowerRegCostJewel ),
			typeof( MageArmorJewel ),	typeof( MageWeaponJewel ),	typeof( SpellChannelingJewel ),
			typeof( SpellDamageJewel ),	typeof( HitColdAreaJewel ),	typeof( HitEnergyAreaJewel ),
			typeof( HitFireAreaJewel ),	typeof( HitPhysicalAreaJewel ),	typeof( HitPoisonAreaJewel ),
			typeof( HitDispelJewel ),	typeof( HitFireballJewel ),	typeof( HitHarmJewel ),
			typeof( HitLightningJewel ),	typeof( HitMagicArrowJewel ),	typeof( HitLowerAttackJewel ),
			typeof( HitLowerDefendJewel ),	typeof( HitLeechHitsJewel ),	typeof( HitLeechManaJewel ),
			typeof( HitLeechStamJewel ),	typeof( UseBestSkillJewel ),	typeof( WeaponDamageJewel ),
			typeof( WeaponSpeedJewel ),	typeof( AttackChanceJewel ),	typeof( DefendChanceJewel ),
			typeof( EnhancePotionsJewel ),	typeof( LowerStatReqJewel ),	typeof( LuckJewel ),
			typeof( ReflectPhysicalJewel ),	typeof( SelfRepairJewel ),	typeof( DurableJewel ),
			typeof( SubstantialJewel ),	typeof( MassiveJewel ),		typeof( FortifiedJewel ),
			typeof( IndestructibleJewel ),	typeof( RuinJewel ),		typeof( MightJewel ),
			typeof( ForceJewel ),		typeof( PowerJewel ),		typeof( VanqJewel ),
			typeof( AccurateJewel ),	typeof( SurpassinglyJewel ),	typeof( EminentlyJewel ),
			typeof( ExceedinglyJewel ),	typeof( SupremelyJewel ),	typeof( DefenseJewel ),
			typeof( GuardingJewel ),	typeof( HardeningJewel ),	typeof( FortificationJewel ),
			typeof( InvulnerabilityJewel )
		};

		public static Item RandomCraft( double chance )
		{
			if ( Utility.RandomDouble() <= chance )
			{
				int val = Utility.Random( Core.AOS ? 48 : 20 ) + ((Core.AOS) ? 0 : 48);

				Item craft = Activator.CreateInstance( m_Loot[val] ) as Item;

				return craft;
			}
			else
			{
				return null;
			}
		}

		public static int Scale( int min, int max, int low, int high )
		{
			return low + AOS.Scale( high-low, Utility.RandomMinMax( min, max ) );
		}

		public static void ApplyAttribute( AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high )
		{
			ApplyAttribute( attrs, min, max, attr, low, high, 1 );
		}

		public static void ApplyAttribute( AosAttributes attrs, int min, int max, AosAttribute attr, int low, int high, int scale )
		{
			if ( attr == AosAttribute.CastSpeed )
				attrs[attr] += Scale( min, max, low / scale, high / scale ) * scale;
			else
				attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;

			if ( attr == AosAttribute.SpellChanneling )
				attrs[AosAttribute.CastSpeed] -= 1;
		}

		public static void ApplyAttribute( AosArmorAttributes attrs, int min, int max, AosArmorAttribute attr, int low, int high )
		{
			attrs[attr] = Scale( min, max, low, high );
		}

		public static void ApplyAttribute( AosArmorAttributes attrs, int min, int max, AosArmorAttribute attr, int low, int high, int scale )
		{
			attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
		}

		public static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high )
		{
			attrs[attr] = Scale( min, max, low, high );
		}

		public static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high, int scale )
		{
			attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
		}

		public static void ApplyAttribute( AosElementAttributes attrs, int min, int max, AosElementAttribute attr, int low, int high )
		{
			attrs[attr] = Scale( min, max, low, high );
		}

		public static void ApplyAttribute( AosElementAttributes attrs, int min, int max, AosElementAttribute attr, int low, int high, int scale )
		{
			attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
		}

		public static void ApplyResistance( BaseArmor ar, int min, int max, ResistanceType res, int low, int high )
		{
			switch ( res )
			{
				case ResistanceType.Physical: ar.PhysicalBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Fire: ar.FireBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Cold: ar.ColdBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Poison: ar.PoisonBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Energy: ar.EnergyBonus += Scale( min, max, low, high ); break;
			}
		}

		public static bool CheckSpellCrafted( Mobile m, object item )
		{
			bool result;

			if ( item is BaseArmor )
				result = CheckSpellCrafted( m, (BaseArmor)item );

			else if ( item is BaseWeapon )
				result = CheckSpellCrafted( m, (BaseWeapon)item );

			else if ( item is BaseJewel )
				result = CheckSpellCrafted( m, (BaseJewel)item );

			else
				result = false;

			return result;
		}

		public static bool CheckSpellCrafted( Mobile m, BaseArmor armor )
		{
			if ( !armor.IsChildOf( m ) )
			{
				m.SendMessage( "You can only spellcraft items in your backpack." );
				return false;
			}

			if ( Core.AOS )
			{
				if ( !ArtifactCraftable && armor.ArtifactRarity > 0 )
				{
					m.SendMessage( "You cannot spellcraft artifact items." );
					return false;
				}

				int props = 0;

				foreach( int i in Enum.GetValues(typeof( AosAttribute)) )
					if ( armor.Attributes[(AosAttribute)i] > 0 ) ++props;

				foreach( int i in Enum.GetValues(typeof( AosArmorAttribute)) )
					if ( armor.ArmorAttributes[(AosArmorAttribute)i] > 0 ) ++props;

				if ( props >= MaxPropsAllowed )
				{
					m.SendMessage( "This item cannot be spellcrafted because it meets or exceeds the maximum number of properties allowed." );
					return false;
				}
			}

			if ( !CheckExplosion( m, armor ) )
				return false;

			if ( !m.Backpack.ConsumeTotal( typeof( MagicJewel ), 1 ) )
			{
				m.SendMessage( "You don't have enough jewels to affix this craft's magic onto any item." );
				return false;
			}

			return true;
		}

		public static bool CheckSpellCrafted( Mobile m, BaseShield shield )
		{
			if ( !shield.IsChildOf( m ) )
			{
				m.SendMessage( "You can only spellcraft items in your backpack." );
				return false;
			}

			if ( Core.AOS )
			{
				if ( !ArtifactCraftable && shield.ArtifactRarity > 0 )
				{
					m.SendMessage( "You cannot spellcraft artifact items." );
					return false;
				}

				int props = 0;

				foreach( int i in Enum.GetValues(typeof( AosAttribute)) )
					if ( shield.Attributes[(AosAttribute)i] > 0 ) ++props;

				foreach( int i in Enum.GetValues(typeof( AosArmorAttribute)) )
					if ( shield.ArmorAttributes[(AosArmorAttribute)i] > 0 ) ++props;

				if ( props >= MaxPropsAllowed )
				{
					m.SendMessage( "This item cannot be spellcrafted because it meets or exceeds the maximum number of properties allowed." );
					return false;
				}
			}

			if ( !CheckExplosion( m, shield ) )
				return false;

			if ( !m.Backpack.ConsumeTotal( typeof( MagicJewel ), 1 ) )
			{
				m.SendMessage( "You don't have enough jewels to affix this craft's magic onto any item." );
				return false;
			}

			return true;
		}

		public static bool CheckSpellCrafted( Mobile m, BaseWeapon weapon )
		{
			if ( !weapon.IsChildOf( m ) )
			{
				m.SendMessage( "You can only spellcraft items in your backpack." );
				return false;
			}

			if ( Core.AOS )
			{
				int props = 0;

				if ( !ArtifactCraftable && weapon.ArtifactRarity > 0 )
				{
					m.SendMessage( "You cannot spellcraft artifact items." );
					return false;
				}

				foreach( int i in Enum.GetValues(typeof( AosAttribute)) )
					if ( weapon.Attributes[(AosAttribute)i] > 0 ) ++props;

				foreach( int i in Enum.GetValues(typeof( AosWeaponAttribute)) )
					if ( weapon.WeaponAttributes[(AosWeaponAttribute)i] > 0 ) ++props;

				if ( props >= MaxPropsAllowed )
				{
					m.SendMessage( "This item cannot be spellcrafted because it meets or exceeds the maximum number of properties allowed." );
					return false;
				}
			}

			if ( !CheckExplosion( m, weapon ) )
				return false;

			if ( !m.Backpack.ConsumeTotal( typeof( MagicJewel ), 1 ) )
			{
				m.SendMessage( "You don't have enough jewels to affix this craft's magic onto any item." );
				return false;
			}

			return true;
		}

		public static bool CheckSpellCrafted( Mobile m, BaseJewel jewel )
		{
			if ( !jewel.IsChildOf( m ) )
			{
				m.SendMessage( "You can only spellcraft items in your backpack." );
				return false;
			}

			if ( Core.AOS )
			{
				int props = 0;

				if ( !( jewel is BaseBracelet || jewel is BaseRing ) && BraceletsRingsOnly )
				{
					m.SendMessage( "You can only spellcraft jewelry that are bracelets or rings." );
					return false;
				} 
				if ( !ArtifactCraftable && jewel.ArtifactRarity > 0 )
				{
					m.SendMessage( "You cannot spellcraft artifact items." );
					return false;
				}

				foreach( int i in Enum.GetValues(typeof( AosAttribute)) )
					if ( jewel.Attributes[(AosAttribute)i] > 0 ) ++props;

				foreach( int i in Enum.GetValues(typeof( AosElementAttribute)) )
					if ( jewel.Resistances[(AosElementAttribute)i] > 0 ) ++props;

				if ( props >= MaxPropsAllowed )
				{
					m.SendMessage( "This item cannot be spellcrafted because it meets or exceeds the maximum number of properties allowed." );
					return false;
				}
			}

			if ( !CheckExplosion( m, jewel ) )
				return false;

			if ( !m.Backpack.ConsumeTotal( typeof( MagicJewel ), 1 ) )
			{
				m.SendMessage( "You don't have enough jewels to affix this craft's magic onto any item." );
				return false;
			}

			return true;
		}

		public static bool CheckExplosion( Mobile from, Item target )
		{
			if ( Utility.RandomDouble() <= ExplodeChance )
			{
				from.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Head );
				from.PlaySound( 0x307 );
				from.Damage( Utility.RandomMinMax( ExplodeMinDmg, ExplodeMaxDmg ) );

				if ( Utility.RandomDouble() <= DestroyChance )
				{
					target.Delete();
					from.SendMessage( "The magics violently erupt and the item is destroyed." );
				}
				else
				{
					from.SendMessage( "The energy contained inside the jewel violently erupts, but the item stays intact." );
				}
				return false;
			}
			return true;
		}
	}
}

Again I increased the values and added in 47.

SpellCraftBookGump.cs became:

Code:
/* 
	SpellCraftBook.cs - Version 12.0

	Last Modified On 10/16/2003 at 3:48:16 PM

	Script generated by Gump Creator 2.01

	245, create new page, 7 entries per page
	next page id = 5601 ( 365, 245 )
	next page press = 5605;
	last page id = 5603 ( 340, 245 )
	last page press = 5607;
*/

using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Items;
using Server.SpellCrafting;
using Server.SpellCrafting.Items;
using Server.SpellCrafting.Crafts;
using Server.Targeting;

namespace Server.SpellCrafting.Gumps
{
	public class SpellCraftBook : Gump
	{
		private Mobile m_Owner;
		private int gumpX, gumpY, m_Count, m_Page;

		public SpellCraftBook( Mobile owner, BookOfSpellCrafts book ) : base( 10, 10 )
		{
			owner.CloseGump( typeof( SpellCraftBook ) );

			m_Owner = owner;

			Closable = true;
			Disposable = true;
			Dragable = true;
			Resizable = false;

			AddImage( 50, 50, 0x1F4 );
			AddHtml( 76, 60, 185, 20, "<center>Spellcraft Index</center", false, false );
			AddButton( 80, 85, 0x1523, 0x1523, 1, GumpButtonType.Page, 1 );
			AddLabel( 95, 85, 0, Core.AOS ? "Stat Bonus Crafts" : "Durability Crafts" );
			AddButton( 80, 105, 0x1523, 0x1523, 2, GumpButtonType.Page, 2 );
			AddLabel( 95, 105, 0, Core.AOS ? "Resist Bonus Crafts" : "Weapon Damage Crafts" );
			AddButton( 80, 125, 0x1523, 0x1523, 3, GumpButtonType.Page, 3 );
			AddLabel( 95, 125, 0, Core.AOS ? "Regeneration Crafts" : "Weapon Accuracy Crafts" );
			AddButton( 80, 145, 0x1523, 0x1523, 4, GumpButtonType.Page, 4 );
			AddLabel( 95, 145, 0, Core.AOS ? "Casting Crafts" : "Armor Protection Crafts" );

			if ( Core.AOS )
			{
				AddButton( 80, 165, 0x1523, 0x1523, 5, GumpButtonType.Page, 5 );
				AddLabel( 95, 165, 0, "Weapon Crafts"  );
				AddButton( 80, 185, 0x1523, 0x1523, 8, GumpButtonType.Page, 8 );
				AddLabel( 95, 185, 0, "Miscellaneous Crafts" );
			}

			AddLabel( 80, 230, 0, "Total Spellcrafts:" );
			AddHtml( 205, 230, 40, 20, String.Format( "<div align=right>{0}</div>", book.Count ), false, false );

			AddPage( 1 );

			if ( Core.AOS )
				AddHtml( 262, 60, 185, 20, "<center>Stat Bonus Crafts</center>", false, false );
			else
				AddHtml( 262, 60, 185, 20, "<center>Durability Crafts</center>", false, false );

			m_Page = 1;
			gumpX = 275; gumpY = 85;

			if ( Core.AOS )
			{
				if( book.HasCraft( 0 ) )
				{
					AddCraft( gumpX, gumpY, 7, "Strength Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 1 ) )
				{
					AddCraft( gumpX, gumpY, 8, "Dexterity Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 2 ) )
				{
					AddCraft( gumpX, gumpY, 9, "Intelligence Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 3 ) )
				{
					AddCraft( gumpX, gumpY, 10, "Hit Point Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 4 ) )
				{
					AddCraft( gumpX, gumpY, 11, "Stamina Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 5 ) )
				{
					AddCraft( gumpX, gumpY, 12, "Mana Bonus" );
					gumpY += 20;
				}
			}
			else
			{
				if ( book.HasCraft( 48 ) )
				{
					AddCraft( gumpX, gumpY, 54, "Durable" );
					gumpY += 20;
				}

				if ( book.HasCraft( 49 ) )
				{
					AddCraft( gumpX, gumpY, 55, "Substantial" );
					gumpY += 20;
				}

				if ( book.HasCraft( 50 ) )
				{
					AddCraft( gumpX, gumpY, 56, "Massive" );
					gumpY += 20;
				}

				if ( book.HasCraft( 51 ) )
				{
					AddCraft( gumpX, gumpY, 57, "Fortified" );
					gumpY += 20;
				}

				if ( book.HasCraft( 52 ) )
				{
					AddCraft( gumpX, gumpY, 58, "Indestructible" );
					gumpY += 20;
				}
			}

			AddPage( 2 );

			if ( Core.AOS )
				AddHtml( 262, 60, 185, 20, "<center>Resist Bonus Crafts</center>", false, false );
			else
				AddHtml( 262, 60, 185, 20, "<center>Weapon Damage Crafts</center>", false, false );

			gumpX = 275; gumpY = 85;
			m_Page = 2;

			if ( Core.AOS )
			{
				if( book.HasCraft( 6 ) )
				{
					AddCraft( gumpX, gumpY, 13, "Physical Resist Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 7 ) )
				{
					AddCraft( gumpX, gumpY, 14, "Fire Resist Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 8 ) )
				{
					AddCraft( gumpX, gumpY, 15, "Cold Resist Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 9 ) )
				{
					AddCraft( gumpX, gumpY, 16, "Poison Resist Bonus" );
					gumpY += 20;
				}

				if( book.HasCraft( 10 ) )
				{
					AddCraft( gumpX, gumpY, 17, "Energy Resist Bonus" );
					gumpY += 20;
				}
			}
			else
			{
				if ( book.HasCraft( 53 ) )
				{
					AddCraft( gumpX, gumpY, 59, "Ruin" );
					gumpY += 20;
				}

				if ( book.HasCraft( 54 ) )
				{
					AddCraft( gumpX, gumpY, 60, "Might" );
					gumpY += 20;
				}

				if ( book.HasCraft( 55 ) )
				{
					AddCraft( gumpX, gumpY, 61, "Force" );
					gumpY += 20;
				}

				if ( book.HasCraft( 56 ) )
				{
					AddCraft( gumpX, gumpY, 62, "Power" );
					gumpY += 20;
				}

				if ( book.HasCraft( 57 ) )
				{
					AddCraft( gumpX, gumpY, 63, "Vanquishing" );
					gumpY += 20;
				}
			}

			AddPage( 3 );

			if ( Core.AOS )
				AddHtml( 262, 60, 185, 20, "<center>Regeneration Crafts</center>", false, false );
			else
				AddHtml( 262, 60, 185, 20, "<center>Accuracy Crafts</center>", false, false );

			gumpX = 275; gumpY = 85;
			m_Page = 3;

			if ( Core.AOS )
			{
				if( book.HasCraft( 11 ) )
				{
					AddCraft( gumpX, gumpY, 18, "Hit Point Regeneration" );
					gumpY += 20;
				}

				if( book.HasCraft( 12 ) )
				{
					AddCraft( gumpX, gumpY, 19, "Mana Regeneration" );
					gumpY += 20;
				}

				if( book.HasCraft( 13 ) )
				{
					AddCraft( gumpX, gumpY, 20, "Stamina Regeneration" );
					gumpY += 20;
				}
			}
			else
			{
				if ( book.HasCraft( 58 ) )
				{
					AddCraft( gumpX, gumpY, 64, "Accurate" );
					gumpY += 20;
				}

				if ( book.HasCraft( 59 ) )
				{
					AddCraft( gumpX, gumpY, 65, "Surpassingly Accurate" );
					gumpY += 20;
				}

				if ( book.HasCraft( 60 ) )
				{
					AddCraft( gumpX, gumpY, 66, "Emminently Accurate" );
					gumpY += 20;
				}

				if ( book.HasCraft( 61 ) )
				{
					AddCraft( gumpX, gumpY, 67, "Exceedingly Accurate" );
					gumpY += 20;
				}

				if ( book.HasCraft( 62 ) )
				{
					AddCraft( gumpX, gumpY, 68, "Supremely Accurate" );
					gumpY += 20;
				}
			}

			AddPage( 4 );

			if ( Core.AOS )
				AddHtml( 262, 60, 185, 20, "<center>Casting Crafts</center>", false, false );
			else
				AddHtml( 262, 60, 185, 20, "<center>Armor Protection Crafts</center>", false, false );

			gumpX = 275; gumpY = 85;
			m_Page = 4;

			if ( Core.AOS )
			{
				if( book.HasCraft( 14 ) )
				{
					AddCraft( gumpX, gumpY, 21, "Faster Cast Recovery" );
					gumpY += 20;
				}

				if( book.HasCraft( 15 ) )
				{
					AddCraft( gumpX, gumpY, 22, "Faster Cast Speed" );
					gumpY += 20;
				}

				if( book.HasCraft( 16 ) )
				{
					AddCraft( gumpX, gumpY, 23, "Lower Mana Cost" );
					gumpY += 20;
				}

				if( book.HasCraft( 17 ) )
				{
					AddCraft( gumpX, gumpY, 24, "Lower Reagent Cost" );
					gumpY += 20;
				}

				if( book.HasCraft( 18 ) )
				{
					AddCraft( gumpX, gumpY, 25, "Mage Armor" );
					gumpY += 20;
				}

				if( book.HasCraft( 19 ) )
				{
					AddCraft( gumpX, gumpY, 26, "Mage Weapon" );
					gumpY += 20;
				}

				if( book.HasCraft( 20 ) )
				{
					AddCraft( gumpX, gumpY, 27, "Spell Channeling" );
					gumpY += 20;
				}

				if( book.HasCraft( 21 ) )
				{
					AddCraft( gumpX, gumpY, 28, "Spell Damage Increase" );
					gumpY += 20;
				}
			}
			else
			{
				if ( book.HasCraft( 63 ) )
				{
					AddCraft( gumpX, gumpY, 69, "Defense" );
					gumpY += 20;
				}

				if ( book.HasCraft( 64 ) )
				{
					AddCraft( gumpX, gumpY, 70, "Guarding" );
					gumpY += 20;
				}

				if ( book.HasCraft( 65 ) )
				{
					AddCraft( gumpX, gumpY, 71, "Hardening" );
					gumpY += 20;
				}

				if ( book.HasCraft( 66 ) )
				{
					AddCraft( gumpX, gumpY, 72, "Fortification" );
					gumpY += 20;
				}

				if ( book.HasCraft( 67 ) )
				{
					AddCraft( gumpX, gumpY, 73, "Invulnerability" );
					gumpY += 20;
				}
			}

			if ( Core.AOS )
			{
				AddPage( 5 );
				AddHtml( 262, 60, 185, 20, "<center>Weapon Crafts</center>", false, false );

				gumpX = 275; gumpY = 85;
				m_Count = 0;
				m_Page = 5;

				if( book.HasCraft( 22 ) )
					{
					AddCraft( gumpX, gumpY, 29, ++m_Count, m_Page, "Hit Cold Area" );
						gumpY += 20;
				}

				if( book.HasCraft( 23 ) )
				{
					AddCraft( gumpX, gumpY, 30, ++m_Count, m_Page, "Hit Energy Area" );
					gumpY += 20;
				}

				if( book.HasCraft( 24 ) )
				{
					AddCraft( gumpX, gumpY, 31, ++m_Count, m_Page, "Hit Fire Area" );
					gumpY += 20;
				}

				if( book.HasCraft( 25 ) )
				{
					AddCraft( gumpX, gumpY, 32, ++m_Count, m_Page, "Hit Physical Area" );
					gumpY += 20;
				}

				if( book.HasCraft( 26 ) )
				{
					AddCraft( gumpX, gumpY, 33, ++m_Count, m_Page, "Hit Poison Area" );
					gumpY += 20;
				}

				if( book.HasCraft( 27 ) )
				{
					AddCraft( gumpX, gumpY, 34, ++m_Count, m_Page, "Hit Dispel" );
					gumpY += 20;
				}

				if( book.HasCraft( 28 ) )
				{
					AddCraft( gumpX, gumpY, 35, ++m_Count, m_Page, "Hit Fireball" );
					gumpY += 20;
				}
				if( book.HasCraft( 29 ) )
				{
					AddCraft( gumpX, gumpY, 36, ++m_Count, m_Page, "Hit Harm" );
					gumpY += 20;
				}

				if( book.HasCraft( 30 ) )
				{
					AddCraft( gumpX, gumpY, 37, ++m_Count, m_Page, "Hit Lightning" );
					gumpY += 20;
				}

				if( book.HasCraft( 31 ) )
				{
					AddCraft( gumpX, gumpY, 38, ++m_Count, m_Page, "Hit Magic Arrow" );
					gumpY += 20;
				}

				if( book.HasCraft( 32 ) )
				{
					AddCraft( gumpX, gumpY, 39, ++m_Count, m_Page, "Hit Lower Attack" );
					gumpY += 20;
				}

				if( book.HasCraft( 33 ) )
				{
					AddCraft( gumpX, gumpY, 40, ++m_Count, m_Page, "Hit Lower Defense" );
					gumpY += 20;
				}

				if( book.HasCraft( 34 ) )
				{
					AddCraft( gumpX, gumpY, 41, ++m_Count, m_Page, "Hit Leech Hits" );
					gumpY += 20;
				}

				if( book.HasCraft( 35 ) )
				{
					AddCraft( gumpX, gumpY, 42, ++m_Count, m_Page, "Hit Leech Mana" );
					gumpY += 20;
				}
				if( book.HasCraft( 36 ) )
				{
					AddCraft( gumpX, gumpY, 43, ++m_Count, m_Page, "Hit Leech Stamina" );
					gumpY += 20;
				}

				if( book.HasCraft( 37 ) )
				{
					AddCraft( gumpX, gumpY, 44, ++m_Count, m_Page, "Use Best Weapon Skill" );
					gumpY += 20;
				}

				if( book.HasCraft( 38 ) )
				{
					AddCraft( gumpX, gumpY, 45, ++m_Count, m_Page, "Weapon Damage Increase" );
					gumpY += 20;
				}

				if( book.HasCraft( 39 ) )
				{
					AddCraft( gumpX, gumpY, 46, ++m_Count, m_Page, "Swing Speed Increase" );
					gumpY += 20;
				}

				AddPage( 8 );
				AddHtml( 262, 60, 185, 20, "<center>Miscellaneous Crafts</center>", false, false );

				gumpX = 275; gumpY = 85;

				if( book.HasCraft( 40 ) )
				{
					AddCraft( gumpX, gumpY, 47, "Hit Chance Increase" );
					gumpY += 20;
				}

				if( book.HasCraft( 41 ) )
				{
					AddCraft( gumpX, gumpY, 48, "Defense Chance Increase" );
					gumpY += 20;
				}

				if( book.HasCraft( 42 ) )
				{
					AddCraft( gumpX, gumpY, 49, "Enhance Potions" );
					gumpY += 20;
				}
				if( book.HasCraft( 43 ) )
				{
					AddCraft( gumpX, gumpY, 50, "Lower Stat Requirements" );
					gumpY += 20;
				}

				if( book.HasCraft( 44 ) )
				{
					AddCraft( gumpX, gumpY, 51, "Luck" );
					gumpY += 20;
				}

				if( book.HasCraft( 45 ) )
				{
					AddCraft( gumpX, gumpY, 52, "Reflect Physical" );
					gumpY += 20;
				}

				if( book.HasCraft( 46 ) )
				{
					AddCraft( gumpX, gumpY, 53, "Self Repair" );
					gumpY += 20;
				}

				if( book.HasCraft( 47 ) )
				{
					AddCraft( gumpX, gumpY, 74, "Item Name" );
					gumpY += 20;
				}

			}		
		}

		public void AddCraft( int x, int y, int buttonID, string text )
		{
			AddButton( gumpX, gumpY, 0x846, 0x845, buttonID, GumpButtonType.Reply, 0 );
			AddLabel( gumpX + 20, gumpY - 2, 0, text );
		}

		public void AddCraft( int x, int y, int buttonID, int count, int currPage, string text )
		{
			if ( count == 8 || count == 15 )
			{
				AddButton( 365, 235, 5601, 5605, 50 + buttonID, GumpButtonType.Page, currPage + 1 );
				AddPage( currPage + 1 );
				AddButton( 340, 235, 5603, 5607, 51 + buttonID, GumpButtonType.Page, currPage );
				m_Page = currPage + 1;
				gumpX = 275; gumpY = 85;
			}

			AddButton( gumpX, gumpY, 0x846, 0x845, buttonID, GumpButtonType.Reply, 0 );
			AddLabel( gumpX + 20, gumpY - 2, 0, text );
		}

		public override void OnResponse( NetState state, RelayInfo info )
		{
			Mobile from = state.Mobile;
			int craft = info.ButtonID - 7;

			if ( craft < 0 )
				return;

			if ( !SpellCraft.Enabled[craft] )
			{
				from.SendMessage( "This craft is currently not enabled." );
				return;
			}
		
			from.SendMessage( "Select the item to place this spellcraft on." );

			switch( craft )
			{
				case 0:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BonusStr.Callback ) ); break;
				case 1:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BonusDex.Callback ) ); break;
				case 2:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BonusInt.Callback ) ); break;
				case 3:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BonusHits.Callback ) ); break;
				case 4:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BonusStam.Callback ) ); break;
				case 5:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BonusMana.Callback ) ); break;
				case 6:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( PhysicalResist.Callback ) ); break;
				case 7:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( FireResist.Callback ) ); break;
				case 8:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( ColdResist.Callback ) ); break;
				case 9:	from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( PoisonResist.Callback ) ); break;
				case 10: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( EnergyResist.Callback ) ); break;
				case 11: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( RegenHits.Callback ) ); break;
				case 12: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( RegenMana.Callback ) ); break;
				case 13: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( RegenStam.Callback ) ); break;
				case 14: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( CastRecovery.Callback ) ); break;
				case 15: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( CastSpeed.Callback ) ); break;
				case 16: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( LowerManaCost.Callback ) ); break;
				case 17: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( LowerRegCost.Callback ) ); break;
				case 18: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( MageArmor.Callback ) ); break;
				case 19: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( MageWeapon.Callback ) ); break;
				case 20: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( SpellChanneling.Callback ) ); break;
				case 21: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( SpellDamage.Callback ) ); break;
				case 22: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitColdArea.Callback ) ); break;
				case 23: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitEnergyArea.Callback ) ); break;
				case 24: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitFireArea.Callback ) ); break;
				case 25: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitPhysicalArea.Callback ) ); break;
				case 26: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitPoisonArea.Callback ) ); break;
				case 27: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitDispel.Callback ) ); break;
				case 28: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitFireball.Callback ) ); break;
				case 29: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitHarm.Callback ) ); break;
				case 30: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitLightning.Callback ) ); break;
				case 31: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitMagicArrow.Callback ) ); break;
				case 32: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitLowerAttack.Callback ) ); break;
				case 33: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitLowerDefend.Callback ) ); break;
				case 34: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitLeechHits.Callback ) ); break;
				case 35: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitLeechMana.Callback ) ); break;
				case 36: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( HitLeechStam.Callback ) ); break;
				case 37: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( UseBestSkill.Callback ) ); break;
				case 38: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( WeaponDamage.Callback ) ); break;
				case 39: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( WeaponSpeed.Callback ) ); break;
				case 40: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( AttackChance.Callback ) ); break;
				case 41: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( DefendChance.Callback ) ); break;
				case 42: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( EnhancePotions.Callback ) ); break;
				case 43: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( LowerStatReq.Callback ) ); break;
				case 44: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Luck.Callback ) ); break;
				case 45: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( ReflectPhysical.Callback ) ); break;
				case 46: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( SelfRepair.Callback ) ); break;
				case 47: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( ItemName.Callback ) ); break;
				// Non-AOS Callbacks
				case 48: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Durable.Callback ) ); break;
				case 49: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Substantial.Callback ) ); break;
				case 50: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Massive.Callback ) ); break;
				case 51: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Fortified.Callback ) ); break;
				case 52: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Indestructible.Callback ) ); break;
				case 53: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Ruin.Callback ) ); break;
				case 54: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Might.Callback ) ); break;
				case 55: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Force.Callback ) ); break;
				case 56: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Power.Callback ) ); break;
				case 57: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Vanq.Callback ) ); break;
				case 58: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Accurate.Callback ) ); break;
				case 59: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Surpassingly.Callback ) ); break;
				case 60: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Eminently.Callback ) ); break;
				case 61: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Exceedingly.Callback ) ); break;
				case 62: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Supremely.Callback ) ); break;
				case 63: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Defense.Callback ) ); break;
				case 64: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Guarding.Callback ) ); break;
				case 65: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Hardening.Callback ) ); break;
				case 66: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Fortification.Callback ) ); break;
				case 67: from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( Invulnerability.Callback ) ); break;
				default: break;
			}
		}
	}
}

In here i added gumpid 47 and case 47.

In the folder items I edited each item increasing the values by one where appropriate to add in 47 and added ItemNameJewel.cs

Code:
using System;
using Server;
using Server.Prompts;
using Server.Network;
using Server.Mobiles;
using Server.Targeting;

namespace Server.SpellCrafting.Items
{
	public class ItemNameJewel : BaseSpellCraft
	{
		[Constructable]
		public ItemNameJewel() : this( 1 )
		{
		}

		[Constructable]
		public ItemNameJewel( int amount ) : base( amount, 47 )
		{
		}

		public ItemNameJewel( Serial serial ) : base( serial )
		{
		}

		[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
		public string name
		{
			get
			{
				return name;
			}
			set
			{
				name = value;
				InvalidateProperties();
			}
		}

		private class RenamePrompt : Prompt
		{
			private ItemName m_Item;

			public RenamePrompt( ItemName item )
			{
				m_Item = item;
			}

			public override void OnResponse( Mobile from, string text )
			{
					m_Item.Name = text;
					from.SendLocalizedMessage( 1010474 ); // The etching on the item has been changed.
			}
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 ); // version
			writer.Write( (string) name );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt(); // version
			name = reader.ReadString();
		}
	}
}

I honestly didnt know what parts belonged in the jewel and what belongs in a call back... but in the folder callbacks i added ItemName.cs

Code:
using System;
using Server;
using Server.Items;
using Server.SpellCrafting;

namespace Server.SpellCrafting.Crafts
{
	public class ItemName
	{
		public static void Callback( Mobile from, object target )
		{
			if ( !(target is BaseWeapon) )
			{
				from.SendMessage( "This craft cannot be placed on that item" );
			}
			else if ( !SpellCraft.CheckSpellCrafted( from, target ) )
			{
				return;
			}
			else
			{
			from.Prompt = new RenamePrompt( this );
			}
		}
	}
}

Now I tried using parts of the rename function from recall runes but i get the following errors:

Code:
Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)
 - Error: Scripts\spellcrafting\Items\ItemNameJewel.cs: CS0246: (line 42, column 12) The type or namespace name 'ItemName' could not be found (are you missing a using directive or an assembly reference?)
 - Error: Scripts\spellcrafting\Items\ItemNameJewel.cs: CS0246: (line 44, column 25) The type or namespace name 'ItemName' could not be found (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

I am really confused at what to do from here I am learning by the seat of my pants all the way here. I know by having read alot of this forum that there are those that feel if newbs like me should only edit simple things we understand but this REALLY needs done. If you use spellcraft at all you will agree.
 
Top