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!

Multiple houses

I have no idea how to do that since all I did was copy artegordons fix. I figured with him being as good as a scriptor as he is that I wouldnt get any errors. Apparently there is another part to his fix somewhere that I didnt get...?....maybe? Not sure, I just know I screwed up somewhere.
 

ArteGordon

Wanderer
Arwen_NightHawk said:
I have no idea how to do that since all I did was copy artegordons fix. I figured with him being as good as a scriptor as he is that I wouldnt get any errors. Apparently there is another part to his fix somewhere that I didnt get...?....maybe? Not sure, I just know I screwed up somewhere.
look at the earlier fix again. You missed part of it.

You can also do it this way. Same basic fix.

Code:
		public static bool HasAccountHouse( Mobile m )
		{
			// ARTEGORDONMOD
			// unlimited housing for the specified staff level and above
			if(m.AccessLevel >= AccessLevel.Player) return false;
		
			Account a = m.Account as Account;

			if ( a == null )
				return false;

            // ARTEGORDONMOD
            // allow for a limited number of houses for the rest
            int nHouses = 0;

			for ( int i = 0; i < a.Length; ++i )
			{
				Mobile mob = a[i];

				if ( mob != null )
					nHouses += GetHouses( mob ).Count;
			}

            // 4 houses per account limit
            if(nHouses >= 4) return true;

			//for ( int i = 0; i < a.Length; ++i )
			//	if ( a[i] != null && HasHouse( a[i] ) )
			//		return true;

			return false;
		}
 
Thanks Arte. I got it finally. I knew I had messed up somewhere just by looking though I couldnt figure out where, so I am glad you were available for a glance. Thanks again.
 

Aeolus

Sorceror
and to turn off decay, change this at the beginning of BaseHouse.cs

Code:

public const bool DecayEnabled = false;

Ok, this turns house decay off- but what about the contents of the house? Will they still decay, and (hopefully this will not be considered hijacking) if so how do I make it so that items within a house will not decay?
 
Top