Hi,

Running Serv UO. Been dinking around trying to change the item color however preserving the actual item name. I know it is possible however tried a couple different things, and being a newbie, plus several hours scouring the forums, I can't find a workable solution. If I need to post all the code, I can. I am guessing it is something with an override.

1610426967615.png
 
Here is my script. You can see some other way's I have tried that also didn't work.
C#:
//=================================================
//This script was created by Gizmo's Uo Quest Maker
//This script was created on 3/1/2020 6:04:23 PM
//=================================================

using System;
using Server;

namespace Server.Items
{
    public class ScepterOfChaos : Scepter
    {
        public override int InitMinHits{ get{ return 255; } }
        public override int InitMaxHits{ get{ return 255; } }
       
        [Constructable]
        public ScepterOfChaos()
        {
            Name = "Scepter Of Chaos";
            //Name = "<BASEFONT COLOR=#FFA500>Scepter Of Chaos<BASEFONT COLOR=#FFA500>";
            //Name = "<BASEFONT COLOR=#FFA500>\u0022Scepter Of Chaos\u0022<BASEFONT COLOR=#FFA500>";
            Weight = 8;
            Hue = 43;
            MinDamage = 22;
            MaxDamage = 26;
            Attributes.WeaponDamage = 40;
            Attributes.SpellChanneling = 1;
            Attributes.WeaponSpeed = 20;
            AosElementDamages.Chaos = 20;
            WeaponAttributes.HitPoisonArea = 25;
            WeaponAttributes.HitFatigue = 50;
            WeaponAttributes.HitLeechStam = 50;
            WeaponAttributes.HitLeechMana = 50;
            WeaponAttributes.HitLeechHits = 50;
            WeaponAttributes.HitLightning = 100;
            WeaponAttributes.HitHarm = 100;
            WeaponAttributes.HitManaDrain = 50;
            //WeaponAttributes.HitPoisonArea = 25;
           
        }

        /*
        //Error with Damage Types, phys,fire,cold,nrgy,pois all must add upto 100
        public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
        {
            phys = 80;
            fire = 0;
            cold = 0;
            pois = 0;
            nrgy = 0;
        }
        */
        public override void AddNameProperty(ObjectPropertyList list)
        {
            // base.AddNameProperty(list);
            //list.Add(String.Format("<BASEFONT COLOR=#A335EE>{0}<BASEFONT COLOR=#FFFFFF>", this.Name)); purple
            list.Add(String.Format("<BASEFONT COLOR=#FFA500>{0}<BASEFONT COLOR=#FFFFFF>", this.Name));
        }
        public ScepterOfChaos( 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();
        }

    }
}
 
list.Add(String.Format("<BASEFONT COLOR=#FFA500>{0}<BASEFONT COLOR=#FFFFFF>", this.Name));

This line, I think should look something like this:

C#:
list.Add(String.Format("<BASEFONT COLOR=#FFA500>{0}</BASEFONT>", this.Name));
 
Back