Scripts/Accounting/Account.cs

Replace:
Code:
		/// <summary>
		/// Gets the maximum amount of characters allowed to be created on this account. Values other than 1, 5, 6, or 7 are
		/// not supported by the client.
		/// </summary>
		[CommandProperty(AccessLevel.Administrator)]
		public int Limit { get { return (Core.SA ? 7 : Core.AOS ? 6 : 5); } }
with
Code:
		/// <summary>
		/// Gets the maximum amount of characters allowed to be created on this account. Values other than 1, 5, 6, or 7 are
		/// not supported by the client.
		/// </summary>
		[CommandProperty(AccessLevel.Administrator)]
		public int Limit { get { return 1; } }
 
...or something like this...
Code:
        /// <summary>
        /// Gets the maximum amount of characters allowed to be created on this account. Values other than 1, 5, 6, or 7 are
        /// not supported by the client.
        /// </summary>
        [CommandProperty(AccessLevel.Administrator)]
        public int Limit { get { return (this.AccessLevel > AccessLevel.Player ? 7 : 1); } }

Haven't checked if its working.
 
Also wanna point out (in case anyone else comes searching here) that I think the client is limited to just 1, 5, or 6 characters. I know on an older shard I was using a method someone had posted (I think it was at RunUO) that would just hang the client if you wanted to use 2, 3, or 4 character limits. It would give you the option to create them, but it would just hang and freeze (forcing a restart), so what was an option for anyone that is looking for limit it by those numbers.
 
So I've checked my code above. It works.

Code:
19:41:45 Login: 127.0.0.1: Character creation failed, account full
19:41:45 Client: 127.0.0.1: Disconnected. [0 Online] [XeroX]

But client is stuck in character creation instead of giving a "account full" message.

Going to check if there's another possiblity.

Issues is:
Code:
private static Mobile CreateMobile(Account a)
{
if (a.Count >= a.Limit)
return null;
 
Yeah, that's how it used to do. To my knowledge it never allowed the client to do anything else if you were using 2,3,or 4 as the number. (Or I never knew of a method.)
 
Oh you mean there is no other possiblity? There is no actual account full message, as ea controls this via the number of slots?
 
That was always my impression on how it worked. If I recall correctly (and it has been awhile) the client would do this if you used any other option outside of 1,5,6 (and I guess now 7.) It's been awhile, so someone please correct me if I'm wrong, but I remember I ran a small shard years and years ago where we only allowed 2 characters and the above method was the only way we could get it to work (IE: Client freezing). We'd see the message on the console, but you'd have to restart the frozen client and try again.
 
Yes, you're right. There is no packet that fits...and actually that makes sense. So client freezes but most important the code works ^^
 
Last edited:
Actually, that is not correct. If you set it to only allow one character, then the NEW button should disappear and they will not be able to create another character. However, the flags are wrong in the repo. I have changed it about 5 times but someone keeps changing it back.

If you go to ExpansionInfo in your server folder, go to this:

Code:
  public enum CharacterListFlags
   {
     None = 0x00000000,
     Unk1 = 0x00000001,
     OverwriteConfigButton = 0x00000002,
     OneCharacterSlot = 0x00000004,
     ContextMenus = 0x00000008,
     SlotLimit = 0x00000010,
     AOS = 0x00000020,

Change it to read:
Code:
  public enum CharacterListFlags
   {
     None = 0x00000000,
     Unk1 = 0x00000001,
     OverwriteConfigButton = 0x00000002,
     OneCharacterSlot = 0x00000014,
     ContextMenus = 0x00000008,
     SlotLimit = 0x00000010,
     AOS = 0x00000020,

After that change, you will need to recompile the core and it will only allow them to create a single character and then the NEW button will go away.
 
Back