Iomega0318

Member
ServUO Version
Publish 57
Ultima Expansion
Endless Journey
So I am using the XML Socketing system which works great, however is there a way to add in the scripts that when an item is created it does not get the attachment applied? I don't mind if it's socketed after creation but I don't want to spawn lets say a donation item in only to have it be socketed as this usually means it places a limit on the sockets which I do not want on certain scripted items. I hope that makes sense, let me know if I need to clarify more thank you.

1654022490189.png
 
You just remove the xmlsocket code from the constructor
And you lost me lol..
this is an example of the scripts I am not wanting to spawn in with sockets to start, I don't care what they do with it afterwards like apply sockets..
C#:
using System;
using Server.Spells;

namespace Server.Items
{
    public class DonationHildebrandtShield : BaseShield
    {
        public override int ArtifactRarity { get { return 9001; } }
        public override int BasePhysicalResistance { get { return 5; } }
        public override int BaseFireResistance { get { return 5; } }
        public override int BaseColdResistance { get { return 5; } }
        public override int BasePoisonResistance { get { return 5; } }
        public override int BaseEnergyResistance { get { return 5; } }
        public override int InitMinHits { get { return 255; } }
        public override int InitMaxHits { get { return 255; } }
        public override int AosStrReq { get { return 90; } }
        public override int OldStrReq { get { return 60; } }

        [Constructable]
        public DonationHildebrandtShield()
            : base(0xA831)
        {
            Weight = 1.0;
            Name = "Dragon Shield Of Adjournment to Antiquity";
            Hue = 1154;

            Attributes.AttackChance = 5;
            Attributes.BonusDex = 25;
            Attributes.BonusInt = 25;
            Attributes.BonusStr = 25;

            Attributes.BonusHits = 25;

            Attributes.DefendChance = 15;

            Attributes.LowerManaCost = 5;
            Attributes.LowerRegCost = 15;
            Attributes.Luck = 25;

            Attributes.ReflectPhysical = 15;

            Attributes.RegenHits = 7;
            Attributes.RegenStam = 7;
            Attributes.BonusMana = 2;

            Attributes.SpellDamage = 5;
            Attributes.WeaponDamage = 5;

            Attributes.CastRecovery = 1;
            Attributes.CastSpeed = 1;

            Attributes.SpellChanneling = 1;
            Attributes.NightSight = 1;


            MeditationAllowance = ArmorMeditationAllowance.All;

            ArmorAttributes.SelfRepair = 10;
        }

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

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

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write(0);
        }
    }
}
 
I think i misunderstood, do you want to prevent sockets addin on creation, for example, on all armor or just certain items?

If just certain ones then i would create a new property and wrap the xmlsocket code in BaseArmor in an if statement

Im trying to think of an example cause i know my explanation is crappy. Give me a bit
 
The goal is to prevent certain individual items from not spawning as socketed, as I made the artifact rarity so high I ended up just doing this which also seems to work:
C#:
            if (ArtifactRarity >= 9000)
            {
            }
            else
            {
                XmlSockets.ConfigureRandom(this, 20.0, 0.1, 0.5, 3.0, 15.0, 50.0);
            }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back