Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetBraggingRight

From RoR Wiki
Revision as of 19:48, 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 · Social functions
Version: WAR 1.4.8

Puts a Tome of Knowledge entry into one of the player's bragging-rights slots, or clears the slot.

SetBraggingRight(slot, entryId)

Arguments

slot
number – Bragging-rights slot, 1–10.
entryId
number – Tome entry id to show in the slot. 0 clears the slot.

Returns

Nothing.

Details

  • The client stores the value in its own list right away (see GetBraggingRights), fires SystemData.Events.SOCIAL_BRAGGING_RIGHTS_UPDATED, and then sends the slot and entry id to the server.
  • Nothing is sent to the server when slot is outside 1–10, or when the connection is not ready.
  • slot is not range-checked before the local store. Passing a slot outside 1–10 writes outside the bragging-rights list in client memory.
  • The function needs at least two arguments and only reads the last two.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

Removing a brag, from default/ea_characterwindow/source/characterwindowbrags.lua:

function CharacterWindow.RemoveBrag()
    local bragIndex = WindowGetId( WindowGetParent( SystemData.ActiveWindow.name ) )

    SetBraggingRight( bragIndex, 0 )
end

Choosing a slot from a context menu, from default/ea_tomeofknowledge/source/tomewindow.lua:

local function OnPickBraggingRight()
    if( entryId )
    then
        SetBraggingRight( index, entryId )
    end
end

See also