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!

[SetArmor]SetSkillBonusus = more than one

koluch

Sorceror
I tried this several ways as you can see commented out in the script, but I cant get more then the first one of peacemaking to show on the armor.
On adding the armor, it does increase all three skills by 10 points.

Any thoughts on what I have totally missed to have this show on the armor?
Code:
using System;
using Server.Items;

namespace Server.Items
{
    public class VirtuosoGloves : LeatherGloves
    {
        public override int LabelNumber{ get{ return 1151322; } } // Virtuoso's Kid Gloves
        
        public override SetItem SetID{ get{ return SetItem.Virtuoso; } }
        public override int Pieces{ get{ return 4; } }
        
        public override int InitMinHits{ get{ return 125; } }
        public override int InitMaxHits{ get{ return 125; } }
        
        public override int BasePhysicalResistance{ get{ return 4; } }
        public override int BaseFireResistance{ get{ return 19; } }
        public override int BaseColdResistance{ get{ return 5; } }
        public override int BasePoisonResistance{ get{ return 5; } }
        public override int BaseEnergyResistance{ get{ return 5; } }

        [Constructable]
        public VirtuosoGloves() : base()
        {
            SetHue = 1158;
            
            SetSkillBonuses.SetValues( 0, SkillName.Peacemaking, 10.0 );
            SetSkillBonuses.SetValues( 1, SkillName.Provocation, 10.0 );
            SetSkillBonuses.SetValues( 2, SkillName.Discordance, 10.0 );
            
            /*SetSkillBonuses.Skill_1_Name = SkillName.Peacemaking;
            SetSkillBonuses.Skill_1_Value = 10.0;
            
            SetSkillBonuses.Skill_2_Name = SkillName.Provocation;
            SetSkillBonuses.Skill_2_Value = 10.0;
            
            SetSkillBonuses.Skill_3_Name = SkillName.Discordance;
            SetSkillBonuses.Skill_3_Value = 10.0;*/
            
            SetSelfRepair = 3;
            
            SetPhysicalBonus = 5;
            SetColdBonus = 5;
            SetPoisonBonus = 5;
            SetEnergyBonus = 5;
        }

        public VirtuosoGloves( Serial serial ) : base( serial )
        {
        }

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( (int) 0 ); // version
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
        }
    }
}

Here is the armor:
VirtuosoArmor.jpg

And it does give the bonus on equipping the set:

SkillsIncrease.jpg

Thanks!

Koluch
 

ABCGizmo

