Display country under character's name

Display country under character's name 1.0.0

Author
Felladrin
Downloads
63
Views
2,426
First release
Last update

Ratings

5.00 star(s) 2 ratings
No permission to download Join the discussion More information

More resources from Felladrin

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:
Expand Collapse Copy
public override void GetProperties(ObjectPropertyList list)
{
    base.GetProperties(list);


Above the Target Block (Outside the GetProperties method), add:
Code:
Expand Collapse Copy
#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:
Expand Collapse Copy
#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

Donations

Total amount
$150.00
Goal
$500.00

Shards

Back