RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Enabling 7th Character Slot [RUO SVN 301]

HellRazor

Knight
Enabling 7th Character Slot [RUO SVN 301]

Props to our friends over at POL who are maintaining a current UO Packet Guide where I found the needed packet info to enable the slot.


1. SCRIPT MODS

In Scripts\Accounting\Account.cs:

Line 590, Change:

Code:
m_Mobiles = new Mobile[6];

To:

Code:
m_Mobiles = new Mobile[7];

Line 773, Change:

Code:
Mobile[] list = new Mobile[6];

To:

Code:
Mobile[] list = new Mobile[7];

Line 1107, Change:

Code:
public int Limit
{
    get { return ( Core.AOS ? 6 : 5 ); }
}

To:

Code:
public int Limit
{
    get { return ( Core.AOS ? 7 : 5 ); }
}


2. CORE MODS:

In Server\Network\Packet.cs:

Line 2522, Change:

Code:
if ( acct != null && acct.Limit >= 6 )
{
	flags |= 0x8020;
	flags &= ~0x004;
}

To:

Code:
if ( acct != null && acct.Limit == 7 )
{
	flags |= 0x9000; 
	flags &= ~0x004;
}
else if ( acct != null && acct.Limit == 6 )
{
	flags |= 0x8020;  
	flags &= ~0x004; 
}

Line 3378, Change:

Code:
if ( count >= 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character

To:

Code:
if ( count == 7 )
	flags |= 0x1000; // 7th character slot
else if ( count == 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character

Recompile the core and you're done!


NOTES:

I believe the first version of the client to support 7th character slot was v6.0.4.0 (18 Oct 07) - this version of the client came out the same day OSI announced that 7th character slots could be purchased from the UO store.

DISCLAIMER:

One thing that should be done in the SVN is to allow extra character slots to be enabled or disabled independently from other expansion features. Right now the 6th character slot is tied to AOS - see the change to the line:

Code:
get { return ( Core.AOS ? 6 : 5 ); }

...and of course there really is no expansion to even associate the 7th character slot with without making more changes to the code. The extra character slot features should be tied more to client versions than to expansions.

Nevertheless, it doesn't really affect anything since only clients that support the extra client slot(s) will be able to use them anyway.

Hope you find this helpful!
 

Sythen

Sorceror
Thank You For This Information

I'll be updating the core tomorrow, but i did already update the Account.cs :)
 

Erica

Knight
HellRazor;783368 said:
Props to our friends over at POL who are maintaining a current UO Packet Guide where I found the needed packet info to enable the slot.


1. SCRIPT MODS

In Scripts\Accounting\Account.cs:

Line 590, Change:

Code:
m_Mobiles = new Mobile[6];

To:

Code:
m_Mobiles = new Mobile[7];

Line 773, Change:

Code:
Mobile[] list = new Mobile[6];

To:

Code:
Mobile[] list = new Mobile[7];

Line 1107, Change:

Code:
public int Limit
{
    get { return ( Core.AOS ? 6 : 5 ); }
}

To:

Code:
public int Limit
{
    get { return ( Core.AOS ? 7 : 5 ); }
}


2. CORE MODS:

In Server\Network\Packet.cs:

Line 2522, Change:

Code:
if ( acct != null && acct.Limit >= 6 )
{
	flags |= 0x8020;
	flags &= ~0x004;
}

To:

Code:
if ( acct != null && acct.Limit == 7 )
{
	flags |= 0x9000; 
	flags &= ~0x004;
}
else if ( acct != null && acct.Limit == 6 )
{
	flags |= 0x8020;  
	flags &= ~0x004; 
}

Line 3378, Change:

Code:
if ( count >= 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character

To:

Code:
if ( count == 7 )
	flags |= 0x1000; // 7th character slot
else if ( count == 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character

Recompile the core and you're done!


NOTES:

I believe the first version of the client to support 7th character slot was v6.0.4.0 (18 Oct 07) - this version of the client came out the same day OSI announced that 7th character slots could be purchased from the UO store.

DISCLAIMER:

One thing that should be done in the SVN is to allow extra character slots to be enabled or disabled independently from other expansion features. Right now the 6th character slot is tied to AOS - see the change to the line:

Code:
get { return ( Core.AOS ? 6 : 5 ); }

...and of course there really is no expansion to even associate the 7th character slot with without making more changes to the code. The extra character slot features should be tied more to client versions than to expansions.

Nevertheless, it doesn't really affect anything since only clients that support the extra client slot(s) will be able to use them anyway.

Hope you find this helpful!

Awesome Job HellRazor Thanks for the fix works great.
 

Greystar

Wanderer
Thank you for providing this detailed information, worked like a charm!





PS) Don't bother flaming me for Res'ing an old Thread. I've been gone a while so it's new to me.
 

Greystar

Wanderer
Lord_Greywolf;800084 said:
not going to flame you fro rezing an old thread
going to flame you for taking over 6 months off of RunUO :eek:
Shame on you :rolleyes:
:D :D :D

One acronym sums it up Nicely ... WoW
 

Thilgon

Sorceror
search for Character slots (or something like that), i believe it was a RoninGT or ArteGordon script... that allows to set (or give as reward) any different number of char slots (or housing slots)... Mod it a little, and it will work easy with this :)
I am not using this (yet), but i'm using the char slots mod on the latest SVN and it is working more than fine...
 

Acronis

Sorceror
Been wanting to do this on my shard for a while but I'm not really good at reverse engineering packets. I knew exactly where I was looking, just did not know what to set it to. :p Got it working now, thanks for posting!
 
Top