I have tried very hard to get the armor to un-soul bind I finally did it . But I have one problem I cant get the Characters name that soul binded it off the peace of armor. Is there some way I can keep the original name of the peace of armor that I am un-soul binding. I am so close to getting it to work the way I want except I don't know the peace of code to take off the name on the armor. Anybody have a peace of code or better idea to help or some direction to go. thanks


example :
Titon's Soul Robe
[Sould Bound]


what I'm tryin to do is when I use the unsoul bind deed would like to get results such as
Soul Robe
[Un-soul Bound]

The Armor will unsoul bind but will not name right .





Code:
                    else if (bs.BoundToSoul != 0)
                {
                    // bs.Name = "Soul Test";
                    bs.Name = bs.Name + "\n <BASEFONT COLOR=#164666>"/*Green*/+ "[Un-SoulBound]\n" + "<BASEFONT COLOR=#233966>" + "Equip To Soul Bind" + "<BASEFONT COLOR=#FFFFFF>";
                    bs.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
 
so bs.Name is recording the player's name? or is that the item name?

i'd suggest have the name and player's name as two separate strings
then have it check if the player is null else name string + player's name

there may be a cleaner way to do it
 
not really sure I just edited a soulsword I found on here . http://www.runuo.com/community/thre...only-be-equiped-by-only-one-character.527180/ just added a little to it cause I'm learning . Everything works fine but what is happening is when I unsould bind a weapon that already has someone's named attached with it like :

Timmy's Robe Of Distruction
Donation Item
[Soulbound]

When I go to unsoul bind it with this deed : It works but it looks like this and I cant figure it out .

Timmy's Robe Of Destruction Timmy's Robe Of Destruction
Donation Item
[Un-Soul Bound]

been working on this for a long time .Not sure what you mean on how to split up the name since all I put is
name = "Robe of Destruction" + this.name;

here is the script :






Code:
/*----------------*/
/*--- Scripted ---*/
/*--- By: JBob ---*/
/*----------------*/
using System;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
using Server;
using Server.Kiasta;

namespace Server.Items
{
    public class DonationUnbindingTarget : Target
    {
        private Mobile m_Owner;

        private DonationUnbindingDeed m_Powder;

        public DonationUnbindingTarget(DonationUnbindingDeed charge) : base(10, false, TargetFlags.None)
        {
            m_Powder = charge;
        }

        protected override void OnTarget(Mobile from, object target)
        {
            if (target == from)
                from.SendMessage("You cant do that.");

            else if (target is SoulSword)
            {
                SoulSword ss = (SoulSword)target;
                if (ss.BoundToSoul == 0)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (ss.BoundToSoul != 0)
                {
                    ss.Name = "Soul Sword";
                    ss.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }
            else if (target is SoulBow)
            {
                SoulBow sb = (SoulBow)target;
                if (sb.BoundToSoul == 0)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (sb.BoundToSoul != 0)
                {
                    sb.Name = "Soul Bow";
                    sb.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }

            else if (target is BaseDonationArmor)
            {
                BaseDonationArmor bs = (BaseDonationArmor)target;
                if (bs.BoundToSoul == 0)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (bs.BoundToSoul != 0)
                {
                    // bs.Name = "Soul Test";
                    bs.Name = nameof(Items);
                    bs.Name = bs.Name + "\n <BASEFONT COLOR=#164666>"/*Green*/+ "[Un-SoulBound]\n" + "<BASEFONT COLOR=#233966>" + "Equip To Soul Bind" + "<BASEFONT COLOR=#FFFFFF>";
                    bs.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }


        }

        }

    }

    public class DonationUnbindingDeed : Item
    {
        [Constructable]
        public DonationUnbindingDeed() : base(0x14F0)
        {
            Weight = 1.0;
            Name = "Unbinding deed";
            LootType = LootType.Blessed;
        }

        public DonationUnbindingDeed(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);
            LootType = LootType.Blessed;
            int version = reader.ReadInt();
        }

        public override bool DisplayLootType { get { return false; } }

        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
            else
            {
                from.SendMessage("Which Soul Weapon would you like to Unbind?");
                from.Target = new DonationUnbindingTarget(this);
            }
        }
    }
 
oh, i see.
thought you were using this one: https://www.servuo.com/threads/soul-bind-sword.437/

look at this part of it:
Code:
 public override bool OnEquip(Mobile from)
        {
            // set owner if not already set -- this is only done the first time.
            if (m_Owner == null)
            {
                m_Owner = from;
                this.Name = m_Owner.Name.ToString() + "'s Sword";
                from.SendMessage("You feel the sword grow fond of you.");
                return base.OnEquip(from);
            }
            else
            {
                if (m_Owner != from)
                {
                    from.SendMessage("Sorry but this Sword does not belong to you.");
                    return false;
                }

                return base.OnEquip(from);
            }
        }

that does what you need it to do to make the item name revert back to normal

to do that, target the item and then do
target.m_Owner = null;

and will need to add this so you can do that
Code:
[CommandProperty( AccessLevel.GameMaster )]
        public Mobile Link
        {
            get
            {
                return m_Owner;
            }
        }
 
oh, i see.
thought you were using this one: https://www.servuo.com/threads/soul-bind-sword.437/

look at this part of it:
Code:
 public override bool OnEquip(Mobile from)
        {
            // set owner if not already set -- this is only done the first time.
            if (m_Owner == null)
            {
                m_Owner = from;
                this.Name = m_Owner.Name.ToString() + "'s Sword";
                from.SendMessage("You feel the sword grow fond of you.");
                return base.OnEquip(from);
            }
            else
            {
                if (m_Owner != from)
                {
                    from.SendMessage("Sorry but this Sword does not belong to you.");
                    return false;
                }

                return base.OnEquip(from);
            }
        }

that does what you need it to do to make the item name revert back to normal

to do that, target the item and then do
target.m_Owner = null;

and will need to add this so you can do that
Code:
[CommandProperty( AccessLevel.GameMaster )]
        public Mobile Link
        {
            get
            {
                return m_Owner;
            }
        }
Hey I'm sorry for the stupid questions I'm not to good yet :)

I been working on ways to implement what you have shown me but hours of putting in the code different ways .Download other script you had I'm kinda lost. I'm not really sure how the code goes in what part of the sturctures or bracets. I kinda know what needs to happen with in the script but knowing like where to implement what you said would I have to make a seprate script . couple questions .


Code:
[CommandProperty( AccessLevel.GameMaster )]      <<<<whats that block of code mean
        public Mobile Link                           <<<<< whats that mean
        {
            get
            {
                return m_Owner;                 <<<<<whats that mean what is it returning the owners name
            }
        }
[/QUOTE]



sorry like I said just trying to learn a little bit I'm not to good .thank you for your time
 
no problem

[CommandProperty( AccessLevel.GameMaster )]
means that in game you can see the property when you do [props and target it

public Mobile Link
records the players name and serial# ( like an ID specific to that mobile )

return m_Owner;
m_Owner is private, which means that another scriptcannot read m_Owner
but Mobile Link is the public accessor, so other scripts can see and read it
and by calling it, it is getting the information saved in m_Owner
 
For some reason I made some edits as mentioned and for sakes I cant get the unsoul bind deed to come up in game . Is there anything that I did wrong it compiles I can add my sword And it binds to soul . but no deed . I have attached the unbinding deed and sword.




heres the script

Code:
/*----------------*/
/*--- Scripted ---*/
/*--- By: JBob ---*/
/*----------------*/
using System;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
using Server;
using Server.Kiasta;

namespace Server.Items
{
    public class DonationUnbindingTarget : Target
    {
      

        private DonationUnbindingDeed m_Powder;

        public DonationUnbindingTarget(DonationUnbindingDeed charge) : base(10, false, TargetFlags.None)
        {
            m_Powder = charge;
        }


        [CommandProperty(AccessLevel.GameMaster)]


        public Mobile Link
        {
            get
            {
                return m_Owner;
            }
        }
        protected override void OnTarget(Mobile from, object target)
        {
            if (target == from)
                from.SendMessage("You cant do that.");

            else if (target is SoulSword)
            {
                SoulSword ss = (SoulSword)target;

                if (ss.BoundToSoul == 0)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (ss.BoundToSoul != 0)
                {
                    ss.Name = null;
                    ss.Name = "Soul Sword";
                    ss.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }
            else if (target is SoulBow)
            {
                SoulBow sb = (SoulBow)target;
                if (sb.BoundToSoul == 0)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (sb.BoundToSoul != 0)
                {
                    sb.Name = "Soul Bow";
                    sb.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }

            else if (target is BaseDonationArmor)
            {
                BaseDonationArmor bs = (BaseDonationArmor)target;
                if (bs.BoundToSoul == 0)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (bs.BoundToSoul != 0)
                 
                {
                    // bs.Name = "Soul Test";

                    target.m_Owner = null;
                    bs.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }


        }

        }

    }

    public class DonationUnbindingDeed : Item
    {
        [Constructable]
        public DonationUnbindingDeed() : base(0x14F0)
        {
            Weight = 1.0;
            Name = "Unbinding deed";
            LootType = LootType.Blessed;
        }

        public DonationUnbindingDeed(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);
            LootType = LootType.Blessed;
            int version = reader.ReadInt();
        }

        public override bool DisplayLootType { get { return false; } }

        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
            else
            {
                from.SendMessage("Which Soul Weapon would you like to Unbind?");
                from.Target = new DonationUnbindingTarget(this);
            }
        }
    }


And the Weapon code :



Code:
using System;
using Server.Network;
using Server.Items;

namespace Server.Items
{
    [FlipableAttribute( 0x13FF, 0x13FE )]
    public class TimsWeapon : BaseSword
    {
        public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.CrushingBlow; } }
        public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }

        public override int AosStrengthReq{ get{ return 40; } }
        public override int AosMinDamage{ get{ return 16; } }
        public override int AosMaxDamage{ get{ return 18; } }
        public override int AosSpeed{ get{ return 35; } }
        public override float MlSpeed{ get{ return 3.50f; } }

        public override int OldStrengthReq{ get{ return 40; } }
        public override int OldMinDamage{ get{ return 16; } }
        public override int OldMaxDamage{ get{ return 18; } }
        public override int OldSpeed{ get{ return 35; } }

        public override int DefHitSound{ get{ return 0x23B; } }
        public override int DefMissSound{ get{ return 0x23A; } }

        public override int InitMinHits{ get{ return 250; } }
        public override int InitMaxHits{ get{ return 250; } }

        private Mobile m_Owner;

        [CommandProperty(AccessLevel.GameMaster)]


        public Mobile Link


        {
            get
            {
                return m_Owner;
            }
        }
        [Constructable]
        public TimsWeapon() : base( 0x27A2 )
        {
            this.Name = "The Great Death Sword";
            this.Hue = 1390;
            this.Weight = 10.0;
            this.Layer = Layer.OneHanded;
            this.Attributes.WeaponSpeed = 90;
            this.Attributes.SpellChanneling = 1;
            this.Attributes.WeaponDamage = 25;
            this.WeaponAttributes.HitMagicArrow = 50;
        }



        public override bool OnEquip(Mobile from)
        {
            // set owner if not already set -- this is only done the first time.
            if (m_Owner == null)
            {
                m_Owner = from;
                this.Name = m_Owner.Name.ToString() + "'s" + this.Name;
                from.SendMessage("You feel the sword grow fond of you.");
                return base.OnEquip(from);
            }
            else
            {
                if (m_Owner != from)
                {
                    from.SendMessage("Sorry but this Sword does not belong to you.");
                    return false;
                }

                return base.OnEquip(from);
            }
        }
        public TimsWeapon( Serial serial ) : base( serial )
        {
        }

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

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

            writer.Write(m_Owner); // Version 1
        }
       
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                    m_Owner = reader.ReadMobile();
                    break;
            }
        }
    }
}
 
