Go Back   RunUO - Ultima Online Emulation > RunUO > FAQ Forum

FAQ Forum A place to find answers to the most frequently asked questions, and a place to post said answers. Do NOT use this forum to ask questions.

Reply
 
Thread Tools Display Modes
Old 10-31-2008, 12:07 AM   #1 (permalink)
Lurker
 
Join Date: Oct 2008
Age: 22
Posts: 17
Default How to change House Limit.

In the script BaseHouse.cs which is located Scripts/Multis/BaseHouse.cs find this code:

Code:
public static bool HasAccountHouse( Mobile m )
Now... Replace Everything Under that bool to say this:

Code:
		{
			Account a = m.Account as Account;

			if ( a == null )
				return false;

            ArrayList allHouses = new ArrayList();

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

				if ( mob != null )
					allHouses.AddRange( GetHouses( mob ) );
			}
           //3 means 4 house limit. Same thing with any number. You want 2 houses? Set it to 1.
            if(allHouses.Count > 3) return true;

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

			return false;
		}
And Whala! Works like a charm. I wouldn't Have posted this FAQ if people would use the search button. I have been asked about 14 times how to do this so. Enjoy!
Azulai is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5