Copying Macros


Aggelakis

 

Posted

I have a character (a squid) where I use macros to switch power trays around. Is there an easy way to copy a macro so it appears in multiple trays? Or do I need to create another macro with a different name?


Paragon City Search And Rescue
The Mentor Project

 

Posted

You can have multiple macro buttons with the same name, but I don't know of a way to copy them without running the command to create it again.

Edit:
Forget the quote below. The slash command powexectray can certainly reference any powerslot, even if there is a macro in the slot, but apparently that command can not be used in a macro to reference another macro. It can be used to reference a slot with a power in it though.

I originally tested the slash command to make sure it worked, but once it moved it to an actual macro button, it did nothing. I can see how it could be exploited by chaining multiple macros if it were allowed. Well, it was a good theory until I tested it fully anyway. lol

Not removing original post, just to show that this method does NOT work:

Quote:
However, if you have a long complex macro you want to directly reference from another slot, you might be able to put a macro in the slot that references it by doing this:
/macro NAME "powexectray 9 1"

That macro should simply run the macro that you already have set up in the indicated location, without having to copy the commands again. It should also allow you to edit just the single original macro for changes that will affect all the slots you put that reference into. (note that slot 0 is referenced using the number 10)

For example...
First tray might include:
(9) Dwf "powexec_toggle_on White Dwarf$$goto_tray 8"
(0) Nov "powexec_toggle_on Bright Nova$$goto_tray 9"

Tray 8 could then include:
(9) Nov "powexectray 10 1"
(0) Hum "powexec_toggle_off White Dwarf$$goto_tray 1"

Tray 9 could then include:
(9) Dwf "powexectray 9 1"
(0) Hum "powexec_toggle_off Bright Nova$$powexec_toggle_on Energy Flight$$goto_tray 1"


 

Posted

Quote:
Originally Posted by Master-Blade View Post
Not removing original post, just to show that this method does NOT work:
I just did some more testing. I know, I have too much spare time to waste on stupid stuff like this. lol

It turns out the powexecSLOT command can be used in a macro to reference another macro, so there could be another way to do it:
Using the previous example of the first tray, tray 9 could then include:
(9) Dwf "goto_tray 1$$powexecslot 9 "

That DOES work to switch to tray one, then runs the macro that is in slot 9 which will turn on Dwarf and go immediately to tray 8. HOWEVER, then you run the risk of a bug possibly causing a problem for you in the future (unless it's been fixed). For some people, for reasons unknown, anything after the goto_tray command is sometimes truncated after zoning/relogging, so...

TL;DR:
It might be easier to just create another duplicate macro, but it CAN have the same name if you want.