Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetActionNameFromId

From RoR Wiki

UI Lua API · Game functions
Version: WAR 1.4.8

Returns the name of a key-bindable action, given its numeric id.

actionName = GetActionNameFromId(actionId)

Arguments

actionId
number – Id of the action, from 0 to 249.

Returns

actionName
string – Name of the action, or an empty string if the id is out of range.

Details

  • The number is converted to an integer. Ids above 249 return "".
  • The result is a plain string, not a wide string.
  • GetActionIdFromName does the reverse lookup.
  • The stock UI never calls this function.

Errors

None.

Example

A minimal example built from the signature ("PET_ATTACK" is an action name used in ea_actionbars/source/actionbutton.lua):

local id = GetActionIdFromName( "PET_ATTACK" )
local name = GetActionNameFromId( id )

See also