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

Search
Previous
(3.7) Creating macros for ranged attacks & abilities (spells)
Next
(3.7b) Quick'n'dirty macros
(3.7a) Ability codes                                                            
--------------------
A problem with the 'm' key is that it not only brings up your magic spells
but a menu containing all skills you can use. Those can be arrow fletching
or dodging for example.
Now you would have to rewrite your macros each time you gain another ability,
since entries in 'm' menu might shift if a new skill gets inserted somewhere.
To avoid this, you can directly choose which skill (ie spell-casting) you
want to use in your macros, by specifying the "ability code"!

Here is a list of all available ability codes:
3       Use innate power (for mimicry users)
4       Toggle Fire-till-kill mode, usable by anyone. See (5.2a).
5       Fighting techniques (see (7.12))
6       Shooting techniques (see (7.12))
8       Check your dodge chance (for dodging skill)
9       Check intercept chance (for martial arts or interception skill)
(included in '6' now: 9       Craft ammunition (for archery skill))
10      Set a monster trap (for trapping skill, see (4.7))
11      Cast a magic spell / recite a holy prayer
12      Draw a rune (for runecraft, see '(7.8b) Runes & Runemastery')
13      Change combat stance (for combat stances skill, see (7.2))
14      Check your chances of parrying and blocking (for melee fighters,
        see (7.11) for details about these abilities)
15      Toggle 'Aura of Fear' if you have trained the according skill.
16      Toggle 'Shivering Aura' if you have trained the according skill.
17      Toggle 'Aura of Death' if you have trained the according skill.

After the ability code has been entered you need to press Enter to confirm it.
In a macro, this is done by '\r' (one of the so-called escape sequences).
Example for a macro that directly specifies the ability code to cast the magic
spell "a) Manathrust" from book "a) Beginner Cantrips" on the closest monster:

\e)*tm@11\r2a-

What does that mean?
\e  ->  escape any pending input request, if there is any
        (so we don't have to press ESC before casting the spell in case we're
         currently 'L'ooking around or something)
)   ->  clear the keyboard buffer (removes all pending keypresses that haven't
        been processed yet due to slow character speed, so we become instantly
        ready to perform our Manathrust spell _now_)
*t  ->  choose the closest monster as target
m   ->  invoke an ability
@   ->  specify an ability code directly
11  ->  the code for 'cast a magic spell/recite a holy prayer'
\r  ->  press Enter to confirm
2   ->  cast from book 2 (inscription on the book must be @m2)
a   ->  cast spell "a)" (Manathrust)
-   ->  use previously designated target as direction, if it's still valid,
        otherwise cancel the spell!

(That macro basically does the same as:
*tmb2a-
..assumed that entry 'b)' in the ability menu (invoked by 'm') is
'b) Cast a spell'. Except for escaping and clearing the keyboard buffer.)

An even better way to cast spells is to not rely on book inscriptions, but to
cast spells by name instead. That way you won't have to redo spells when your
books change. See (3.9b) for details, or (3.7c) for the 'macro wizard', which
uses cast-by-name by default for all macros you create in it (yet can also
handle call-by-inscription).
Previous
(3.7) Creating macros for ranged attacks & abilities (spells)
Next
(3.7b) Quick'n'dirty macros