» Contents
» (0) Quickstart
» (1) Introduction
» (2) Installation & setup
» (3) Creating a character & starting to play
» (3.9b) Alternative macros: Calling objects by their name
» (4) The world
» (5) Item and flag details, elements
» (6) Monster details
» (7) Character details
» (8) Tactics & strategy
» (9) Miscellanous

Search
Previous
(3.9a) Creating a chat macro for your party
Next
(3.10) Experience, level-ups and skill points
(3.9b) Alternative macros: Calling objects by their name                        
--------------------------------------------------------
An alternative way to utilize macros is to not rely on item inscriptions, but
instead call the target object directly by its name!

This is actually the default behaviour of the 'Macro Wizard' (invoked by % z
keys) and the recommended way, as it is more flexible, although command-key-
based macros could be seen as more clean (these macros use the @[<KEY>]<NUMBER>
format with the key being optional, also called a 'tag' or tag-based macros).

If your client version is 4.9.1 or older, the name-based macro is also be the
only way that works with subinventories (such as potion belt, or antistatic
wrapping, etc), newer versions can use tag-based macros fine.

The text specified can either be an item name, as it appears in your inventory,
or a spell name if you want your macro to cast a spell. It can be a partial
item name too, including the item's inscription, so it could also be a tag
that is inscribed on an item.
When asked "Aim which wand?", "Read which scroll?", "Cast from which book?" etc
you can also press '@' key to directly type in a name.
Note: In the special case of books, you will then be able to type in
a spell name instead of a book name, and the game will search your books for
that spell automatically.

So, instead of inscribing your potions of Healing '@q1' and having a macro
'\e)q1' you could also just have a macro '\e)q@Healing\r'.

Or you could make a macro '\e)q@@q1\r' which would quaff any potion inscribed
'@q1', treating that inscription as a simple text comparison rather than a tag.

Or, instead of inscribing a Beginner Cantrips book '@m0' and macroing the spell
Manathrust with '\e)*tm@11\r0a-' you could also just make a macro
'\e)*tm@11\r@Manathrust\r-' without the need to inscribe your book.

In fact you could make a macro '\e)*tm@Cast a spell\r@Manathrust\r-'.

Another example: '\e)m@11\r@Phase Door\r'.

IMPORTANT: Keep in mind that call-by-name is actually case-sensitive!
(So in the example above, 'Manathrust' would not work.)

Additional details:
-------------------
The text you provide for matching is treated as a partial text (sub-string)
that must occur anywhere in an inventory slot text. Only those inventory slots
are tested for this, which actually contain an item of fitting base type (tval)
for the action that is being executed.

Example: You make a macro   z@Gold-Pl\r  -this will be processed as follows:
The command is 'z' to zap a rod. So only inventory slots that contain rods will
be looked at, the rest is ignored.
Now all inventory slots that contain rods will be tested for whether they
contain the text piece 'Gold-Pl' somewhere.
So if you carry any Gold-Plated rods in your inventory they will be zapped.

Note that since it's really just all about partial-text-matching, you could
inscribe some other rods 'Gold-Pl' so the text matching would succeed, although
they aren't 'real' Gold-Plated rods. (!)

Note about spell-cast macros regarding spell tiers:
---------------------------------------------------
If you specify a particlar tier, eg "Manathrust II" (tier 2, as denoted by the
roman number II), then the macro will only work if you carry exactly this spell
with you (and have learned it, of course). However, if you do not specify a
spell tier but just the generic name, eg just enter "Manathrust" for the spell
name then the macro will attempt to automatically cast the highest spell tier
currently available (that means it is in your inventory and you have learned it
and so could in theory cast it, provided you have enough MP and are not blinded
or confused etc) to you. So if you carry for example Manathrust I but also
the 2nd tier Manathrust II and your 'Mana' school is trained high enough to
unlock Manathrust II then it will automatically attempt to cast II (and fail
the attempt if you don't have enough MP for it or are blinded etc!).
Previous
(3.9a) Creating a chat macro for your party
Next
(3.10) Experience, level-ups and skill points