Karack

Member
Hi, I have a armor set script when fully weared add +15 magery +15 mystic and +20 spellweaving but in game, the gump only show the +15 mystic.

Here the script and the screenshot

Code:
using System;

namespace Server.Items
{
    public class MerlinArms : LeatherArms
    {
        public override bool IsArtifact { get { return true; } }
       
        [Constructable]
        public MerlinArms() : base()
        {
            this.SetHue = 2101;
            this.Name = "The Grand Wizard Merlin - Arms";
            this.Attributes.SpellDamage = 5;
            this.Attributes.LowerManaCost = 5;           
            this.Attributes.LowerRegCost = 12;
           
            this.LootType = LootType.Blessed;

            this.MaxHitPoints = 255;
            this.HitPoints = 255;
           
            this.SetPhysicalBonus = 10;
            this.SetFireBonus = 10;
            this.SetColdBonus = 10;
            this.SetPoisonBonus = 10;
            this.SetEnergyBonus = 10;
           
       
            this.SetSkillBonuses.SetValues(0, SkillName.Mysticism, 15);
            this.SetSkillBonuses.SetValues(1, SkillName.Magery, 15);
            this.SetSkillBonuses.SetValues(2, SkillName.Spellweaving, 20);
       
            this.SetAttributes.BonusInt = 25;
            this.SetAttributes.SpellDamage = 10;
           
            this.SetAttributes.AttackChance = 10;                       
            this.SetAttributes.DefendChance = 10;
            this.SetAttributes.LowerRegCost = 40;
            this.SetAttributes.LowerManaCost = 15;
        }
       
        public MerlinArms(Serial serial)
            : base(serial)
        {
        }

        public override int LabelNumber
        {
            get
            {
                return 1096033;
            }
        }// TheGrandWizardMerlinSet01
        public override SetItem SetID
        {
            get
            {
                return SetItem.TheGrandWizardMerlinSet01;
            }
        }
        public override int Pieces
        {
            get
            {
                return 5;
            }
        }
       
    public override int BasePhysicalResistance
    { get { return 12; } }
    public override int BaseFireResistance
    { get { return 12; } }
    public override int BaseColdResistance
    { get { return 12; } }
    public override int BasePoisonResistance
    { get { return 12; } }
    public override int BaseEnergyResistance
    { get { return 12; } }

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

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

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

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


Thx for support
 

Attachments

  • Item properties appear.png
    Item properties appear.png
    66.5 KB · Views: 48
Only changing for : m_AosSkillBonuses.GetProperties(list); give a error about ( and )

when changing to :

[article] if (m_AosSkillBonuses.GetProperties(list));[/article]

I get this error

[article]
CS0103: Line 160: The name 'm_AosSkillBonuses' does not exist in the current context
[/article]
 
Last edited:
AosSkillBonuses.GetProperties(list);

also, at the top of the SetItem.cs add using Server; after using System.Linq;
 
I get this error

[article]CS0120: Line 161: An object reference is required for the non-static property, method, or field 'Server.AosSkillBonuses.GetProperties (Server.ObjectPropertyList)'[/article]

At line 55 of setitem.cs it refer to object property list like this

[article]
public static void GetSetProperties(ObjectPropertyList list, ISetItem setItem)
{
AosAttributes attrs;

if (setItem is BaseWeapon)
attrs = ((BaseWeapon)setItem).Attributes;
else if (setItem is BaseArmor)
attrs = ((BaseArmor)setItem).Attributes;
else if (setItem is BaseClothing)
attrs = ((BaseClothing)setItem).Attributes;
else if (setItem is BaseQuiver)
attrs = ((BaseQuiver)setItem).Attributes;
else if (setItem is BaseJewel)
attrs = ((BaseJewel)setItem).Attributes;
else
attrs = new AosAttributes(setItem as Item);
[/article]

Great thx for your support
 
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) if (setItem.SetSkillBonuses.Skill_2_Value != 0) list.Add(1072502, "{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(1072502, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_3_Name), setItem.SetSkillBonuses.Skill_3_Value); // ~1_skill~ ~2_val~ (total) if (setItem.SetSkillBonuses.Skill_4_Value != 0) list.Add(1072502, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_4_Name), setItem.SetSkillBonuses.Skill_4_Value); // ~1_skill~ ~2_val~ (total) if (setItem.SetSkillBonuses.Skill_5_Value != 0) list.Add(1072502, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_5_Name), setItem.SetSkillBonuses.Skill_5_Value); // ~1_skill~ ~2_val~ (total)
that should work
 
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back