Returns information about a player's score in battlegrounds.
name, killingBlows, honorableKills, deaths, honorGained, faction, race, class, classToken, damageDone, healingDone, bgRating, ratingChange, preMatchMMR, mmrChange, talentSpec = GetBattlefieldScore(index)
- Number - The characters index in battlegrounds, going from 1 to GetNumBattlefieldScores().
- String - The player's name, with their server name attached if from a different server to the player.
- Number - Number of killing blows.
- Number - Number of honorable kills.
- Number - The number of deaths.
- Number - The amount of honour gained so far (Bonus Honour).
- Number - (Battlegrounds: Horde = 0, Alliance = 1 / Arenas: Green Team = 0, Yellow Team = 1).
- String - The players race (Orc, Undead, Human, etc).
- String - The players class (Mage, Hunter, Warrior, etc).
- String - The player's class name in english given in all capitals (MAGE , HUNTER, WARRIOR, etc)
- Number - The amount of damage done.
- Number - The amount of healing done.
- String - Localized name of player build
How to count the number of players in each faction.
local numScores = GetNumBattlefieldScores() local numHorde = 0 local numAlliance = 0 for i=1, numScores do name, killingBlows, honorableKills, deaths, honorGained, faction = GetBattlefieldScore(i); if ( faction ) then if ( faction == 0 ) then numHorde = numHorde + 1 else numAlliance = numAlliance + 1 end end end