» Contents
» (0) Quickstart
» (1) Introduction
» (2) Installation & setup
» (3) Creating a character & starting to play
» (3.9) Macros with special keys
» (4) The world
» (5) Item and flag details, elements
» (6) Monster details
» (7) Character details
» (8) Tactics & strategy
» (9) Miscellanous

(3.8) Example macro sets
(3.9a) Creating a chat macro for your party
(3.9) Macros with special keys                                                  
You can use so-called 'escapes', meaning a combination of '\' and a regular
key to emulate some special keys in your macros:
\\              the backslash itself. Prevents it from being interpreted as
                the beginning of an escape sequence.
\e              equals the 'ESC' key.
\s              equals the 'SPACE' key. You can also just type in regular
                spaces, which will be converted automatically.
\r or \n        RETURN/ENTER or LINEFEED. Makes no difference.
                :hi!\r:hi!\n    makes your character say 'hi!' two times.
)               clears the keyboard buffer (all previous key presses that
                still have to be processed will be forgotten).
^               Prefixed to any key this will lead to a CTRL + <thatkey>
                combination. For example a macro '^q' will exit the game.

:Hi all!\r      This macro writes 'Hi all!' to everyone.
\e)*tf-         This macro will press escape to leave any potential
                running input routine, clear the buffer, fire a shot at
                the closest enemy. You can hammer this macro madly while
                playing without fear of your client processing the key
                presses forever, locking you in a position till your last
                arrow has been shot, since each time you hit the macro,
                it will clear the keyboard buffer (')' symbol) from all
                previous entries.
                The 'running input routine' means:
                If you previously pressed 'q' to quaff a potion, the game
                will now ask you 'Which potion?' and wait for your input.
                If you now see an enemy approaching before you decide which
                potion to quaff, you would usually have to press ESC to leave
                the quaffing input and start firing arrows then. By
                integrating the ESC key into the macro ('\e') this step is
                done automatically.
*I recommend to have all macros start with the '\e)' sequence.*

Miscellanous escape sequences:
\x??            Convert the hex code into an ASCII character. For example
                \x41 (hex 41, dec 65) will become the 65th character of the
                ASCII charset which is a capital 'A'.
\^              The caret '^' or 'accent circonflex'.
\b              stands for the BACKSPACE key.
\t              stands for the TABulator key.
\0?? or \1?? or \2?? or \3??
                stands for an octal code. The code will be converted into an
                ASCII character similar to \x?? hex mode, so \101 becomes 'A'.
\w??            Waits (asynchronously) for ?? tenth seconds. (eg. 20 -> 2 s)
                Use this for macros which contain several commands in a row
                which depend on each others execution. You might have to
                adjust the delay to your personal latency, depending on your
                internet connection and speed at which your character acts.
                NOTE: You must always specify TWO digits. For example if you
                      want to wait for 200 ms, you need to enter "\w02" and
                      NOT "\w2"!
                Setting a too high delay is actually not necessarily bad:
                For the most common use cases, wielding/taking off/swapping
                items or polymorphing yourself, the server will actually send
                an internal confirmation to the client when that action has
                finished processing and the client will then exit the \w delay
                early, so you're not losing any time that way. So if you have
                a network connection that suffers of continuous lag spikes it
                might even be an advantage to crank up the \w times. Actually
                you should just switch your ISP though.
\W????          Similar to \w?? but differs as follows:
                It takes four digits instead of two, allowing for much longer
                delays, and the delays are interruptible manually, in two ways:
                Press ESC to cancel and abort the running macro.
                Press SPACE to cancel the delay and resume the running macro.
(3.8) Example macro sets
(3.9a) Creating a chat macro for your party