Sorceror
If I can assume you are running some version of RunUO with ML support. Then you probably have a file called.. RunUORoot\Expansions\MondainsLegacy\Armor\SetItems.cs file... if you do you will have an object called SetHelper with a method named GetSetProperties. This method is called from your GetProperties in your base armor, which reaches to another command in BaseArmor called GetSetProperties. So anywho, you end up in the SetHelper.GetSetProperties method. Here is the listing.....
Code:
    public static class SetHelper
    {   
        public static void GetSetProperties( ObjectPropertyList list, ISetItem setItem )
        {
            int prop;
                       
            if ( (prop = setItem.SetAttributes.RegenHits) != 0 )
                list.Add( 1080244, prop.ToString() ); // hit point regeneration ~1_val~ (total)
 
            /*if ( (prop = setItem.SetAttributes.RegenStam) != 0 )
                list.Add( , prop.ToString() ); // stamina regeneration ~1_val~ (total)*/
 
            if ( (prop = setItem.SetAttributes.RegenMana) != 0 )
                list.Add( 1080245, prop.ToString() ); // mana regeneration ~1_val~ (total)
 
            if ( (prop = setItem.SetAttributes.DefendChance) != 0 )
                list.Add( 1073493, prop.ToString() ); // defense chance increase ~1_val~% (total)
           
            if ( (prop = setItem.SetAttributes.AttackChance) != 0 )
                list.Add( 1073490, prop.ToString() ); // hit chance increase ~1_val~% (total)
           
            if ( (prop = setItem.SetAttributes.BonusStr) != 0 )
                list.Add( 1072514, prop.ToString() ); // strength bonus ~1_val~ (total)
           
            if ( (prop = setItem.SetAttributes.BonusDex) != 0 )
                list.Add( 1072503, prop.ToString() ); // dexterity bonus ~1_val~ (total)
           
            if ( (prop = setItem.SetAttributes.BonusInt) != 0 )
                list.Add( 1072381, prop.ToString() ); // intelligence bonus ~1_val~ (total)
                       
            if ( (prop = setItem.SetAttributes.BonusHits) != 0 )
                list.Add( 1080360, prop.ToString() ); // hit point increase ~1_val~ (total)
           
            /*if ( (prop = setItem.SetAttributes.BonusStam) != 0 )
                list.Add( , prop.ToString() ); // stamina increase ~1_val~ (total)
           
            if ( (prop = setItem.SetAttributes.BonusMana) != 0 )
                list.Add( , prop.ToString() ); // mana increase ~1_val~ (total)
           
            if ( (prop = setItem.SetAttributes.WeaponDamage ) != 0 )
                list.Add( , prop.ToString() ); // damage increase ~1_val~% (total)*/
           
            if ( (prop = setItem.SetAttributes.WeaponSpeed) != 0 )
                list.Add( 1074323, prop.ToString() ); // swing speed increase ~1_val~% (total)   
           
            if ( (prop = setItem.SetAttributes.SpellDamage) != 0 )
                list.Add( 1072380, prop.ToString() ); // spell damage increase ~1_val~% (total)
                                   
            if ( (prop = setItem.SetAttributes.CastRecovery) != 0 )
                list.Add( 1080242, prop.ToString() ); // faster cast recovery ~1_val~ (total)
                                   
            if ( (prop = setItem.SetAttributes.CastSpeed) != 0 )
                list.Add( 1080243, prop.ToString() ); // faster casting ~1_val~ (total)
           
            if ( (prop = setItem.SetAttributes.LowerManaCost) != 0 )
                list.Add( 1073488, prop.ToString() ); // lower mana cost ~1_val~% (total)
           
            if ( (prop = setItem.SetAttributes.LowerRegCost) != 0 )
                list.Add( 1080441, prop.ToString() ); // lower reagent cost ~1_val~% (total)
           
            if ( (prop = setItem.SetAttributes.ReflectPhysical) != 0 )
                list.Add( 1072513, prop.ToString() ); // reflect physical damage ~1_val~% (total)
           
            /*if ( (prop = setItem.SetAttributes.EnhancePotions) != 0 )
                list.Add( , prop.ToString() ); enhance potions ~1_val~% (total)*/
           
            if ( (prop = setItem.SetAttributes.Luck) != 0 )
                list.Add( 1073489, prop.ToString() ); // luck ~1_val~% (total)
 
            if ( !setItem.SetEquipped && setItem.SetAttributes.NightSight != 0 )
                list.Add( 1060441 ); // night sight
                       
            if ( setItem.SetSkillBonuses.Skill_1_Value != 0 )
                list.Add( 1072502, "{0}\t{1}", "#" + ( 1044060 + (int) setItem.SetSkillBonuses.Skill_1_Name ), setItem.SetSkillBonuses.Skill_1_Value ); // ~1_skill~ ~2_val~ (total)
        }


I was looking through the Cliloc files and think I found 2 more numbers you can use which match the format of ~1_skill~ ~2_val~ (total), try attaching these 2 lines in the GetSetProperties method....

Code:
 if (setItem.SetSkillBonuses.Skill_2_Value != 0)
                list.Add(1151211, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_2_Name), setItem.SetSkillBonuses.Skill_2_Value); // ~1_skill~ ~2_val~ (total)
            if (setItem.SetSkillBonuses.Skill_3_Value != 0)
                list.Add(1151212, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_3_Name), setItem.SetSkillBonuses.Skill_3_Value); // ~1_skill~ ~2_val~ (total)

Once again didn't really test this out, but it compiles fine and should work, if not its the direction you need to take, just need to be able to add 2 more property checks for the Skill2 and Skill3. Hope this helps.
 

koluch

