I wanted to share this little tidbit, but I was not sure what section to put it in so this one won.

I have been doing this for a bit to give items some separation, mainly for artifact rarity. Simple little entry that will change the color of an items name. I know that on the RunUO servers M309 showed some interest in this.

Code:
this.Name = "<BASEFONT COLOR=#A335EE>Item Name</font>";

Below is a link to a color chart.

http://www.theodora.com/html_colors.html

Just edit the A335EE to the color you want it to be and your set.
 
One other thing, this can also be used to change the name color of a mobile also, not just items.
 
How to change color of an item name for example, which I need to pass as variable?

I tested

this.Name = String.Format("<BASEFONT COLOR=#1EFF00>{0}<BASEFONT COLOR=#FFFFFF>", itemname );

and name just disappear.

If I use instead

this.Name = "<BASEFONT COLOR=#A335EE>test</font>";

I have the item with correct color but with "test" as name.



I definitely dont know if is a bug or not but items seems like many items do not have names (null as name)
 
Last edited:
the answer to a possible workaround lies here, (I took a few time to discover).

http://www.runuo.com/community/threads/item-name.537395/
I'd love to assist as much as i can but i can't do much continuous support.

Here's what i concluded,
string newName = "";
when no name or default name: Cliloc.Convert(item.LabelNumber, null);
when default name: item.DefaultName;
when named: item.Name;

Then, call in:
from.Send( new UnicodeMessage( item.Serial, item.ItemID, MessageType.Label, <<addhuehere>>, 3, "", "", newName));

As for how to display that on click, there are various ways, be sure to check OnSingleClick first.

Here is the cliloc file.
 

Attachments

  • Cliloc.cs
    3.6 KB · Views: 20
it should also be noted that adding a hue to an item's name will result in html coding to show up when you do the ctrl + shift
instead of the item's name in the little window that pops ups, you'll see something like BASEFONT COLOR
 
Yea, overriding the OnSingleClick method to show the color is prefferable, but that is a different story when the AOS property list is enabled xD
 
Unfortunatly the EC client do not manage any basefont or color methods, so name will be displayed in the same yellow fun way everytime :D
 
Back