|
||
|
|||||||
| New Join Forum So your new to RunUO and looking to work with people that are new, this is the place. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
I've been trying to find a way to add 10 Str Requirement to clothing like OSI does. Does anybody know of a way to do this? I've looked through BaseClothing.cs and I found this area:
Code:
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
if ( m_Crafter != null )
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
if ( m_Quality == ClothingQuality.Exceptional )
list.Add( 1060636 ); // exceptional
base.AddResistanceProperties( list );
}
|
|
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
|
Try this, right after the Deserialize method in the cs file put this method
Code:
public override bool CanEquip( Mobile m )
{
if( m.Str < 10 )
return false;
return true;
}
Only problem might be is that it gives no visible indication that it doesn't let you equip it based on strength. If you want it to tell them they don't have the strength to equip it, make it this Code:
public override bool CanEquip( Mobile m )
{
if( m.Str < 10 )
{
if( m is PlayerMobile )
m.SendMessage( "You do not have the strength to equip this" );
return false;
}
return true;
}
|
|
|
|
|
|
#5 (permalink) |
|
Okay well I put this code in right after the Deserialization part:
Code:
public override bool CanEquip( Mobile m )
{
if( m.Str < 10 )
return false;
return true;
}
|
|
|
|
|
|
|
#8 (permalink) |
|
Join Date: Sep 2004
Age: 25
Posts: 4
|
I think your best bet would be to take a look at the script for items that already have a strength requirement, for example, plate armor all has a strength requirement
learn from that and it should give you a direction you need |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|