everything looks good on the item.
so if you do the command: [add DonationUnbindingDeed
nothing shows up in game?
 
Ok I figured it out I had it a script folder outside of the server folder OMG!!! Windows 10 is a little hard to figure out shortcuts and quick links .

I do have a error on my unbinding deed

error
object does not contain a definition for m_Owner and no extension method. line 92


do I have that in the wrong spot
 
Last edited:
if you look at it, your weapon no longer has a boundtosoul property, and that's ok because you shouldn't need it
but your deed still has this

Code:
else if (bs.BoundToSoul != 0)
               
                {
                    // bs.Name = "Soul Test";
                    target.m_Owner = null;
                    bs.BoundToSoul = 0;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }

i'd remove that section then go through each item check and change it to check for m_Owner like so

Code:
else if (target is SoulSword)
            {
                SoulSword ss = (SoulSword)target;
                if (ss.m_Owner == null)
                {
                    from.SendMessage("That is not Soul Bound.");
                }
                else if (ss.m_Owner != null)
                {
                    ss.m_Owner = null;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                }
            }

let me know how that works
 
I got a error says :
Unbindingdeed2.cs
line 54 : Server.Items.SoulSword.m_Owner' is inaccessible due to its protection level
line 59: Server.Items.SoulSword.m_Owner' is inaccessible due to its protection level
line 63: Server.Items.SoulSword.m_Owner' is inaccessible due to its protection level
 
my bad, it should be Link instead of m_Owner, but Link also needed a set to be able to change it to null from outside code

Code:
[CommandProperty(AccessLevel.GameMaster)]
        public Mobile Link
        {
            get { return m_Owner; }
            set{ m_Owner = value; }
        }

as for the name issue i added this
Code:
public override void AddNameProperty(ObjectPropertyList list)
        {
            if( m_Owner != null ) {
             list.Add("{0}'s {1}", Link.Name, this.Name);
            }
            else{ list.Add(this.Name); }
           
        }

and in the code for the target i added this

Code:
else if (target is TimsWeapon)
            {
                TimsWeapon ss = (TimsWeapon)target;
               
                if (!ss.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                    return;
                }
              
                    ss.Link = null;
                    m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                    ss.Delta(ItemDelta.Update); // this forces the name to update
            }

without the Delta bit the item name doesn't update until you drag/drop it
as well as a check to make sure the item is in their pack ( not on the ground, equipped, etc )

also noticed in your deed there's another mobile link property that doesn't belong

i'll postthe code with my edits but i had to take out a few things, so don't use as is. just for reference
 

Attachments

  • bonding sword and deed.rar
    4.3 KB · Views: 12
Awesome I have learned a lot from this :) really really appreciate it .Cant wait till I get home to try this out
 
