Im not sure what you mean fully, could you post further details os people can try looking into your issues.
i have laid out a few possible alternatives to what im guessing you may need help with but if they arenot/do not work for you then please post further support info.
try this:
Attributes.Luck =
200; //
<<<<--------- Add the amount of luck you want to add when the item is equiped!!
This line adds luck to an item as an attribute.
or this,
private void DefineMods()
{
m_AttributeMod0 = new DefaultAttributeMod( AttributeName.Luck, true, 20 );
m_AttributeMod0 = new AttributeMod( StatType.Int, "WarriorCloak", 20, TimeSpan.Zero );
}
private void SetMods( Mobile wearer )
{
wearer.AddAttributeMod( m_AttributeMod0 );
wearer.AddAttributeMod( m_AttributeMod0 );
}
public override bool OnEquip( Mobile from )
{
SetMods( from );
return true;
}
public override void OnRemoved( object parent )
{
if ( parent is Mobile )
{
Mobile m = (Mobile)parent;
m.RemoveAttributeMod( "WarriorCloak" );
if ( m.Hits > m.HitsMax )
m.Hits = m.HitsMax;
if ( m_AttributeMod0 != null )
m_AttributeMod0.Remove();
}
}
This should add luck to the item when it is "Equiped" then remove the luck when "Removed"
This code is Un-Tested.
Please do not quote me as im a novice scripter, im just trying to help.
(Please Backup Existing Scripts First)