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!

8th anniversary fountain of life

8th anniversary fountain of life

Please Update to fix the customize house crash fix reported by dragonlady!
All info at http://www.runuo.com/forums/showthread.php?p=535050

It's been a difficult birth for such a sloppy solution, but it's hard to track down the error when you choose Container instead BaseContainer as parental class and wonder why you cant get the set securelevel context menu entry...

But afaik there are no working container addons out there.
/rant

My gratitude to the highly pestered Erica http://www.runuo.com/forums/showthread.php?t=68459 ^^ for helping me making this almost OSI exact -(OSI sloppy "I wish to release this" work) -(Exact Bounds and healing chance, but it should both be pretty close)

Installation: download the zip and drop in Custom, except BaseHouse.cs and Bandage.cs, which are distro files. You will have to find and edit them in your RUO scripts folder. ( You can try to simply replace them, but if you don't have standard distro files anymore, this will break stuff.
Just search for the keyword fountain and apply the changes 1 by 1. If you got troubles you may post here.

Note: This system is incompatible with http://www.runuo.com/forums/showthread.php?t=61258
You will have to rename classes and choose between some features, post if you still want to try but need help.

Fixed bugs thanks to Erica's reports: Redeed exploit instant and on 1st worldsve. Draging Enhanced Bandage made the remaining pile normal bandages.
Fixed glitches with moving fountains and demolishing house.

Version 1.3
 

Attachments

  • fountainoflive.zip
    25.1 KB · Views: 74

Erica

Knight
Kamuflaro said:
I just recognize how big basehouse is... It's been a difficult birth for such a sloppy solution, but it's hard to track down the error when you choose Container instead BaseContainer as parental class and wonder why you cant get the set securelevel context menu entry...
Installation: download the zip and drop in Custom.
Open your UNMODIFIED basehouse.cs and change the lines 3207, 3257 and 3277:
Code:
	public class LockdownTarget : Target
	{
		private bool m_Release;
		private BaseHouse m_House;

		public LockdownTarget( bool release, BaseHouse house ) : base( 12, false, TargetFlags.None )
		{
			CheckLOS = false;

			m_Release = release;
			m_House = house;
		}

		protected override void OnTargetNotAccessible( Mobile from, object targeted )
		{
			OnTarget( from, targeted );
		}

		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( !from.Alive || m_House.Deleted || !m_House.IsCoOwner( from ) )
				return;

			if ( targeted is Item )
			{
				if ( m_Release )
				{
					m_House.Release( from, (Item)targeted );
				}
				else
				{
					if ( targeted is VendorRentalContract || ( targeted is Container && ((Container)targeted).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
					{
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062392 ); // You must double click the contract in your pack to lock it down.
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501732 ); // I cannot lock this down!
					}
					else
					{
						m_House.LockDown( from, (Item)targeted );
					}
				}
			} 
			else 
			{
				from.SendLocalizedMessage( 1005377 );//You cannot lock that down
			}
		}
	}

	public class SecureTarget : Target
	{
		private bool m_Release;
		private BaseHouse m_House;

		public SecureTarget( bool release, BaseHouse house ) : base( 12, false, TargetFlags.None )
		{
			CheckLOS = false;

			m_Release = release;
			m_House = house;
		}

		protected override void OnTargetNotAccessible( Mobile from, object targeted )
		{
			OnTarget( from, targeted );
		}

		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( !from.Alive || m_House.Deleted || !m_House.IsCoOwner( from ) )
				return;

			if ( targeted is Item )
			{
				if ( m_Release )
				{
					m_House.ReleaseSecure( from, (Item)targeted );
				}
				else
				{
					if ( targeted is VendorRentalContract || ( targeted is Container && ((Container)targeted).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
					{
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062392 ); // You must double click the contract in your pack to lock it down.
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501732 ); // I cannot lock this down!
					}
					else
					{
						m_House.AddSecure( from, (Item)targeted );
					}
				}
			} 
			else 
			{
				from.SendLocalizedMessage( 1010424 );//You cannot secure this
			}
		}
	}

