Hello im trying to make some weapon tiers and give them a colored name;

This i what i tried, in the Constructor:

Code:
Name = "<BASEFONT COLOR=#A335EE>Epic Katana</font>";

Didnt worked

also i tried to override the onsingleclick method:


Code:
 public override void OnSingleClick(Mobile from)
        {
            string Name = "<BASEFONT COLOR=#A335EE>Item Name</font>";

    
        }

Didnt worked either, thanks!
 
Try something similar in AddNameProperties:

list.Add( String.Format("<BASEFONT COLOR=#A335EE>{0}<BASEFONT COLOR=#FFFFFF>", this.Name ) );
 
Try something similar in AddNameProperties:

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

My server have no propeties on items or attritbutes, expansion is set to None
 
Try this:

Code:
public override void AddNameProperty(ObjectPropertyList list)
{
     // base.AddNameProperty(list);
     list.Add( String.Format("<BASEFONT COLOR=#A335EE>{0}<BASEFONT COLOR=#FFFFFF>", this.Name ) );
}
 
If you have the AOS+ hover-tooltips disabled, then you can't color an item's name using Html and #RRGGBB colors.

You are limited to changing the hue of the single-click message:

https://github.com/ServUO/ServUO/blob/master/Server/Item.cs#L5623
https://github.com/ServUO/ServUO/blob/master/Server/Item.cs#L5632
https://github.com/ServUO/ServUO/blob/master/Server/Item.cs#L5645

All 3 of those lines use a constant hue of 0x3B2 which you can change.

It would probably be worth adding a "NameHue" property to Item.cs with a default value of 0x3B2, then replacing 0x3B2 on the above linked lines with this.NameHue.

If you do add a "NameHue" property to Item.cs, don't forget to Serialize/Deserialize it.
 
Back