So I am trying to create a macro that will equip the Cloak of Coordination and use it (with 2 clicks of the macro) and then equip the previous cloak I had on. I have been trying to adapt a fishing macro I found here (https ://owlmoth. net/ matt/ 330/ world-of-warcraft-nat-pagles-ultimate-fishing-macro/) that works beautifully. Essentially, the fishing macro will equip my fishing pole and start fishing with button 1 and then when I hit button 2 will re-equip what ever weapons/off-hand items I had equipped previously. It also includes some fun emote use. The fishing macro is:
/run m={âyawnâ,âboredâ}f=âFishingâe=C_EquipmentSet g=e.GetEquipmentSetID if IsEquippedItemType(fâŚâ Polesâ)then DoEmote(m[random(9)])else e.CreateEquipmentSet(âxâ)e.SaveEquipmentSet(g(âxâ))e.UseEquipmentSet(g(f))end
/equipset [btn:2] x
/use [btn:1]Fishing
Now, the macro I am trying to get to work so far it:
/run m={âyawnâ,âboredâ}f=âCapitalâe=C_EquipmentSet g=e.GetEquipmentSetID if IsEquippedItem(fâŚâ 65360â)then DoEmote(m[random(9)])else e.CreateEquipmentSet(âyâ)e.SaveEquipmentSet(g(âyâ))e.UseEquipmentSet(g(f))end
/equipset [btn:2] y
/use [btn:1]15
The issue I am running into is that my macro is not assigning the currently equipped cloak to the temporary equipment set. Instead, it assigns the Cloak of Coordination to both equipment sets. Does anyone have any input on how I could make any changes to the macro to do what the fishing macro does so well? Thanks!
/run m={âyawnâ,âboredâ}f='Capitalâe=C_EquipmentSet g=e.GetEquipmentSetID if IsEquippedItem(65360)then DoEmote(m[random(9)])else e.CreateEquipmentSet(âyâ)e.SaveEquipmentSet(g(âyâ))e.UseEquipmentSet(g(f))end
/equipset [btn:2] y
/use [btn:1]15
Essentially first left click equips my Cloak of Coordination, second left click does the âUseâ effect (i.e. teleports to SW), and then by right clicking the macro it re-equips whatever cloak I had on initially.
My next question is, for my Horde toons, the Cloak of Coordination uses item # 65274. Would I have to create a new macro for my Horde toons, or can IsEquippedItem check for multiple items? Meaning could I have the macro look like this:
/run m={âyawnâ,âboredâ}f='Capitalâe=C_EquipmentSet g=e.GetEquipmentSetID if IsEquippedItem(65360,65274)then DoEmote(m[random(9)])else e.CreateEquipmentSet(âyâ)e.SaveEquipmentSet(g(âyâ))e.UseEquipmentSet(g(f))end
/equipset [btn:2] y
/use [btn:1]15
I am still a novice with macros, so I donât really know how I can structure them too well. Does there need to be an âorâ between the numbers of IsEquippedItem?
So I tried you macro and it didnât work, but then when I used my original macro again it also wasnât working for some reason. The fishing one still works, but I canât get the initial part (where it equips the âCapitalâ equipment set) to work anymore for some reason. Did anything change in the coding? Thanks.
Original script was a bit complicated and you had to setup an equipment set just for the hearth/cloak, which would end up with outdated/deleted equipment in it. Also, I didnât want the emotes. This is what I ended up doing, should work with no setup besides the macro:
First Left Click will equip the Cloak of Coordination and save current equipment as a set.
Second Left Click will use the cloak/hearth
Right Click will equip original equipment or interrupt the hearth
/equip [btn:1]Cloak of Coordination
/run e=C_EquipmentSet g=e.GetEquipmentSetID h=IsEquippedItem if (not (h(65274)or h(65360)))then e.CreateEquipmentSet(âyâ)e.SaveEquipmentSet(g(âyâ))end
/equipset [btn:2]y
/use [btn:1]15
@Elvenbane:
The only downside with that is that youâll have to update the macro every time you get a new cloak. With the macro I posted, it should keep working.
Thereâs no way for a macro to know if something is on a cooldown, so youâll have to do separate macros. I actually found a much better one a bit ago that doesnât require equipment sets.
Here are the macros for the three different cloaks:
Cloak of Coordination
/run local c,e,t=65360,GetInventoryItemID("player",15)t=GetItemCooldown(c)>0 if c==e then if COC_PREVEQ and t then EquipItemByName(COC_PREVEQ)COC_PREVEQ=nil end elseif not t then COC_PREVEQ=e and GetItemInfo(e)EquipItemByName(c)end
/use 15
Wrap of Unity
/run local c,e,t=63206,GetInventoryItemID("player",15)t=GetItemCooldown(c)>0 if c==e then if COC_PREVEQ and t then EquipItemByName(COC_PREVEQ)COC_PREVEQ=nil end elseif not t then COC_PREVEQ=e and GetItemInfo(e)EquipItemByName(c)end
/use 15
Shroud of Cooperation
/run local c,e,t=63352,GetInventoryItemID("player",15)t=GetItemCooldown(c)>0 if c==e then if COC_PREVEQ and t then EquipItemByName(COC_PREVEQ)COC_PREVEQ=nil end elseif not t then COC_PREVEQ=e and GetItemInfo(e)EquipItemByName(c)end
/use 15
I highly recommend the addon âOpieâ for stuff like this, I put all my travel stuff in one ring, like hearthstones, teleports, items, wormholes.