Trending Games | Black Desert | The Witcher 3 | Elder Scrolls Online | ArcheAge Unchained

    Facebook Twitter YouTube YouTube.Gaming Discord
Quick Game Jump
Members:3,911,240 Users Online:0

Show Blog

Link to this blogs RSS feed

Roleplaying Right

I am an avid player of the MUD, Achaea. If you are looking for a roleplay environment, with politics, combat, sailing, and more included, please consider joining Achaea. Seek me out if you have any questions or want help getting started! - Corbeaux

Author: Corbeau-x

Mudlet Basics - setting up a basic target variable and using it!

Posted by Corbeau-x Sunday August 19 2012 at 5:06PM
Login or Register to rate this blog post!
I'm aware that with the general gaming community there is a bit of a point-and-laugh attitude towards the MUDder, or text-gamer. In one episode of The Big Bang Theory, we see Sheldon frantically typing out, get sword, wield sword, swing at goblin over and over. While one can go hardcore, full-manual, this is just not the case for many of us who play the top MUDs of today.

In this article I'll attempt to give basic instruction on the simplest of coding, specifically a targeting and bashing alias directed towards using the Mudlet client to play Achaea, a free download program that is arguably the fastest, most reliable and best supported MUD client around.

First some useful documentation:;a=blob_plain;f=src/mudlet_documentation.html;hb=HEAD

We'll start out with creating a new alias. Needing at first a name, we'll call it Target.

Then we need the 'pattern' this is what you'll type in each time to fire this alias off.

In this case, I use ^t (.+)$

I know, I know, this looks like gobbledygook. But let's break it down, a simple lesson in a bit of regex (Regular Expression.)

The carat ^ - This 'anchors' the pattern, telling the client that the 't (and what follows)' will always come at the beginning of a line.

The t is our alias. So when we want to set a rat as our target, we'd type t rat, or for a goblin, t goblin.

The bit in brackets (.+) is the regex match, in this case it means a single character (signified by the .) and that it has one or more of the preceding element after it. This allows us to capture letters, punctuation, numbers, even whitespace.

Finally finishing the pattern is the $. This serves a lot like the ^ does, anchoring the end of the line. It tells the client not to keep looking and matching. Anchoring your aliases with the carat and dollar sign are simple ways of ensuring your scripting is tidy and ensures that the processing is optimal.

Now, we have our pattern defined. We want it do something when we use it.

target = matches[2]

This line takes whatever was caught by the regex pattern (.+) and assigns it to a variable, in this case, target.

target = string.title(target)

This nifty little line takes whatever we assigned to the variable target, and capitalises the string. Turning t rat, into Rat, or Goblin. Very handy when highlighting your target for PvP

cecho("\nTarget is: " .. target .. ".\n")

This line is my safety check, a coloured echo that tells me when I've changed my target and what I changed it to.

cecho("") denotes that it is to be a coloured echo
The \n inside the brackets tells the MUD to put it on a newline, this keeps things nice and tidy.
is one of the colour options supported by Mudlet, and is another.

.. target .. calls the information from the target variable, to use it in our colour echo. Note that the "s are broken for this.

Now save your alias and open up a new one, we'll use our new hunting target in a very basic bashing alias.

Name the new alias Hunt or something appropriate, then in the pattern simple ^h$

This needs no special qualifiers and will execute everytime you type h alone on a line.

Finally, to tell it what to do,

send("kill "

In Achaea, the coders have instituted a kill command that allows you to use 'kill whatever' and it will make use of your highest strength bashing ability, whether it be the newbie kick, or a monk's lethal combo. If you wanted to do something in particular say perhaps a metamorph's maul it is easily replaced.

send("maul " would accomplish this for you.

And it's as simple as that! If you want to give it a try, why not create a character in one of the free to play MUDs from Iron Realms and join us, kill some rats, take on the goblins, perhaps one day you'll kill Ugrach, Undead Lord of the Underworld.