1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Display country under character's name 1.0.0

Encourages communication between players.

  1. 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 (C#):
    1. public override void GetProperties(ObjectPropertyList list)
    2. {
    3.     base.GetProperties(list);

    Above the Target Block (Outside the GetProperties method), add:
    Code (C#):
    1. #region Display country under character name
    2. [CommandProperty(AccessLevel.GameMaster)]
    3. public string Country
    4. {
    5.     get
    6.     {
    7.         if (m_Country == null && Language != null)
    8.             m_Country = Felladrin.Utilities.Country.GetNameFromCode(Language);
    9.  
    10.         return m_Country;
    11.     }
    12. }
    13. string m_Country;
    14. #endregion

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

    Just remove the two blocks of code you've added, and delete Country.cs.

Recent Reviews

  1. Vorspire
    Vorspire
    5/5,
    Version: 1.0.0
    I wasn't aware that the client's language resolved more options than there are cliloc files, until I saw this - awesome!