To the following:
Code:
	public class LockdownTarget : Target
	{
		private bool m_Release;
		private BaseHouse m_House;

		public LockdownTarget( bool release, BaseHouse house ) : base( 12, false, TargetFlags.None )
		{
			CheckLOS = false;

			m_Release = release;
			m_House = house;
		}

		protected override void OnTargetNotAccessible( Mobile from, object targeted )
		{
			OnTarget( from, targeted );
		}

		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( !from.Alive || m_House.Deleted || !m_House.IsCoOwner( from ) )
				return;
			if ( targeted is BaseAddonContainer ) return; // Line 3207 changed for Fountain of Life
			if ( targeted is Item )
			{
				if ( m_Release )
				{
					m_House.Release( from, (Item)targeted );
				}
				else
				{
					if ( targeted is VendorRentalContract || ( targeted is Container && ((Container)targeted).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
					{
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062392 ); // You must double click the contract in your pack to lock it down.
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501732 ); // I cannot lock this down!
					}
					else
					{
						m_House.LockDown( from, (Item)targeted );
					}
				}
			} 
			else 
			{
				from.SendLocalizedMessage( 1005377 );//You cannot lock that down
			}
		}
	}

	public class SecureTarget : Target
	{
		private bool m_Release;
		private BaseHouse m_House;

		public SecureTarget( bool release, BaseHouse house ) : base( 12, false, TargetFlags.None )
		{
			CheckLOS = false;

			m_Release = release;
			m_House = house;
		}

		protected override void OnTargetNotAccessible( Mobile from, object targeted )
		{
			OnTarget( from, targeted );
		}

		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( !from.Alive || m_House.Deleted || !m_House.IsCoOwner( from ) )
				return;
// Line 3257 changed for Fountain of Life
			if ( targeted is Item && !(targeted is BaseAddonContainer) )
			{
				if ( m_Release )
				{
					m_House.ReleaseSecure( from, (Item)targeted );
				}
				else
				{
					if ( targeted is VendorRentalContract || ( targeted is Container && ((Container)targeted).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
					{
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062392 ); // You must double click the contract in your pack to lock it down.
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501732 ); // I cannot lock this down!
					}
					else
					{
						m_House.AddSecure( from, (Item)targeted );
					}
				}
			} // Line 3277 changed for Fountain of Life
			else if ( !(targeted is BaseAddonContainer) )
			{
				from.SendLocalizedMessage( 1010424 );//You cannot secure this
			}
		}
	}
In other words: copy the lower one and paste it to where it looks like the top one
If you got a modified BaseHouse and are not sure what to do just ask for help. (post your BaseHouse here)

Look if you get any errors. If you do so, you have classes defined more than once. Look at the names of those classes and go my scripts and delete the file if it is EnhancedBandage, but if it is the FountainOfLife you best search the other version, which is not mine and rename or delete it. Elsewise post the error here.

With a quick look on it one might see it's not really an addoncontainer, but a single container, that is working like an addon. addons have components, this one just has 1 addoncontainer, no components. Anyways, I got to admit the bandages aren't done, but it's simple override stuff and can be added anytime, I just need some info I am waiting on and thought I'd simply release the 1st tested version, which shouldnt crash(as far, as I tested) or unbalance a shard.

P.S. Waaah totally forgot... this wouldn't be possible without Erica's intelligence services. :p http://www.runuo.com/forums/showthread.php?t=68459
P.P.S. Fixed bug with releasing the fountain and redeed for 10 fresh uses exploit. (Just hit on delete for the deeds on shard load, no need to add extra code for 4 ppl.) :p
Kamuflaro i will keep helping you on this i'll be on osi today to find out exactly what the enhanced bandages do so then you could either message me on msn or i'll message you on msn i am sure the enhanced bandages has a function or it wouldnt be called that lol. Great job on the Fountain Of Life i'll keep you posted on msn. :)
 
I've made it OSI like drop bandages from the fountain to the ground on chop. (Changed BaseAddonContainer.cs, which works better now with this.)
Next on my TODO List is the bandages to fullfill another purpose, than working like normal bandages and look good. *lol*
Edit: Added correct dropsound override to the fountain
Edit2: Bandages done.
Edit3: Fixed another tiny bug.
Edit4: Bug stew yay... from now on I'll add version numbers to any of my scripts -.- sorry folks :D
 
Top