ESODecoded

GetSelectedLFGRole

ESO Lua API function — used by 54 of the 3,030 addons we indexed (combined 28,511,935 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetSelectedLFGRole()

Returns: role

Real usage — from Action Duration Reminder

  -- Level 4: role preferred
  local role = GetSelectedLFGRole()
  if (role == LFG_ROLE_DPS or self.flags.forEnemy) and not self.flags.forArea then

Short excerpt from the shipping addon Action Duration Reminderits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
Action Duration Reminder6,522,011
LibCombat5,017,654
Code's Combat Alerts4,445,158
RaidNotifier Updated2,789,746
Item Set Browser1,893,031
LibCharacterKnowledge1,771,857