firefox

Initiate
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.
 

Active Shards

  • Unchained
    Custom (Classic)
    • Players
    • 162 Online
    • 273 Peak
  • The Crossroads
    Mondain's Legacy
    • Players
    • 106 Online
    • 190 Peak
  • UO Eventine
    Custom (Classic)
    • Players
    • 79 Online
    • 137 Peak
  • Insane UO
    Endless Journey
    • Players
    • 76 Online
    • 105 Peak
  • UO: New Renaissance
    Custom (Classic)
    • Players
    • 25 Online
    • 85 Peak
  • CALYPSO
    Custom (Modern)
    • Players
    • 24 Online
    • 30 Peak
  • UO Phoenix
    Custom (Classic)
    • Players
    • 19 Online
    • 48 Peak
  • Pandora
    Custom (Modern)
    • Players
    • 19 Online
    • 32 Peak
  • Arth
    Custom (Modern)
    • Players
    • 17 Online
    • 34 Peak
  • UO Enigma
    Custom (Modern)
    • Players
    • 16 Online
    • 172 Peak

Donations

Total amount
$0.00
Goal
$500.00
Back