glad to help :)

also, I think I should mention that in OnEquip method of the item, I removed the part that changes the item name when equipped. that's all done with AddNameProperty now.
 
Hey I have tried that and it works just fine . But I have one question

I have looked at other scripts pulled this form a couple of them





Code:
public override void AddNameProperty(ObjectPropertyList list)
        {
            if (m_Owner != null)
            {
                list.Add("{0}'s {1}", Link.Name, this.Name);
            }
            else list.Add("<BASEFONT COLOR=#164666>" + this.Name   /*Green*/+ "\n [Un-SoulBound]" + "<BASEFONT COLOR=#233966>" + "\n Equip To Soul Bind" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );

        }



this will work but I can see very little of the next line under the name. Is there something I'm doing wrong. To my understanding \n is to drop to the next line? Plus Item will not update until I Pick it up .Also question with few lines of your code :


list.Add("{0}'s {1}", Link.Name, this.Name); <<<<< Whats the {0}'s {1} mean in that line I know what Link.Name does and this.name




Thanks again :)
 
Well I been editing and researching I have come up with the fix for making it add what I need but.
I just cant get it to update without moving it . Do I need to put that delta in another area too?
 
Well I been editing and researching I have come up with the fix for making it add what I need but.
I just cant get it to update without moving it . Do I need to put that delta in another area too?

