Passing parameters to macros?

I’ve got a little macro I use for mounts on my toolbar. Alt + Pushing the button unmounts no matter what. Shift + the button mounts up the Tundra Mammoth with the repair guy. With no modifiers it just goes to the regular mount.

I’ve got at least a dozen macros saved with the exact same thing but for different main mounts.

Is there a way I could just save that once but tell it what to use by default? Like /Mountmacro Sinrunner Blanchy or /MountMacro Celestial Steed?

Someone may have a more elegant solution with scripting, but here’s an option if you’re willing to sacrifice a button slot. (This assumes that you’re tying to use the same macro for different characters. It won’t really help if you want macros for different mounts on the same character.)

#showtooltip
/dismount [mod:alt]
/cast [mod:shift] Traveler's Tundra Mammoth
/click [nomod] MultiBar7Button1

Then, you put the mount itself on the specified button. (In this case MultiBar7Button1 is the first bar of Action Bar 8. You can use /fstack to see a button’s name.) The bar doesn’t need to be visible for it to work.

The downside is that it doesn’t show the normal mount icon for the macro. Again, someone with scripting knowledge may have a way around that.

You might wanna take a look at LiteMount.
https://www.curseforge.com/wow/addons/litemount

1 Like

Thanks that’s an idea!