Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetGroupAutoLootInRvR

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 · Loot functions
Version: WAR 1.4.8

Asks the server to change the group's "auto loot in RvR" setting.

SetGroupAutoLootInRvR(enabled)

Arguments

enabled
boolean – The new value of the setting.

Returns

Nothing.

Details

  • The client sends the value to the server as a group command. It does not check whether the player is the group leader; the server decides. The stock UI disables the button for players who are not the leader.
  • The stock UI shows the current setting from GameData.Player.Group.Settings.autoLootInRvR, and disables the loot threshold control while it is on.
  • enabled must be a real boolean. Passing nil or a number raises an Invalid Parameters error.
  • Exactly one argument must be passed.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a boolean.

Example

From default/ea_openpartywindow/source/openpartywindowtabmanage.lua:

function EA_Window_OpenPartyManage.ToggleAutoLootRvR()
    if( not ButtonGetDisabledFlag( PARENT_WINDOW.."AutoLootRvRButton" ) )
    then
        local isPressed = ButtonGetPressedFlag( PARENT_WINDOW.."AutoLootRvRButton" )
        SetGroupAutoLootInRvR( not isPressed )
        ButtonSetPressedFlag( PARENT_WINDOW.."AutoLootRvRButton", not isPressed )
    end
end

See also