View Single Post
05-04-06, 04:38 AM   #55
tlai
A Murloc Raider
Join Date: Jan 2005
Posts: 4
Originally Posted by Aeneas-KuM
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;
This is in another language right? How would i use this (you saying ITEMUSED and NOTIFY in the same script). Can you give more details please?

When you go down
"Großmeister der Arena",
"Insignien der Allianz",
"Mal der Resolution",
"Talisman von Arathor",
"Barov-Arbeiterrufer",
"Rune der Perfektion"
if the trinket to the first one is back up and its on the 2nd change does it swap back the the first instead of the 3rd one?

If this event doesnt work then i can try another that my guildy is using but i cant get the work for some reason

ITEMRACK_NOTIFY
Delay: 0
if arg1=="Earthstrike" then EquipSet() end

Event 2: This swaps in ES when it's CD is at 30 seconds, ensuring it's ready to use as soon as trinket soon CD is over.


ITEMRACK_ITEMUSED
Delay: 20 seconds

if string.find( GetInventoryItemLink( "player",14 ) or "","Earthstrike") and GetInventoryItemCooldown( "player",14 )>0 and not IsInventoryItemLocked(14) then
EquipSet()
end

So what would be the best way of swapping the trinkets say ZHM, ES, BhB and maelstome so i'll get the best use of the timed trinkets

Thanks
  Reply With Quote