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 ➜ Weapon help

Weapon help

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


Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Sat 31 Jan 2004 09:59 PM (UTC)

Amended on Sat 31 Jan 2004 10:00 PM (UTC) by Nick Gammon

Message
Make the keypad keys contains keypad-1, keypad-2, and so on up to keypad-9 or whatever.

Then make 9 aliases, like this:


<aliases>
  <alias
   match="keypad-1"
   enabled="y"
   variable="w1"
   send_to="9"
   sequence="100"
  >
  <send>axe</send>
  </alias>
</aliases>


That will pick up the keypad-1 and send "axe" to "variable w1".

You can copy the above and paste (click the "paste" button) in the aliases list 9 times, and then go back and edit each one to change what it matches on, and what it sets the variable to.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 01 Feb 2004 03:51 AM (UTC)
Message
Make sure that the alias exactly matches what the keypad is sending (no trailing spaces for example) and that aliases are enabled.

- Nick Gammon

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

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #2 on Sun 01 Feb 2004 11:46 AM (UTC)
Message
Which version of MC are you using and do you have scripting enabled?

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 01 Feb 2004 07:46 PM (UTC)
Message
send_to="9" means send to variable.

So, the "send to" combo box should have "variable" in it.

Thus, the alias sends "axe" to "w1".

I tried pasting it, it works OK.

Make sure you put "keypad-1" as the keypad action, and paste the alias into the alias list.

If it doesn't work, in what way does it not work? Can you give the error message or behaviour?

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 01 Feb 2004 09:11 PM (UTC)

Amended on Sun 01 Feb 2004 11:27 PM (UTC) by Nick Gammon

Message
In my alias the "send" line was:

<send>axe</send>

Thus, it should have "axe" in the send box (not "<send>axe</send>"). Did you copy the entire XML code from my first post, or did you copy line-by-line? It is starting to sound like you did.

You should be able to copy from <aliases> to </aliases> as one whole block, and then click the "paste" button in the alias list.

That should set up everything, including the "send to variable" and everything.

(Edited to add emphasis to instructions).

- Nick Gammon

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

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #5 on Sun 01 Feb 2004 11:13 PM (UTC)

Amended on Sun 01 Feb 2004 11:14 PM (UTC) by Meerclar

Message
Think I see the problem.

<alias
<alias stuff here>
>
</alias>

should probably be

<alias>
<alias stuff here>
</alias>


What I suspect is happening (admittedly havent tested this) is the broken alias flag means the alias never actually gets processed so MC has no clue what to do with the "axe" input from the send commands.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #6 on Sun 01 Feb 2004 11:22 PM (UTC)

Amended on Sun 01 Feb 2004 11:26 PM (UTC) by Nick Gammon

Message

No, the problem is that you are not clicking on the "paste" button as I suggested.

Do not start a new alias, and paste the XML code given into the "send" box as you have done. Delete that alias. Now, copy the alias as given above, go to the alias list window and click on the "paste" button, like this:

That will set up the entire alias, checkboxes, where to send to, the lot. It is supposed to be really easy to use.


- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #7 on Mon 02 Feb 2004 01:14 AM (UTC)
Message
Again, you have to do this via an alias.

First set up the macro (F2 or whatever) and in the macro "send" box type "steal_macro".

Then make an alias to pick that up, and expand the variable, like this ...


<aliases>
  <alias
   match="steal_macro"
   enabled="y"
   expand_variables="y"
   sequence="100"
  >
  <send>steal @w1</send>
  </alias>
</aliases>


This will do "steal @w1" and (unlike macros) you can expand variables, so this will work for you.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #8 on Tue 03 Feb 2004 01:29 AM (UTC)
Message
In the "send" box enter both commands by pressing Ctrl+Enter to start a new line.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


18,982 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.