Setting a Target

Posted by Shozan on Sun 28 Oct 2007 07:25 PM — 5 posts, 20,632 views.

#0
Ok, I can't figure out how to 'set target' I want to type: t rat and then have the target set to rat. I need to do this so I can then hit F1 or F2 and do a combo attack on 'target'. Please help
Australia Forum Administrator #1
See http://mushclient.com/faq point 21 (and point 22 for how to use that in an attack).
#2
thank you. So I copied the alias for the targeting feature. Now I'm unsure of how to use that variable. here is my combo:

I 't rat' to target the rat
I set a macro for the key F2
-stand
-sdk %1
-ucp %1
-ucp %1
so I should stand, then sidekick rat, then uppercut rat twice. but it doesnt' recognize the target, why not?
Australia Forum Administrator #3
The %1 you used is only relevant inside a trigger, where it matches the first wildcard.

You need two extra steps. First, to use the variable "target" which your alias sets up, you need an alias, with "expand variables" checked, like this:


<aliases>
  <alias
   match="F2_macro"
   enabled="y"
   expand_variables="y"
   sequence="100"
  >
  <send>
stand
sdk @target
ucp @target
ucp @target
  </send>
  </alias>
</aliases>


Notice in the above how I use @target where I want to use whatever word is in the target variable.

Next, in the macro configuration screen, call this alias. That is, for F2 send the word "F2_macro". That way, the command interpreter inside MUSHclient intercepts "F2_macro" and then executes the above alias.

You can make similar macro/alias combinations to do other sorts of things on the same target variable.
#4
Nick Gammen you rock, thank you so much