This Spellbook Basket was given to me by a friend from a 'shard they no longer had running. My 'shard also has ACC Spells installed, but I could not get the spellbooks to fully work from inside the Spellbook Basket. You could put the book in there, open it and cast from the button, but not from the scroll or a locked into position icon.
Now everything works as intended. All spellbooks can be put into the Spellbook basket and still work, including the OSI spellbooks.
I tried a ton to fix CSpellbook.cs, but it was not the whole problem, CheckRestrictions was the other half to the equation.
So if you want to use the Spellbook Basket with ACC, here are the changes in two places.
ACC-->Complete Spell System-->Core --> CSpellbook.cs
inside the method for [public static book MobileHasSpell], underneath the backpack code, add this region:
Then go into the ACC-->Complete Spell System-->Changing-->SpellRestrictions.cs
inside the method for [public static book CheckRestrictions], add this region before the [return false;] line
The last edit comes to each spellbook inside ACC -->Systems (Open Each folder and open the XSpellbook.cs, where X is the system). This edit removes the check for Players, which does not apply to Staff and then CheckRestrictions becomes the main way to verify the spellbook is inside the player's backpack (or the spellbook basket).
Spellbook Basket script has already been edited to include ACC and OSI spellbooks.
(Doubtful this is drag/drop, so PM for help or post on the forums.)
Now everything works as intended. All spellbooks can be put into the Spellbook basket and still work, including the OSI spellbooks.
I tried a ton to fix CSpellbook.cs, but it was not the whole problem, CheckRestrictions was the other half to the equation.
So if you want to use the Spellbook Basket with ACC, here are the changes in two places.
ACC-->Complete Spell System-->Core --> CSpellbook.cs
inside the method for [public static book MobileHasSpell], underneath the backpack code, add this region:
C#:
#region SpellbookBasket
Container pack2 = m.Backpack.FindItemByType( typeof( SpellbookBasket )) as Container;
foreach( Item i in pack2.FindItemsByType( typeof( CSpellbook ), true ) )
{
CSpellbook book = (CSpellbook)i;
if (book.School == school && book.HasSpell(type))
return true;
}
#endregion
Then go into the ACC-->Complete Spell System-->Changing-->SpellRestrictions.cs
inside the method for [public static book CheckRestrictions], add this region before the [return false;] line
C#:
#region SpellbookBasket
Container pack2 = caster.Backpack.FindItemByType( typeof( SpellbookBasket )) as Container;
if( pack2 == null )
return false;
for( int i = 0; i < pack2.Items.Count; i++ )
{
item = (Item)pack2.Items[i];
if( item is CSpellbook && CheckRestrictions( caster, ((CSpellbook)item).School ) )
return true;
}
#endregion
The last edit comes to each spellbook inside ACC -->Systems (Open Each folder and open the XSpellbook.cs, where X is the system). This edit removes the check for Players, which does not apply to Staff and then CheckRestrictions becomes the main way to verify the spellbook is inside the player's backpack (or the spellbook basket).
C#:
public override void OnDoubleClick( Mobile from )
{
if ( from.AccessLevel == AccessLevel.Player )
{
/*Container pack = from.Backpack;
if( !(Parent == from || (pack != null && Parent == pack)) )
{
from.SendMessage( "The spellbook must be in your backpack [and not in a container within] to open." );
return;
}
else*/if( SpellRestrictions.UseRestrictions && !SpellRestrictions.CheckRestrictions( from, this.School ) )
{
return;
}
}
from.CloseGump( typeof( ChivalrySpellbookGump ) );
from.SendGump( new ChivalrySpellbookGump( this ) );
}
Spellbook Basket script has already been edited to include ACC and OSI spellbooks.
(Doubtful this is drag/drop, so PM for help or post on the forums.)
Attachments
Last edited: