Page 1 of 2

ItemRack help!

PostPosted: Mon Nov 16, 2015 5:01 pm
by mhm
hey,

if anyone can help with this i'd be very appreciative!

itemrack currently queues itemsets (that you've created) when you select them (either by click/keybind) when you're in combat, to automatically equip them for you as soon as you leave combat

does anyone know the script it utilizes to do this? so it can be put into a macro

thanks!

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 6:32 pm
by Geigerkind
Add this at the end of ItemRack.lua

Code: Select all
-- Custom added stuff by Shino <Synced> - Kronos 8/3/15 --
SLASH_IR1 = "/IR"
SLASH_IR2 = "/ir"
SlashCmdList["IR"] = function(msg)
   if (msg) then
      local cmd = string.lower(msg)
      if string.sub(cmd, 1, 10) == "addtoque13" then
         local incombat = UnitAffectingCombat("player")
         if string.len(cmd) > 11 and incombat then
            local itemid1 = string.sub(cmd, 12, 16)
            local itemid2 = string.sub(cmd, 18, 24)
            local _,wornId = Rack.GetItemInfo(13)
            if wornId == itemid1..":0:0" then
               Rack.AddToCombatQueue(13, tonumber(itemid2)..":0:0")
            else
               Rack.AddToCombatQueue(13, tonumber(itemid1)..":0:0")
            end
         end
      elseif string.sub(cmd, 1, 10) == "addtoque14" then
         local incombat = UnitAffectingCombat("player")
         if string.len(cmd) > 11 and incombat then
            local itemid1 = string.sub(cmd, 12, 16)
            local itemid2 = string.sub(cmd, 18, 24)
            local _,wornId = Rack.GetItemInfo(14)
            if wornId == itemid1..":0:0" then
               Rack.AddToCombatQueue(14, tonumber(itemid2)..":0:0")
            else
               Rack.AddToCombatQueue(14, tonumber(itemid1)..":0:0")
            end
         end
      end
   end
end


The macro would be then /ir addtoque13 <ITEMID1> <ITEMID2> or addtoque14 depending on which slot you want to change.

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 7:57 pm
by mhm
hey Shino,

this didn't work, i tried;

/ir addtoque13 19381 (boots of the shadow flame)
/ir addtoque13 bootsswap (name of itemrack set)

please lmk if i'm doing anything wrong!

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 8:10 pm
by Geigerkind
Its just designed for trinkets. Just change the 14 and 13 in the code to other slots. Every Item has an slot number therefore you have to look for your boots.

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 8:13 pm
by mhm
Geigerkind wrote:Its just designed for trinkets. Just change the 14 and 13 in the code to other slots. Every Item has an slot number therefore you have to look for your boots.


tried that with slot 8, boots, didn't work

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 8:26 pm
by Geigerkind
/ir addtoque13 19381 19382

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 8:30 pm
by Geigerkind
Code: Select all
-- Custom added stuff by Shino <Synced> - Kronos 8/3/15 --
SLASH_IR1 = "/IR"
SLASH_IR2 = "/ir"
SlashCmdList["IR"] = function(msg)
   if (msg) then
      local cmd = string.lower(msg)
      if string.sub(cmd, 1, 8) == "addtoque" then
         local incombat = UnitAffectingCombat("player")
         if string.len(cmd) > 11 and incombat then
            local itemid1 = string.sub(cmd, 10, 14)
            local itemid2 = string.sub(cmd, 16, 20)
local slot = tonumber(string.sub(cmd, 22, 28))
            local _,wornId = Rack.GetItemInfo(slot)
            if wornId == itemid1..":0:0" then
               Rack.AddToCombatQueue(slot, tonumber(itemid2)..":0:0")
            else
               Rack.AddToCombatQueue(slot, tonumber(itemid1)..":0:0")
            end
         end
      end
   end
end


Use /ir addtoque 12345 12345 8

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 8:45 pm
by mhm
both /ir addtoque 19381 19381 8
and /ir addtoque 19381 8

don't work :o

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 9:43 pm
by Geigerkind
You cant switch an item with the same item
/ir addtoque FIRSTITEM SECONDITEM 8

Re: ItemRack help!

PostPosted: Mon Nov 16, 2015 10:04 pm
by mhm
Geigerkind wrote:You cant switch an item with the same item
/ir addtoque FIRSTITEM SECONDITEM 8


great, this works fine, tyvm! :D

but, only works for when you're in combat, is there a way to make it so it works ooc too?

& also to swap straight to the item you want rather than having to add in every pair of boots you use + the boots you want to swap to (or any other item for example)