API:SetGroupLootMode
From RoR Wiki
UI Lua API · Game functions
Version: WAR 1.4.8
Asks the server to change the loot mode of the player's group.
SetGroupLootMode(mode)
Arguments
- mode
number– The new loot mode, counting from 1. In the stock UI this is the index of the selected entry in the loot-mode combo box: 1 = Round Robin, 2 = Free For All, 3 = Master Loot.
Returns
Nothing.
Details
- The client subtracts 1 from
modeand sends it to the server as a group command. It does not check the value or whether the player is the group leader; the server decides. - The current mode is published in
GameData.Player.Group.Settings.lootMode, which also counts from 1. The stock UI compares it withGameData.LootModes.MASTER_LOOT + 1. - The function takes exactly one argument.
Errors
None besides the Invalid Parameters argument check.
Example
The combo box handler in ea_openpartywindow/source/openpartywindowtabmanage.lua:
function EA_Window_OpenPartyManage.OnLootModeSelChange( newMode )
SetGroupLootMode( newMode )
end
