API BNGetGameAccountInfo

Returns information about the specified toon of a RealID friend. hasFocus, characterName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime, canSoR, toonID, bnetIDAccount, isGameAFK, isGameBusy = BNGetGameAccountInfo(bnetIDGameAccount)

Arguments

 * : Number - A unique numeric identifier for the friend during this session.

Returns

 * : Boolean - Whether or not this toon is the one currently being displayed in Blizzard's FriendFrame.
 * : String - The name of the logged in toon/character.
 * : String - Either "WoW" (BNET_CLIENT_WOW), "S2" (BNET_CLIENT_S2), "WTCG" (BNET_CLIENT_WTCG), "App" (BNET_CLIENT_APP), "Hero" (BNET_CLIENT_HEROES), "Pro" (BNET_CLIENT_OVERWATCH), "CLNT" (BNET_CLIENT_CLNT), or "D3" (BNET_CLIENT_D3) for World of Warcraft, StarCraft 2, Hearthstone, BNet Application, Heroes of the Storm, Overwatch, another client, or Diablo 3.
 * : String - The name of the logged in realm.
 * : Number - The ID for the logged in realm.
 * : String - The faction name (i.e., "Alliance" or "Horde").
 * : String - The localized race name (e.g., "Blood Elf").
 * : String - The localized class name (e.g., "Death Knight").
 * : String - Seems to return "" even if the player is in a guild.
 * : String - The localized zone name (e.g., "The Undercity").
 * : String - The current level (e.g., "90").
 * : String - For WoW, returns " -  ". For StarCraft 2 and Diablo 3, returns the location or activity the player is currently engaged in.
 * : String - The Battle.Net broadcast message.
 * : Number - The number of seconds elapsed since the current broadcast message was sent.
 * : Boolean - Whether or not this friend can receive a Scroll of Resurrection.
 * : Number - A unique numeric identifier for the friend's character during this session.
 * : Number -
 * : Boolean -
 * : Boolean -

Example
local bnetIDGameAccount = select(6,BNGetFriendInfo(1)) -- assuming friend index 1 is me (Grdn) local _, characterName, _, realmName = BNGetGameAccountInfo(bnetIDGameAccount) print(toonName.." plays on "..realmName)

Result Grdn plays on Onyxia