Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:PregameGetRealmLimit

From RoR Wiki
Revision as of 19:47, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Pregame functions
Version: WAR 1.4.8

Returns which realms the player may create characters in on the current server.

realmLimit = PregameGetRealmLimit()

Arguments

None.

Returns

realmLimit
number – 1, 2 or 3. The stock UI names 2 REALM_LIMIT_ORDER_ONLY and 3 REALM_LIMIT_DESTRUCTION_ONLY, and does not limit the realm choice for any other value.

Details

  • The client reads the limit from a value it keeps for the account. Any value other than 2 or 3 is returned as 1.
  • While the character select data is not set up yet, the function returns 1.
  • Outside the pregame state the function returns nothing.

Errors

None.

Example

From interfacecore/source/characterselectwindow.lua (the constants are local to that file):

local REALM_LIMIT_ORDER_ONLY = 2
local REALM_LIMIT_DESTRUCTION_ONLY = 3

-- get the realm limitation for the player
local realmLimit = PregameGetRealmLimit( )
if REALM_LIMIT_ORDER_ONLY == realmLimit
then
    -- explain why Destruction cannot be chosen

See also