Rems 0 Report post Posted December 12, 2016 Is there any addon or macro that can swap my weapon at x amount of mana? 0 Share this post Link to post Share on other sites
Shino 27 Report post Posted December 13, 2016 (edited) I think it is not possible to put such functions in some kind of OnUpdate function. However you could bind this to pretty much every button. The macro should check the weapon and mana: Depending on that, switch or don't switch the weapon. What you need is: UnitMana("player") => Your mana (current) UnitManaMax("player") => Your max mana local _,texture = GetInventorySlotInfo("MainHandSlot") => Lookup the texture string strfind(str1, str2) => To just fuzzy check cause only 255 chars, UseContainerItem(bagid, slotid, onself) => Where your weapon is located So now we should have everything: local p,u,z,s,_,t="player",UnitMana,UnitManaMax,strfind,GetInventorySlotInfo("MainHandSlot"); if ((u(p)/z(p))<50) and s(t,"textureNamePart")) or ((u(p)/z(p))>50) and s(t,"textureNamePartOther")) then UseContainerItem(0,1,1); end Maybe you can shorten it a little bit more with some neat tricks. Also I didn't test it, so just test it and fix the issues. cheers! Edit: Supermacro or putting such macros into an own macro addon can also help! Edited December 13, 2016 by Shino 0 Share this post Link to post Share on other sites