Thanks for this. I found it but did not get a chance to test it or update it.

FYI: if memory serves (and that is under serious doubt) there may have been an issue at one point with many Internal Items generated by this system. It uses Internal Items to store the runebooks as part of the master book, but I thought there was a bug (which may have been fixed - again, relying on memory here) whereby the Internal Items would fail to get disposed of properly, causing a huge increase in Item Count. Just want you to be aware of this, since I cannot say which version of the script you have here.
 
Ok this book when you open it and go to dbbl click a book in it welp it crashes the server. Sadly I cant get any of my books back lol
 
Please post a crash log file, and we might be able to get it fixed. Thanks!

Again, sorry I have not had time to test this. I am not even sure where it came from.
 
I am experiencing that crash also on closing the book or interacting with it in any way other than the initial opening.

ServUO Version 0.5, Build 9198.3251
Operating System: Microsoft Windows NT 6.2.9200.0
.NET Framework: 4.0.30319.42000
Time: 3/8/2025 7:49:55 AM
Mobiles: 43406
Items: 233702
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Gumps.MasterRunebookGump.OnResponse(NetState state, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

Clients:
- Count: 1
+ 192.168.x.x: (account = xxxxxx) (mobile = 0x75 'xxx')
 
Post the "MasterRunebookGump" script into code tags here, this should be a simple fix for the null, suspecting Case 0 is causing this which is the default closing case in the response, probably some code being ran on close and a condition isn't set, just a shot in the dark prior to seeing the script!
 
MasterRunebookGump.cs:
using System;
using Server;
using Server.Items;
using Server.Network;

namespace Server.Gumps
{
    public class MasterRunebookGump : Gump
    {
        private MasterRunebook m_Book;
        public MasterRunebook Book { get { return m_Book; } set { m_Book = value; } }

        public MasterRunebookGump(Mobile owner, MasterRunebook book)
            : base(150, 60)
        {
            m_Book = book;
            AddPage(0);
            AddBackground(0, 0, 420, 440, 3500);
            AddItem(66, 14, 0x2252, m_Book.Hue);
            AddLabel(110, 14, 0, "Lokai's Master Runebook");
            AddItem(260, 14, 0x2252, m_Book.Hue);

            int count = 0;
            for (int x = 0; x < 3; x++)
            {
                AddPage(1 + x);
                if (x < 2)
                    AddButton(338, 407, 2471, 2470, 0, GumpButtonType.Page, 2 + x); //Next Button
                if (x > 0)
                    AddButton(30, 407, 2468, 2467, 0, GumpButtonType.Page, x); // Previous Button

                int XposB = 15, YposB = 44, XposL = 35, YposL = 41, bk = 16;
                for (int y = 0; y < 17; y++)
                {
                    string name = "";
                    try { name = m_Book.Books[count].Name.Trim(); }
                    catch { }
                    if (name == null || name.Length < 1) name = string.Format("Book #{0}", ((int)(count + 1)).ToString());
                    AddTextEntry(XposL, YposL, 320, 19, 0, count + 100, name);
                    AddButton(XposB, YposB, 1802, 1802, bk, GumpButtonType.Reply, 0);
                    AddItem(XposB - 13, YposB - 4, 8901, 0x461);
                    YposB += 20;
                    YposL += 20;
                    count++;
                    bk++;
                }
                XposB += 130;
                XposL += 130;
                YposB = 44;
                YposL = 41;
            }
        }

        private string GetString(RelayInfo info, int id)
        {
            TextRelay t = info.GetTextEntry(id);
            return (t == null ? null : t.Text.Trim());
        }

        public override void OnResponse(NetState state, RelayInfo info)
        {
            string bookName;
            for (int x = 0; x < 51; x++)
            {
                bookName = GetString(info, x + 100);
                if (bookName != null && bookName.Length > 0) Book.Books[x].Name = bookName;
                else Book.Books[x].Name = string.Format("Book #{0}", ((int)(x + 1)).ToString());
            }
            Mobile from = state.Mobile;
            if (info.ButtonID > 0)
                from.SendGump(new InternalRunebookGump(from, Book.Books[info.ButtonID - 16], Book, info.ButtonID - 16));
        }
    }
}
 
Code:
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID > 0)
            {
                 string bookName;
                 for (int x = 0; x < 51; x++)
                 {
                     bookName = GetString(info, x + 100);
                     if (bookName != null && bookName.Length > 0) Book.Books[x].Name = bookName;
                     else Book.Books[x].Name = string.Format("Book #{0}", ((int)(x + 1)).ToString());
                 }
                 Mobile from = state.Mobile;
            
                 from.SendGump(new InternalRunebookGump(from, Book.Books[info.ButtonID - 16], Book, info.ButtonID - 16));
            }
        }

I adjusted the method to not allow the close (ButtonID 0) to run any code in the method, this should solve the null error!
 
Code:
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID > 0)
            {
                 string bookName;
                 for (int x = 0; x < 51; x++)
                 {
                     bookName = GetString(info, x + 100);
                     if (bookName != null && bookName.Length > 0) Book.Books[x].Name = bookName;
                     else Book.Books[x].Name = string.Format("Book #{0}", ((int)(x + 1)).ToString());
                 }
                 Mobile from = state.Mobile;
       
                 from.SendGump(new InternalRunebookGump(from, Book.Books[info.ButtonID - 16], Book, info.ButtonID - 16));
            }
        }

I adjusted the method to not allow the close (ButtonID 0) to run any code in the method, this should solve the null error!
OMG thank you! That did it! Seems to work fine now with 1 exception. Apparently, If I try to delete a one of these books, it restarts the server.

*edit-it's not just that, seems [save command reboots server, [shutdown command reboots it, [delete on certain items like the master runebook or a spawned bag of resources will reboot the server. [delete of a generic spawned pouch or dye tub or something will delete just fine

**edit-so [shutdown or [save work fine, as long as there isn't a master runebook on the ground anywhere in the world or a bag of resources on the ground. If there is one on the ground, it reboots the server. [delete on either one, same thing, it reboots the server. Sorry, prolly need to move this so I don't hijack this resource, my bad
 
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$500.00
Back