Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:PQLootItem

From RoR Wiki

UI Lua API · PublicQuest functions
Version: WAR 1.4.8

Sends the player's choice from a public quest reward bag to the server and closes the client's loot list.

PQLootItem(choiceIndex)

Arguments

choiceIndex
number – Index of the chosen item in the bag's loot list, starting at 1. Only the low 8 bits are used.

Returns

Nothing.

Details

  • Let n be the number of items in the client's current loot list:
    • For choiceIndex 1 to n a loot request for that item is sent.
    • For choiceIndex n+1 a loot request is sent with the value 255 instead of an item.
    • For any other value nothing is sent.
  • In every case the client then clears its loot list, so a second call does nothing until the server sends a new list.
  • The function takes exactly one argument.

Errors

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

Example

From default/ea_lootwindow/source/chooseonelootwindow.lua:

if(EA_Window_ChooseOneLoot.lootType == EA_Window_ChooseOneLoot.LOOT_TYPE_PQR_MYSTERY_BAG)
then
    PQLootItem( EA_Window_ChooseOneLoot.currentlySelectedChoice )
elseif(EA_Window_ChooseOneLoot.lootType == EA_Window_ChooseOneLoot.LOOT_TYPE_ITEM_CONTAINER)
then
    ItemContainerLootItem( EA_Window_ChooseOneLoot.currentlySelectedChoice )
end

See also