public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            if (info.ButtonID >= 280 && info.ButtonID < 290)
            {
                m_Book.page = info.ButtonID;
                from.SendSound(0x54B);
                int page = info.ButtonID;
                from.SendGump(new JediSpellbookGump(from, m_Book, page));
            }
            else if (info.ButtonID >= 380)
            {
                m_Book.page = 1;
                int spell = info.ButtonID - 100;
                if (spell == 280 && HasSpell(from, 280))
                {
                    new ForceGrip(from, null).Cast();
                }
                else if (spell == 281 && HasSpell(from, 281))
                {
                    new MindsEye(from, null).Cast();
                }
                else if (spell == 282 && HasSpell(from, 282))
                {
                    new Mirage(from, null).Cast();
                }
                else if (spell == 283 && HasSpell(from, 283))
                {
                    new ThrowSabre(from, null).Cast();
                }
                else if (spell == 284 && HasSpell(from, 284))
                {
                    new Celerity(from, null).Cast();
                }
                else if (spell == 285 && HasSpell(from, 285))
                {
                    new PsychicAura(from, null).Cast();
                }
                else if (spell == 286 && HasSpell(from, 286))
                {
                    new Deflection(from, null).Cast();
                }
                else if (spell == 287 && HasSpell(from, 287))
                {
                    new SoothingTouch(from, null).Cast();
                }
                else if (spell == 288 && HasSpell(from, 288))
                {
                    new StasisField(from, null).Cast();
                }
                else if (spell == 289 && HasSpell(from, 289))
                {
                    new Replicate(from, null).Cast();
                }

                from.SendGump(new JediSpellbookGump(from, m_Book, 1));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 2)
            {
                m_Book.page = 2;
                from.SendGump(new JediSpellbookGump(from, m_Book, 2));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 3)
            {
                from.SendSound(0x54D); from.CloseGump(typeof(Server.Items.JediSpellbook.PowerColumn)); from.CloseGump(typeof(Server.Items.JediSpellbook.PowerRow)); from.SendGump(new Server.Items.JediSpellbook.PowerRow(from, m_Book));
            }
            else if (info.ButtonID == 4)
            {
                from.SendSound(0x54D); from.CloseGump(typeof(Server.Items.JediSpellbook.PowerColumn)); from.CloseGump(typeof(Server.Items.JediSpellbook.PowerRow)); from.SendGump(new Server.Items.JediSpellbook.PowerColumn(from, m_Book));
            }
            else if (info.ButtonID == 5)
            {
                if (m_Book.names == 1)
                {
                    m_Book.names = 0;
                }
                else
                {
                    m_Book.names = 1;
                }
                from.SendGump(new JediSpellbookGump(from, m_Book, 1));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 6)
            {
                m_Book.page = 6;
                from.SendGump(new JediSpellbookGump(from, m_Book, 6));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 7 || info.ButtonID == 8)
            {
                Container pack = from.Backpack;
                if (pack.ConsumeTotal(typeof(Gold), 10000))
                {
                    Item sword = new LevelLaserSword();
                    if (info.ButtonID == 8)
                    {
                        sword.Delete(); sword = new LevelDoubleLaserSword();
                    }
                    sword.Hue    = m_Book.gem;
                    from.Fame    = 0;
                    from.Karma   = 0;
                    m_Book.gem   = 0;
                    m_Book.steel = 0;
                    sword.Name   = SwordName(sword.Name, from);
                    from.AddToBackpack(sword);
                    LoggingFunctions.LogCreatedJedi(from, sword.Name);
                    from.SendMessage("You can construct your own laser sword.");
                    from.FixedParticles(0x373A, 9, 32, 5030, 0xB41, 0, EffectLayer.Waist);
                    from.PlaySound(0x5C9);
                }
            }
            else if (info.ButtonID == 9)
            {
                from.SendSound(0x54D); from.CloseGump(typeof(Server.Items.JediSpellbook.PowerColumn)); from.CloseGump(typeof(Server.Items.JediSpellbook.PowerRow));
            }
            else if (m_Book.page > 1)
            {
                m_Book.page = 1;
                from.SendGump(new JediSpellbookGump(from, m_Book, 1));
                from.SendSound(0x54B);
            }
            else
            {
                from.SendSound(0x54D);
            }
        }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            if (info.ButtonID >= 270 && info.ButtonID < 280)
            {
                m_Book.page = info.ButtonID;
                from.SendSound(0x54B);
                int page = info.ButtonID;
                from.SendGump(new SythSpellbookGump(from, m_Book, page));
            }
            else if (info.ButtonID >= 370)
            {
                m_Book.page = 1;
                int spell = info.ButtonID - 100;
                if (spell == 270 && HasSpell(from, 270))
                {
                    new Psychokinesis(from, null).Cast();
                }
                else if (spell == 271 && HasSpell(from, 271))
                {
                    new DeathGrip(from, null).Cast();
                }
                else if (spell == 272 && HasSpell(from, 272))
                {
                    new Projection(from, null).Cast();
                }
                else if (spell == 273 && HasSpell(from, 273))
                {
                    new ThrowSword(from, null).Cast();
                }
                else if (spell == 274 && HasSpell(from, 274))
                {
                    new SythSpeed(from, null).Cast();
                }
                else if (spell == 275 && HasSpell(from, 275))
                {
                    new SythLightning(from, null).Cast();
                }
                else if (spell == 276 && HasSpell(from, 276))
                {
                    new Absorption(from, null).Cast();
                }
                else if (spell == 277 && HasSpell(from, 277))
                {
                    new PsychicBlast(from, null).Cast();
                }
                else if (spell == 278 && HasSpell(from, 278))
                {
                    new DrainLife(from, null).Cast();
                }
                else if (spell == 279 && HasSpell(from, 279))
                {
                    new CloneBody(from, null).Cast();
                }

                from.SendGump(new SythSpellbookGump(from, m_Book, 1));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 2)
            {
                m_Book.page = 2;
                from.SendGump(new SythSpellbookGump(from, m_Book, 2));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 3)
            {
                from.SendSound(0x54D); from.CloseGump(typeof(Server.Items.SythSpellbook.PowerColumn)); from.CloseGump(typeof(Server.Items.SythSpellbook.PowerRow)); from.SendGump(new Server.Items.SythSpellbook.PowerRow(from, m_Book));
            }
            else if (info.ButtonID == 4)
            {
                from.SendSound(0x54D); from.CloseGump(typeof(Server.Items.SythSpellbook.PowerColumn)); from.CloseGump(typeof(Server.Items.SythSpellbook.PowerRow)); from.SendGump(new Server.Items.SythSpellbook.PowerColumn(from, m_Book));
            }
            else if (info.ButtonID == 5)
            {
                if (m_Book.names == 1)
                {
                    m_Book.names = 0;
                }
                else
                {
                    m_Book.names = 1;
                }
                from.SendGump(new SythSpellbookGump(from, m_Book, 1));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 6)
            {
                m_Book.page = 6;
                from.SendGump(new SythSpellbookGump(from, m_Book, 6));
                from.SendSound(0x54B);
            }
            else if (info.ButtonID == 7 || info.ButtonID == 8)
            {
                Container pack = from.Backpack;
                if (pack.ConsumeTotal(typeof(Gold), 10000))
                {
                    Item sword = new LevelLaserSword();
                    if (info.ButtonID == 8)
                    {
                        sword.Delete(); sword = new LevelDoubleLaserSword();
                    }
                    sword.Hue    = m_Book.gem;
                    from.Fame    = 0;
                    from.Karma   = 0;
                    m_Book.gem   = 0;
                    m_Book.steel = 0;
                    sword.Name   = SwordName(sword.Name, from);
                    from.AddToBackpack(sword);
                    LoggingFunctions.LogCreatedSyth(from, sword.Name);
                    from.SendMessage("You can construct your own laser sword.");
                    Point3D blast = new Point3D((from.X), (from.Y), from.Z + 10);
                    Effects.SendLocationEffect(blast, from.Map, 0x2A4E, 30, 10, 0xB00, 0);
                    from.PlaySound(0x653);
                }
            }
            else if (info.ButtonID == 9)
            {
                from.SendSound(0x54D); from.CloseGump(typeof(Server.Items.SythSpellbook.PowerColumn)); from.CloseGump(typeof(Server.Items.SythSpellbook.PowerRow));
            }
            else if (m_Book.page > 1)
            {
                m_Book.page = 1;
                from.SendGump(new SythSpellbookGump(from, m_Book, 1));
                from.SendSound(0x54B);
            }
            else
            {
                from.SendSound(0x54D);
            }
        }