How to make a targeting alias in MUSHclient


Uploaded by Jainh872 on 23.07.2009

Transcript:
I'm going to show today how to make a targeting alias
which lets you target mobs in MUSHclient
and that lets you just type in the name once to target them
and then do other actions such as kicking them, punching them
without having to type their name all the time
like, for example, "minotaur" is a fairly lengthy name to have to type
on every command
to do that I'll go into the Alias configuration
one way of doing that is to go up to here, Aliases, on the world action bar
or I could go to the Game -> Configuration menu, and go down to Aliases
or, what I usually do, is just press Alt + Enter to bring up my World configuration,
find the spot I want, and then I need to add a new alias
Since this is a targeting alias, I'll call it "t"
to keep it short
and now I need to put a space, and an asterisk
the asterisk is a wildcard, which is going to represent the name of the mob
The simplest thing to do is just send that name to a variable
so, %1 is going to be replaced by the mob's name
so that wildcard there (the asterisk)
will become %1
and I'll click on "Send to: Variable"
because I want that to be sent to the variable
and I'll call the variable "target"
so now if I type in "t minotaur" it will send "minotaur" to the "target" variable
I'll close that, and close that, ...
and type in "t minotaur" ...
I'll use tab-completion to save me typing out the whole name
to do that I just typed in "mino" and pressed
"t minotaur" - that has set up the target variable
but ... how do we know for sure?
we don't have any confirmation, so I'll click on the Variables button up here
and have a look down here under Variables
and we see there is a variable set up: target -> minotaur
so that shows that we did, in fact, set the "target" variable up
I'll show in a minute how you can do that as part of changing the target
so that you know, immediately, that it worked.
Now, the next thing we need to do is: kill the minotaur!
To do that, I'll click on the Alias configuration again
and add a new alias
I'll click on the Add button, and then type in "k"
now, "k" is a very easy thing to type, and I'll replace that by:
"kill @target"
It will now substitute "minotaur" for "@target"
providing I go over here and click "Expand Variables"
so we can close that. We now have two aliases on the list
one that kills the current target, and one that sets the current target up.
Close that, and I now type in "k"
and as you can see, it has attacked the minotaur!
I have attacked the minotaur
and I have beaten it! (sounds surprised) ...
The second minotaur has also attacked me ...
And I have defeated him too!
Now, the only problem with this is, we never got any confirmation
... that we changed our target.
So, I'll change the targeting alias ...
to work a bit differently.
I'll select it in the list, and click Edit.
Or, I could have just double-clicked it.
Instead of sending to "Variable" I'll now send to "Script"
This lets me put in script commands
The first command I'll do is SetVariable
Notice the capitalization - that has to be done correctly
or it won't work.
open brackets, quote "target", comma, quote "%1", close brackets
That will set the variable "target" to whatever the current mob's name is
Now to get some visual feedback, I'll now type in:
ColourNote (again, notice the capitalization and spelling)
I think I'll display it in white-on-blue colour
"Target is now: %1"
We will now see writing on the screen saying what the new target is.
And, just to set the status line, which is the little line at the bottom of the window
That will remind us over the next few minutes what our target is
So I'll say: SetStatus ("Target: %1")
That is being sent to Script, so we don't need that variable name there any more
That's not relevant
Say OK, and close that
Now if I say "t minotaur"
We now see "Target is now: minotaur"
And also down on the status line, there.
So that's the important thing.
We can see the target wherever we move around
So if we change rooms, and if all this stuff is scrolled off the screen
we can still see our current target.
So let's see if the minotaur has respawned - yes it has
so I'll type in "k" again and I'm attacking the minotaur again
So that shows how you can set up a targeting alias
and see the confirmation on the screen, both when you type it in
and on the status line, when you change targets
Now, as soon as this fight is over ...
I'll just change to a different room and show how we can
target a different mob.
So, um, change out of that room, and I think we go North ...
There's a naga, so I say "t naga"
Target is now naga, and the status line is updated
Type in "k" again and I'm now fighting the naga.
... and the second naga!
Now, once we've set up a target variable, we can do more than just kill it ...
we could also backstab it, or - um - kick it, or do other things
so to do that I'll go back into Alias configuration
and since I've got "k" for "kill @target" I might make another alias ...
"p" and make that "punch @target"
... and check "Expand Variables" ...
OK. And, maybe I want to do "backstab @target" as well.
Now, to save typing everything in again (not that there was much to type)
I'll copy that alias and paste it
Now I have two aliases "punch target"
Now I can just edit one of them, since they'll both be identical
I might change that to "bs" for backstab
"backstab @target"
We've still got "Expand Variables" checked ...
So, click OK
... and close that.
I'll just save my world file so I haven't lost all my hard work ...
... and I'm done!
That shows how you can set up a targeting alias in MUSHclient
and use the targeting alias to do various actions, like
kicking, backstabbing, punching, and whatever you want to do with it.
Thank you for watching.