Lagatha

Rookie
Hi all what i'm trying to do is take deed I have from run uo and and make it work in serveuo. no luck so far. I have players able to have up to 2 house but would like to add the deed so they can add up to 2 more. Any help would be great.
 

Attachments

  • HouseSlotScroll.cs
    2.3 KB · Views: 10

Asteria

Citizen
we had tried this deed when we added in extra house slots on our server and had no luck with it. the solution for us ended up being added in a section into basehouse for an extra house slots tag as well as into our playermobile, then we essentially just made a deed that adjusts the number in that tag.
 

Lokai

Moderator
Look at BaseHouse, method CheckAccountHouseLimit().

In there it checks to see if a Mobile is at the shard's housing limit. It should be easy enough to modify that method to first check the Shard Limit of 2, then pull the Mobile's Account, check for the Account tag created by the Scroll, and allow them to proceed if it finds more slots for them.
 

Lagatha

Rookie
we had tried this deed when we added in extra house slots on our server and had no luck with it. the solution for us ended up being added in a section into basehouse for an extra house slots tag as well as into our playermobile, then we essentially just made a deed that adjusts the number in that tag.
Well that sounds like what i will have to do. Only lol I dont know how. :) May I see How it is written?
 

Lagatha

Rookie
Look at BaseHouse, method CheckAccountHouseLimit().

In there it checks to see if a Mobile is at the shard's housing limit. It should be easy enough to modify that method to first check the Shard Limit of 2, then pull the Mobile's Account, check for the Account tag created by the Scroll, and allow them to proceed if it finds more slots for them.
I have changed the players amount of houses all may have, but i was looking for how to only change one player at a time. But thank you for your effort.
 

Violet Joy

Citizen
Attached are the git-sourced script files, edited, as well as a deed. Properties will appear in [props and edited code regions (BaseHouse.cs and Account.cs) are marked.
 

Attachments

  • BaseHouse.cs
    166.5 KB · Views: 30
  • ExtraHouseDeed.cs
    2.6 KB · Views: 35
  • Account.cs
    65.3 KB · Views: 28
Last edited:

Violet Joy

Citizen
I was attempting to get this to work on my ServUO. I updated BaseHouse, Account, and used the ExtraHouseDeed file posted. It says it increases the house slots, but I'm still limited to 1 house.
A config entry is used to get the account house limit for all players. If this value is zero and you used the deed, your total allowed houses becomes one.
I believe if the config entry doesn't exist in the config text files, the value returned is still zero. You may need to add the config entry.
 

Lagatha

Rookie
I was attempting to get this to work on my ServUO. I updated BaseHouse, Account, and used the ExtraHouseDeed file posted. It says it increases the house slots, but I'm still limited to 1 house.
Ya I never got it work on my shard, but i found a work around. I make the player staff and transfer the house to them.. Then i return them to player
 

magik hatt

Citizen
I can't say exactly what the problem was, but I upgraded to the latest release of ServUO and a slightly higher UO client. House increase appears to be working as it should for me now.
 

magik hatt

Citizen
I used the ExtraHouseDeed.cs file Violet Jay posted then edited my BaseHouse.cs and Account.cs files based on the extra house edits in the files Violet Jay posted.

BaseHouse has 1 edit.
C#:
public static int GetAccountHouseLimit(Mobile m)
        {
            //added extra house here
            #region ExtraAccountHouses
            if (m.Account != null)
            {
                if (m.Account is Account)
                {
                    Account account = m.Account as Account;
                    return AccountHouseLimit + account.ExtraAccountHouses;
                }
                else
                {
                    return AccountHouseLimit;
                }
            }
            #endregion ExtraAccountHouses


Account has 3 edits.
C#:
[PropertyObject]
    public class Account : IAccount, IComparable, IComparable<Account>
    {
        //added extra house accounts here
        #region ExtraAccountHouses

        private int m_ExtraAccountHouses = 0;

        [CommandProperty(AccessLevel.Counselor, AccessLevel.Administrator)]
        public int ExtraAccountHouses
        {
            get
            {
                return m_ExtraAccountHouses;
            }
            set
            {
                if (value < 0)
                    value = 0;

                m_ExtraAccountHouses = value;
            }
        }
        #endregion ExtraAccountHouses
        //end extra house edits

C#:
public Account(XmlElement node)
        {
            //added extra house accounts here
            #region ExtraAccountHouses

            m_ExtraAccountHouses = Utility.GetXMLInt32(Utility.GetText(node["extraAccountHouses"], "0"), 0);

            #endregion ExtraAccountHouses
            //end extra house here

C#:
public void Save(XmlTextWriter xml)
        {
            xml.WriteStartElement("account");

            //added extra house accounts here
            #region ExtraAccountHouses

            xml.WriteStartElement("extraAccountHouses");
            xml.WriteString(m_ExtraAccountHouses.ToString());
            xml.WriteEndElement();

            #endregion ExtraAccountHouses
            //end extra house here
 
Last edited:

jayates

Citizen
I used these files too and just like
magik hatt
I couldn't get this to work either. I tried to just replace my basehouse script with the posted one and got a ton of errors so, I put mine back and edited it like
magik hatt's post and it didn't work.
Post automatically merged:

Of course I edited the account.cs and added the ExtraHouseDeed.cs too.
Post automatically merged:

we had tried this deed when we added in extra house slots on our server and had no luck with it. the solution for us ended up being added in a section into basehouse for an extra house slots tag as well as into our playermobile, then we essentially just made a deed that adjusts the number in that tag.
Will you share your work?
 
Last edited:

Lagatha

Rookie
I never got this to work for me but at least people are still posting and some seem to be able to make it work. So i have hope
 

Violet Joy

Citizen
Account needs to hold and serialize the number of extra houses it has. This is a new property which needs to be added.
Next, in 'BaseHouse.cs' you need to modify the method 'GetAccountHouseLimit(Mobile m)' to return the total houses allowed for that mobile.
To do this, you need to verify the mobile has an account and then add the house bonus from the account to the number returned.