hackmud

hackmud

g0at Oct 5, 2016 @ 3:13am
How to create macros
I've seen that you can make macros to stop mistyping commands, but i haven't figured out how to make one. Could anyone help where to find the commands/scripts which create macros.

Thanks in advance ^_^
< >
Showing 1-9 of 9 comments
Skid Oct 5, 2016 @ 3:33am 
/marco = script.loc {args}
The're fixed so you can't include custom args when you call it though, worth remembering.
So "/bal = accts.balance" will display your balance, and "/send = accts.xfer_gc_to {to:"alt",amount:accts.balance}" will send all your money to your alt username.
g0at Oct 5, 2016 @ 3:34am 

Originally posted by Skid:
/marco = script.loc {args}
The're fixed so you can't include custom args when you call it though, worth remembering.
So "/bal = accts.balance" will display your balance, and "/send = accts.xfer_gc_to {to:"alt",amount:accts.balance}" will send all your money to your alt username.
ty ^^
Decker Oct 28, 2016 @ 4:27pm 
great; now how do I pass arguments to a macro?

I did finally find on https://docs.google.com/document/d/1cNms-T_KSFy0F5j1xHXrUZEGd7AM49QEork3KlpGqkc/edit#

"Macros unfortunately cannot themselves have arguments, which limits what you can do with them somewhat"

which isn't on http://wiki.hackmud.info/view/Macros (which is blank, but could have as much information as the above)
Last edited by Decker; Oct 28, 2016 @ 4:56pm
abraxas86 Dec 26, 2016 @ 8:50pm 
So I guess there's no way to create a macro to shorten then chats.send command?
Loveball Jan 10, 2017 @ 10:27am 
You can actually create macros that allow sending to specific chats.
For example, if I wanted a macro to send messages to a room called "test", I could use
/c = {chats.send{channel:"test",msg:{0}}}
To actually use this, you simply type
/c "Message"
Qubic (SolarisJT) Feb 1, 2017 @ 10:25am 
@LoveBall, I tried "/c = {chats.send{channel:"test",msg:{0}}}", but it threw an error. Are you sure that's the correct format for parameters? (P.s. I copy/pasted the exact format you mentioned and *did* include quotes around the parameter when calling it.)
R. U. Pickman Feb 2, 2017 @ 9:07am 
hes trolling
Jolley Oct 18, 2017 @ 8:08pm 
@wardrich @LoveBall
If you get the synatx right, you can create macros with arguments.

/c = chats.send {{ channel:"{0}",msg:{1} }} /c 0000 "This is a test"

Things of note:
1. The argument being passed to chats.send has two curly braces ( '{{' and '}}' ) at the beginning and end of it.
2. the {0} is quoted, the {1} is not.

If you observe these differences from your attempt, you will be successful!
Last edited by Jolley; Oct 18, 2017 @ 8:08pm
SalchiPapa Dec 3, 2017 @ 6:03am 
@Jolley thanks! It works. :D

https://s33.postimg.org/6lq44k9ov/macro.png
Last edited by SalchiPapa; Dec 3, 2017 @ 6:10am
< >
Showing 1-9 of 9 comments
Per page: 1530 50