Sorceror
If I can assume you are running some version of RunUO with ML support. Then you probably have a file called.. RunUORoot\Expansions\MondainsLegacy\Armor\SetItems.cs file... if you do you will have an object called SetHelper with a method named GetSetProperties. This method is called from your GetProperties in your base armor, which reaches to another command in BaseArmor called GetSetProperties. So anywho, you end up in the SetHelper.GetSetProperties method. Here is the listing.....
Code:
    public static class SetHelper
    { 
        public static void GetSetProperties( ObjectPropertyList list, ISetItem setItem )
        {
            int prop;
                     
            if ( (prop = setItem.SetAttributes.RegenHits) != 0 )
                list.Add( 1080244, prop.ToString() ); // hit point regeneration ~1_val~ (total)
 
            /*if ( (prop = setItem.SetAttributes.RegenStam) != 0 )
                list.Add( , prop.ToString() ); // stamina regeneration ~1_val~ (total)*/
 
            if ( (prop = setItem.SetAttributes.RegenMana) != 0 )
                list.Add( 1080245, prop.ToString() ); // mana regeneration ~1_val~ (total)
 
            if ( (prop = setItem.SetAttributes.DefendChance) != 0 )
                list.Add( 1073493, prop.ToString() ); // defense chance increase ~1_val~% (total)
         
            if ( (prop = setItem.SetAttributes.AttackChance) != 0 )
                list.Add( 1073490, prop.ToString() ); // hit chance increase ~1_val~% (total)
         
            if ( (prop = setItem.SetAttributes.BonusStr) != 0 )
                list.Add( 1072514, prop.ToString() ); // strength bonus ~1_val~ (total)
         
            if ( (prop = setItem.SetAttributes.BonusDex) != 0 )
                list.Add( 1072503, prop.ToString() ); // dexterity bonus ~1_val~ (total)
         
            if ( (prop = setItem.SetAttributes.BonusInt) != 0 )
                list.Add( 1072381, prop.ToString() ); // intelligence bonus ~1_val~ (total)
                     
            if ( (prop = setItem.SetAttributes.BonusHits) != 0 )
                list.Add( 1080360, prop.ToString() ); // hit point increase ~1_val~ (total)
         
            /*if ( (prop = setItem.SetAttributes.BonusStam) != 0 )
                list.Add( , prop.ToString() ); // stamina increase ~1_val~ (total)
         
            if ( (prop = setItem.SetAttributes.BonusMana) != 0 )
                list.Add( , prop.ToString() ); // mana increase ~1_val~ (total)
         
            if ( (prop = setItem.SetAttributes.WeaponDamage ) != 0 )
                list.Add( , prop.ToString() ); // damage increase ~1_val~% (total)*/
         
            if ( (prop = setItem.SetAttributes.WeaponSpeed) != 0 )
                list.Add( 1074323, prop.ToString() ); // swing speed increase ~1_val~% (total) 
         
            if ( (prop = setItem.SetAttributes.SpellDamage) != 0 )
                list.Add( 1072380, prop.ToString() ); // spell damage increase ~1_val~% (total)
                                 
            if ( (prop = setItem.SetAttributes.CastRecovery) != 0 )
                list.Add( 1080242, prop.ToString() ); // faster cast recovery ~1_val~ (total)
                                 
            if ( (prop = setItem.SetAttributes.CastSpeed) != 0 )
                list.Add( 1080243, prop.ToString() ); // faster casting ~1_val~ (total)
         
            if ( (prop = setItem.SetAttributes.LowerManaCost) != 0 )
                list.Add( 1073488, prop.ToString() ); // lower mana cost ~1_val~% (total)
         
            if ( (prop = setItem.SetAttributes.LowerRegCost) != 0 )
                list.Add( 1080441, prop.ToString() ); // lower reagent cost ~1_val~% (total)
         
            if ( (prop = setItem.SetAttributes.ReflectPhysical) != 0 )
                list.Add( 1072513, prop.ToString() ); // reflect physical damage ~1_val~% (total)
         
            /*if ( (prop = setItem.SetAttributes.EnhancePotions) != 0 )
                list.Add( , prop.ToString() ); enhance potions ~1_val~% (total)*/
         
            if ( (prop = setItem.SetAttributes.Luck) != 0 )
                list.Add( 1073489, prop.ToString() ); // luck ~1_val~% (total)
 
            if ( !setItem.SetEquipped && setItem.SetAttributes.NightSight != 0 )
                list.Add( 1060441 ); // night sight
                     
            if ( setItem.SetSkillBonuses.Skill_1_Value != 0 )
                list.Add( 1072502, "{0}\t{1}", "#" + ( 1044060 + (int) setItem.SetSkillBonuses.Skill_1_Name ), setItem.SetSkillBonuses.Skill_1_Value ); // ~1_skill~ ~2_val~ (total)
        }


I was looking through the Cliloc files and think I found 2 more numbers you can use which match the format of ~1_skill~ ~2_val~ (total), try attaching these 2 lines in the GetSetProperties method....

Code:
 if (setItem.SetSkillBonuses.Skill_2_Value != 0)
                list.Add(1151211, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_2_Name), setItem.SetSkillBonuses.Skill_2_Value); // ~1_skill~ ~2_val~ (total)
            if (setItem.SetSkillBonuses.Skill_3_Value != 0)
                list.Add(1151212, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_3_Name), setItem.SetSkillBonuses.Skill_3_Value); // ~1_skill~ ~2_val~ (total)

Once again didn't really test this out, but it compiles fine and should work, if not its the direction you need to take, just need to be able to add 2 more property checks for the Skill2 and Skill3. Hope this helps.

Perfect!

Koluch;)
 
Top