Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Setting a Target

Setting a Target

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Shozan   (5 posts)  Bio
Date Sun 28 Oct 2007 07:25 PM (UTC)
Message
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
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 28 Oct 2007 08:33 PM (UTC)
Message
See http://mushclient.com/faq point 21 (and point 22 for how to use that in an attack).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shozan   (5 posts)  Bio
Date Reply #2 on Sun 28 Oct 2007 09:09 PM (UTC)
Message
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?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 28 Oct 2007 09:50 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shozan   (5 posts)  Bio
Date Reply #4 on Mon 29 Oct 2007 01:47 AM (UTC)
Message
Nick Gammen you rock, thank you so much
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,340 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.