For scripter reference, the following things are available for working with community names:
- player.communityname - gets the community name of the player
- findPlayerByCommunityName() - works almost identically findPlayer() except it takes a community name as a parameter instead of account name
For instance, to address a player by their community name, you may use the following:
PHP Code:
function onPlayerTouchsMe()
{
this.chat = "Hello, " @ player.communityname;
}
Notes:
- Players with original account names have community names set to the same as their account. For instance, account "Skyld" has the community name "Skyld".
- Guest players (those who have not logged in with an account for the 4-hour trial) have a community name of "guest".