◢███◤      ◢██◤                            ◢██◤                            
     ◢██◤       ◢██◤                            ◢██◤                             
    ◢██◤       ◢██◤                            ◢██◤                              
   ◢██◤       ◢██◤                            ◢██◤                               
  ◢██◤       ◢██◤                            ◢██◤                                
◢███◤       ◢██◤                            ◢██◤                          ◥██◣   
◥███       ◢█████◣    ◢████████◤ ◢███████◤ ◢██◤ ◢██◤                 ◢██◤   ██◣  
 ███      ◢███████◣        ◢██◤ ◢██◤ ◢██◤ ◢███████◤                 ◢██◤    ███  
 ███     ◢██◤  ◢██◤ ◢████████◤ ◢██◤      ◢█████◣                   ◢██◤     ███  
 ███    ◢██◤  ◢██◤ ◢██◤  ███◤ ◢██◤ ◢██◤ ◢██◤◥███◣                 ◢██◤      ███  
 ◥██   ◢██◤  ◢██◤ ◢████████◤ ◢███████◤ ◢██◤  ◥███◣               ◢██◤       ███◣ 
  ◥██◣                                                          ◢██◤       ◢███◤ 
                                 ◢███◤ ◢███◤ ◢██◤  ◢██◤ ◢█████████◤       ◢██◤   
                                ◢█████████◤ ◢██◤  ◢██◤ ◢██◤  ████◤       ◢██◤    
                               ◢██◤◢█◤◢██◤ ◢██◤  ◢██◤ ◢██◤   ███◤       ◢██◤     
                              ◢██◤   ◢██◤ ◢████████◤ ◢█████████◤       ◢██◤      
                             ◢██◤   ◢██◤ ◢████████◤ ◢█████████◤      ◢███◤       

0005
Macro Reference / Guide
304yws
`FGuide` If I wanted to call a script from a macro, I would type: `1/name = ``0script``1.``2name` For example, if I wanted to make a macro that hardlines for me, I would type: `1/hardline = ``Fkernel``1.``2hardline` and it would turn into `Fkernel``1.``2hardline` If I wanted the macro to pass arguments, I would replace every curly bracket I would put with DOUBLE curly brackets. For example, if I wanted to make a macro that disconnects from hardline for me, I would type: `1/disconnect = ``Fkernel``1.``2hardline``1 {{``Ndc``1 : ``Vtrue``1}}` and that would turn into `Fkernel``1.``2hardline``1 {``Ndc``1 : ``Vtrue``1}` If I wanted to make a macro that let you change arguments, you can put `1{n}` in the place of that argument, but instead of `1n`, you would type which argument you would want. Note, that it counts from 0, so `10` would be the first argument, `11` would be the second, and so on. For example, if I wanted to make a macro that shows one of my upgrades for me, I would type: `1/upg = ``Fsys``1.``2upgrades``1 {{``Ni``1 : ``1{0}``1}}` and if I used it like `1/upg 0` it would turn into `Fsys``1.``2upgrades``1 {``Ni``1 : ``V0``1}` Now let's make a macro that lists all my upgrades. It's easy right? Just use the first example. But what if I wanted to make it show me the `Nfull` upgrades? I could add a `1{0}` for `Nfull`, but I'm too lazy to always type in true or false. Luckily, we can give it a default value. So, if I would type: `1/upg = ``Fsys``1.``2upgrades``1 {{``Nfull``1 : ``1{0=false}}}` and if I used it like `1/upg` it would turn into `Fsys``1.``2upgrades``1 {``Nfull``1 : ``Vfalse``1}` but if I used it like `1/upg true` it would turn into `Fsys``1.``2upgrades``1 {``Nfull``1 : ``Vtrue``1}` What if I wanted to make a macro that chats in 0000 for me? Because of how macros work, if I try to use `1{0}`, it will stop at the first space, and not being able to put spaces in your chats is bad. Instead, you can use `1{$}`. Which essentially means, dump every argument that isn't used elsewhere in a `1{n}` here. So, if I would type: `1/chat = ``Fchats``1.``2send``1 {{``Nchannel``1 : ``V"0000"``1, ``Nmsg``1 : "{$}"}}` and if I used it like `1/chat hello world!` it would turn into `Fchats``1.``2send``1 {``Nchannel``1 : ``V"0000"``1, ``Nmsg``1 : ``V"hello world!"``1}` Let's say that I wrote a cracker. It takes an argument `Nt`, a scriptor, that it cracks. If I wanted to make a macro for it, I would type: `l// replace your.cracker with your actual cracker` `1/crack = ``0your``1.``2cracker``1 {{``Nt``1 : ``V#s.``F{0}``1}}` and if I used it like `l// replace example.loc with an actual loc` `1/crack example.loc` it would turn into `0your``1.``2cracker``1 {``Nt``1 : ``V#s.example.loc``1}` `FCommon Macros` Here are some common macros for the average player. /hl = kernel.hardline /dc = kernel.hardline {{ dc: true }} /bal = accts.balance /upgs = sys.upgrades /upg = sys.upgrades {{ i: {0} }} /xfer = accts.xfer_gc_to {{ to: "{0}", amount: "{1}" }} /xferupg = sys.xfer_upgrade_to {{ to: "{0}", i: {1} }} /load = sys.manage {{ load: {0} }} /unload = sys.manage {{ unload: {0} }} /cull = sys.cull {{ i: [{0}], confirm: true }} `FCaveats` * You can not create a global macro that exists across all of your users. You can modify the macro files of your users in your hackmud directory, but DO NOT SYMLINK the files, because it will crash the hackmud client. * Macros can not be used with `1/auto`.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -