Delta Tao ClanLord
Clan Lord
Try the free demo Buy Clan Lord Member account log in About Clan Lord Getting Started in Clan Lord Related links Clan Lord Screen shots Whats New download Clan Lord [Clan Lord Logo]
Clan Lord Macros

Basic Macro Instructions

A macro is a tool which reduces the amount of work you need to do while playing Clan Lord. Macros are intended to serve as a role-playing aid and make general interaction more interesting. Now we’ll get right to introducing how you use macros.

First, there should be a macro folder in the folder in which ClanLord is located. Inside this folder you should find a file for each of your characters, as well as one called “Default”. If you don’t have these, run ClanLord and join the game. As you join they will be created.

You can learn more about how these files work in the manual. For now all you need to know is that Clan Lord loads the macros in the file named after the character you are playing.

Simple Macros

In Clan Lord a macro has two parts: the “trigger”, which tells Clan Lord when to run the macro, and the “commands”, which tell it what to do. There are two different ways to declare a macro. For the simplest ones you can write everything on one line:

trigger command

For example:

trigger command
"aa" "/action " @text "\r"

This probably looks odd to you, so let’s see what is going on:

The "aa" on the left tells Clan Lord to execute this macro whenever you type aa (no quotes) and hit the Return key in the Clan Lord text window.

Notice that this is in quotation marks. A command which is just a word in quotation marks is typed to the text pane, so "/action " is typed to the text pane.

Now look at the @text. This is a variable that tells Clan Lord to insert the text which you have typed in the input area (without the beginning "aa").

Now what the heck is that "\r"? It is in quotes, so this string is appended after the things we’ve already been through. \r in a macro’s text tells it to act like a return.

You type

>aa jumps over the stream. (Return)

The macro makes things act like you typed:

>/action jumps over the stream. (Return)

So what if there is no \r character on the end? Then after you hit Return the text would be changed, but it would just sit there in your input text. You would have to hit Return again.

Now let’s look at the second most common type of macro trigger, a key macro:

Trigger command

shift-f1 "Help! I've fallen!\r"

First, notice that the shift-f1 isn’t in quotes like the "aa". This macro will be triggered whenever you hold down the Shift key and press the “f1” key. You can string together as many modifier keys as you want separated by hyphens. The last word must be a key, and it can be almost any key (see the manual for special key and modifier key names). The command of this macro is just text like before.

You type:

shift and f1 at the same time

The macro makes things act like you typed:

>Help! I've fallen! (Return)

Commenting Lines

You might want to write things in your text file that you don’t want Clan Lord to interpret as macros. These are called comments, and you begin any line with // to have Clan Lord ignore it.

"eat" "/action joyfully chews on " @text "\r"
// This macro is for eating something. <-- This line is ignored!

More Complex Macros

With the knowledge you now have you can save yourself a lot of typing, but macros also have more powerful features. To use them we must delve a little deeper and master the complex macro form.

  (as many commands as you want, 1 per line)
(they don't have to be indented)

The first two macros can be rewritten in this form also. Notice that they only have one command (which is to send text ):

  "/action " @text "\r"

  "Help! I've fallen!\r"

You’ve probably guessed that there are more commands than just typing text (otherwise, why would we need this beast?) The most important thing to note is that you can only have one command per line. Let’s introduce another command with an example:

  "/action slashes upward with his sword, striking " @text ".\r"
  "/pose bless\r"
  pause 3
  "Take that!\r"
  "/pose stand\r"

As we learned before, text can be a command. You can put as many clauses in quotation marks or variables (we call @text a variable) as you want on one line. All of the lines except the middle one, just tell the macro to act like you typed that text. The middle line is different. Its first word is 'pause' which tells the macro not to type out the contents of the line but to pause instead. It waits on this command until 3 frames have passed (about one second of real time), then continues to the next line. So it looks like this when you are using it.

You type:

slash Beral

The macro makes things act like you typed:

/action slashes upward with his sword, striking Beral. (Return)
/pose bless (Return)

Then it waits for 3 frames before continuing with...

Take that! (Return)
/pose stand (Return)

This is quite a bit more than we typed in! You now know the basics of how to make macros. The manual includes more detailed information, but you can learn a lot by looking at the default and example macro files.