Help me make funny macros...


Bill_Ramey

 

Posted

Specifically:

Is there a way in-game to create a macro which itself uses $$, or do I have to do that by editing files?

The issue is that, if I do:

/macro foo petsay_name Bob Hello $$ petsay_name Jim Hey there.

this actually creates a macro "foo" with the first command, then trying to execute the second command.

Is there an obvious way to "escape" the $$? For that matter, is there an easy way to just put these in a file and load it, so I can use an editor?


 

Posted

Quote:
Originally Posted by seebs View Post
Specifically:

Is there a way in-game to create a macro which itself uses $$, or do I have to do that by editing files?

The issue is that, if I do:

/macro foo petsay_name Bob Hello $$ petsay_name Jim Hey there.

this actually creates a macro "foo" with the first command, then trying to execute the second command.

Is there an obvious way to "escape" the $$? For that matter, is there an easy way to just put these in a file and load it, so I can use an editor?
Use quotation marks.

/macro foo "petsay_name Bob Hello $$ petsay_name Jim Hey there"

I don't know of anyway to load a macro, but you can creat a .txt file with the commands as binds in and load that using /bindloadfile <path>.


 

Posted

Ooh, okay. Hadn't thought of quotes, should have. Thanks.

So I could make a file that bound a bunch of macro definitions to keys, load it, hit the keys, then load over it again with bindings I like better. I mention this because it's pretty hard to do some of the things I want.

On a vaguely related note: Right-click and edit of macros can't seem to handle <> (as in <emote foo>), because it turns them into &lt; so they turn into literal < that are spoken instead of leaving them as < to have their magic effect. Is that a known "feature"?


 

Posted

I just realized, I shouldn't be using macros for this, I should be using popmenu.


 

Posted

Quote:
Originally Posted by seebs View Post
On a vaguely related note: Right-click and edit of macros can't seem to handle <> (as in <emote foo>), because it turns them into &lt; so they turn into literal < that are spoken instead of leaving them as < to have their magic effect. Is that a known "feature"?
From the Wiki:
Quote:
ALERT!!

As of Issue 13, code has been added to prevent players from crashing other players clients through tags that use the greater than and less than signs, <, >.
  • From one of the programmers: The new SMF code converts < and > to &lt; and &gt; (which show as < and > in displayed text but don't get recognised as meaning 'this is a tag' internally in order to stop players from breaking other people's clients with bad tags or whatever. Unfortunately this means the text colouring doesn't work any more. Probably needs a better solution but not a high priority until the start of next year.
Quote:
Originally Posted by seebs View Post
I just realized, I shouldn't be using macros for this, I should be using popmenu.
As I recall <> function correctly in popmenus (not really sure why). Best sources for custom popmenus I know of are here and here.


 

Posted

If you want to load a bind file that will generate macros in your tray upon loading, you need to do this (in your case):

Create a file called macro.txt and put this in it:

Code:
$$macro foo "petsay_name Bob Hello $$ petsay_name Jim Hey there"
Each line in the file can contain a line like this, put the slash command but replace the / with $$.

Then in-game type /bindloadfile "C:\Program Files\City of Heroes\macro.txt" (this assumes you have CoH installed to the default directory and that the file is located in that directory), and the macro "foo" will appear in your tray (along with any others you have added).


"You don't lose levels. You don't have equipment to wear out, repair, or lose, or that anyone can steal from you. About the only thing lighter than debt they could do is have an NPC walk by, point and laugh before you can go to the hospital or base." -Memphis_Bill
We will honor the past, and fight to the last, it will be a good way to die...

 

Posted

I've never quite understood why macros are more useful than binds, being that they take up tray space so there's more to click, and many people still bind their macros to keys. Can't binds do everything a macro can?


 

Posted

Quote:
Originally Posted by runt9 View Post
I've never quite understood why macros are more useful than binds, being that they take up tray space so there's more to click, and many people still bind their macros to keys. Can't binds do everything a macro can?
I like macros in the tray, because I generally can't remember more than a handful of keybinds. It's also nice to be able to edit macros on the fly as well. For example, I have a standard macro I play when meeting the main villain at the end of a mission: "It's over $target. Stand down." But if, for example, the villain is named Ajax, I can edit the macro on the fly to read: "Stand down, Ajax, or we'll scrub the floor with you."


 

Posted

Quote:
Originally Posted by Bill_Ramey View Post
I like macros in the tray, because I generally can't remember more than a handful of keybinds.
That's me as well. Altitis doesn't help.