In ITEMUSED and NOTIFY I have the same script. It rotates the trinkets upon priority and if the CD is over.
Code:
local trinketslot, _ = GetInventorySlotInfo("Trinket1Slot");
local trinkets = {
"Großmeister der Arena",
"Insignien der Allianz",
"Mal der Resolution",
"Talisman von Arathor",
"Barov-Arbeiterrufer",
"Rune der Perfektion"
};
for _, t in ipairs(trinkets) do
local inv,bag,slot = Rack.FindItem(nil, t);
local s, d, e;
local ignore=false;
if inv == trinketslot then
s, d, e = GetInventoryItemCooldown("player", inv);
elseif bag and slot then
s, d, e = GetContainerItemCooldown(bag,slot);
else
ignore=true;
end
if ( not ignore and (s + d <= 30 )) then
if not inv and bag and slot then
if UnitAffectingCombat("player") or Rack.IsPlayerReallyDead() then
local _,itemID = Rack.GetItemInfo(bag, slot)
Rack.AddToCombatQueue(trinketslot ,itemID)
else
PickupContainerItem(bag,slot);
PickupInventoryItem(trinketslot);
end;
end;
break;
end;
end;