AdvLoot
¶
The AdvLoot TLO grants access to items in the Advanced Loot window.
Members¶
Type | Member | Description |
---|---|---|
itemfilterdata | Filter[ ItemID ] | Inspect the loot filter for a given ItemID. |
bool | LootInProgress | True/False if looting from AdvLoot is in progress |
int | PCount | item count from the Personal list |
advlootitem | PList[ Index ] | Inspect the item at the specified index in the personal loot list. |
int | PWantCount | Want count from the Personal list (AN + AG + ND + GD) |
int | SCount | Item count from the Shared list |
advlootitem | SList[ Index ] | Inspect the item at the specified index in the shared loot list. |
int | SWantCount | Want count from the Shared list (AN + AG + ND + GD) |
Associated DataTypes¶
advlootitem
Type¶
Represents a discrete item being looted in an AdvLoot window.
Type | Member | Description |
---|---|---|
bool | AlwaysGreed | The Always Greed (AG) state of the item. |
bool | AlwaysNeed | The Always Need (AN) state of the item. |
bool | AutoRoll | The Auto Roll state (dice icon) of the item. |
spawn | Corpse | The spawn representing the corpse that is being looted, if available. |
bool | Greed | The Greed (GD) state of the item. |
int | IconID | The ID of the icon for the item. |
int64 | ID | The ID of the item. |
int | Index | The positional index of the item. |
string | Name | The name of the item. |
bool | Need | The Need (ND) state of the item. |
bool | Never | The Never (NV) state of the item. |
bool | No | The No state of the item. |
bool | NoDrop | Indicates if the item is NO DROP. |
int | StackSize | The size of the stack of items being looted. |
string | To String | Same as Name |
itemfilterdata
Type¶
A collection of settings that together describe the loot filter for an item.
Type | Member | Description |
---|---|---|
bool | AutoRoll | The Auto Roll state (dice icon). |
bool | Greed | The Greed (GD) state. |
int | IconID | The ID of the icon. |
int | ID | The ID of the item. |
string | Name | The Name of the item. |
bool | Need | The Need (ND) state. |
bool | Never | The Never (NV) state. |
int | Types | Bit field representing all the loot filter flags for this item. |
string | To String | Same as Name |
Usage Examples¶
| Echo the name of the first item in the personal loot list
/echo ${AdvLoot.PList[1].Name}
| Echo the number of items in the personal loot list.
/echo There are ${AdvLoot.PCount} items in the personal loot list
| Echo the stack size of the first item in the personal loot list.
/echo The item in index 1 has a StackSize of ${AdvLoot.PList[1].StackSize}
| If the first item in the shared loot list is marked as Need, then echo.
/if (${AdvLoot.SList[1].Need}==TRUE) /echo I need that item!
| Echo the NO DROP status of the first item in the personal loot list: TRUE or FALSE.
/echo ${AdvLoot.PList[1].NoDrop}
| Wait 10 seconds, or until AdvLoot is no longer in the process of looting.
/delay 10s !${AdvLoot.LootInProgress}
| Give the first item in the shared loot list to myself.
/if (!${AdvLoot.LootInProgress}) {
/echo Its safe to loot!
/if (${AdvLoot.SCount}>=1) {
/echo I am going to give 1 ${AdvLoot.SList[1].Name} to myself
/advloot shared 1 giveto ${Me.Name} 1
}
} else {
/echo Do something else, loot is already in progress...
}
-- Print the name of the first item in the personal loot list
print(mq.TLO.AdvLoot.PList(1).Name())
-- Print the number of items in the personal loot list
print('There are ', mq.TLO.AdvLoot.PCount(), ' items in the personal loot list')
-- Print the stack size of the first item in the personal loot list.
print('The item in index 1 has a StackSize of ', mq.TLO.AdvLoot.PList(1).StackSize()))
-- If the first item in the shared loot list is marked as Need, then print a message.
if mq.TLO.AdvLoot.SList(1).Need() then
print('I need that item!')
end
-- Print the NO DROP status of the first item in the personal loot list.
print(mq.TLO.AdvLoot.PList(1).NoDrop())
-- Wait 10 seconds, or until AdvLoot is no longer in the process of looting.
mq.delay('10s', function() return not mq.TLO.AdvLoot.LootInProgress() end)
-- Give the first item in the shared loot list to myself.
if not mq.TLO.AdvLoot.LootInProgress() then
print('Its safe to loot!')
if mq.TLO.AdvLoot.SCount() >= 1 then
print('I am going to give 1 ', mq.TLO.AdvLoot.SList(1).Name(), ' to myself')
mq.cmdf('/advloot shared 1 giveto %s 1', mq.TLO.Me.Name())
end
else
print('Do something else, loot is already in progress...')
end