I'm having issues with a custom spell book gump for these spells but ere is what I have so far:
http://middleearth.sempai-net.com/NewSpells.rar
The issue is in this script:
[code:1]using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
using Server.Spells;
using Server.Spells.Druid;
using Server.Prompts;
namespace Server.Gumps
{
public class Ancient1SpellbookGump : Gump
{
private Ancient1Spellbook m_Book;
int gth = 0x903;
private void AddBackground()
{
AddPage( 0 );
AddImage( 100, 10, 0x89B, 0x48B );
AddImage( 255, 10, 0x8AD, 0x48B );
AddLabel( 150, 17, gth, "Ancient Spells" );
AddLabel( 155, 45, gth, "Volume One" );
}
public static bool HasSpell( Mobile from, int spellID )
{
Spellbook book = Spellbook.Find( from, spellID );
return ( book != null && book.HasSpell( spellID ) );
}
public Ancient1SpellbookGump( Mobile from, Ancient1Spellbook book ) : base( 150, 200 )
{
m_Book = book;
AddBackground();
int sbtn = 0x93A;
int dby = 40;
if (HasSpell( from, 340) )
{
AddLabel( 315, dby, gth, "Fireworks" );
AddButton( 295, dby + 3, sbtn, sbtn, 1, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 341) )
{
AddLabel( 315, dby, gth, "Glimmer" );
AddButton( 295, dby + 3, sbtn, sbtn, 2, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 342) )
{
AddLabel( 315, dby, gth, "Awaken" );
AddButton( 295, dby + 3, sbtn, sbtn, 3, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 343) )
{
AddLabel( 315, dby, gth, "Locate" );
AddButton( 295, dby + 3, sbtn, sbtn, 4, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 344) )
{
AddLabel( 315, dby, gth, "Enchant" );
AddButton( 295, dby + 3, sbtn, sbtn, 5, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 345) )
{
AddLabel( 315, dby, gth, "False Coin" );
AddButton( 295, dby + 3, sbtn, sbtn, 6, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 346) )
{
AddLabel( 315, dby, gth, "Sleep" );
AddButton( 295, dby + 3, sbtn, sbtn, 7, GumpButtonType.Reply, 1 );
dby = dby + 20;
}
if (HasSpell( from, 347) )
{
AddLabel( 315, dby, gth, "Dance" );
AddButton( 295, dby + 3, sbtn, sbtn, 8, GumpButtonType.Reply, 1 );
}
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
switch ( info.ButtonID )
{
case 0:
{
break;
}
case 1:
{
//new FireworksSpell( from, null ).Cast();
break;
}
case 2:
{
//new GlimmerSpell( from, null ).Cast();
break;
}
case 3:
{
//new AwakenSpell( from, null ).Cast();
break;
}
case 4:
{
//new LocateSpell( from, null ).Cast();
break;
}
case 5:
{
//new EnchantSpell( from, null ).Cast();
break;
}
case 6:
{
//new FalseCoinSpell( from, null ).Cast();
break;
}
case 7:
{
//new SleepSpell( from, null ).Cast();
break;
}
case 8:
{
//new DanceSpell( from, null ).Cast();
break;
}
}
}
}
}[/code:1]
Notice the commented out sections?
If I DON'T comment those out i get errors...
...which effectivly kills the spellbooks for these spells....