API:GetAccountData
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns two account flags from the login, which the stock UI reads as "trial account" and "buddied account".
isTrial, isBuddied = GetAccountData()
Arguments
None.
Returns
- isTrial
boolean– First account flag. The stock UI treats it as "this is a trial account".- isBuddied
boolean– Second account flag. The stock UI stores it asbuddiedPlayer.
Details
- The client keeps a 16-bit flag value from the login. The first result is
truewhen its low byte is non-zero, the second when its high byte is non-zero. - The function works in the pregame and in the game. Many stock windows call it to hide or limit features for trial accounts.
Errors
None.
Example
From interfacecore/source/serverselectwindow.lua:
function ServerSelectWindow.RefreshPlayerData()
ServerSelectWindow.trialPlayer, ServerSelectWindow.buddiedPlayer = GetAccountData()
end
From ea_mailwindow/source/mailwindow.lua:
local isTrial, _ = GetAccountData()