that depends on how you do your coding. but yeah, for each item targeted you will need code to tell it to do the update delta thing .

so if you do your coding like the deed you posted above, you would change it for both soulsword and soulbow to do the delta thing each time

else if (target is SoulSword)
{
SoulSword ss = (SoulSword)target;


if (ss.Link != null)
{
ss.Link = null;
m_Powder.Delete();
from.SendMessage("That Soul Weapon is now Unbound!");
ss.Delta(ItemDelta.Update); // this forces the name to update
}
}
else if (target is SoulBow)
{
SoulBow sb = (SoulBow)target;

if (sb.Link != null)
{
sb.Link= null;
m_Powder.Delete();
from.SendMessage("That Soul Weapon is now Unbound!");
sb.Delta(ItemDelta.Update); // this forces the name to update
}
}
 
I used the sword we created and went a little farther :)


Code:
using System;
using Server;
using Server.Items;

namespace Server.Kiasta
{
   
    public abstract class BaseDonationArmor : KiastasBaseArmor
    {

       
       

        private Mobile m_Owner;

        [CommandProperty(AccessLevel.GameMaster)]
        public Mobile Link
        {
            get { return m_Owner; }
            set { m_Owner = value; }
        }


        public override ArmorMaterialType MaterialType { get { return ArmorMaterialType.Dragon; } }

           
       
       
           
               
        public override void AddNameProperty(ObjectPropertyList list)
        {
            if (m_Owner != null)
            {
                list.Add("{0}'s {1}", Link.Name, this.Name);
                list.Add(String.Format("<BASEFONT COLOR=#1EFF00 >[SoulBound]</font><BASEFONT COLOR=#FFFFFF>"));
            }
            else
            {


                list.Add(String.Format(this.Name, 1));
                list.Add(String.Format("<BASEFONT COLOR=#ff0000>[Unsoul Bound]</font> \n <BASEFONT COLOR=#ff0000> Equip To Soul Bind <BASEFONT COLOR=#FFFFFF>"));
               


            }
        }


