I been searching around for a while and can't seem to find anything about this. I found how to change the max weight, but what I'm looking for is to up the max number of items that can be in a bank. Any help would be greatly appreciated.
 
Yea I don't really know much about RunUO 2. I started working on this with the ServUO fork and that's like 3 forks removed :) Were you looking in the Server directory? I think the file is Containers.cs
 
This is what I added to the Containers.cs and it doesn't seem to work

{
public override int DefaultMaxItems
{
get
{
// return base.DefaultMaxItems;
return 600;
}
}



So I'm gonna guess that's not right?
 
There is an old thread at RunUO (2007) and that code snippet is what they said to do. Change it in containers.cs and recompile the core. I have not tried so I do not know if it works. The code is completely different in ServUO:
Code:
  public class BankBox : Container
   {
     private Mobile m_Owner;
     private bool m_Open;

     public override int DefaultMaxWeight { get { return 0; } }

     public override bool IsVirtualItem { get { return true; } }

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

     public Mobile Owner { get { return m_Owner; } }

     public bool Opened { get { return m_Open; } }

     public void Open()
     {
       m_Open = true;

       if (m_Owner != null)
       {
         m_Owner.PrivateOverheadMessage(
           MessageType.Regular,
           0x3B2,
           true,
           String.Format("Bank container has {0} items, {1} stones", TotalItems, TotalWeight),
           m_Owner.NetState);
         m_Owner.Send(new EquipUpdate(this));
         DisplayTo(m_Owner);
       }
     }
 
Maybe input
public override int DefaultMaxItems { get { return 0; } } and afer get put in the number of max items?
 
Yea I did see that thread, I think I'm just gonna end up making the bank deed for players to get as a vet reward to just make it easier that way. Thanks for the help guys.
 
Just tested this script posted by Peoharen, it compiles and works.
ref: http://www.runuo.com/community/threads/bank-box-max-items.84598/#post-3800182

I tested by using a player account, not a staff account, and setting the shard to Test shard so my full is full of stuff.
Dropped a few bags until the bank item count reaches about 145.
Try to drop my robe in, it won't fit.
I use the deed, and now the robe fits.
 

Attachments

  • BankMaxItemsIncreaseDeed.cs
    5 KB · Views: 85
No problem, the script needs a little tweaking IMO.
1) A player can use it 2 to 3 times before it tells them they cannot use it again
2) The deed doesn't disappear after use.

Fixing #2 will more or less fixes #1, and maybe an additional check for a cap on maxitems ( I can't remember if the script includes one or not )
 
looked all over for max items in bank mod haven't found one i tried containers.cs in server folder add this line

public override int DefaultMaxItems { get { return 10000; } }

sadly enough it didn't work...
 
well that's a readonly because it has a get, not a set. so it wouldn't be changeable as a normal property in game. but you should be able to switch it so it's not readonly. not sure how many scripts would need adjustment if you did though
 
Code:
mobile.BankBox.MaxItems = 10000;

You could do this in the static method PlayerMobile.OnLogin()

Code:
private static void OnLogin( LoginEventArgs e )
{
	Mobile from = e.Mobile;
			
	from.BankBox.MaxItems = 10000;

...
 
Back