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.
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.)