        public override bool OnEquip(Mobile from)
        {
            // set owner if not already set -- this is only done the first time.
            if (m_Owner == null)
            {
                m_Owner = from;
                // this.Name = m_Owner.Name.ToString() + "'s" + this.Name;
            
                from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");
                Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);
                Effects.PlaySound(from.Location, from.Map, 0x243);
                Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
                Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);


                return base.OnEquip(from);
            }
            else
            {
                if (m_Owner != from)
                {
                    from.SendMessage("Sorry but this Sword does not belong to you.");
                    return false;
                }

                return base.OnEquip(from);
            }
        }
       

        public BaseDonationArmor() : base(0)
        {
            this.Weight = 1.0;   
        }

        public BaseDonationArmor(int itemID) : base(itemID)
        {
           

        }



        public BaseDonationArmor(Serial serial) : base(serial)
        {
        }
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0);
          
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                    m_Owner = reader.ReadMobile();
                    break;
            }
        }
    }
}

And Deed


Code:
/*----------------*/
/*--- Scripted ---*/
/*--- By: JBob ---*/
/*----------------*/
using System;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
using Server;
using Server.Kiasta;
namespace Server.Items
{
    public class DonationUnbindingTarget : Target
    {
    
        private DonationUnbindingDeed m_Powder;
        public DonationUnbindingTarget(DonationUnbindingDeed charge) : base(10, false, TargetFlags.None)
        {
            m_Powder = charge;
        }
     
        protected override void OnTarget(Mobile from, object target)
        {
            if (target == from)
                from.SendMessage("You cant do that.");
            else if (target is BaseDonationArmor )
            {
                BaseDonationArmor ss = (BaseDonationArmor)target;
               
                if (!ss.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                    return;
                }
              
                    ss.Link = null;
               
            m_Powder.Delete();
                    from.SendMessage("That Soul Weapon is now Unbound!");
                    ss.Delta(ItemDelta.Update); // this forces the name to update
            }
        }
    }
}
    public class DonationUnbindingDeed : Item
    {
        [Constructable]
        public DonationUnbindingDeed() : base(0x14F0)
        {
            Weight = 1.0;
            Name = "Unbinding deed";
            LootType = LootType.Blessed;
        }
        public DonationUnbindingDeed(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);
            LootType = LootType.Blessed;
            int version = reader.ReadInt();
        }
        public override bool DisplayLootType { get { return false; } }
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
            else
            {
                from.SendMessage("Which Soul Weapon would you like to Unbind?");
                from.Target = new DonationUnbindingTarget(this);
            }
        }
    }
 
list.Add("{0}'s {1}", Link.Name, this.Name); <<<<< Whats the {0}'s {1} mean in that line I know what Link.Name does and this.name

