use_trinkets
The use_trinkets function uses the player's trinkets if they are usable and off cooldown. This function is useful for automating the use of trinkets during combat.
Parameters
slot(number, optional): The inventory slot of the trinket to use. Valid values are 13 (top trinket) and 14 (bottom trinket). If not specified, both trinkets will be checked and used if available.
Example Usage in Lua
Here is an example of how to use the use_trinkets function in Lua:
local api = ...
-- Function to use the player's trinkets
function UseTrinkets(slot)
api.use_trinkets(slot)
print("Trinket in slot " .. (slot or "13 and 14") .. " used if available.")
end
-- Example usage: Use the top trinket (slot 13)
UseTrinkets(13)
-- Example usage: Use the bottom trinket (slot 14)
UseTrinkets(14)
-- Example usage: Use both trinkets if available
UseTrinkets()