Need Help with Macro - only works for some people?

Hi there,

I have this super neat macro that someone helped me make a while back for using mage food if I have it in bags, and if not, the specified normal food. It’s helpful for my healers who drink 24/7. Below is the macro, which checks every time you press it and works super well.

/run local a,b,n,m,i,f=113509,173859,GetRunningMacro() m=GetMacroBody(n)f=(GetItemCount(a)>0 and a or b)f,,,,,,,,,i=GetItemInfo(f)EditMacro(n,nil,i,strsub(m,1,strfind(m,"%-%-")+1)…"\n/use "…f)–
/use Conjured Mana Bun

the /use Conjured Mana Bun line changes each time you use it to the correct item, either ID 113509 mage food or 173859 Ethereal Pomegranate, always preferring the mage buns.

Our tank swapped back to Kyrian tonight and thought about using it to either phial of serenity (preferred) or spiritual healing potion. I was immediately intrigued and got to modifying it, and came up with the following

/run local a,b,n,m,i,f=177278,171267,GetRunningMacro() m=GetMacroBody(n)f=(GetItemCount(a)>0 and a or b)f,,,,,,,,,i=GetItemInfo(f)EditMacro(n,nil,i,strsub(m,1,strfind(m,"%-%-")+1)…"\n/use "…f)–
/use Spiritual Healing Potion

When I use this, it works flawlessly, and I’m super excited, but neither of the other two kyrians I have testing it have it working despite copying and pasting it.

The only thing I could think of was that I have this other macro which doesn’t get clicked and I don’t know if it’s being called in here or if it’s just junk in my book, but below is the paste
/run local a,b,f,m=“Conjured Mana Bun”,“Ambroria Dew”,“food” m=GetMacroBody(f)EditMacro(GetMacroIndexByName(f),f,1,strsub(GetMacroBody(f),1,strfind(m,")"…")")+1)…"\n/use "…(GetItemCount(a)>0 and a or b))

Can anyone help troubleshoot this and let me know if it’s working for you or not? I think this is a super cool macro for our kyrians to use, and it works well for me, but I’d love to get it working for them (and all you kyrians out there!)

Thanks!

Make sure to wrap your code in code tags, ``` or the </> button, when posting it on the forums or it’ll convert your quotes into smartquotes and do other stuff that makes it impossible for us to test your code as-posted.

That said, macro aside I don’t know that I’d want to use something that combines Phial and health stones/healing potions because Phial does a lot more than simply healing you.