I want to make a macro to equip 1 of my daggers to my offhand slot and another dagger to main hand slot, can anyone show this macro if it exists?
What you ask for is possible, but it is one of those things that is more complex than it would seem. (I can't test anything so the following may not work as is)
To equip/unequip an item to/from a specific inventory slot, you need to use the
EquipItem function. This requires an inventory slot number and if equipping, also needs a bag slot index for the item you want to equip. To get the bag slot index, you will need to use the
GetBagItemInfo function. This function will also be used to search through your bags to find the correct item as well. To search through all your bags, you will need to use a third function called
GetBagCount since the number of slots you have may change if you rent bag space.
So knowing all this, the following should do the trick (if it isn't too long for a single macro)
|
Source code
|
1
2
3
|
/run EquipItem(16) EquipItem(17) mh,offh = nil,nil
/run _,_,ts=GetBagCount() for i=1,ts do ii,_,n=GetBagItemInfo(i) if n=="offhand" then offh=ii elseif n=="mainhand" then mh = ii end end
/run EquipItem(16, mh) EquipItem(17, offh)
|
The above should work, replace
offhand with the name of the offhand weapon you want and replace
mainhand with the name of the weapon for your mainhand. Names are case sensitive.
As the macro is fairly long, you don't have much room to put long item names in there.
The whole thing would work better as a custom slash command though.