Display country under character's name

Display country under character's name 1.0.0

No permission to download
Display country under character's name

This script displays the player country based on their client's language code.

screenshot.png


Install

Download Country.cs and drop it anywhere inside your scripts folder.

Then open PlayerMobile.cs and find the Target Block:

Code:
public override void GetProperties(ObjectPropertyList list)
{
    base.GetProperties(list);

Above the Target Block (Outside the GetProperties method), add:
Code:
#region Display country under character name
[CommandProperty(AccessLevel.GameMaster)]
public string Country
{
    get
    {
        if (m_Country == null && Language != null)
            m_Country = Felladrin.Utilities.Country.GetNameFromCode(Language);

        return m_Country;
    }
}
string m_Country;
#endregion

Below the Target Block (Inside the GetProperties method), add:
Code:
#region Display country under character's name
if (Country != null)
{
    list.Add(1060658, "{0}\t{1}", "From", Country);
}
#endregion
Uninstall

Just remove the two blocks of code you've added, and delete Country.cs.
  • Like
Reactions: TheDoc
Author
Felladrin
Downloads
42
Views
114
First release
Last update
Rating
5.00 star(s) 2 ratings

More resources from Felladrin

Latest reviews

I did something similar long ago, lost it, and forgot how I did it. Thanks!
I wasn't aware that the client's language resolved more options than there are cliloc files, until I saw this - awesome!