RoninGT
Sorceror
FS Accounting Mods
This is a script i came up with to limit char slots and housing slots per account rather than make it server wide. This way i can reward players with a 6th char slot or a 2nd, 3rd, whatever house slot. Very simple edits to some distros and a few new commands.
The following is the edits needed for your distros.
ALWAYS BACKUP YOUR FILES BEFORE EDITING OR DELETING!!!
Open your Account.cs and find
Add Above...
Where it says chars = 5; you can change that to your servers default amount.
Also find...
Change this to...
Close and save Account.cs
Open your BaseHouse.cs and find...
Add above...
Where it says houses = 1; You can change this to your servers default amount. However make it one over your default.
Also find...
Change it to...
Close and Save BaseHouse.cs
Open CharacterCreation.cs and find...
Add above...
Here you can also set what you want your servers starting char and house slots to be per account. ( Default: Houses 1, Chars 5 )
Once you have done that download the below commands, [SetCharSlots ## [SetHouseSlots ## target that player, It will set the accounts slots. Also remember that you can only have 1, 5, or 6 char slots. The system will not let you make anything other than that but for those who dont know and wonder why you can make an account have 3, Its nothing you can do to change this, This is based on the UO Client its self.
You can always set up items (Reward Deeds, Etc) to give players their extra slots rather than the commands. Or a quest reward. You get the idea.
Remember thou that in Account.cs, BaseHouse.cs where you find the chars = 5; and houses = 1; you should change these values to your servers starting about. So when a vet player (Account made before installing this) trys to place a house they will be limited to the servers defaults, Unless you have changed thier slots
ATTN: You may also wish to disable house decay in BaseHouse.cs, Or edit it so you dont get a penaltiy for multi houses.
I hope you guys enjoy.
Ronin
This is a script i came up with to limit char slots and housing slots per account rather than make it server wide. This way i can reward players with a 6th char slot or a 2nd, 3rd, whatever house slot. Very simple edits to some distros and a few new commands.
The following is the edits needed for your distros.
ALWAYS BACKUP YOUR FILES BEFORE EDITING OR DELETING!!!
Open your Account.cs and find
Code:
/// <summary>
/// Gets the maximum amount of characters allowed to be created on this account. Values other than 1, 5, or 6 are not supported.
/// </summary>
public int Limit
{
Add Above...
Code:
public int GetCharSlots()
{
int chars = Convert.ToInt32( this.GetTag("maxChars") );
if ( chars > 1 && chars < 5 || chars > 6 || chars < 1 )
chars = 5;
return chars;
}
Also find...
Code:
public int Limit
{
get{ return 5; }
}
Change this to...
Code:
public int Limit
{
get{ return GetCharSlots(); }
}
Close and save Account.cs
Open your BaseHouse.cs and find...
Code:
public static bool HasHouse( Mobile m )
{
Add above...
Code:
public static int GetHouseSlots( Mobile m )
{
Account acct = m.Account as Account;
int houses = Convert.ToInt32( acct.GetTag("maxHouses") );
if ( houses < 1 )
houses = 1;
int trueSlots = houses - 1;
return trueSlots;
}
Also find...
Code:
public static bool HasHouse( Mobile m )
{
if ( m == null )
return false;
ArrayList list = (ArrayList)m_Table[m];
if ( list == null )
return false;
for ( int i = 0; i < list.Count; ++i )
{
BaseHouse h = (BaseHouse)list[i];
if ( !h.Deleted )
return true;
}
return false;
}
Change it to...
Code:
public static bool HasHouse( Mobile m )
{
if ( m == null )
return false;
ArrayList list = (ArrayList)m_Table[m];
if ( list == null )
return false;
for ( int i = GetHouseSlots( m ); i < list.Count; ++i )
{
BaseHouse h = (BaseHouse)list[i];
if ( !h.Deleted )
return true;
}
return false;
}
Close and Save BaseHouse.cs
Open CharacterCreation.cs and find...
Code:
//CityInfo city = GetStartLocation( args, young );
CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca );
Add above...
Code:
Account acct = newChar.Account as Account;
int houses = Convert.ToInt32( acct.GetTag("maxHouses") );
int chars = Convert.ToInt32( acct.GetTag("maxChars") );
if ( houses <= 1 )
acct.SetTag( "maxHouses", "1" );
if ( chars <= 5 )
acct.SetTag( "maxChars", "5" );
Here you can also set what you want your servers starting char and house slots to be per account. ( Default: Houses 1, Chars 5 )
Once you have done that download the below commands, [SetCharSlots ## [SetHouseSlots ## target that player, It will set the accounts slots. Also remember that you can only have 1, 5, or 6 char slots. The system will not let you make anything other than that but for those who dont know and wonder why you can make an account have 3, Its nothing you can do to change this, This is based on the UO Client its self.
You can always set up items (Reward Deeds, Etc) to give players their extra slots rather than the commands. Or a quest reward. You get the idea.
Remember thou that in Account.cs, BaseHouse.cs where you find the chars = 5; and houses = 1; you should change these values to your servers starting about. So when a vet player (Account made before installing this) trys to place a house they will be limited to the servers defaults, Unless you have changed thier slots
ATTN: You may also wish to disable house decay in BaseHouse.cs, Or edit it so you dont get a penaltiy for multi houses.
I hope you guys enjoy.
Ronin