the {0} and {1} are placeholders in the string. and pick up the information after the comma.
so since order is Link.Name, this.Name; then {0} = Link.Name and {1} = this.Name
 
Well I have a slew of weapons and clothing and a lot of stuff that goes with that script. I changed the TimsSword to BaseDonationArmor and have all my armor derive from that base. I didn't upload that cause it pretty big with multiple files. I am on a laptop connection for cellphone limited data. Ty for the info really been picking on this for days you put it in terms I could explain. Also Donation meaning for my member s to donate gold for these items aka Family lol. Keep them all busy
 
Here is the baseDonation Armor script . I edited
Kiasta's Weapon package script and made one kinda out of it.

using System;

using Server;

using Server.Items;

namespace Server.Kiasta


{



publicabstractclassBaseDonationArmor : KiastasBaseArmor


{

private Mobile m_Owner;


[CommandProperty(AccessLevel.GameMaster)]

public Mobile Link


{

get { return m_Owner; }

set { m_Owner = value; }


}

publicoverride ArmorMaterialType MaterialType { get { return ArmorMaterialType.Dragon; } }

publicoverridevoid AddNameProperty(ObjectPropertyList list)


{

if (m_Owner != null)


{

list.Add("{0}'s {1}", Link.Name, this.Name);

list.Add(String.Format("<BASEFONT COLOR=#1EFF00 >[SoulBound]</font><BASEFONT COLOR=#FFFFFF>"));


}

else

{

list.Add(String.Format(this.Name, 1));

list.Add(String.Format("<BASEFONT COLOR=#ff0000>[Unsoul Bound]</font> \n <BASEFONT COLOR=#ff0000> Equip To Soul Bind <BASEFONT COLOR=#FFFFFF>"));


}

}

publicoverridebool OnEquip(Mobile from)


{

// set owner if not already set -- this is only done the first time.

if (m_Owner == null)


{

m_Owner = from;

// this.Name = m_Owner.Name.ToString() + "'s" + this.Name;



from.Emote("*" + from.Name + " feels a weird energy overwhelming their body*");


Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);

Effects.PlaySound(from.Location, from.Map, 0x243);

Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);

Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);

Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100);


Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);



returnbase.OnEquip(from);


}

else

{

if (m_Owner != from)


{

from.SendMessage("Sorry but this Sword does not belong to you.");

returnfalse;


}

returnbase.OnEquip(from);


}

}



public BaseDonationArmor() : base(0)


{

this.Weight = 1.0;


}

public BaseDonationArmor(int itemID) : base(itemID)


{



}





public BaseDonationArmor(Serial serial) : base(serial)


{

}

publicoverridevoid Serialize(GenericWriter writer)


{

base.Serialize(writer);

writer.Write((int)0);




}

publicoverridevoid Deserialize(GenericReader reader)


{

base.Deserialize(reader);

int version = reader.ReadInt();

switch (version)


{

case 1:


m_Owner = reader.ReadMobile();

break;


}

}

}

}


And here is a peace of armor ties that all together

Code:
using System;
using Server;
using Server.Items;

namespace Server.Kiasta
{
   
    public class DonationMageCuirass : BaseDonationArmor
    {
        [Constructable]
        public DonationMageCuirass() : base( 0x2641 )
        {
            this.Hue = 1287;
            this.Name = "Mages Delight Cuirass";
            Weight = 1.0;
           
           
            SkillBonuses.SetValues(0, SkillName.Tactics, 120.00);
           
            Attributes.SpellChanneling = 1;
            Attributes.LowerManaCost = 5;
            Attributes.LowerRegCost = 15;
            Attributes.Luck = 200;
            Attributes.BonusDex = 8;
            //Attributes.BonusHits = 20;
            Attributes.BonusInt = 10;
            Attributes.BonusMana = 10;
            Attributes.SpellDamage = 10;
          


            this.ColdBonus = 10;
            this.EnergyBonus = 10;
            this.FireBonus = 10;
            this.PhysicalBonus = 10;
            this.PoisonBonus = 10;

        }

        public DonationMageCuirass(Serial serial)
            : base(serial)
        {
        }
       
        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );
            writer.Write( (int) 0 );
        }
       
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize( reader );
            int version = reader.ReadInt();
        }
    }
}
 
Back